sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_build_object) function_name_build_object (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj )parameters (block (if_statement (not_operator (attribute (identifier_obj) identifier_obj (identifier_exclude_from_static) identifier_exclude_from_static )attribute )not_operator (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ShowPage) identifier_ShowPage (identifier_self) identifier_self )argument_list )call (identifier_build_object) identifier_build_object )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Override django-bakery to skip pages marked exclude_from_static
(module (function_definition (function_name_backup) function_name_backup (parameters (identifier_file_name) identifier_file_name (default_parameter (identifier_jail) identifier_jail (None) None )default_parameter (default_parameter (identifier_chroot) identifier_chroot (None) None )default_parameter (default_parameter (identifier_root) identifier_root (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (binary_operator (call (identifier__pkg) identifier__pkg (argument_list (identifier_jail) identifier_jail (identifier_chroot) identifier_chroot (identifier_root) identifier_root )argument_list )call (list (string_'backup') string_'backup' (string_'-d') string_'-d' (identifier_file_name) identifier_file_name )list )binary_operator (keyword_argument (identifier_output_loglevel) identifier_output_loglevel (string_'trace') string_'trace' )keyword_argument (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (subscript (call (attribute (identifier_ret) identifier_ret (identifier_split) identifier_split )attribute (argument_list (string_'...') string_'...' )argument_list )call (integer_1) integer_1 )subscript )return_statement )block )function_definition )module
Export installed packages into yaml+mtree file CLI Example: .. code-block:: bash salt '*' pkg.backup /tmp/pkg jail Backup packages from the specified jail. Note that this will run the command within the jail, and so the path to the backup file will be relative to the root of the jail CLI Example: .. code-block:: bash salt '*' pkg.backup /tmp/pkg jail=<jail name or id> chroot Backup packages from the specified chroot (ignored if ``jail`` is specified). Note that this will run the command within the chroot, and so the path to the backup file will be relative to the root of the chroot. root Backup packages from the specified root (ignored if ``jail`` is specified). Note that this will run the command within the root, and so the path to the backup file will be relative to the root of the root. CLI Example: .. code-block:: bash salt '*' pkg.backup /tmp/pkg chroot=/path/to/chroot
(module (function_definition (function_name_verify_existence_and_get) function_name_verify_existence_and_get (parameters (identifier_id) identifier_id (identifier_table) identifier_table (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_get_id) identifier_get_id (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_where_clause) identifier_where_clause (comparison_operator (attribute (attribute (identifier_table) identifier_table (identifier_c) identifier_c )attribute (identifier_id) identifier_id )attribute (identifier_id) identifier_id )comparison_operator )assignment )expression_statement (if_statement (identifier_name) identifier_name (block (expression_statement (assignment (identifier_where_clause) identifier_where_clause (comparison_operator (attribute (attribute (identifier_table) identifier_table (identifier_c) identifier_c )attribute (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'state') string_'state' (attribute (identifier_table) identifier_table (identifier_columns) identifier_columns )attribute )comparison_operator (block (expression_statement (assignment (identifier_where_clause) identifier_where_clause (call (attribute (identifier_sql) identifier_sql (identifier_and_) identifier_and_ )attribute (argument_list (comparison_operator (attribute (attribute (identifier_table) identifier_table (identifier_c) identifier_c )attribute (identifier_state) identifier_state )attribute (string_'archived') string_'archived' )comparison_operator (identifier_where_clause) identifier_where_clause )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (call (attribute (identifier_sql) identifier_sql (identifier_select) identifier_select )attribute (argument_list (list (identifier_table) identifier_table )list )argument_list )call (identifier_where) identifier_where )attribute (argument_list (identifier_where_clause) identifier_where_clause )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (call (attribute (attribute (attribute (identifier_flask) identifier_flask (identifier_g) identifier_g )attribute (identifier_db_conn) identifier_db_conn )attribute (identifier_execute) identifier_execute )attribute (argument_list (identifier_query) identifier_query )argument_list )call (identifier_fetchone) identifier_fetchone )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_result) identifier_result (None) None )comparison_operator (block (raise_statement (call (attribute (identifier_dci_exc) identifier_dci_exc (identifier_DCIException) identifier_DCIException )attribute (argument_list (binary_operator (string_'Resource "%s" not found.') string_'Resource "%s" not found.' (identifier_id) identifier_id )binary_operator (keyword_argument (identifier_status_code) identifier_status_code (integer_404) integer_404 )keyword_argument )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_get_id) identifier_get_id (block (return_statement (attribute (identifier_result) identifier_result (identifier_id) identifier_id )attribute )return_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Verify the existence of a resource in the database and then return it if it exists, according to the condition, or raise an exception. :param id: id of the resource :param table: the table object :param name: the name of the row to look for :param get_id: if True, return only the ID :return:
(module (function_definition (function_name_get_info) function_name_get_info (parameters (identifier_node_id) identifier_node_id (identifier_info_id) identifier_info_id )parameters (block (expression_statement (assignment (identifier_exp) identifier_exp (call (identifier_experiment) identifier_experiment (argument_list (identifier_session) identifier_session )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_node) identifier_node (call (attribute (attribute (attribute (identifier_models) identifier_models (identifier_Node) identifier_Node )attribute (identifier_query) identifier_query )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_node_id) identifier_node_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_node) identifier_node (None) None )comparison_operator (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (keyword_argument (identifier_error_type) identifier_error_type (string_"/info, node does not exist") string_"/info, node does not exist" )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_info) identifier_info (call (attribute (attribute (attribute (identifier_models) identifier_models (identifier_Info) identifier_Info )attribute (identifier_query) identifier_query )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_info_id) identifier_info_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_info) identifier_info (None) None )comparison_operator (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (keyword_argument (identifier_error_type) identifier_error_type (string_"/info GET, info does not exist") string_"/info GET, info does not exist" )keyword_argument (keyword_argument (identifier_participant) identifier_participant (attribute (identifier_node) identifier_node (identifier_participant) identifier_participant )attribute )keyword_argument )argument_list )call )return_statement )block (elif_clause (parenthesized_expression (boolean_operator (comparison_operator (attribute (identifier_info) identifier_info (identifier_origin_id) identifier_origin_id )attribute (attribute (identifier_node) identifier_node (identifier_id) identifier_id )attribute )comparison_operator (comparison_operator (attribute (identifier_info) identifier_info (identifier_id) identifier_id )attribute (list_comprehension (attribute (identifier_t) identifier_t (identifier_info_id) identifier_info_id )attribute (for_in_clause (identifier_t) identifier_t (call (attribute (identifier_node) identifier_node (identifier_transmissions) identifier_transmissions )attribute (argument_list (keyword_argument (identifier_direction) identifier_direction (string_"incoming") string_"incoming" )keyword_argument (keyword_argument (identifier_status) identifier_status (string_"received") string_"received" )keyword_argument )argument_list )call )for_in_clause )list_comprehension )comparison_operator )boolean_operator )parenthesized_expression (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (keyword_argument (identifier_error_type) identifier_error_type (string_"/info GET, forbidden info") string_"/info GET, forbidden info" )keyword_argument (keyword_argument (identifier_status) identifier_status (integer_403) integer_403 )keyword_argument (keyword_argument (identifier_participant) identifier_participant (attribute (identifier_node) identifier_node (identifier_participant) identifier_participant )attribute )keyword_argument )argument_list )call )return_statement )block )elif_clause )if_statement (try_statement (block (expression_statement (call (attribute (identifier_exp) identifier_exp (identifier_info_get_request) identifier_info_get_request )attribute (argument_list (keyword_argument (identifier_node) identifier_node (identifier_node) identifier_node )keyword_argument (keyword_argument (identifier_infos) identifier_infos (identifier_info) identifier_info )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (keyword_argument (identifier_error_type) identifier_error_type (string_"/info GET server error") string_"/info GET server error" )keyword_argument (keyword_argument (identifier_status) identifier_status (integer_403) integer_403 )keyword_argument (keyword_argument (identifier_participant) identifier_participant (attribute (identifier_node) identifier_node (identifier_participant) identifier_participant )attribute )keyword_argument )argument_list )call )return_statement )block )except_clause )try_statement (return_statement (call (identifier_success_response) identifier_success_response (argument_list (keyword_argument (identifier_field) identifier_field (string_"info") string_"info" )keyword_argument (keyword_argument (identifier_data) identifier_data (call (attribute (identifier_info) identifier_info (identifier___json__) identifier___json__ )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_request_type) identifier_request_type (string_"info get") string_"info get" )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get a specific info. Both the node and info id must be specified in the url.
(module (function_definition (function_name_save_model) function_name_save_model (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_obj) identifier_obj (identifier_form) identifier_form (identifier_change) identifier_change )parameters (block (if_statement (comparison_operator (string_'config.menu_structure') string_'config.menu_structure' (attribute (identifier_form) identifier_form (identifier_changed_data) identifier_changed_data )attribute )comparison_operator (block (import_from_statement (dotted_name (identifier_menus) identifier_menus (identifier_menu_pool) identifier_menu_pool )dotted_name (dotted_name (identifier_menu_pool) identifier_menu_pool )dotted_name )import_from_statement (expression_statement (call (attribute (identifier_menu_pool) identifier_menu_pool (identifier_clear) identifier_clear )attribute (argument_list (keyword_argument (identifier_all) identifier_all (True) True )keyword_argument )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_BlogConfigAdmin) identifier_BlogConfigAdmin (identifier_self) identifier_self )argument_list )call (identifier_save_model) identifier_save_model )attribute (argument_list (identifier_request) identifier_request (identifier_obj) identifier_obj (identifier_form) identifier_form (identifier_change) identifier_change )argument_list )call )return_statement )block )function_definition )module
Clear menu cache when changing menu structure
(module (function_definition (function_name_validate_file) function_name_validate_file (parameters (identifier_parser) identifier_parser (identifier_arg) identifier_arg )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_arg) identifier_arg )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"%s is not a file.") string_"%s is not a file." (identifier_arg) identifier_arg )binary_operator )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_arg) identifier_arg )return_statement )block )function_definition )module
Validates that `arg` is a valid file.
(module (function_definition (function_name_smallest) function_name_smallest (parameters (identifier_heap) identifier_heap (identifier_predicate) identifier_predicate )parameters (block (expression_statement (assignment (identifier_n) identifier_n (call (attribute (identifier_heap) identifier_heap (identifier_size) identifier_size )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_items) identifier_items (call (identifier_deque) identifier_deque (argument_list (list (integer_0) integer_0 )list )argument_list )call )assignment )expression_statement (while_statement (identifier_items) identifier_items (block (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_items) identifier_items (identifier_popleft) identifier_popleft )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_current) identifier_current (identifier_n) identifier_n )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (call (identifier_predicate) identifier_predicate (argument_list (call (attribute (identifier_heap) identifier_heap (identifier_peek) identifier_peek )attribute (argument_list (identifier_current) identifier_current )argument_list )call )argument_list )call (block (return_statement (identifier_current) identifier_current )return_statement )block )if_statement (expression_statement (assignment (identifier_child1) identifier_child1 (binary_operator (binary_operator (integer_2) integer_2 (identifier_current) identifier_current )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_child2) identifier_child2 (binary_operator (identifier_child1) identifier_child1 (integer_1) integer_1 )binary_operator )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (comparison_operator (identifier_child1) identifier_child1 (identifier_n) identifier_n )comparison_operator (comparison_operator (identifier_child2) identifier_child2 (identifier_n) identifier_n )comparison_operator )boolean_operator (call (attribute (identifier_heap) identifier_heap (identifier_lt) identifier_lt )attribute (argument_list (identifier_child2) identifier_child2 (identifier_child1) identifier_child1 )argument_list )call )boolean_operator (block (expression_statement (assignment (pattern_list (identifier_child1) identifier_child1 (identifier_child2) identifier_child2 )pattern_list (expression_list (identifier_child2) identifier_child2 (identifier_child1) identifier_child1 )expression_list )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_child1) identifier_child1 (identifier_n) identifier_n )comparison_operator (block (expression_statement (call (attribute (identifier_items) identifier_items (identifier_append) identifier_append )attribute (argument_list (identifier_child1) identifier_child1 )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_child2) identifier_child2 (identifier_n) identifier_n )comparison_operator (block (expression_statement (call (attribute (identifier_items) identifier_items (identifier_append) identifier_append )attribute (argument_list (identifier_child2) identifier_child2 )argument_list )call )expression_statement )block )if_statement )block )while_statement (raise_statement (call (identifier_NoMatchError) identifier_NoMatchError (argument_list )argument_list )call )raise_statement )block )function_definition )module
Finds the index of the smallest item in the heap that matches the given predicate. :param heap: Heap on which this search is being performed. :param predicate: Function that accepts an item from the heap and returns true or false. :returns: Index of the first item for which ``predicate`` returned true. :raises NoMatchError: If no matching items were found.
(module (function_definition (function_name_view_atype) function_name_view_atype (parameters (identifier_self) identifier_self (identifier_atype) identifier_atype )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_cur_prj) identifier_cur_prj )attribute )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Viewing atype %s') string_'Viewing atype %s' (attribute (identifier_atype) identifier_atype (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cur_atype) identifier_cur_atype )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_pages_tabw) identifier_pages_tabw )attribute (identifier_setCurrentIndex) identifier_setCurrentIndex )attribute (argument_list (integer_4) integer_4 )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_atype_name_le) identifier_atype_name_le )attribute (identifier_setText) identifier_setText )attribute (argument_list (attribute (identifier_atype) identifier_atype (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_atype_desc_pte) identifier_atype_desc_pte )attribute (identifier_setPlainText) identifier_setPlainText )attribute (argument_list (attribute (identifier_atype) identifier_atype (identifier_description) identifier_description )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_assetrootdata) identifier_assetrootdata (call (attribute (identifier_treemodel) identifier_treemodel (identifier_ListItemData) identifier_ListItemData )attribute (argument_list (list (string_'Name') string_'Name' (string_'Description') string_'Description' )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_assetrootitem) identifier_assetrootitem (call (attribute (identifier_treemodel) identifier_treemodel (identifier_TreeItem) identifier_TreeItem )attribute (argument_list (identifier_assetrootdata) identifier_assetrootdata )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_atype_asset_model) identifier_atype_asset_model )attribute (call (attribute (identifier_treemodel) identifier_treemodel (identifier_TreeModel) identifier_TreeModel )attribute (argument_list (identifier_assetrootitem) identifier_assetrootitem )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_atype_asset_treev) identifier_atype_asset_treev )attribute (identifier_setModel) identifier_setModel )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_atype_asset_model) identifier_atype_asset_model )attribute )argument_list )call )expression_statement (for_statement (identifier_a) identifier_a (call (attribute (attribute (identifier_djadapter) identifier_djadapter (identifier_assets) identifier_assets )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_project) identifier_project (attribute (identifier_self) identifier_self (identifier_cur_prj) identifier_cur_prj )attribute )keyword_argument (keyword_argument (identifier_atype) identifier_atype (identifier_atype) identifier_atype )keyword_argument )argument_list )call (block (expression_statement (assignment (identifier_assetdata) identifier_assetdata (call (attribute (identifier_djitemdata) identifier_djitemdata (identifier_AssetItemData) identifier_AssetItemData )attribute (argument_list (identifier_a) identifier_a )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_treemodel) identifier_treemodel (identifier_TreeItem) identifier_TreeItem )attribute (argument_list (identifier_assetdata) identifier_assetdata (identifier_assetrootitem) identifier_assetrootitem )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cur_atype) identifier_cur_atype )attribute (identifier_atype) identifier_atype )assignment )expression_statement )block )function_definition )module
View the given atype on the atype page :param atype: the atype to view :type atype: :class:`jukeboxcore.djadapter.models.Atype` :returns: None :rtype: None :raises: None
(module (function_definition (function_name_from_json) function_name_from_json (parameters (identifier_cls) identifier_cls (identifier_json_doc) identifier_json_doc )parameters (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_json_doc) identifier_json_doc )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_token) identifier_token (call (identifier_cls) identifier_cls (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_token) identifier_token (identifier___dict__) identifier___dict__ )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_d) identifier_d )argument_list )call )expression_statement (return_statement (identifier_token) identifier_token )return_statement )block )function_definition )module
Create and return a new Session Token based on the contents of a JSON document. :type json_doc: str :param json_doc: A string containing a JSON document with a previously saved Credentials object.
(module (function_definition (function_name_rst_filename_rel_autodoc_index) function_name_rst_filename_rel_autodoc_index (parameters (identifier_self) identifier_self (typed_parameter (identifier_index_filename) identifier_index_filename (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_index_dir) identifier_index_dir (call (identifier_dirname) identifier_dirname (argument_list (call (identifier_abspath) identifier_abspath (argument_list (call (identifier_expanduser) identifier_expanduser (argument_list (identifier_index_filename) identifier_index_filename )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (identifier_relpath) identifier_relpath (argument_list (attribute (identifier_self) identifier_self (identifier_target_rst_filename) identifier_target_rst_filename )attribute (keyword_argument (identifier_start) identifier_start (identifier_index_dir) identifier_index_dir )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns the filename of the target RST file, relative to a specified index file. Used to make the index refer to the RST.
(module (function_definition (function_name__print_results) function_name__print_results (parameters (identifier_filename) identifier_filename (identifier_data) identifier_data )parameters (block (if_statement (identifier_filename) identifier_filename (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'wb') string_'wb' )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 (identifier_data) identifier_data )argument_list )call )expression_statement )block )with_statement )block (else_clause (block (print_statement (identifier_data) identifier_data )print_statement )block )else_clause )if_statement )block )function_definition )module
Print data to a file or STDOUT. Args: filename (str or None): If None, print to STDOUT; otherwise, print to the file with this name. data (str): Data to print.
(module (function_definition (function_name_remove_padding) function_name_remove_padding (parameters (identifier_sequence) identifier_sequence )parameters (block (expression_statement (assignment (identifier_length) identifier_length (call (attribute (identifier_sequence) identifier_sequence (identifier_pop) identifier_pop )attribute (argument_list (string_'length') string_'length' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sequence) identifier_sequence (call (attribute (attribute (identifier_tools) identifier_tools (identifier_nested) identifier_nested )attribute (identifier_map) identifier_map )attribute (argument_list (lambda (lambda_parameters (identifier_tensor) identifier_tensor )lambda_parameters (subscript (identifier_tensor) identifier_tensor (slice (colon) colon (identifier_length) identifier_length )slice )subscript )lambda (identifier_sequence) identifier_sequence )argument_list )call )assignment )expression_statement (return_statement (identifier_sequence) identifier_sequence )return_statement )block )function_definition )module
Selects the used frames of a sequence, up to its length. This function does not expect a batch of sequences, but a single sequence. The sequence must be a dict with `length` key, which will removed from the result. Args: sequence: Nested dict of tensors with time dimension. Returns: Nested dict of tensors with padding elements and `length` key removed.
(module (function_definition (function_name_list_lb_nat_rules) function_name_list_lb_nat_rules (parameters (identifier_access_token) identifier_access_token (identifier_subscription_id) identifier_subscription_id (identifier_resource_group) identifier_resource_group (identifier_lb_name) identifier_lb_name )parameters (block (expression_statement (assignment (identifier_endpoint) identifier_endpoint (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (list (call (identifier_get_rm_endpoint) identifier_get_rm_endpoint (argument_list )argument_list )call (string_'/subscriptions/') string_'/subscriptions/' (identifier_subscription_id) identifier_subscription_id (string_'/resourceGroups/') string_'/resourceGroups/' (identifier_resource_group) identifier_resource_group (string_'/providers/Microsoft.Network/loadBalancers/') string_'/providers/Microsoft.Network/loadBalancers/' (identifier_lb_name) identifier_lb_name (string_'inboundNatRules?api-version=') string_'inboundNatRules?api-version=' (identifier_NETWORK_API) identifier_NETWORK_API )list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_do_get) identifier_do_get (argument_list (identifier_endpoint) identifier_endpoint (identifier_access_token) identifier_access_token )argument_list )call )return_statement )block )function_definition )module
List the inbound NAT rules for a load balancer. Args: access_token (str): A valid Azure authentication token. subscription_id (str): Azure subscription id. resource_group (str): Azure resource group name. lb_name (str): Name of the load balancer. Returns: HTTP response. JSON body of load balancer NAT rules.
(module (function_definition (function_name_parse_content) function_name_parse_content (parameters (identifier_self) identifier_self (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_usage_re_str) identifier_usage_re_str )attribute (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_usage_name) identifier_usage_name )attribute )argument_list )call (identifier_text) identifier_text (keyword_argument (identifier_flags) identifier_flags (parenthesized_expression (conditional_expression (attribute (identifier_re) identifier_re (identifier_DOTALL) identifier_DOTALL )attribute (attribute (identifier_self) identifier_self (identifier_case_sensitive) identifier_case_sensitive )attribute (parenthesized_expression (binary_operator (attribute (identifier_re) identifier_re (identifier_DOTALL) identifier_DOTALL )attribute (attribute (identifier_re) identifier_re (identifier_IGNORECASE) identifier_IGNORECASE )attribute )binary_operator )parenthesized_expression )conditional_expression )parenthesized_expression )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_match) identifier_match (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_dic) identifier_dic (call (attribute (identifier_match) identifier_match (identifier_groupdict) identifier_groupdict )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (identifier_dic) identifier_dic )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_raw_content) identifier_raw_content )attribute (subscript (identifier_dic) identifier_dic (string_'raw') string_'raw' )subscript )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_dic) identifier_dic (string_'sep') string_'sep' )subscript (tuple (string_'\n') string_'\n' (string_'\r\n') string_'\r\n' )tuple )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_formal_content) identifier_formal_content )attribute (subscript (identifier_dic) identifier_dic (string_'section') string_'section' )subscript )assignment )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_reallen) identifier_reallen (call (identifier_len) identifier_len (argument_list (subscript (identifier_dic) identifier_dic (string_'name') string_'name' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_replace) identifier_replace (call (attribute (string_'') string_'' (identifier_ljust) identifier_ljust )attribute (argument_list (identifier_reallen) identifier_reallen )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_drop_name) identifier_drop_name (call (attribute (identifier_match) identifier_match (identifier_expand) identifier_expand )attribute (argument_list (binary_operator (string_'%s\\g<sep>\\g<section>') string_'%s\\g<sep>\\g<section>' (identifier_replace) identifier_replace )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_formal_content) identifier_formal_content )attribute (call (attribute (call (attribute (identifier_self) identifier_self (identifier_drop_started_empty_lines) identifier_drop_started_empty_lines )attribute (argument_list (identifier_drop_name) identifier_drop_name )argument_list )call (identifier_rstrip) identifier_rstrip )attribute (argument_list )argument_list )call )assignment )expression_statement )block )function_definition )module
get Usage section and set to `raw_content`, `formal_content` of no title and empty-line version
(module (function_definition (function_name__get_name) function_name__get_name (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (None) None )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_scoring_) identifier_scoring_ )attribute (None) None )comparison_operator (block (return_statement (string_'score') string_'score' )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_scoring_) identifier_scoring_ )attribute (identifier_str) identifier_str )argument_list )call (block (return_statement (attribute (identifier_self) identifier_self (identifier_scoring_) identifier_scoring_ )attribute )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_scoring_) identifier_scoring_ )attribute (identifier_partial) identifier_partial )argument_list )call (block (return_statement (attribute (attribute (attribute (identifier_self) identifier_self (identifier_scoring_) identifier_scoring_ )attribute (identifier_func) identifier_func )attribute (identifier___name__) identifier___name__ )attribute )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_scoring_) identifier_scoring_ )attribute (identifier__BaseScorer) identifier__BaseScorer )argument_list )call (block (return_statement (attribute (attribute (attribute (identifier_self) identifier_self (identifier_scoring_) identifier_scoring_ )attribute (identifier__score_func) identifier__score_func )attribute (identifier___name__) identifier___name__ )attribute )return_statement )block )if_statement (return_statement (attribute (attribute (identifier_self) identifier_self (identifier_scoring_) identifier_scoring_ )attribute (identifier___name__) identifier___name__ )attribute )return_statement )block )function_definition )module
Find name of scoring function.
(module (function_definition (function_name_write_branch_data) function_name_write_branch_data (parameters (identifier_self) identifier_self (identifier_file) identifier_file (default_parameter (identifier_padding) identifier_padding (string_" ") string_" " )default_parameter )parameters (block (expression_statement (assignment (identifier_attrs) identifier_attrs (list_comprehension (binary_operator (string_'%s="%s"') string_'%s="%s"' (tuple (identifier_k) identifier_k (identifier_v) identifier_v )tuple )binary_operator (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_branch_attr) identifier_branch_attr )attribute (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_attr_str) identifier_attr_str (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (identifier_attrs) identifier_attrs )argument_list )call )assignment )expression_statement (for_statement (identifier_br) identifier_br (attribute (attribute (identifier_self) identifier_self (identifier_case) identifier_case )attribute (identifier_branches) identifier_branches )attribute (block (expression_statement (call (attribute (identifier_file) identifier_file (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_"%s%s -> %s [%s];\n") string_"%s%s -> %s [%s];\n" (line_continuation_\) line_continuation_\ (tuple (identifier_padding) identifier_padding (attribute (attribute (identifier_br) identifier_br (identifier_from_bus) identifier_from_bus )attribute (identifier_name) identifier_name )attribute (attribute (attribute (identifier_br) identifier_br (identifier_to_bus) identifier_to_bus )attribute (identifier_name) identifier_name )attribute (identifier_attr_str) identifier_attr_str )tuple )binary_operator )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Writes branch data in Graphviz DOT language.
(module (function_definition (function_name_register_nscf_task) function_name_register_nscf_task (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_"task_class") string_"task_class" )subscript (identifier_NscfTask) identifier_NscfTask )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_register_task) identifier_register_task )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Register a nscf task.
(module (function_definition (function_name_update_chat) function_name_update_chat (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_other) identifier_other (await (call (attribute (attribute (identifier_self) identifier_self (identifier_bot) identifier_bot )attribute (identifier_get_chat) identifier_get_chat )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )argument_list )call )await )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (identifier_other) identifier_other (block (expression_statement (assignment (subscript (identifier_self) identifier_self (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement )block )function_definition )module
User this method to update Chat data :return: None
(module (function_definition (function_name_readACTIONRECORD) function_name_readACTIONRECORD (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_action) identifier_action (None) None )assignment )expression_statement (expression_statement (assignment (identifier_actionCode) identifier_actionCode (call (attribute (identifier_self) identifier_self (identifier_readUI8) identifier_readUI8 )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_actionCode) identifier_actionCode (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_actionLength) identifier_actionLength (conditional_expression (call (attribute (identifier_self) identifier_self (identifier_readUI16) identifier_readUI16 )attribute (argument_list )argument_list )call (comparison_operator (identifier_actionCode) identifier_actionCode (integer_0x80) integer_0x80 )comparison_operator (integer_0) integer_0 )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_action) identifier_action (call (attribute (identifier_SWFActionFactory) identifier_SWFActionFactory (identifier_create) identifier_create )attribute (argument_list (identifier_actionCode) identifier_actionCode (identifier_actionLength) identifier_actionLength )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_action) identifier_action (identifier_parse) identifier_parse )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_action) identifier_action )return_statement )block )function_definition )module
Read a SWFActionRecord
(module (function_definition (function_name_to_json) function_name_to_json (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ContentType) identifier_ContentType (identifier_self) identifier_self )argument_list )call (identifier_to_json) identifier_to_json )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'name') string_'name' (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )pair (pair (string_'description') string_'description' (attribute (identifier_self) identifier_self (identifier_description) identifier_description )attribute )pair (pair (string_'displayField') string_'displayField' (attribute (identifier_self) identifier_self (identifier_display_field) identifier_display_field )attribute )pair (pair (string_'fields') string_'fields' (list_comprehension (call (attribute (identifier_f) identifier_f (identifier_to_json) identifier_to_json )attribute (argument_list )argument_list )call (for_in_clause (identifier_f) identifier_f (attribute (identifier_self) identifier_self (identifier_fields) identifier_fields )attribute )for_in_clause )list_comprehension )pair )dictionary )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Returns the JSON representation of the content type.
(module (function_definition (function_name_search) function_name_search (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (call (attribute (identifier_db) identifier_db (identifier_select) identifier_select )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute )argument_list )call (identifier_condition) identifier_condition )attribute (argument_list (string_'status') string_'status' (string_'active') string_'active' )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (identifier_kw) identifier_kw (block (expression_statement (call (attribute (identifier_q) identifier_q (identifier_condition) identifier_condition )attribute (argument_list (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_q) identifier_q (identifier_execute) identifier_execute )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_users) identifier_users (list )list )assignment )expression_statement (for_statement (identifier_user) identifier_user (identifier_data) identifier_data (block (expression_statement (call (attribute (identifier_users) identifier_users (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_load) identifier_load )attribute (argument_list (identifier_user) identifier_user (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_users) identifier_users )return_statement )block )function_definition )module
Find the users match the condition in kw
(module (function_definition (function_name_Tag) function_name_Tag (parameters (identifier_env) identifier_env (identifier_target) identifier_target (identifier_source) identifier_source (list_splat_pattern (identifier_more_tags) identifier_more_tags )list_splat_pattern (dictionary_splat_pattern (identifier_kw_tags) identifier_kw_tags )dictionary_splat_pattern )parameters (block (if_statement (not_operator (identifier_target) identifier_target )not_operator (block (expression_statement (assignment (identifier_target) identifier_target (identifier_source) identifier_source )assignment )expression_statement (expression_statement (assignment (identifier_first_tag) identifier_first_tag (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_first_tag) identifier_first_tag (identifier_source) identifier_source )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_first_tag) identifier_first_tag (block (expression_statement (assignment (subscript (identifier_kw_tags) identifier_kw_tags (subscript (identifier_first_tag) identifier_first_tag (integer_0) integer_0 )subscript )subscript (string_'') string_'' )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_kw_tags) identifier_kw_tags )argument_list )call (integer_0) integer_0 )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_more_tags) identifier_more_tags )argument_list )call (integer_0) integer_0 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_UserError) identifier_UserError (argument_list (string_"No tags given.") string_"No tags given." )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_x) identifier_x (identifier_more_tags) identifier_more_tags (block (expression_statement (assignment (subscript (identifier_kw_tags) identifier_kw_tags (identifier_x) identifier_x )subscript (string_'') string_'' )assignment )expression_statement )block )for_statement (if_statement (not_operator (call (attribute (attribute (identifier_SCons) identifier_SCons (identifier_Util) identifier_Util )attribute (identifier_is_List) identifier_is_List )attribute (argument_list (identifier_target) identifier_target )argument_list )call )not_operator (block (expression_statement (assignment (identifier_target) identifier_target (list (identifier_target) identifier_target )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_target) identifier_target (call (attribute (identifier_env) identifier_env (identifier_Flatten) identifier_Flatten )attribute (argument_list (identifier_target) identifier_target )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_t) identifier_t (identifier_target) identifier_target (block (for_statement (tuple_pattern (identifier_k) identifier_k (identifier_v) identifier_v )tuple_pattern (call (attribute (identifier_kw_tags) identifier_kw_tags (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (subscript (identifier_k) identifier_k (slice (colon) colon (integer_10) integer_10 )slice )subscript (string_'PACKAGING_') string_'PACKAGING_' )comparison_operator (block (expression_statement (assignment (identifier_k) identifier_k (binary_operator (string_'PACKAGING_') string_'PACKAGING_' (identifier_k) identifier_k )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_t) identifier_t (identifier_Tag) identifier_Tag )attribute (argument_list (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Tag a file with the given arguments, just sets the accordingly named attribute on the file object. TODO: FIXME
(module (function_definition (function_name_handle_profile_delete) function_name_handle_profile_delete (parameters (identifier_self) identifier_self (identifier_sender) identifier_sender (identifier_instance) identifier_instance (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_save) identifier_handle_save )attribute (argument_list (attribute (attribute (identifier_instance) identifier_instance (identifier_user) identifier_user )attribute (identifier___class__) identifier___class__ )attribute (attribute (identifier_instance) identifier_instance (identifier_user) identifier_user )attribute )argument_list )call )expression_statement )block (except_clause (parenthesized_expression (attribute (call (identifier_get_profile_model) identifier_get_profile_model (argument_list )argument_list )call (identifier_DoesNotExist) identifier_DoesNotExist )attribute )parenthesized_expression (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Custom handler for user profile delete
(module (function_definition (function_name_decode) function_name_decode (parameters (identifier_stream) identifier_stream (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_encoding) identifier_encoding (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'encoding') string_'encoding' (identifier_DEFAULT_ENCODING) identifier_DEFAULT_ENCODING )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_decoder) identifier_decoder (call (identifier_get_decoder) identifier_get_decoder (argument_list (identifier_encoding) identifier_encoding (identifier_stream) identifier_stream (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_decoder) identifier_decoder )return_statement )block )function_definition )module
A generator function to decode a datastream. @param stream: AMF data to be decoded. @type stream: byte data. @kwarg encoding: AMF encoding type. One of L{ENCODING_TYPES}. @return: A generator that will decode each element in the stream.
(module (function_definition (function_name_my_glob) function_name_my_glob (parameters (identifier_pattern) identifier_pattern )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_pattern) identifier_pattern (slice (integer_0) integer_0 (colon) colon (integer_4) integer_4 )slice )subscript (string_'vos:') string_'vos:' )comparison_operator (block (expression_statement (assignment (identifier_dirname) identifier_dirname (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_pattern) identifier_pattern )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_flist) identifier_flist (call (identifier_listdir) identifier_listdir (argument_list (identifier_dirname) identifier_dirname )argument_list )call )assignment )expression_statement (for_statement (identifier_fname) identifier_fname (identifier_flist) identifier_flist (block (expression_statement (assignment (identifier_fname) identifier_fname (call (attribute (string_'/') string_'/' (identifier_join) identifier_join )attribute (argument_list (list (identifier_dirname) identifier_dirname (identifier_fname) identifier_fname )list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_fnmatch) identifier_fnmatch (identifier_fnmatch) identifier_fnmatch )attribute (argument_list (identifier_fname) identifier_fname (identifier_pattern) identifier_pattern )argument_list )call (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_fname) identifier_fname )argument_list )call )expression_statement )block )if_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_glob) identifier_glob (argument_list (identifier_pattern) identifier_pattern )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
get a listing matching pattern @param pattern: @return:
(module (function_definition (function_name_get_oqparam) function_name_get_oqparam (parameters (identifier_job_ini) identifier_job_ini (default_parameter (identifier_pkg) identifier_pkg (None) None )default_parameter (default_parameter (identifier_calculators) identifier_calculators (None) None )default_parameter (default_parameter (identifier_hc_id) identifier_hc_id (None) None )default_parameter (default_parameter (identifier_validate) identifier_validate (integer_1) integer_1 )default_parameter (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (import_from_statement (dotted_name (identifier_openquake) identifier_openquake (identifier_calculators) identifier_calculators )dotted_name (dotted_name (identifier_base) identifier_base )dotted_name )import_from_statement (expression_statement (assignment (attribute (attribute (attribute (identifier_OqParam) identifier_OqParam (identifier_calculation_mode) identifier_calculation_mode )attribute (identifier_validator) identifier_validator )attribute (identifier_choices) identifier_choices )attribute (call (identifier_tuple) identifier_tuple (argument_list (boolean_operator (identifier_calculators) identifier_calculators (attribute (identifier_base) identifier_base (identifier_calculators) identifier_calculators )attribute )boolean_operator )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_job_ini) identifier_job_ini (identifier_dict) identifier_dict )argument_list )call )not_operator (block (expression_statement (assignment (identifier_basedir) identifier_basedir (conditional_expression (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (identifier_pkg) identifier_pkg (identifier___file__) identifier___file__ )attribute )argument_list )call (identifier_pkg) identifier_pkg (string_'') string_'' )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_job_ini) identifier_job_ini (call (identifier_get_params) identifier_get_params (argument_list (list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_basedir) identifier_basedir (identifier_job_ini) identifier_job_ini )argument_list )call )list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (identifier_hc_id) identifier_hc_id (block (expression_statement (call (attribute (identifier_job_ini) identifier_job_ini (identifier_update) identifier_update )attribute (argument_list (keyword_argument (identifier_hazard_calculation_id) identifier_hazard_calculation_id (call (identifier_str) identifier_str (argument_list (identifier_hc_id) identifier_hc_id )argument_list )call )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_job_ini) identifier_job_ini (identifier_update) identifier_update )attribute (argument_list (identifier_kw) identifier_kw )argument_list )call )expression_statement (expression_statement (assignment (identifier_oqparam) identifier_oqparam (call (identifier_OqParam) identifier_OqParam (argument_list (dictionary_splat (identifier_job_ini) identifier_job_ini )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (identifier_validate) identifier_validate (block (expression_statement (call (attribute (identifier_oqparam) identifier_oqparam (identifier_validate) identifier_validate )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_oqparam) identifier_oqparam )return_statement )block )function_definition )module
Parse a dictionary of parameters from an INI-style config file. :param job_ini: Path to configuration file/archive or dictionary of parameters :param pkg: Python package where to find the configuration file (optional) :param calculators: Sequence of calculator names (optional) used to restrict the valid choices for `calculation_mode` :param hc_id: Not None only when called from a post calculation :param validate: Flag. By default it is true and the parameters are validated :param kw: String-valued keyword arguments used to override the job.ini parameters :returns: An :class:`openquake.commonlib.oqvalidation.OqParam` instance containing the validate and casted parameters/values parsed from the job.ini file as well as a subdictionary 'inputs' containing absolute paths to all of the files referenced in the job.ini, keyed by the parameter name.
(module (function_definition (function_name_add_to_heap) function_name_add_to_heap (parameters (identifier_self) identifier_self (identifier_heap) identifier_heap (default_parameter (identifier_descriptors) identifier_descriptors (string_'stale') string_'stale' )default_parameter (default_parameter (identifier_data) identifier_data (string_'stale') string_'stale' )default_parameter )parameters (block (if_statement (comparison_operator (identifier_descriptors) identifier_descriptors (list (string_'stale') string_'stale' (string_'all') string_'all' (string_'none') string_'none' )list )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"descriptors must be one of 'stale', 'all', 'none'") string_"descriptors must be one of 'stale', 'all', 'none'" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_data) identifier_data (list (string_'stale') string_'stale' (string_'all') string_'all' (string_'none') string_'none' )list )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"data must be one of 'stale', 'all', 'none'") string_"data must be one of 'stale', 'all', 'none'" )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_item) identifier_item (call (attribute (attribute (identifier_self) identifier_self (identifier__item_group) identifier__item_group )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_info) identifier_info (call (attribute (identifier_self) identifier_self (identifier__get_info) identifier__get_info )attribute (argument_list (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (parenthesized_expression (comparison_operator (identifier_descriptors) identifier_descriptors (string_'all') string_'all' )comparison_operator )parenthesized_expression (parenthesized_expression (boolean_operator (comparison_operator (identifier_descriptors) identifier_descriptors (string_'stale') string_'stale' )comparison_operator (call (attribute (identifier_self) identifier_self (identifier__descriptor_stale) identifier__descriptor_stale )attribute (argument_list (identifier_item) identifier_item (identifier_info) identifier_info )argument_list )call )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_heap) identifier_heap (identifier_add_descriptor) identifier_add_descriptor )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_info) identifier_info (identifier_descriptor_cnt) identifier_descriptor_cnt )attribute (attribute (identifier_self) identifier_self (identifier__descriptor_cnt) identifier__descriptor_cnt )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_item) identifier_item (identifier_value) identifier_value )attribute (None) None )comparison_operator (block (if_statement (boolean_operator (parenthesized_expression (comparison_operator (identifier_data) identifier_data (string_'all') string_'all' )comparison_operator )parenthesized_expression (parenthesized_expression (boolean_operator (comparison_operator (identifier_data) identifier_data (string_'stale') string_'stale' )comparison_operator (comparison_operator (attribute (identifier_info) identifier_info (identifier_version) identifier_version )attribute (attribute (identifier_item) identifier_item (identifier_version) identifier_version )attribute )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_heap) identifier_heap (identifier_add_item) identifier_add_item )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_info) identifier_info (identifier_version) identifier_version )attribute (attribute (identifier_item) identifier_item (identifier_version) identifier_version )attribute )assignment )expression_statement )block )if_statement )block )if_statement )block )for_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__descriptor_cnt) identifier__descriptor_cnt )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (return_statement (identifier_heap) identifier_heap )return_statement )block )function_definition )module
Update a heap to contains all the new items and item descriptors since the last call. Parameters ---------- heap : :py:class:`Heap` The heap to update. descriptors : {'stale', 'all', 'none'} Which descriptors to send. The default ('stale') sends only descriptors that have not been sent, or have not been sent recently enough according to the `descriptor_frequency` passed to the constructor. The other options are to send all the descriptors or none of them. Sending all descriptors is useful if a new receiver is added which will be out of date. data : {'stale', 'all', 'none'} Which data items to send. item_group : :py:class:`ItemGroup`, optional If specified, uses the items from this item group instead of the one passed to the constructor (which could be `None`). Raises ------ ValueError if `descriptors` or `data` is not one of the legal values
(module (function_definition (function_name_request_password_change_mail) function_name_request_password_change_mail (parameters (identifier_self) identifier_self (identifier_password) identifier_password )parameters (block (expression_statement (assignment (identifier_message) identifier_message (call (identifier_Msg) identifier_Msg (argument_list (attribute (identifier_EMsg) identifier_EMsg (identifier_ClientRequestChangeMail) identifier_ClientRequestChangeMail )attribute (keyword_argument (identifier_extended) identifier_extended (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_message) identifier_message (identifier_body) identifier_body )attribute (identifier_password) identifier_password )attribute (identifier_password) identifier_password )assignment )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_self) identifier_self (identifier_send_job_and_wait) identifier_send_job_and_wait )attribute (argument_list (identifier_message) identifier_message (keyword_argument (identifier_timeout) identifier_timeout (integer_10) integer_10 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_resp) identifier_resp (None) None )comparison_operator (block (return_statement (attribute (identifier_EResult) identifier_EResult (identifier_Timeout) identifier_Timeout )attribute )return_statement )block (else_clause (block (return_statement (call (identifier_EResult) identifier_EResult (argument_list (attribute (identifier_resp) identifier_resp (identifier_eresult) identifier_eresult )attribute )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Request password change mail :param password: current account password :type password: :class:`str` :return: result :rtype: :class:`.EResult`
(module (function_definition (function_name__validate_question_area) function_name__validate_question_area (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_hazard_index) identifier_hazard_index (call (attribute (attribute (identifier_self) identifier_self (identifier_hazard_layer_combo) identifier_hazard_layer_combo )attribute (identifier_currentIndex) identifier_currentIndex )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_exposure_index) identifier_exposure_index (call (attribute (attribute (identifier_self) identifier_self (identifier_exposure_layer_combo) identifier_exposure_layer_combo )attribute (identifier_currentIndex) identifier_currentIndex )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_hazard_index) identifier_hazard_index (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (comparison_operator (identifier_exposure_index) identifier_exposure_index (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator )boolean_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier_conflicting_plugin_detected) identifier_conflicting_plugin_detected )attribute (block (expression_statement (assignment (identifier_message) identifier_message (call (identifier_conflicting_plugin_message) identifier_conflicting_plugin_message (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_message) identifier_message (call (identifier_getting_started_message) identifier_getting_started_message (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (expression_list (False) False (identifier_message) identifier_message )expression_list )return_statement )block (else_clause (block (return_statement (expression_list (True) True (None) None )expression_list )return_statement )block )else_clause )if_statement )block )function_definition )module
Helper method to evaluate the current state of the dialog. This function will determine if it is appropriate for the OK button to be enabled or not. .. note:: The enabled state of the OK button on the dialog will NOT be updated (set True or False) depending on the outcome of the UI readiness tests performed - **only** True or False will be returned by the function. :returns: A two-tuple where the first element is a Boolean reflecting the results of the validation tests and the second is a message indicating any reason why the validation may have failed. :rtype: (Boolean, safe.messaging.Message) Example:: flag,message = self._validate_question_area()
(module (function_definition (function_name_listdir) function_name_listdir (parameters (identifier_self) identifier_self (default_parameter (identifier_folder_id) identifier_folder_id (string_'0') string_'0' )default_parameter (default_parameter (identifier_offset) identifier_offset (None) None )default_parameter (default_parameter (identifier_limit) identifier_limit (None) None )default_parameter (default_parameter (identifier_fields) identifier_fields (None) None )default_parameter )parameters (block (expression_statement (string_'Get Box object, representing list of objects in a folder.') string_'Get Box object, representing list of objects in a folder.' )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_fields) identifier_fields (None) None )comparison_operator (line_continuation_\) line_continuation_\ (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_fields) identifier_fields (attribute (identifier_types) identifier_types (identifier_StringTypes) identifier_StringTypes )attribute )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (identifier_fields) identifier_fields (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (identifier_fields) identifier_fields )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (identifier_self) identifier_self (argument_list (call (identifier_join) identifier_join (argument_list (string_'folders') string_'folders' (identifier_folder_id) identifier_folder_id (string_'items') string_'items' )argument_list )call (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_offset) identifier_offset (identifier_offset) identifier_offset )keyword_argument (keyword_argument (identifier_limit) identifier_limit (identifier_limit) identifier_limit )keyword_argument (keyword_argument (identifier_fields) identifier_fields (identifier_fields) identifier_fields )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get Box object, representing list of objects in a folder.
(module (function_definition (function_name_perform_ops) function_name_perform_ops (parameters (identifier_self) identifier_self )parameters (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (identifier_closing) identifier_closing (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )argument_list )call (as_pattern_target (identifier_cursor) identifier_cursor )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_execute) identifier_execute )attribute (argument_list (string_'BEGIN TRANSACTION') string_'BEGIN TRANSACTION' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__perform_ops) identifier__perform_ops )attribute (argument_list (identifier_cursor) identifier_cursor )argument_list )call )expression_statement )block )with_statement )block )with_statement )block )function_definition )module
Performs the stored operations on the database connection.
(module (function_definition (function_name_weighted_random) function_name_weighted_random (parameters (identifier_sample) identifier_sample (identifier_embedding) identifier_embedding )parameters (block (expression_statement (assignment (identifier_unembeded) identifier_unembeded (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_v) identifier_v (identifier_chain) identifier_chain )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_embedding) identifier_embedding )argument_list )call (block (expression_statement (assignment (identifier_vals) identifier_vals (list_comprehension (subscript (identifier_sample) identifier_sample (identifier_u) identifier_u )subscript (for_in_clause (identifier_u) identifier_u (identifier_chain) identifier_chain )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (subscript (identifier_unembeded) identifier_unembeded (identifier_v) identifier_v )subscript (call (attribute (identifier_random) identifier_random (identifier_choice) identifier_choice )attribute (argument_list (identifier_vals) identifier_vals )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (yield (identifier_unembeded) identifier_unembeded )yield )expression_statement )block )function_definition )module
Determines the sample values by weighed random choice. Args: sample (dict): A sample of the form {v: val, ...} where v is a variable in the target graph and val is the associated value as determined by a binary quadratic model sampler. embedding (dict): The mapping from the source graph to the target graph. Should be of the form {v: {s, ...}, ...} where v is a node in the source graph and s is a node in the target graph. Yields: dict: The unembedded sample. When there is a chain break, the value is chosen randomly, weighted by the frequency of the values within the chain.
(module (function_definition (function_name_get_or_create) function_name_get_or_create (parameters (identifier_self) identifier_self (default_parameter (identifier_write_concern) identifier_write_concern (None) None )default_parameter (default_parameter (identifier_auto_save) identifier_auto_save (True) True )default_parameter (list_splat_pattern (identifier_q_objs) identifier_q_objs )list_splat_pattern (dictionary_splat_pattern (identifier_query) identifier_query )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_defaults) identifier_defaults (call (attribute (identifier_query) identifier_query (identifier_pop) identifier_pop )attribute (argument_list (string_'defaults') string_'defaults' (dictionary )dictionary )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_doc) identifier_doc (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (list_splat (identifier_q_objs) identifier_q_objs )list_splat (dictionary_splat (identifier_query) identifier_query )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_doc) identifier_doc (False) False )expression_list )return_statement )block (except_clause (attribute (attribute (identifier_self) identifier_self (identifier__document) identifier__document )attribute (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (expression_statement (call (attribute (identifier_query) identifier_query (identifier_update) identifier_update )attribute (argument_list (identifier_defaults) identifier_defaults )argument_list )call )expression_statement (expression_statement (assignment (identifier_doc) identifier_doc (call (attribute (identifier_self) identifier_self (identifier__document) identifier__document )attribute (argument_list (dictionary_splat (identifier_query) identifier_query )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (identifier_auto_save) identifier_auto_save (block (expression_statement (call (attribute (identifier_doc) identifier_doc (identifier_save) identifier_save )attribute (argument_list (keyword_argument (identifier_write_concern) identifier_write_concern (identifier_write_concern) identifier_write_concern )keyword_argument )argument_list )call )expression_statement )block )if_statement (return_statement (expression_list (identifier_doc) identifier_doc (True) True )expression_list )return_statement )block )except_clause )try_statement )block )function_definition )module
Retrieve unique object or create, if it doesn't exist. Returns a tuple of ``(object, created)``, where ``object`` is the retrieved or created object and ``created`` is a boolean specifying whether a new object was created. Taken back from: https://github.com/MongoEngine/mongoengine/ pull/1029/files#diff-05c70acbd0634d6d05e4a6e3a9b7d66b
(module (function_definition (function_name_code_binary) function_name_code_binary (parameters (identifier_item) identifier_item )parameters (block (expression_statement (assignment (identifier_code_str) identifier_code_str (call (identifier_code) identifier_code (argument_list (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_code_str) identifier_code_str (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (return_statement (call (attribute (identifier_code_str) identifier_code_str (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )return_statement )block )if_statement (return_statement (identifier_code_str) identifier_code_str )return_statement )block )function_definition )module
Return a binary 'code' suitable for hashing.
(module (function_definition (function_name_local_manager_consider_for_user) function_name_local_manager_consider_for_user (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_local_management_enabled) identifier_local_management_enabled )attribute )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_request) identifier_request (call (identifier_get_current_request) identifier_get_current_request (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_authenticated_userid) identifier_authenticated_userid (argument_list (identifier_request) identifier_request )argument_list )call (attribute (identifier_security) identifier_security (identifier_ADMIN_USER) identifier_ADMIN_USER )attribute )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_roles) identifier_roles (attribute (call (attribute (identifier_security) identifier_security (identifier_authenticated_user) identifier_authenticated_user )attribute (argument_list (identifier_request) identifier_request )argument_list )call (identifier_roles) identifier_roles )attribute )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (string_'admin') string_'admin' (identifier_roles) identifier_roles )comparison_operator (comparison_operator (string_'manager') string_'manager' (identifier_roles) identifier_roles )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Flag whether local manager ACL should be considered for current authenticated user.
(module (function_definition (function_name_set_default_backend) function_name_set_default_backend (parameters (identifier_self) identifier_self (identifier_backend_name) identifier_backend_name )parameters (block (if_statement (comparison_operator (identifier_backend_name) identifier_backend_name (identifier_BACKENDS) identifier_BACKENDS )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_f"Unknown backend '{backend_name}'.") string_f"Unknown backend '{backend_name}'." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__default_backend) identifier__default_backend )attribute (identifier_backend_name) identifier_backend_name )assignment )expression_statement )block )function_definition )module
Set the default backend of this circuit. This setting is only applied for this circuit. If you want to change the default backend of all gates, use `BlueqatGlobalSetting.set_default_backend()`. After set the default backend by this method, global setting is ignored even if `BlueqatGlobalSetting.set_default_backend()` is called. If you want to use global default setting, call this method with backend_name=None. Args: backend_name (str or None): new default backend name. If None is given, global setting is applied. Raises: ValueError: If `backend_name` is not registered backend.
(module (function_definition (function_name_parse_value) function_name_parse_value (parameters (identifier_self) identifier_self (identifier_values) identifier_values )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier_get_default_value) identifier_get_default_value )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_values) identifier_values )not_operator (block (return_statement (identifier_result) identifier_result )return_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_values) identifier_values (identifier_list) identifier_list )argument_list )call )not_operator (block (return_statement (identifier_values) identifier_values )return_statement )block )if_statement (return_statement (list_comprehension (call (attribute (identifier_self) identifier_self (identifier__cast_value) identifier__cast_value )attribute (argument_list (identifier_value) identifier_value )argument_list )call (for_in_clause (identifier_value) identifier_value (identifier_values) identifier_values )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Cast value to proper collection.
(module (function_definition (function_name_find_defined_levels) function_name_find_defined_levels (parameters )parameters (block (expression_statement (assignment (identifier_defined_levels) identifier_defined_levels (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_name) identifier_name (call (identifier_dir) identifier_dir (argument_list (identifier_logging) identifier_logging )argument_list )call (block (if_statement (call (attribute (identifier_name) identifier_name (identifier_isupper) identifier_isupper )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_getattr) identifier_getattr (argument_list (identifier_logging) identifier_logging (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_int) identifier_int )argument_list )call (block (expression_statement (assignment (subscript (identifier_defined_levels) identifier_defined_levels (identifier_name) identifier_name )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement )block )if_statement )block )for_statement (return_statement (identifier_defined_levels) identifier_defined_levels )return_statement )block )function_definition )module
Find the defined logging levels. :returns: A dictionary with level names as keys and integers as values. Here's what the result looks like by default (when no custom levels or level names have been defined): >>> find_defined_levels() {'NOTSET': 0, 'DEBUG': 10, 'INFO': 20, 'WARN': 30, 'WARNING': 30, 'ERROR': 40, 'FATAL': 50, 'CRITICAL': 50}
(module (function_definition (function_name_walk) function_name_walk (parameters (identifier_self) identifier_self (identifier_function) identifier_function (default_parameter (identifier_raise_errors) identifier_raise_errors (True) True )default_parameter (default_parameter (identifier_call_on_sections) identifier_call_on_sections (False) False )default_parameter (dictionary_splat_pattern (identifier_keywargs) identifier_keywargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_out) identifier_out (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_scalars) identifier_scalars )attribute )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_entry) identifier_entry (subscript (attribute (identifier_self) identifier_self (identifier_scalars) identifier_scalars )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_val) identifier_val (call (identifier_function) identifier_function (argument_list (identifier_self) identifier_self (identifier_entry) identifier_entry (dictionary_splat (identifier_keywargs) identifier_keywargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_entry) identifier_entry (subscript (attribute (identifier_self) identifier_self (identifier_scalars) identifier_scalars )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_out) identifier_out (identifier_entry) identifier_entry )subscript (identifier_val) identifier_val )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (if_statement (identifier_raise_errors) identifier_raise_errors (block (raise_statement )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_entry) identifier_entry (subscript (attribute (identifier_self) identifier_self (identifier_scalars) identifier_scalars )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_out) identifier_out (identifier_entry) identifier_entry )subscript (False) False )assignment )expression_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )for_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_sections) identifier_sections )attribute )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_entry) identifier_entry (subscript (attribute (identifier_self) identifier_self (identifier_sections) identifier_sections )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement (if_statement (identifier_call_on_sections) identifier_call_on_sections (block (try_statement (block (expression_statement (call (identifier_function) identifier_function (argument_list (identifier_self) identifier_self (identifier_entry) identifier_entry (dictionary_splat (identifier_keywargs) identifier_keywargs )dictionary_splat )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (if_statement (identifier_raise_errors) identifier_raise_errors (block (raise_statement )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_entry) identifier_entry (subscript (attribute (identifier_self) identifier_self (identifier_sections) identifier_sections )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_out) identifier_out (identifier_entry) identifier_entry )subscript (False) False )assignment )expression_statement )block )else_clause )if_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_entry) identifier_entry (subscript (attribute (identifier_self) identifier_self (identifier_sections) identifier_sections )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_out) identifier_out (identifier_entry) identifier_entry )subscript (call (attribute (subscript (identifier_self) identifier_self (identifier_entry) identifier_entry )subscript (identifier_walk) identifier_walk )attribute (argument_list (identifier_function) identifier_function (keyword_argument (identifier_raise_errors) identifier_raise_errors (identifier_raise_errors) identifier_raise_errors )keyword_argument (keyword_argument (identifier_call_on_sections) identifier_call_on_sections (identifier_call_on_sections) identifier_call_on_sections )keyword_argument (dictionary_splat (identifier_keywargs) identifier_keywargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Walk every member and call a function on the keyword and value. Return a dictionary of the return values If the function raises an exception, raise the errror unless ``raise_errors=False``, in which case set the return value to ``False``. Any unrecognised keyword arguments you pass to walk, will be pased on to the function you pass in. Note: if ``call_on_sections`` is ``True`` then - on encountering a subsection, *first* the function is called for the *whole* subsection, and then recurses into it's members. This means your function must be able to handle strings, dictionaries and lists. This allows you to change the key of subsections as well as for ordinary members. The return value when called on the whole subsection has to be discarded. See the encode and decode methods for examples, including functions. admonition:: caution You can use ``walk`` to transform the names of members of a section but you mustn't add or delete members. >>> config = '''[XXXXsection] ... XXXXkey = XXXXvalue'''.splitlines() >>> cfg = ConfigObj(config) >>> cfg ConfigObj({'XXXXsection': {'XXXXkey': 'XXXXvalue'}}) >>> def transform(section, key): ... val = section[key] ... newkey = key.replace('XXXX', 'CLIENT1') ... section.rename(key, newkey) ... if isinstance(val, (tuple, list, dict)): ... pass ... else: ... val = val.replace('XXXX', 'CLIENT1') ... section[newkey] = val >>> cfg.walk(transform, call_on_sections=True) {'CLIENT1section': {'CLIENT1key': None}} >>> cfg ConfigObj({'CLIENT1section': {'CLIENT1key': 'CLIENT1value'}})
(module (function_definition (function_name__create_messages) function_name__create_messages (parameters (identifier_self) identifier_self (identifier_names) identifier_names (identifier_data) identifier_data (default_parameter (identifier_isDms) identifier_isDms (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_chats) identifier_chats (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_empty_dms) identifier_empty_dms (list )list )assignment )expression_statement (expression_statement (assignment (identifier_formatter) identifier_formatter (call (identifier_SlackFormatter) identifier_SlackFormatter (argument_list (attribute (identifier_self) identifier_self (identifier___USER_DATA) identifier___USER_DATA )attribute (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (for_statement (identifier_name) identifier_name (identifier_names) identifier_names (block (expression_statement (assignment (identifier_dir_path) identifier_dir_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__PATH) identifier__PATH )attribute (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_messages) identifier_messages (list )list )assignment )expression_statement (expression_statement (assignment (identifier_day_files) identifier_day_files (call (attribute (identifier_glob) identifier_glob (identifier_glob) identifier_glob )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_dir_path) identifier_dir_path (string_"*.json") string_"*.json" )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_day_files) identifier_day_files )not_operator (block (if_statement (identifier_isDms) identifier_isDms (block (expression_statement (call (attribute (identifier_empty_dms) identifier_empty_dms (identifier_append) identifier_append )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement (continue_statement )continue_statement )block )if_statement (for_statement (identifier_day) identifier_day (call (identifier_sorted) identifier_sorted (argument_list (identifier_day_files) identifier_day_files )argument_list )call (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_io) identifier_io (identifier_open) identifier_open )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__PATH) identifier__PATH )attribute (identifier_day) identifier_day )argument_list )call (keyword_argument (identifier_encoding) identifier_encoding (string_"utf8") string_"utf8" )keyword_argument )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_day_messages) identifier_day_messages (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_messages) identifier_messages (identifier_extend) identifier_extend )attribute (argument_list (list_comprehension (call (identifier_Message) identifier_Message (argument_list (identifier_formatter) identifier_formatter (identifier_d) identifier_d )argument_list )call (for_in_clause (identifier_d) identifier_d (identifier_day_messages) identifier_day_messages )for_in_clause )list_comprehension )argument_list )call )expression_statement )block )with_statement )block )for_statement (expression_statement (assignment (subscript (identifier_chats) identifier_chats (identifier_name) identifier_name )subscript (identifier_messages) identifier_messages )assignment )expression_statement )block )for_statement (if_statement (identifier_isDms) identifier_isDms (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__EMPTY_DMS) identifier__EMPTY_DMS )attribute (identifier_empty_dms) identifier_empty_dms )assignment )expression_statement )block )if_statement (return_statement (identifier_chats) identifier_chats )return_statement )block )function_definition )module
Creates object of arrays of messages from each json file specified by the names or ids :param [str] names: names of each group of messages :param [object] data: array of objects detailing where to get the messages from in the directory structure :param bool isDms: boolean value used to tell if the data is dm data so the function can collect the empty dm directories and store them in memory only :return: object of arrays of messages :rtype: object
(module (function_definition (function_name_name) function_name_name (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_clonify_ids) identifier_clonify_ids (list_comprehension (subscript (subscript (attribute (identifier_p) identifier_p (identifier_heavy) identifier_heavy )attribute (string_'clonify') string_'clonify' )subscript (string_'id') string_'id' )subscript (for_in_clause (identifier_p) identifier_p (attribute (identifier_self) identifier_self (identifier_heavies) identifier_heavies )attribute )for_in_clause (if_clause (comparison_operator (string_'clonify') string_'clonify' (attribute (identifier_p) identifier_p (identifier_heavy) identifier_heavy )attribute )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_clonify_ids) identifier_clonify_ids )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (subscript (identifier_clonify_ids) identifier_clonify_ids (integer_0) integer_0 )subscript )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Returns the lineage name, or None if the name cannot be found.
(module (function_definition (function_name_install) function_name_install (parameters (identifier_environment) identifier_environment (identifier_opts) identifier_opts )parameters (block (expression_statement (call (attribute (identifier_environment) identifier_environment (identifier_require_data) identifier_require_data )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_install_all) identifier_install_all (argument_list (identifier_environment) identifier_environment (subscript (identifier_opts) identifier_opts (string_'--clean') string_'--clean' )subscript (keyword_argument (identifier_verbose) identifier_verbose (not_operator (subscript (identifier_opts) identifier_opts (string_'--quiet') string_'--quiet' )subscript )not_operator )keyword_argument (keyword_argument (identifier_packages) identifier_packages (subscript (identifier_opts) identifier_opts (string_'PACKAGE') string_'PACKAGE' )subscript )keyword_argument )argument_list )call )expression_statement (for_statement (identifier_site) identifier_site (attribute (identifier_environment) identifier_environment (identifier_sites) identifier_sites )attribute (block (expression_statement (assignment (identifier_environment) identifier_environment (call (attribute (identifier_Environment) identifier_Environment (identifier_load) identifier_load )attribute (argument_list (attribute (identifier_environment) identifier_environment (identifier_name) identifier_name )attribute (identifier_site) identifier_site )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'web') string_'web' (call (attribute (identifier_environment) identifier_environment (identifier_containers_running) identifier_containers_running )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_manage) identifier_manage (identifier_reload_) identifier_reload_ )attribute (argument_list (identifier_environment) identifier_environment (dictionary (pair (string_'--address') string_'--address' (subscript (identifier_opts) identifier_opts (string_'--address') string_'--address' )subscript )pair (pair (string_'--background') string_'--background' (False) False )pair (pair (string_'--no-watch') string_'--no-watch' (False) False )pair (pair (string_'--production') string_'--production' (False) False )pair (pair (string_'PORT') string_'PORT' (None) None )pair (pair (string_'--syslog') string_'--syslog' (False) False )pair (pair (string_'--site-url') string_'--site-url' (None) None )pair (pair (string_'--interactive') string_'--interactive' (False) False )pair )dictionary )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Install or reinstall Python packages within this environment Usage: datacats install [-q] [--address=IP] [ENVIRONMENT [PACKAGE ...]] datacats install -c [q] [--address=IP] [ENVIRONMENT] Options: --address=IP The address to bind to when reloading after install -c --clean Reinstall packages into a clean virtualenv -q --quiet Do not show output from installing packages and requirements. ENVIRONMENT may be an environment name or a path to an environment directory. Default: '.'
(module (function_definition (function_name_getDetails) function_name_getDetails (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_pingdom) identifier_pingdom )attribute (identifier_request) identifier_request )attribute (argument_list (string_'GET') string_'GET' (binary_operator (string_'checks/%s') string_'checks/%s' (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___addDetails__) identifier___addDetails__ )attribute (argument_list (subscript (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call (string_'check') string_'check' )subscript )argument_list )call )expression_statement (return_statement (subscript (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call (string_'check') string_'check' )subscript )return_statement )block )function_definition )module
Update check details, returns dictionary of details
(module (function_definition (function_name_render_to_texture) function_name_render_to_texture (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_texture) identifier_texture (identifier_offset) identifier_offset (identifier_size) identifier_size )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_texture) identifier_texture (identifier_Texture2D) identifier_Texture2D )argument_list )call )assert_statement (expression_statement (call (identifier_set_state) identifier_set_state (argument_list (keyword_argument (identifier_blend) identifier_blend (False) False )keyword_argument (keyword_argument (identifier_depth_test) identifier_depth_test (False) False )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_orig_tex) identifier_orig_tex (call (identifier_Texture2D) identifier_Texture2D (argument_list (binary_operator (integer_255) integer_255 (identifier_data) identifier_data )binary_operator (keyword_argument (identifier_format) identifier_format (string_'luminance') string_'luminance' )keyword_argument (keyword_argument (identifier_wrapping) identifier_wrapping (string_'clamp_to_edge') string_'clamp_to_edge' )keyword_argument (keyword_argument (identifier_interpolation) identifier_interpolation (string_'nearest') string_'nearest' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_edf_neg_tex) identifier_edf_neg_tex (call (attribute (identifier_self) identifier_self (identifier__render_edf) identifier__render_edf )attribute (argument_list (identifier_orig_tex) identifier_orig_tex )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_orig_tex) identifier_orig_tex (slice (colon) colon )slice (slice (colon) colon )slice (integer_0) integer_0 )subscript (identifier_data) identifier_data )assignment )expression_statement (expression_statement (assignment (identifier_edf_pos_tex) identifier_edf_pos_tex (call (attribute (identifier_self) identifier_self (identifier__render_edf) identifier__render_edf )attribute (argument_list (identifier_orig_tex) identifier_orig_tex )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_program_insert) identifier_program_insert )attribute (string_'u_texture') string_'u_texture' )subscript (identifier_orig_tex) identifier_orig_tex )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_program_insert) identifier_program_insert )attribute (string_'u_pos_texture') string_'u_pos_texture' )subscript (identifier_edf_pos_tex) identifier_edf_pos_tex )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_program_insert) identifier_program_insert )attribute (string_'u_neg_texture') string_'u_neg_texture' )subscript (identifier_edf_neg_tex) identifier_edf_neg_tex )assignment )expression_statement (expression_statement (assignment (attribute (subscript (attribute (identifier_self) identifier_self (identifier_fbo_to) identifier_fbo_to )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_color_buffer) identifier_color_buffer )attribute (identifier_texture) identifier_texture )assignment )expression_statement (with_statement (with_clause (with_item (subscript (attribute (identifier_self) identifier_self (identifier_fbo_to) identifier_fbo_to )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript )with_item )with_clause (block (expression_statement (call (identifier_set_viewport) identifier_set_viewport (argument_list (binary_operator (call (identifier_tuple) identifier_tuple (argument_list (identifier_offset) identifier_offset )argument_list )call (call (identifier_tuple) identifier_tuple (argument_list (identifier_size) identifier_size )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_program_insert) identifier_program_insert )attribute (identifier_draw) identifier_draw )attribute (argument_list (string_'triangle_strip') string_'triangle_strip' )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Render a SDF to a texture at a given offset and size Parameters ---------- data : array Must be 2D with type np.ubyte. texture : instance of Texture2D The texture to render to. offset : tuple of int Offset (x, y) to render to inside the texture. size : tuple of int Size (w, h) to render inside the texture.
(module (function_definition (function_name_ingest) function_name_ingest (parameters (identifier_self) identifier_self (identifier_token) identifier_token (default_parameter (identifier_endpoint) identifier_endpoint (None) None )default_parameter (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter (default_parameter (identifier_compress) identifier_compress (None) None )default_parameter )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix )relative_import (dotted_name (identifier_ingest) identifier_ingest )dotted_name )import_from_statement (if_statement (attribute (identifier_ingest) identifier_ingest (identifier_sf_pbuf) identifier_sf_pbuf )attribute (block (expression_statement (assignment (identifier_client) identifier_client (attribute (identifier_ingest) identifier_ingest (identifier_ProtoBufSignalFxIngestClient) identifier_ProtoBufSignalFxIngestClient )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier__logger) identifier__logger (identifier_warn) identifier_warn )attribute (argument_list (concatenated_string (string_'Protocol Buffers not installed properly; ') string_'Protocol Buffers not installed properly; ' (string_'falling back to JSON.') string_'falling back to JSON.' )concatenated_string )argument_list )call )expression_statement (expression_statement (assignment (identifier_client) identifier_client (attribute (identifier_ingest) identifier_ingest (identifier_JsonSignalFxIngestClient) identifier_JsonSignalFxIngestClient )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_compress) identifier_compress (conditional_expression (identifier_compress) identifier_compress (comparison_operator (identifier_compress) identifier_compress (None) None )comparison_operator (attribute (identifier_self) identifier_self (identifier__compress) identifier__compress )attribute )conditional_expression )assignment )expression_statement (return_statement (call (identifier_client) identifier_client (argument_list (keyword_argument (identifier_token) identifier_token (identifier_token) identifier_token )keyword_argument (keyword_argument (identifier_endpoint) identifier_endpoint (boolean_operator (identifier_endpoint) identifier_endpoint (attribute (identifier_self) identifier_self (identifier__ingest_endpoint) identifier__ingest_endpoint )attribute )boolean_operator )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (boolean_operator (identifier_timeout) identifier_timeout (attribute (identifier_self) identifier_self (identifier__timeout) identifier__timeout )attribute )boolean_operator )keyword_argument (keyword_argument (identifier_compress) identifier_compress (identifier_compress) identifier_compress )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Obtain a datapoint and event ingest client.
(module (function_definition (function_name_send_request) function_name_send_request (parameters (identifier_self) identifier_self (identifier_job_request) identifier_job_request (default_parameter (identifier_message_expiry_in_seconds) identifier_message_expiry_in_seconds (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_request_id) identifier_request_id (attribute (identifier_self) identifier_self (identifier_request_counter) identifier_request_counter )attribute )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_request_counter) identifier_request_counter )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_meta) identifier_meta (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_wrapper) identifier_wrapper (call (attribute (identifier_self) identifier_self (identifier__make_middleware_stack) identifier__make_middleware_stack )attribute (argument_list (list_comprehension (attribute (identifier_m) identifier_m (identifier_request) identifier_request )attribute (for_in_clause (identifier_m) identifier_m (attribute (identifier_self) identifier_self (identifier_middleware) identifier_middleware )attribute )for_in_clause )list_comprehension (attribute (identifier_self) identifier_self (identifier__base_send_request) identifier__base_send_request )attribute )argument_list )call )assignment )expression_statement (try_statement (block (with_statement (with_clause (with_item (call (attribute (attribute (identifier_self) identifier_self (identifier_metrics) identifier_metrics )attribute (identifier_timer) identifier_timer )attribute (argument_list (string_'client.send.including_middleware') string_'client.send.including_middleware' (keyword_argument (identifier_resolution) identifier_resolution (attribute (identifier_TimerResolution) identifier_TimerResolution (identifier_MICROSECONDS) identifier_MICROSECONDS )attribute )keyword_argument )argument_list )call )with_item )with_clause (block (expression_statement (call (identifier_wrapper) identifier_wrapper (argument_list (identifier_request_id) identifier_request_id (identifier_meta) identifier_meta (identifier_job_request) identifier_job_request (identifier_message_expiry_in_seconds) identifier_message_expiry_in_seconds )argument_list )call )expression_statement )block )with_statement (return_statement (identifier_request_id) identifier_request_id )return_statement )block (finally_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_metrics) identifier_metrics )attribute (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Send a JobRequest, and return a request ID. The context and control_extra arguments may be used to include extra values in the context and control headers, respectively. :param job_request: The job request object to send :type job_request: JobRequest :param message_expiry_in_seconds: How soon the message will expire if not received by a server (defaults to sixty seconds unless the settings are otherwise) :type message_expiry_in_seconds: int :return: The request ID :rtype: int :raise: ConnectionError, InvalidField, MessageSendError, MessageSendTimeout, MessageTooLarge
(module (function_definition (function_name_header_length) function_name_header_length (parameters (identifier_bytearray) identifier_bytearray )parameters (block (expression_statement (assignment (pattern_list (identifier_groups_of_3) identifier_groups_of_3 (identifier_leftover) identifier_leftover )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (call (identifier_len) identifier_len (argument_list (identifier_bytearray) identifier_bytearray )argument_list )call (integer_3) integer_3 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_n) identifier_n (binary_operator (identifier_groups_of_3) identifier_groups_of_3 (integer_4) integer_4 )binary_operator )assignment )expression_statement (if_statement (identifier_leftover) identifier_leftover (block (expression_statement (augmented_assignment (identifier_n) identifier_n (integer_4) integer_4 )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_n) identifier_n )return_statement )block )function_definition )module
Return the length of s when it is encoded with base64.
(module (function_definition (function_name_get_project) function_name_get_project (parameters (identifier_self) identifier_self (identifier_projectname) identifier_projectname )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (list (string_"list") string_"list" (string_"accounts") string_"accounts" (string_"where") string_"where" (binary_operator (string_"name=%s") string_"name=%s" (identifier_projectname) identifier_projectname )binary_operator )list )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (call (attribute (identifier_self) identifier_self (identifier__read_output) identifier__read_output )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_results) identifier_results )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (None) None )return_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_results) identifier_results )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"Command returned multiple results for '%s'.") string_"Command returned multiple results for '%s'." (identifier_projectname) identifier_projectname )binary_operator )argument_list )call )expression_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"Command returned multiple results for '%s'.") string_"Command returned multiple results for '%s'." (identifier_projectname) identifier_projectname )binary_operator )argument_list )call )raise_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_the_result) identifier_the_result (subscript (identifier_results) identifier_results (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_the_project) identifier_the_project (subscript (identifier_the_result) identifier_the_result (string_"Account") string_"Account" )subscript )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_projectname) identifier_projectname (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (call (attribute (identifier_the_project) identifier_the_project (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (concatenated_string (string_"We expected projectname '%s' ") string_"We expected projectname '%s' " (string_"but got projectname '%s'.") string_"but got projectname '%s'." )concatenated_string (tuple (identifier_projectname) identifier_projectname (identifier_the_project) identifier_the_project )tuple )binary_operator )argument_list )call )expression_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (concatenated_string (string_"We expected projectname '%s' ") string_"We expected projectname '%s' " (string_"but got projectname '%s'.") string_"but got projectname '%s'." )concatenated_string (tuple (identifier_projectname) identifier_projectname (identifier_the_project) identifier_the_project )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_the_result) identifier_the_result )return_statement )block )function_definition )module
Get the project details from Slurm.
(module (function_definition (function_name_get_object) function_name_get_object (parameters (identifier_self) identifier_self (identifier_obj_class) identifier_obj_class (default_parameter (identifier_data) identifier_data (None) None )default_parameter (default_parameter (identifier_subset) identifier_subset (None) None )default_parameter )parameters (block (if_statement (identifier_subset) identifier_subset (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_subset) identifier_subset (identifier_list) identifier_list )argument_list )call )not_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_subset) identifier_subset (identifier_basestring) identifier_basestring )argument_list )call (block (expression_statement (assignment (identifier_subset) identifier_subset (call (attribute (identifier_subset) identifier_subset (identifier_split) identifier_split )attribute (argument_list (string_"&") string_"&" )argument_list )call )assignment )expression_statement )block (else_clause (block (raise_statement (identifier_TypeError) identifier_TypeError )raise_statement )block )else_clause )if_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_list) identifier_get_list )attribute (argument_list (identifier_obj_class) identifier_obj_class (identifier_data) identifier_data (identifier_subset) identifier_subset )argument_list )call )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (tuple (identifier_basestring) identifier_basestring (identifier_int) identifier_int )tuple )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_individual_object) identifier_get_individual_object )attribute (argument_list (identifier_obj_class) identifier_obj_class (identifier_data) identifier_data (identifier_subset) identifier_subset )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (attribute (identifier_ElementTree) identifier_ElementTree (identifier_Element) identifier_Element )attribute )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_new_object) identifier_get_new_object )attribute (argument_list (identifier_obj_class) identifier_obj_class (identifier_data) identifier_data )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (identifier_ValueError) identifier_ValueError )raise_statement )block )else_clause )if_statement )block )function_definition )module
Return a subclassed JSSObject instance by querying for existing objects or posting a new object. Args: obj_class: The JSSObject subclass type to search for or create. data: The data parameter performs different operations depending on the type passed. None: Perform a list operation, or for non-container objects, return all data. int: Retrieve an object with ID of <data>. str: Retrieve an object with name of <str>. For some objects, this may be overridden to include searching by other criteria. See those objects for more info. xml.etree.ElementTree.Element: Create a new object from xml. subset: A list of XML subelement tags to request (e.g. ['general', 'purchasing']), OR an '&' delimited string (e.g. 'general&purchasing'). This is not supported for all JSSObjects. Returns: JSSObjectList: for empty or None arguments to data. JSSObject: Returns an object of type obj_class for searches and new objects. (FUTURE) Will return None if nothing is found that match the search criteria. Raises: TypeError: if subset not formatted properly. JSSMethodNotAllowedError: if you try to perform an operation not supported by that object type. JSSGetError: If object searched for is not found. JSSPostError: If attempted object creation fails.
(module (function_definition (function_name_certificate) function_name_certificate (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_certificate') string_'_certificate' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_cert_url) identifier_cert_url (call (attribute (identifier_self) identifier_self (identifier__get_cert_url) identifier__get_cert_url )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_cert_url) identifier_cert_url )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__certificate) identifier__certificate )attribute (None) None )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__certificate) identifier__certificate )attribute )return_statement )block )if_statement (try_statement (block (import_statement (dotted_name (identifier_requests) identifier_requests )dotted_name )import_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (raise_statement (call (identifier_ImproperlyConfigured) identifier_ImproperlyConfigured (argument_list (string_"requests is required for bounce message verification.") string_"requests is required for bounce message verification." )argument_list )call )raise_statement )block )except_clause )try_statement (try_statement (block (import_statement (dotted_name (identifier_M2Crypto) identifier_M2Crypto )dotted_name )import_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (raise_statement (call (identifier_ImproperlyConfigured) identifier_ImproperlyConfigured (argument_list (string_"M2Crypto is required for bounce message verification.") string_"M2Crypto is required for bounce message verification." )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_cert_url) identifier_cert_url )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_u'Could not download certificate from %s: "%s"') string_u'Could not download certificate from %s: "%s"' (identifier_cert_url) identifier_cert_url (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__certificate) identifier__certificate )attribute (None) None )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__certificate) identifier__certificate )attribute )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__certificate) identifier__certificate )attribute (call (attribute (attribute (identifier_M2Crypto) identifier_M2Crypto (identifier_X509) identifier_X509 )attribute (identifier_load_cert_string) identifier_load_cert_string )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_content) identifier_content )attribute )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (attribute (identifier_M2Crypto) identifier_M2Crypto (identifier_X509) identifier_X509 )attribute (identifier_X509Error) identifier_X509Error )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_u'Could not load certificate from %s: "%s"') string_u'Could not load certificate from %s: "%s"' (identifier_cert_url) identifier_cert_url (identifier_e) identifier_e )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__certificate) identifier__certificate )attribute (None) None )assignment )expression_statement )block )except_clause )try_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__certificate) identifier__certificate )attribute )return_statement )block )function_definition )module
Retrieves the certificate used to sign the bounce message. TODO: Cache the certificate based on the cert URL so we don't have to retrieve it for each bounce message. *We would need to do it in a secure way so that the cert couldn't be overwritten in the cache*
(module (function_definition (function_name_receive_message) function_name_receive_message (parameters (identifier_self) identifier_self (identifier_message) identifier_message (identifier_data) identifier_data )parameters (block (if_statement (attribute (attribute (identifier_self) identifier_self (identifier__socket_client) identifier__socket_client )attribute (identifier_is_stopped) identifier_is_stopped )attribute (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_data) identifier_data (identifier_MESSAGE_TYPE) identifier_MESSAGE_TYPE )subscript (identifier_TYPE_CLOSE) identifier_TYPE_CLOSE )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__socket_client) identifier__socket_client )attribute (identifier_disconnect_channel) identifier_disconnect_channel )attribute (argument_list (attribute (identifier_message) identifier_message (identifier_source_id) identifier_source_id )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__socket_client) identifier__socket_client )attribute (identifier_receiver_controller) identifier_receiver_controller )attribute (identifier_update_status) identifier_update_status )attribute (argument_list )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Called when a connection message is received.
(module (function_definition (function_name_lru_cache) function_name_lru_cache (parameters (identifier_fn) identifier_fn )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_fn) identifier_fn )argument_list )call )decorator (function_definition (function_name_memoized_fn) function_name_memoized_fn (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_pargs) identifier_pargs (call (attribute (identifier_pickle) identifier_pickle (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_pargs) identifier_pargs (attribute (identifier_memoized_fn) identifier_memoized_fn (identifier_cache) identifier_cache )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_memoized_fn) identifier_memoized_fn (identifier_cache) identifier_cache )attribute (identifier_pargs) identifier_pargs )subscript (call (identifier_fn) identifier_fn (argument_list (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (subscript (attribute (identifier_memoized_fn) identifier_memoized_fn (identifier_cache) identifier_cache )attribute (identifier_pargs) identifier_pargs )subscript )return_statement )block )function_definition )decorated_definition (for_statement (pattern_list (identifier_attr) identifier_attr (identifier_value) identifier_value )pattern_list (call (identifier_iter) identifier_iter (argument_list (call (attribute (attribute (identifier_fn) identifier_fn (identifier___dict__) identifier___dict__ )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_memoized_fn) identifier_memoized_fn (identifier_attr) identifier_attr (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_memoized_fn) identifier_memoized_fn (identifier_cache) identifier_cache )attribute (dictionary )dictionary )assignment )expression_statement (return_statement (identifier_memoized_fn) identifier_memoized_fn )return_statement )block )function_definition )module
Memoization wrapper that can handle function attributes, mutable arguments, and can be applied either as a decorator or at runtime. :param fn: Function :type fn: function :returns: Memoized function :rtype: function
(module (function_definition (function_name_resolve_job) function_name_resolve_job (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (for_statement (identifier_r) identifier_r (call (attribute (identifier_self) identifier_self (identifier_job_resolvers) identifier_job_resolvers )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_resolved_name) identifier_resolved_name (call (identifier_r) identifier_r (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_resolved_name) identifier_resolved_name (None) None )comparison_operator (block (return_statement (identifier_resolved_name) identifier_resolved_name )return_statement )block )if_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Attempt to resolve the task name in to a job name. If no job resolver can resolve the task, i.e. they all return None, return None. Keyword arguments: name -- Name of the task to be resolved.
(module (function_definition (function_name_check_publish_block) function_name_check_publish_block (parameters (identifier_self) identifier_self (identifier_block_header) identifier_block_header )parameters (block (if_statement (call (identifier_any) identifier_any (generator_expression (comparison_operator (identifier_publisher_key) identifier_publisher_key (attribute (identifier_block_header) identifier_block_header (identifier_signer_public_key) identifier_signer_public_key )attribute )comparison_operator (for_in_clause (identifier_publisher_key) identifier_publisher_key (attribute (identifier_self) identifier_self (identifier__valid_block_publishers) identifier__valid_block_publishers )attribute )for_in_clause )generator_expression )call (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__min_wait_time) identifier__min_wait_time )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__min_wait_time) identifier__min_wait_time )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (assert_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__min_wait_time) identifier__min_wait_time )attribute (integer_0) integer_0 )comparison_operator )assert_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__max_wait_time) identifier__max_wait_time )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (comparison_operator (binary_operator (attribute (identifier_self) identifier_self (identifier__start_time) identifier__start_time )attribute (attribute (identifier_self) identifier_self (identifier__min_wait_time) identifier__min_wait_time )attribute )binary_operator (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )comparison_operator )return_statement )block )if_statement (assert_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__max_wait_time) identifier__max_wait_time )attribute (integer_0) integer_0 )comparison_operator )assert_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__max_wait_time) identifier__max_wait_time )attribute (attribute (identifier_self) identifier_self (identifier__min_wait_time) identifier__min_wait_time )attribute )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (assert_statement (comparison_operator (integer_0) integer_0 (attribute (identifier_self) identifier_self (identifier__min_wait_time) identifier__min_wait_time )attribute (attribute (identifier_self) identifier_self (identifier__max_wait_time) identifier__max_wait_time )attribute )comparison_operator )assert_statement (return_statement (comparison_operator (binary_operator (attribute (identifier_self) identifier_self (identifier__start_time) identifier__start_time )attribute (attribute (identifier_self) identifier_self (identifier__wait_time) identifier__wait_time )attribute )binary_operator (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )comparison_operator )return_statement )block )function_definition )module
Check if a candidate block is ready to be claimed. block_header (BlockHeader): the block_header to be checked if it should be claimed Returns: Boolean: True if the candidate block_header should be claimed.
(module (function_definition (function_name_user_timeline) function_name_user_timeline (parameters (identifier_self) identifier_self (identifier_delegate) identifier_delegate (default_parameter (identifier_user) identifier_user (None) None )default_parameter (default_parameter (identifier_params) identifier_params (dictionary )dictionary )default_parameter (default_parameter (identifier_extra_args) identifier_extra_args (None) None )default_parameter )parameters (block (if_statement (identifier_user) identifier_user (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'id') string_'id' )subscript (identifier_user) identifier_user )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___get) identifier___get )attribute (argument_list (string_'/statuses/user_timeline.xml') string_'/statuses/user_timeline.xml' (identifier_delegate) identifier_delegate (identifier_params) identifier_params (attribute (identifier_txml) identifier_txml (identifier_Statuses) identifier_Statuses )attribute (keyword_argument (identifier_extra_args) identifier_extra_args (identifier_extra_args) identifier_extra_args )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get the most recent updates for a user. If no user is specified, the statuses for the authenticating user are returned. See search for example of how results are returned.
(module (function_definition (function_name_update_comment) function_name_update_comment (parameters (identifier_self) identifier_self (identifier_comment_id) identifier_comment_id (identifier_body) identifier_body )parameters (block (expression_statement (assignment (identifier_path) identifier_path (string_'/msg/update_comment') string_'/msg/update_comment' )assignment )expression_statement (expression_statement (assignment (identifier_req) identifier_req (call (attribute (identifier_ET) identifier_ET (identifier_Element) identifier_Element )attribute (argument_list (string_'request') string_'request' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (call (attribute (identifier_ET) identifier_ET (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_req) identifier_req (string_'comment_id') string_'comment_id' )argument_list )call (identifier_text) identifier_text )attribute (call (identifier_str) identifier_str (argument_list (call (identifier_int) identifier_int (argument_list (identifier_comment_id) identifier_comment_id )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_comment) identifier_comment (call (attribute (identifier_ET) identifier_ET (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_req) identifier_req (string_'comment') string_'comment' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (call (attribute (identifier_ET) identifier_ET (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_comment) identifier_comment (string_'body') string_'body' )argument_list )call (identifier_text) identifier_text )attribute (call (identifier_str) identifier_str (argument_list (identifier_body) identifier_body )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (argument_list (identifier_path) identifier_path (identifier_req) identifier_req )argument_list )call )return_statement )block )function_definition )module
Update a specific comment. This can be used to edit the content of an existing comment.
(module (function_definition (function_name_parser) function_name_parser (parameters (identifier_cls) identifier_cls (identifier_buf) identifier_buf (identifier_offset) identifier_offset )parameters (block (expression_statement (assignment (identifier_stats) identifier_stats (call (identifier_OFPStats) identifier_OFPStats (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_reserved) identifier_reserved (identifier_length) identifier_length )pattern_list (call (attribute (identifier_struct) identifier_struct (identifier_unpack_from) identifier_unpack_from )attribute (argument_list (string_'!HH') string_'!HH' (identifier_buf) identifier_buf (identifier_offset) identifier_offset )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_stats) identifier_stats (identifier_length) identifier_length )attribute (identifier_length) identifier_length )assignment )expression_statement (expression_statement (augmented_assignment (identifier_offset) identifier_offset (integer_4) integer_4 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_length) identifier_length (integer_4) integer_4 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_fields) identifier_fields (list )list )assignment )expression_statement (while_statement (comparison_operator (identifier_length) identifier_length (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_n) identifier_n (identifier_value) identifier_value (identifier__) identifier__ (identifier_field_len) identifier_field_len )pattern_list (call (attribute (identifier_ofproto) identifier_ofproto (identifier_oxs_parse) identifier_oxs_parse )attribute (argument_list (identifier_buf) identifier_buf (identifier_offset) identifier_offset )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_k) identifier_k (identifier_uv) identifier_uv )pattern_list (call (attribute (identifier_ofproto) identifier_ofproto (identifier_oxs_to_user) identifier_oxs_to_user )attribute (argument_list (identifier_n) identifier_n (identifier_value) identifier_value (None) None )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fields) identifier_fields (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_k) identifier_k (identifier_uv) identifier_uv )tuple )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_offset) identifier_offset (identifier_field_len) identifier_field_len )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_length) identifier_length (identifier_field_len) identifier_field_len )augmented_assignment )expression_statement )block )while_statement (expression_statement (assignment (attribute (identifier_stats) identifier_stats (identifier_fields) identifier_fields )attribute (identifier_fields) identifier_fields )assignment )expression_statement (return_statement (identifier_stats) identifier_stats )return_statement )block )function_definition )module
Returns an object which is generated from a buffer including the expression of the wire protocol of the flow stats.
(module (function_definition (function_name_OnNodeActivated) function_name_OnNodeActivated (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_activated_node) identifier_activated_node )attribute (assignment (attribute (identifier_self) identifier_self (identifier_selected_node) identifier_selected_node )attribute (attribute (identifier_event) identifier_event (identifier_node) identifier_node )attribute )assignment )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_squareMap) identifier_squareMap )attribute (identifier_SetModel) identifier_SetModel )attribute (argument_list (attribute (identifier_event) identifier_event (identifier_node) identifier_node )attribute (attribute (identifier_self) identifier_self (identifier_adapter) identifier_adapter )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_squareMap) identifier_squareMap )attribute (identifier_SetSelected) identifier_SetSelected )attribute (argument_list (attribute (identifier_event) identifier_event (identifier_node) identifier_node )attribute )argument_list )call )expression_statement (if_statement (identifier_editor) identifier_editor (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_SourceShowFile) identifier_SourceShowFile )attribute (argument_list (attribute (identifier_event) identifier_event (identifier_node) identifier_node )attribute )argument_list )call (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_event) identifier_event (identifier_node) identifier_node )attribute (string_'lineno') string_'lineno' )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sourceCodeControl) identifier_sourceCodeControl )attribute (identifier_GotoLine) identifier_GotoLine )attribute (argument_list (attribute (attribute (identifier_event) identifier_event (identifier_node) identifier_node )attribute (identifier_lineno) identifier_lineno )attribute )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_RecordHistory) identifier_RecordHistory )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Double-click or enter on a node in some control...
(module (function_definition (function_name_set_naming_params) function_name_set_naming_params (parameters (identifier_self) identifier_self (default_parameter (identifier_autonaming) identifier_autonaming (None) None )default_parameter (default_parameter (identifier_prefix) identifier_prefix (None) None )default_parameter (default_parameter (identifier_suffix) identifier_suffix (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set) identifier__set )attribute (argument_list (string_'auto-procname') string_'auto-procname' (identifier_autonaming) identifier_autonaming (keyword_argument (identifier_cast) identifier_cast (identifier_bool) identifier_bool )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set) identifier__set )attribute (argument_list (binary_operator (string_'procname-prefix%s') string_'procname-prefix%s' (parenthesized_expression (conditional_expression (string_'-spaced') string_'-spaced' (boolean_operator (identifier_prefix) identifier_prefix (call (attribute (identifier_prefix) identifier_prefix (identifier_endswith) identifier_endswith )attribute (argument_list (string_' ') string_' ' )argument_list )call )boolean_operator (string_'') string_'' )conditional_expression )parenthesized_expression )binary_operator (identifier_prefix) identifier_prefix )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set) identifier__set )attribute (argument_list (string_'procname-append') string_'procname-append' (identifier_suffix) identifier_suffix )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set) identifier__set )attribute (argument_list (string_'procname') string_'procname' (identifier_name) identifier_name )argument_list )call )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__section) identifier__section )attribute )return_statement )block )function_definition )module
Setups processes naming parameters. :param bool autonaming: Automatically set process name to something meaningful. Generated process names may be 'uWSGI Master', 'uWSGI Worker #', etc. :param str|unicode prefix: Add prefix to process names. :param str|unicode suffix: Append string to process names. :param str|unicode name: Set process names to given static value.
(module (function_definition (function_name_get_feature) function_name_get_feature (parameters (identifier_self) identifier_self (identifier_cat) identifier_cat (identifier_img) identifier_img (identifier_feature) identifier_feature )parameters (block (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (argument_list (identifier_cat) identifier_cat (identifier_img) identifier_img (identifier_feature) identifier_feature )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_loadmat) identifier_loadmat (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (list_comprehension (identifier_k) identifier_k (for_in_clause (identifier_k) identifier_k (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_data) identifier_data (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )for_in_clause (if_clause (not_operator (call (attribute (identifier_k) identifier_k (identifier_startswith) identifier_startswith )attribute (argument_list (string_'__') string_'__' )argument_list )call )not_operator )if_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (None) None )comparison_operator (block (return_statement (call (identifier_imresize) identifier_imresize (argument_list (subscript (identifier_data) identifier_data (call (attribute (identifier_name) identifier_name (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )subscript (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute )argument_list )call )return_statement )block )if_statement (return_statement (subscript (identifier_data) identifier_data (call (attribute (identifier_name) identifier_name (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )subscript )return_statement )block )function_definition )module
Load a feature from disk.
(module (function_definition (function_name__write_cron_lines) function_name__write_cron_lines (parameters (identifier_user) identifier_user (identifier_lines) identifier_lines )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (list_comprehension (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_stringutils) identifier_stringutils )attribute (identifier_to_str) identifier_to_str )attribute (argument_list (identifier__l) identifier__l )argument_list )call (for_in_clause (identifier__l) identifier__l (identifier_lines) identifier_lines )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_files) identifier_files )attribute (identifier_mkstemp) identifier_mkstemp )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (identifier__check_instance_uid_match) identifier__check_instance_uid_match (argument_list (identifier_user) identifier_user )argument_list )call (comparison_operator (call (attribute (identifier___grains__) identifier___grains__ (identifier_get) identifier_get )attribute (argument_list (string_'os_family') string_'os_family' )argument_list )call (tuple (string_'Solaris') string_'Solaris' (string_'AIX') string_'AIX' )tuple )comparison_operator )boolean_operator (block (with_statement (with_clause (with_item (as_pattern (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_files) identifier_files )attribute (identifier_fpopen) identifier_fpopen )attribute (argument_list (identifier_path) identifier_path (string_'w+') string_'w+' (keyword_argument (identifier_uid) identifier_uid (call (subscript (identifier___salt__) identifier___salt__ (string_'file.user_to_uid') string_'file.user_to_uid' )subscript (argument_list (identifier_user) identifier_user )argument_list )call )keyword_argument (keyword_argument (identifier_mode) identifier_mode (integer_0o600) integer_0o600 )keyword_argument )argument_list )call (as_pattern_target (identifier_fp_) identifier_fp_ )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_fp_) identifier_fp_ (identifier_writelines) identifier_writelines )attribute (argument_list (identifier_lines) identifier_lines )argument_list )call )expression_statement )block )with_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (call (identifier__get_cron_cmdstr) identifier__get_cron_cmdstr (argument_list (identifier_path) identifier_path )argument_list )call (keyword_argument (identifier_runas) identifier_runas (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (with_statement (with_clause (with_item (as_pattern (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_files) identifier_files )attribute (identifier_fpopen) identifier_fpopen )attribute (argument_list (identifier_path) identifier_path (string_'w+') string_'w+' (keyword_argument (identifier_mode) identifier_mode (integer_0o600) integer_0o600 )keyword_argument )argument_list )call (as_pattern_target (identifier_fp_) identifier_fp_ )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_fp_) identifier_fp_ (identifier_writelines) identifier_writelines )attribute (argument_list (identifier_lines) identifier_lines )argument_list )call )expression_statement )block )with_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (call (identifier__get_cron_cmdstr) identifier__get_cron_cmdstr (argument_list (identifier_path) identifier_path (identifier_user) identifier_user )argument_list )call (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Takes a list of lines to be committed to a user's crontab and writes it
(module (function_definition (function_name_jsonify) function_name_jsonify (parameters (identifier_obj) identifier_obj )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_obj) identifier_obj (string_'to_json') string_'to_json' )argument_list )call (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_obj) identifier_obj (identifier_to_json) identifier_to_json )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__push_metadata) identifier__push_metadata (argument_list (identifier_d) identifier_d (identifier_obj) identifier_obj )argument_list )call )expression_statement (return_statement (call (identifier_jsonify) identifier_jsonify (argument_list (identifier_d) identifier_d )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )argument_list )call (block (return_statement (call (attribute (identifier_obj) identifier_obj (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (tuple (attribute (identifier_np) identifier_np (identifier_int32) identifier_int32 )attribute (attribute (identifier_np) identifier_np (identifier_int64) identifier_int64 )attribute )tuple )argument_list )call (block (return_statement (call (identifier_int) identifier_int (argument_list (identifier_obj) identifier_obj )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_np) identifier_np (identifier_float64) identifier_float64 )attribute )argument_list )call (block (return_statement (call (identifier_float) identifier_float (argument_list (identifier_obj) identifier_obj )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_dict) identifier_dict )argument_list )call (block (return_statement (call (identifier__jsonify_dict) identifier__jsonify_dict (argument_list (identifier_obj) identifier_obj )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_obj) identifier_obj (string_'__dict__') string_'__dict__' )argument_list )call (block (return_statement (call (identifier__jsonify_dict) identifier__jsonify_dict (argument_list (attribute (identifier_obj) identifier_obj (identifier___dict__) identifier___dict__ )attribute )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (block (return_statement (list_comprehension (call (identifier_jsonify) identifier_jsonify (argument_list (identifier_item) identifier_item )argument_list )call (for_in_clause (identifier_item) identifier_item (identifier_obj) identifier_obj )for_in_clause )list_comprehension )return_statement )block )if_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Return a JSON-encodable representation of an object, recursively using any available ``to_json`` methods, converting NumPy arrays and datatypes to native lists and types along the way.
(module (function_definition (function_name_draw_group_labels) function_name_draw_group_labels (parameters (identifier_self) identifier_self )parameters (block (for_statement (pattern_list (identifier_i) identifier_i (identifier_label) identifier_label )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_groups) identifier_groups )attribute )argument_list )call (block (expression_statement (assignment (identifier_label_x) identifier_label_x (subscript (subscript (attribute (identifier_self) identifier_self (identifier_group_label_coords) identifier_group_label_coords )attribute (string_"x") string_"x" )subscript (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_label_y) identifier_label_y (subscript (subscript (attribute (identifier_self) identifier_self (identifier_group_label_coords) identifier_group_label_coords )attribute (string_"y") string_"y" )subscript (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_label_ha) identifier_label_ha (subscript (subscript (attribute (identifier_self) identifier_self (identifier_group_label_aligns) identifier_group_label_aligns )attribute (string_"has") string_"has" )subscript (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_label_va) identifier_label_va (subscript (subscript (attribute (identifier_self) identifier_self (identifier_group_label_aligns) identifier_group_label_aligns )attribute (string_"vas") string_"vas" )subscript (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_color) identifier_color (subscript (attribute (identifier_self) identifier_self (identifier_group_label_color) identifier_group_label_color )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute (identifier_text) identifier_text )attribute (argument_list (keyword_argument (identifier_s) identifier_s (identifier_label) identifier_label )keyword_argument (keyword_argument (identifier_x) identifier_x (identifier_label_x) identifier_label_x )keyword_argument (keyword_argument (identifier_y) identifier_y (identifier_label_y) identifier_label_y )keyword_argument (keyword_argument (identifier_ha) identifier_ha (identifier_label_ha) identifier_label_ha )keyword_argument (keyword_argument (identifier_va) identifier_va (identifier_label_va) identifier_label_va )keyword_argument (keyword_argument (identifier_color) identifier_color (identifier_color) identifier_color )keyword_argument (keyword_argument (identifier_fontsize) identifier_fontsize (attribute (identifier_self) identifier_self (identifier_fontsize) identifier_fontsize )attribute )keyword_argument (keyword_argument (identifier_family) identifier_family (attribute (identifier_self) identifier_self (identifier_fontfamily) identifier_fontfamily )attribute )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Renders group labels to the figure.
(module (function_definition (function_name_run) function_name_run (parameters )parameters (block (expression_statement (assignment (identifier_command) identifier_command (call (attribute (call (attribute (subscript (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (integer_1) integer_1 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'[COMMAND]:') string_'[COMMAND]:' (identifier_command) identifier_command )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_command) identifier_command (string_'test') string_'test' )comparison_operator (block (return_statement (call (identifier_run_test) identifier_run_test (argument_list )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_command) identifier_command (string_'build') string_'build' )comparison_operator (block (return_statement (call (identifier_run_build) identifier_run_build (argument_list )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_command) identifier_command (string_'up') string_'up' )comparison_operator (block (return_statement (call (identifier_run_container) identifier_run_container (argument_list )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_command) identifier_command (string_'serve') string_'serve' )comparison_operator (block (import_statement (dotted_name (identifier_cauldron) identifier_cauldron )dotted_name )import_statement (expression_statement (call (attribute (identifier_cauldron) identifier_cauldron (identifier_run_server) identifier_run_server )attribute (argument_list (keyword_argument (identifier_port) identifier_port (integer_5010) integer_5010 )keyword_argument (keyword_argument (identifier_public) identifier_public (True) True )keyword_argument )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Execute the Cauldron container command
(module (function_definition (function_name__x_axis) function_name__x_axis (parameters (identifier_self) identifier_self (default_parameter (identifier_draw_axes) identifier_draw_axes (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_axis) identifier_axis (call (attribute (attribute (identifier_self) identifier_self (identifier_svg) identifier_svg )attribute (identifier_node) identifier_node )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_nodes) identifier_nodes )attribute (string_'plot') string_'plot' )subscript (keyword_argument (identifier_class_) identifier_class_ (string_"axis y gauge") string_"axis y gauge" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (call (attribute (identifier_self) identifier_self (identifier_view) identifier_view )attribute (argument_list (tuple (integer_0) integer_0 (integer_0) integer_0 )tuple )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_svg) identifier_svg )attribute (identifier_node) identifier_node )attribute (argument_list (identifier_axis) identifier_axis (string_'circle') string_'circle' (keyword_argument (identifier_cx) identifier_cx (identifier_x) identifier_x )keyword_argument (keyword_argument (identifier_cy) identifier_cy (identifier_y) identifier_y )keyword_argument (keyword_argument (identifier_r) identifier_r (integer_4) integer_4 )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Override x axis to put a center circle in center
(module (function_definition (function_name_bots_delete) function_name_bots_delete (parameters (identifier_self) identifier_self (identifier_bot) identifier_bot )parameters (block (expression_statement (call (attribute (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_bots) identifier_bots )attribute (identifier___getattr__) identifier___getattr__ )attribute (argument_list (attribute (identifier_bot) identifier_bot (identifier_name) identifier_name )attribute )argument_list )call (identifier___call__) identifier___call__ )attribute (argument_list (keyword_argument (identifier__method) identifier__method (string_"DELETE") string_"DELETE" )keyword_argument (keyword_argument (identifier__params) identifier__params (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_botName) identifier_botName (attribute (identifier_bot) identifier_bot (identifier_name) identifier_name )attribute )keyword_argument )argument_list )call )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Delete existing bot :param bot: bot to delete :type bot: Bot
(module (function_definition (function_name_handle) function_name_handle (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_options) identifier_set_options )attribute (argument_list (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_destination_path) identifier_destination_path )attribute (keyword_argument (identifier_exist_ok) identifier_exist_ok (True) True )keyword_argument )argument_list )call )expression_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_interactive) identifier_interactive )attribute (call (identifier_any) identifier_any (argument_list (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_destination_path) identifier_destination_path )attribute )argument_list )call )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_get_confirmation) identifier_get_confirmation )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_clear) identifier_clear )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear_dir) identifier_clear_dir )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_collect) identifier_collect )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Collect tools.
(module (function_definition (function_name_plot_shade_mask) function_name_plot_shade_mask (parameters (identifier_ax) identifier_ax (identifier_ind) identifier_ind (identifier_mask) identifier_mask (default_parameter (identifier_facecolor) identifier_facecolor (string_'gray') string_'gray' )default_parameter (default_parameter (identifier_alpha) identifier_alpha (float_0.5) float_0.5 )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_ymin) identifier_ymin (identifier_ymax) identifier_ymax )pattern_list (call (attribute (identifier_ax) identifier_ax (identifier_get_ylim) identifier_get_ylim )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ax) identifier_ax (identifier_fill_between) identifier_fill_between )attribute (argument_list (identifier_ind) identifier_ind (identifier_ymin) identifier_ymin (identifier_ymax) identifier_ymax (keyword_argument (identifier_where) identifier_where (identifier_mask) identifier_mask )keyword_argument (keyword_argument (identifier_facecolor) identifier_facecolor (identifier_facecolor) identifier_facecolor )keyword_argument (keyword_argument (identifier_alpha) identifier_alpha (identifier_alpha) identifier_alpha )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_ax) identifier_ax )return_statement )block )function_definition )module
Shade across x values where boolean mask is `True` Args ---- ax: pyplot.ax Axes object to plot with a shaded region ind: ndarray The indices to use for the x-axis values of the data mask: ndarray Boolean mask array to determine which regions should be shaded facecolor: matplotlib color Color of the shaded area Returns ------- ax: pyplot.ax Axes object with the shaded region added
(module (function_definition (function_name_get_visualizations) function_name_get_visualizations (parameters )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_g) identifier_g (string_'visualizations') string_'visualizations' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_g) identifier_g (identifier_visualizations) identifier_visualizations )attribute (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_VisClass) identifier_VisClass (call (identifier__get_visualization_classes) identifier__get_visualization_classes (argument_list )argument_list )call (block (expression_statement (assignment (identifier_vis) identifier_vis (call (identifier_VisClass) identifier_VisClass (argument_list (call (identifier_get_model) identifier_get_model (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_g) identifier_g (identifier_visualizations) identifier_visualizations )attribute (attribute (attribute (identifier_vis) identifier_vis (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )subscript (identifier_vis) identifier_vis )assignment )expression_statement )block )for_statement )block )if_statement (return_statement (attribute (identifier_g) identifier_g (identifier_visualizations) identifier_visualizations )attribute )return_statement )block )function_definition )module
Get the available visualizations from the request context. Put the visualizations in the request context if they are not yet there. Returns: :obj:`list` of instances of :class:`.BaseVisualization` or derived class
(module (function_definition (function_name_insert_loan_entries) function_name_insert_loan_entries (parameters (identifier_database) identifier_database (identifier_entries) identifier_entries )parameters (block (expression_statement (assignment (identifier_entries) identifier_entries (call (identifier_map) identifier_map (argument_list (identifier_clean_entry) identifier_clean_entry (identifier_entries) identifier_entries )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_database) identifier_database (identifier_loans) identifier_loans )attribute (identifier_insert) identifier_insert )attribute (argument_list (identifier_entries) identifier_entries (keyword_argument (identifier_continue_on_error) identifier_continue_on_error (True) True )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Insert a set of records of a loan report in the provided database. Insert a set of new records into the provided database without checking for conflicting entries. @param db: The MongoDB database to operate on. The loans collection will be used from this database. @type db: pymongo.database.Database @param entries: The entries to insert into the database. @type entries: dict
(module (function_definition (function_name_set_values) function_name_set_values (parameters (identifier_self) identifier_self (identifier_x) identifier_x )parameters (block (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_numpy) identifier_numpy (identifier_atleast_2d) identifier_atleast_2d )attribute (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (attribute (identifier_x) identifier_x (identifier_real) identifier_real )attribute )assignment )expression_statement (expression_statement (assignment (identifier_C_inv) identifier_C_inv (attribute (identifier_self) identifier_self (identifier___C_inv__) identifier___C_inv__ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_theta) identifier_theta (call (attribute (identifier_numpy) identifier_numpy (identifier_dot) identifier_dot )attribute (argument_list (identifier_x) identifier_x (identifier_C_inv) identifier_C_inv )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_theta) identifier_theta )attribute (identifier_theta) identifier_theta )assignment )expression_statement (return_statement (identifier_theta) identifier_theta )return_statement )block )function_definition )module
Updates self.theta parameter. No returns values
(module (function_definition (function_name_fit_transform) function_name_fit_transform (parameters (identifier_self) identifier_self (identifier_X) identifier_X (default_parameter (identifier_y) identifier_y (None) None )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_U) identifier_U (identifier_S) identifier_S (identifier_V) identifier_V )pattern_list (call (attribute (identifier_self) identifier_self (identifier__fit) identifier__fit )attribute (argument_list (identifier_X) identifier_X )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_U) identifier_U (subscript (identifier_U) identifier_U (slice (colon) colon )slice (slice (colon) colon (attribute (identifier_self) identifier_self (identifier_n_components_) identifier_n_components_ )attribute )slice )subscript )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_whiten) identifier_whiten )attribute (block (expression_statement (augmented_assignment (identifier_U) identifier_U (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (subscript (attribute (identifier_X) identifier_X (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (integer_1) integer_1 )binary_operator )argument_list )call )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_U) identifier_U (subscript (identifier_S) identifier_S (slice (colon) colon (attribute (identifier_self) identifier_self (identifier_n_components_) identifier_n_components_ )attribute )slice )subscript )augmented_assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_U) identifier_U )return_statement )block )function_definition )module
Fit the model with X and apply the dimensionality reduction on X. Parameters ---------- X : array-like, shape (n_samples, n_features) New data, where n_samples in the number of samples and n_features is the number of features. y : Ignored Returns ------- X_new : array-like, shape (n_samples, n_components)
(module (function_definition (function_name_contains_plural_field) function_name_contains_plural_field (parameters (identifier_model) identifier_model (identifier_fields) identifier_fields )parameters (block (expression_statement (assignment (identifier_source_model) identifier_source_model (identifier_model) identifier_model )assignment )expression_statement (for_statement (identifier_orm_path) identifier_orm_path (identifier_fields) identifier_fields (block (expression_statement (assignment (identifier_model) identifier_model (identifier_source_model) identifier_source_model )assignment )expression_statement (expression_statement (assignment (identifier_bits) identifier_bits (call (attribute (call (attribute (identifier_orm_path) identifier_orm_path (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'+-') string_'+-' )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_'__') string_'__' )argument_list )call )assignment )expression_statement (for_statement (identifier_bit) identifier_bit (subscript (identifier_bits) identifier_bits (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (block (expression_statement (assignment (identifier_field) identifier_field (call (attribute (attribute (identifier_model) identifier_model (identifier__meta) identifier__meta )attribute (identifier_get_field) identifier_get_field )attribute (argument_list (identifier_bit) identifier_bit )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (attribute (identifier_field) identifier_field (identifier_many_to_many) identifier_many_to_many )attribute (attribute (identifier_field) identifier_field (identifier_one_to_many) identifier_one_to_many )attribute )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (expression_statement (assignment (identifier_model) identifier_model (call (identifier_get_model_at_related_field) identifier_get_model_at_related_field (argument_list (identifier_model) identifier_model (identifier_bit) identifier_bit )argument_list )call )assignment )expression_statement )block )for_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Returns a boolean indicating if ``fields`` contains a relationship to multiple items.
(module (function_definition (function_name_binary_arguments_to_tensors) function_name_binary_arguments_to_tensors (parameters (identifier_x1) identifier_x1 (identifier_x2) identifier_x2 )parameters (block (if_statement (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x1) identifier_x1 (identifier_Tensor) identifier_Tensor )argument_list )call )not_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x2) identifier_x2 (identifier_Tensor) identifier_Tensor )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"at least one of x1 and x2 must be an mtf Tensor") string_"at least one of x1 and x2 must be an mtf Tensor" )argument_list )call )raise_statement )block (elif_clause (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x1) identifier_x1 (identifier_Tensor) identifier_Tensor )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x2) identifier_x2 (identifier_Tensor) identifier_Tensor )argument_list )call )boolean_operator (block (return_statement (expression_list (identifier_x1) identifier_x1 (identifier_x2) identifier_x2 )expression_list )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x1) identifier_x1 (identifier_Tensor) identifier_Tensor )argument_list )call (block (return_statement (expression_list (identifier_x1) identifier_x1 (call (identifier_import_tf_tensor) identifier_import_tf_tensor (argument_list (attribute (identifier_x1) identifier_x1 (identifier_mesh) identifier_mesh )attribute (call (attribute (identifier_tf) identifier_tf (identifier_convert_to_tensor) identifier_convert_to_tensor )attribute (argument_list (identifier_x2) identifier_x2 (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_x1) identifier_x1 (identifier_dtype) identifier_dtype )attribute )keyword_argument )argument_list )call (call (identifier_Shape) identifier_Shape (argument_list (list )list )argument_list )call )argument_list )call )expression_list )return_statement )block )elif_clause (else_clause (block (return_statement (expression_list (call (identifier_import_tf_tensor) identifier_import_tf_tensor (argument_list (attribute (identifier_x2) identifier_x2 (identifier_mesh) identifier_mesh )attribute (call (attribute (identifier_tf) identifier_tf (identifier_convert_to_tensor) identifier_convert_to_tensor )attribute (argument_list (identifier_x1) identifier_x1 (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_x2) identifier_x2 (identifier_dtype) identifier_dtype )attribute )keyword_argument )argument_list )call (call (identifier_Shape) identifier_Shape (argument_list (list )list )argument_list )call )argument_list )call (identifier_x2) identifier_x2 )expression_list )return_statement )block )else_clause )if_statement )block )function_definition )module
Convert argument of a binary operation to Tensors. Args: x1: a Tensor or something convertible to a tf Scalar x2: a Tensor or something convertible to a tf Scalar Returns: new_x1: a Tensor new_x2: a Tensor Raises: ValueError: on failure
(module (function_definition (function_name_split) function_name_split (parameters (identifier_self) identifier_self (identifier_pat) identifier_pat (default_parameter (identifier_side) identifier_side (string_'left') string_'left' )default_parameter )parameters (block (expression_statement (call (identifier_check_type) identifier_check_type (argument_list (identifier_pat) identifier_pat (identifier_str) identifier_str )argument_list )call )expression_statement (expression_statement (call (identifier_check_type) identifier_check_type (argument_list (identifier_side) identifier_side (identifier_str) identifier_str )argument_list )call )expression_statement (expression_statement (assignment (identifier__split_mapping) identifier__split_mapping (dictionary (pair (string_'left') string_'left' (integer_0) integer_0 )pair (pair (string_'right') string_'right' (integer_1) integer_1 )pair )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_side) identifier_side (identifier__split_mapping) identifier__split_mapping )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Can only select left or right side of split') string_'Can only select left or right side of split' )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier__series_str_result) identifier__series_str_result (argument_list (identifier_self) identifier_self (identifier_weld_str_split) identifier_weld_str_split (keyword_argument (identifier_pat) identifier_pat (identifier_pat) identifier_pat )keyword_argument (keyword_argument (identifier_side) identifier_side (subscript (identifier__split_mapping) identifier__split_mapping (identifier_side) identifier_side )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Split once each element from the left and select a side to return. Note this is unlike pandas split in that it essentially combines the split with a select. Parameters ---------- pat : str side : {'left', 'right'} Which side of the split to select and return in each element. Returns ------- Series
(module (function_definition (function_name_get_rule_table) function_name_get_rule_table (parameters (identifier_rules) identifier_rules )parameters (block (expression_statement (assignment (identifier_table) identifier_table (call (attribute (identifier_formatting) identifier_formatting (identifier_Table) identifier_Table )attribute (argument_list (list (string_'Id') string_'Id' (string_'KeyName') string_'KeyName' )list (string_"Rules") string_"Rules" )argument_list )call )assignment )expression_statement (for_statement (identifier_rule) identifier_rule (identifier_rules) identifier_rules (block (expression_statement (call (attribute (identifier_table) identifier_table (identifier_add_row) identifier_add_row )attribute (argument_list (list (subscript (identifier_rule) identifier_rule (string_'id') string_'id' )subscript (subscript (identifier_rule) identifier_rule (string_'keyName') string_'keyName' )subscript )list )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_table) identifier_table )return_statement )block )function_definition )module
Formats output from get_all_rules and returns a table.
(module (function_definition (function_name_apply_defaults) function_name_apply_defaults (parameters (identifier_self) identifier_self (identifier_other_config) identifier_other_config )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_other_config) identifier_other_config (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_load_from_dict) identifier_load_from_dict )attribute (argument_list (attribute (identifier_other_config) identifier_other_config (identifier_config) identifier_config )attribute (keyword_argument (identifier_overwrite) identifier_overwrite (False) False )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_load_from_dict) identifier_load_from_dict )attribute (argument_list (identifier_other_config) identifier_other_config (keyword_argument (identifier_overwrite) identifier_overwrite (False) False )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Applies default values from a different ConfigObject or ConfigKey object to this ConfigObject. If there are any values in this object that are also in the default object, it will use the values from this object.
(module (function_definition (function_name_en010) function_name_en010 (parameters (identifier_self) identifier_self (default_parameter (identifier_value) identifier_value (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_float) identifier_float (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'value {} need to be of type float ') string_'value {} need to be of type float ' (string_'for field `en010`') string_'for field `en010`' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__en010) identifier__en010 )attribute (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Corresponds to IDD Field `en010` mean coincident dry-bulb temperature to Enthalpy corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `en010` Unit: kJ/kg if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
(module (function_definition (function_name_a_send_line) function_name_a_send_line (parameters (identifier_text) identifier_text (identifier_ctx) identifier_ctx )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_text) identifier_text (string_'__iter__') string_'__iter__' )argument_list )call (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_ctx) identifier_ctx (identifier_ctrl) identifier_ctrl )attribute (identifier_sendline) identifier_sendline )attribute (argument_list (call (attribute (identifier_text) identifier_text (identifier_next) identifier_next )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block (except_clause (identifier_StopIteration) identifier_StopIteration (block (expression_statement (assignment (attribute (identifier_ctx) identifier_ctx (identifier_finished) identifier_finished )attribute (True) True )assignment )expression_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_ctx) identifier_ctx (identifier_ctrl) identifier_ctrl )attribute (identifier_sendline) identifier_sendline )attribute (argument_list (identifier_text) identifier_text )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Send text line to the controller followed by `os.linesep`.
(module (function_definition (function_name_consume) function_name_consume (parameters (identifier_self) identifier_self (default_parameter (identifier_amount) identifier_amount (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_self) identifier_self (identifier_leak) identifier_leak )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (binary_operator (identifier_current) identifier_current (identifier_amount) identifier_amount )binary_operator (attribute (identifier_self) identifier_self (identifier_capacity) identifier_capacity )attribute )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__incr) identifier__incr )attribute (argument_list (identifier_amount) identifier_amount )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Consume one or more units from the bucket.
(module (function_definition (function_name_pretty_print_str) function_name_pretty_print_str (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_retval) identifier_retval (string_'') string_'' )assignment )expression_statement (expression_statement (assignment (identifier_todo) identifier_todo (list (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute )list )assignment )expression_statement (while_statement (identifier_todo) identifier_todo (block (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_todo) identifier_todo (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_char) identifier_char (call (identifier_reversed) identifier_reversed (argument_list (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_current) identifier_current (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_todo) identifier_todo (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_current) identifier_current (identifier_char) identifier_char )subscript )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_indent) identifier_indent (binary_operator (string_' ') string_' ' (parenthesized_expression (binary_operator (attribute (identifier_current) identifier_current (identifier_depth) identifier_depth )attribute (integer_2) integer_2 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_retval) identifier_retval (binary_operator (binary_operator (identifier_indent) identifier_indent (call (attribute (identifier_current) identifier_current (identifier___unicode__) identifier___unicode__ )attribute (argument_list )argument_list )call )binary_operator (string_'\n') string_'\n' )binary_operator )augmented_assignment )expression_statement )block )while_statement (return_statement (call (attribute (identifier_retval) identifier_retval (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )return_statement )block )function_definition )module
Create a string to pretty-print this trie to standard output.
(module (function_definition (function_name_get_axis_value) function_name_get_axis_value (parameters (identifier_self) identifier_self (identifier_axis) identifier_axis )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_type) identifier_type )attribute (attribute (identifier_EventType) identifier_EventType (identifier_POINTER_AXIS) identifier_POINTER_AXIS )attribute )comparison_operator (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (call (attribute (identifier__wrong_meth) identifier__wrong_meth (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_type) identifier_type )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__libinput) identifier__libinput )attribute (identifier_libinput_event_pointer_get_axis_value) identifier_libinput_event_pointer_get_axis_value )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__handle) identifier__handle )attribute (identifier_axis) identifier_axis )argument_list )call )return_statement )block )function_definition )module
Return the axis value of the given axis. The interpretation of the value depends on the axis. For the two scrolling axes :attr:`~libinput.constant.PointerAxis.SCROLL_VERTICAL` and :attr:`~libinput.constant.PointerAxis.SCROLL_HORIZONTAL`, the value of the event is in relative scroll units, with the positive direction being down or right, respectively. For the interpretation of the value, see :attr:`axis_source`. If :meth:`has_axis` returns False for an axis, this method returns 0 for that axis. For pointer events that are not of type :attr:`~libinput.constant.Event.POINTER_AXIS`, this method raises :exc:`AttributeError`. Args: axis (~libinput.constant.PointerAxis): The axis who's value to get. Returns: float: The axis value of this event. Raises: AttributeError
(module (function_definition (function_name__use_widgets) function_name__use_widgets (parameters (identifier_objs) identifier_objs )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_models) identifier_models (identifier_widgets) identifier_widgets )dotted_name )relative_import (dotted_name (identifier_Widget) identifier_Widget )dotted_name )import_from_statement (return_statement (call (identifier__any) identifier__any (argument_list (identifier_objs) identifier_objs (lambda (lambda_parameters (identifier_obj) identifier_obj )lambda_parameters (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_Widget) identifier_Widget )argument_list )call )lambda )argument_list )call )return_statement )block )function_definition )module
Whether a collection of Bokeh objects contains a any Widget Args: objs (seq[Model or Document]) : Returns: bool
(module (function_definition (function_name_regexp_replace) function_name_regexp_replace (parameters (identifier_str) identifier_str (identifier_pattern) identifier_pattern (identifier_replacement) identifier_replacement )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_sc) identifier_sc (attribute (identifier_SparkContext) identifier_SparkContext (identifier__active_spark_context) identifier__active_spark_context )attribute )assignment )expression_statement (expression_statement (assignment (identifier_jc) identifier_jc (call (attribute (attribute (attribute (identifier_sc) identifier_sc (identifier__jvm) identifier__jvm )attribute (identifier_functions) identifier_functions )attribute (identifier_regexp_replace) identifier_regexp_replace )attribute (argument_list (call (identifier__to_java_column) identifier__to_java_column (argument_list (identifier_str) identifier_str )argument_list )call (identifier_pattern) identifier_pattern (identifier_replacement) identifier_replacement )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Column) identifier_Column (argument_list (identifier_jc) identifier_jc )argument_list )call )return_statement )block )function_definition )module
r"""Replace all substrings of the specified string value that match regexp with rep. >>> df = spark.createDataFrame([('100-200',)], ['str']) >>> df.select(regexp_replace('str', r'(\d+)', '--').alias('d')).collect() [Row(d=u'-----')]
(module (function_definition (function_name_as_fixture) function_name_as_fixture (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )assignment )expression_statement )block )if_statement (function_definition (function_name_deco) function_name_deco (parameters (identifier_f) identifier_f )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_f) identifier_f )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (with_statement (with_clause (with_item (identifier_self) identifier_self )with_item )with_clause (block (expression_statement (assignment (subscript (identifier_kw) identifier_kw (identifier_name) identifier_name )subscript (identifier_self) identifier_self )assignment )expression_statement (return_statement (call (identifier_f) identifier_f (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call )return_statement )block )with_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition (return_statement (identifier_deco) identifier_deco )return_statement )block )function_definition )module
A decorator to inject this container into a function as a test fixture.
(module (function_definition (function_name_ToManagedObject) function_name_ToManagedObject (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_Ucs) identifier_Ucs )dotted_name (dotted_name (identifier_ClassFactory) identifier_ClassFactory )dotted_name )import_from_statement (expression_statement (assignment (identifier_cln) identifier_cln (call (attribute (identifier_UcsUtils) identifier_UcsUtils (identifier_WordU) identifier_WordU )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_classId) identifier_classId )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mo) identifier_mo (call (identifier_ClassFactory) identifier_ClassFactory (argument_list (identifier_cln) identifier_cln )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_mo) identifier_mo (parenthesized_expression (comparison_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_mo) identifier_mo (identifier_ManagedObject) identifier_ManagedObject )argument_list )call (True) True )comparison_operator )parenthesized_expression )boolean_operator (block (expression_statement (assignment (identifier_metaClassId) identifier_metaClassId (call (attribute (identifier_UcsUtils) identifier_UcsUtils (identifier_FindClassIdInMoMetaIgnoreCase) identifier_FindClassIdInMoMetaIgnoreCase )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_classId) identifier_classId )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_property) identifier_property (attribute (identifier_self) identifier_self (identifier_properties) identifier_properties )attribute (block (if_statement (comparison_operator (call (attribute (identifier_UcsUtils) identifier_UcsUtils (identifier_WordU) identifier_WordU )attribute (argument_list (identifier_property) identifier_property )argument_list )call (call (attribute (identifier_UcsUtils) identifier_UcsUtils (identifier_GetUcsPropertyMetaAttributeList) identifier_GetUcsPropertyMetaAttributeList )attribute (argument_list (identifier_metaClassId) identifier_metaClassId )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_mo) identifier_mo (identifier_setattr) identifier_setattr )attribute (argument_list (call (attribute (identifier_UcsUtils) identifier_UcsUtils (identifier_WordU) identifier_WordU )attribute (argument_list (identifier_property) identifier_property )argument_list )call (subscript (attribute (identifier_self) identifier_self (identifier_properties) identifier_properties )attribute (identifier_property) identifier_property )subscript )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_WriteUcsWarning) identifier_WriteUcsWarning (argument_list (binary_operator (string_"Property %s Not Exist in MO %s") string_"Property %s Not Exist in MO %s" (tuple (call (attribute (identifier_UcsUtils) identifier_UcsUtils (identifier_WordU) identifier_WordU )attribute (argument_list (identifier_property) identifier_property )argument_list )call (identifier_metaClassId) identifier_metaClassId )tuple )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (if_statement (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_child) identifier_child )attribute )argument_list )call (block (for_statement (identifier_ch) identifier_ch (attribute (identifier_self) identifier_self (identifier_child) identifier_child )attribute (block (expression_statement (assignment (identifier_moch) identifier_moch (call (attribute (identifier_ch) identifier_ch (identifier_ToManagedObject) identifier_ToManagedObject )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_mo) identifier_mo (identifier_child) identifier_child )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_moch) identifier_moch )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_mo) identifier_mo )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Method creates and returns an object of ManagedObject class using the classId and information from the Generic managed object.
(module (function_definition (function_name_i2repr) function_name_i2repr (parameters (identifier_self) identifier_self (identifier_pkt) identifier_pkt (identifier_packed_seconds) identifier_packed_seconds )parameters (block (expression_statement (assignment (identifier_time_struct) identifier_time_struct (call (attribute (identifier_time) identifier_time (identifier_gmtime) identifier_gmtime )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__convert_seconds) identifier__convert_seconds )attribute (argument_list (identifier_packed_seconds) identifier_packed_seconds )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_time) identifier_time (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%a %b %d %H:%M:%S %Y") string_"%a %b %d %H:%M:%S %Y" (identifier_time_struct) identifier_time_struct )argument_list )call )return_statement )block )function_definition )module
Convert the internal representation to a nice one using the RFC format.
(module (function_definition (function_name_process_train_set) function_name_process_train_set (parameters (identifier_hdf5_file) identifier_hdf5_file (identifier_train_archive) identifier_train_archive (identifier_patch_archive) identifier_patch_archive (identifier_n_train) identifier_n_train (identifier_wnid_map) identifier_wnid_map (default_parameter (identifier_shuffle_seed) identifier_shuffle_seed (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_producer) identifier_producer (call (identifier_partial) identifier_partial (argument_list (identifier_train_set_producer) identifier_train_set_producer (keyword_argument (identifier_train_archive) identifier_train_archive (identifier_train_archive) identifier_train_archive )keyword_argument (keyword_argument (identifier_patch_archive) identifier_patch_archive (identifier_patch_archive) identifier_patch_archive )keyword_argument (keyword_argument (identifier_wnid_map) identifier_wnid_map (identifier_wnid_map) identifier_wnid_map )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_consumer) identifier_consumer (call (identifier_partial) identifier_partial (argument_list (identifier_image_consumer) identifier_image_consumer (keyword_argument (identifier_hdf5_file) identifier_hdf5_file (identifier_hdf5_file) identifier_hdf5_file )keyword_argument (keyword_argument (identifier_num_expected) identifier_num_expected (identifier_n_train) identifier_n_train )keyword_argument (keyword_argument (identifier_shuffle_seed) identifier_shuffle_seed (identifier_shuffle_seed) identifier_shuffle_seed )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_producer_consumer) identifier_producer_consumer (argument_list (identifier_producer) identifier_producer (identifier_consumer) identifier_consumer )argument_list )call )expression_statement )block )function_definition )module
Process the ILSVRC2010 training set. Parameters ---------- hdf5_file : :class:`h5py.File` instance HDF5 file handle to which to write. Assumes `features`, `targets` and `filenames` already exist and have first dimension larger than `n_train`. train_archive : str or file-like object Filename or file handle for the TAR archive of training images. patch_archive : str or file-like object Filename or file handle for the TAR archive of patch images. n_train : int The number of items in the training set. wnid_map : dict A dictionary mapping WordNet IDs to class indices. shuffle_seed : int or sequence, optional Seed for a NumPy random number generator that permutes the training set on disk. If `None`, no permutation is performed (this is the default).
(module (function_definition (function_name_do_layout) function_name_do_layout (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (list (integer_1) integer_1 (integer_1) integer_1 )list )comparison_operator (block (return_statement )return_statement )block )if_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_decks) identifier_decks )attribute )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_layout_deck) identifier_layout_deck )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Layout each of my decks
(module (function_definition (function_name_register_function_compilation) function_name_register_function_compilation (parameters (identifier_self) identifier_self (identifier_func) identifier_func (identifier_compilation_cbk) identifier_compilation_cbk (identifier_listclass) identifier_listclass )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_compilations_function) identifier_compilations_function )attribute (identifier_func) identifier_func )subscript (dictionary (pair (string_'callback') string_'callback' (identifier_compilation_cbk) identifier_compilation_cbk )pair (pair (string_'listclass') string_'listclass' (identifier_listclass) identifier_listclass )pair )dictionary )assignment )expression_statement )block )function_definition )module
Register given compilation method for given function. :param str path: Function name. :param callable compilation_cbk: Compilation callback to be called. :param class listclass: List class to use for lists.
(module (function_definition (function_name__determine_redirect) function_name__determine_redirect (parameters (identifier_self) identifier_self (identifier_url) identifier_url (identifier_verb) identifier_verb (default_parameter (identifier_timeout) identifier_timeout (integer_15) integer_15 )default_parameter (default_parameter (identifier_headers) identifier_headers (dictionary )dictionary )default_parameter )parameters (block (expression_statement (assignment (identifier_requests_verb) identifier_requests_verb (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_verb) identifier_verb )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (identifier_requests_verb) identifier_requests_verb (argument_list (identifier_url) identifier_url (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_allow_redirects) identifier_allow_redirects (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_redirect) identifier_redirect (comparison_operator (integer_300) integer_300 (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (integer_400) integer_400 )comparison_operator )assignment )expression_statement (expression_statement (assignment (identifier_url_new) identifier_url_new (identifier_url) identifier_url )assignment )expression_statement (if_statement (identifier_redirect) identifier_redirect (block (expression_statement (assignment (identifier_redirect_url) identifier_redirect_url (subscript (attribute (identifier_r) identifier_r (identifier_headers) identifier_headers )attribute (string_'Location') string_'Location' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_url_new) identifier_url_new (identifier_redirect_url) identifier_redirect_url )assignment )expression_statement (expression_statement (assignment (identifier_relative_redirect) identifier_relative_redirect (not_operator (call (attribute (identifier_redirect_url) identifier_redirect_url (identifier_startswith) identifier_startswith )attribute (argument_list (string_'http') string_'http' )argument_list )call )not_operator )assignment )expression_statement (if_statement (identifier_relative_redirect) identifier_relative_redirect (block (expression_statement (assignment (identifier_url_new) identifier_url_new (identifier_url) identifier_url )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_base_redir) identifier_base_redir (call (identifier_base_url) identifier_base_url (argument_list (identifier_redirect_url) identifier_redirect_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_base_supplied) identifier_base_supplied (call (identifier_base_url) identifier_base_url (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_same_base) identifier_same_base (comparison_operator (identifier_base_redir) identifier_base_redir (identifier_base_supplied) identifier_base_supplied )comparison_operator )assignment )expression_statement (if_statement (identifier_same_base) identifier_same_base (block (expression_statement (assignment (identifier_url_new) identifier_url_new (identifier_url) identifier_url )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_url_new) identifier_url_new )return_statement )block )function_definition )module
Internal redirect function, focuses on HTTP and worries less about application-y stuff. @param url: the url to check @param verb: the verb, e.g. head, or get. @param timeout: the time, in seconds, that requests should wait before throwing an exception. @param headers: a set of headers as expected by requests. @return: the url that needs to be scanned. It may be equal to the url parameter if no redirect is needed.
(module (function_definition (function_name_get_current_consumer_offsets) function_name_get_current_consumer_offsets (parameters (identifier_kafka_client) identifier_kafka_client (identifier_group) identifier_group (identifier_topics) identifier_topics (default_parameter (identifier_raise_on_error) identifier_raise_on_error (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_topics) identifier_topics (call (identifier__verify_topics_and_partitions) identifier__verify_topics_and_partitions (argument_list (identifier_kafka_client) identifier_kafka_client (identifier_topics) identifier_topics (identifier_raise_on_error) identifier_raise_on_error )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_group_offset_reqs) identifier_group_offset_reqs (list_comprehension (call (identifier_OffsetFetchRequestPayload) identifier_OffsetFetchRequestPayload (argument_list (identifier_topic) identifier_topic (identifier_partition) identifier_partition )argument_list )call (for_in_clause (pattern_list (identifier_topic) identifier_topic (identifier_partitions) identifier_partitions )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_topics) identifier_topics )argument_list )call )for_in_clause (for_in_clause (identifier_partition) identifier_partition (identifier_partitions) identifier_partitions )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_group_offsets) identifier_group_offsets (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_send_api) identifier_send_api (attribute (identifier_kafka_client) identifier_kafka_client (identifier_send_offset_fetch_request_kafka) identifier_send_offset_fetch_request_kafka )attribute )assignment )expression_statement (if_statement (identifier_group_offset_reqs) identifier_group_offset_reqs (block (expression_statement (assignment (identifier_group_resps) identifier_group_resps (call (identifier_send_api) identifier_send_api (argument_list (keyword_argument (identifier_group) identifier_group (identifier_group) identifier_group )keyword_argument (keyword_argument (identifier_payloads) identifier_payloads (identifier_group_offset_reqs) identifier_group_offset_reqs )keyword_argument (keyword_argument (identifier_fail_on_error) identifier_fail_on_error (False) False )keyword_argument (keyword_argument (identifier_callback) identifier_callback (identifier_pluck_topic_offset_or_zero_on_unknown) identifier_pluck_topic_offset_or_zero_on_unknown )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_resp) identifier_resp (identifier_group_resps) identifier_group_resps (block (expression_statement (assignment (subscript (call (attribute (identifier_group_offsets) identifier_group_offsets (identifier_setdefault) identifier_setdefault )attribute (argument_list (attribute (identifier_resp) identifier_resp (identifier_topic) identifier_topic )attribute (dictionary )dictionary )argument_list )call (attribute (identifier_resp) identifier_resp (identifier_partition) identifier_partition )attribute )subscript (attribute (identifier_resp) identifier_resp (identifier_offset) identifier_offset )attribute )assignment )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_group_offsets) identifier_group_offsets )return_statement )block )function_definition )module
Get current consumer offsets. NOTE: This method does not refresh client metadata. It is up to the caller to avoid using stale metadata. If any partition leader is not available, the request fails for all the other topics. This is the tradeoff of sending all topic requests in batch and save both in performance and Kafka load. :param kafka_client: a connected KafkaToolClient :param group: kafka group_id :param topics: topic list or dict {<topic>: [partitions]} :param raise_on_error: if False the method ignores missing topics and missing partitions. It still may fail on the request send. :returns: a dict topic: partition: offset :raises: :py:class:`kafka_utils.util.error.UnknownTopic`: upon missing topics and raise_on_error=True :py:class:`kafka_utils.util.error.UnknownPartition`: upon missing partitions and raise_on_error=True FailedPayloadsError: upon send request error.
(module (function_definition (function_name_serialize) function_name_serialize (parameters (identifier_self) identifier_self (default_parameter (identifier_keep_readonly) identifier_keep_readonly (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_serializer) identifier_serializer (call (identifier_Serializer) identifier_Serializer (argument_list (call (attribute (identifier_self) identifier_self (identifier__infer_class_models) identifier__infer_class_models )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_serializer) identifier_serializer (identifier__serialize) identifier__serialize )attribute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_keep_readonly) identifier_keep_readonly (identifier_keep_readonly) identifier_keep_readonly )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the JSON that would be sent to azure from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. :param bool keep_readonly: If you want to serialize the readonly attributes :returns: A dict JSON compatible object :rtype: dict
(module (function_definition (function_name_clear) function_name_clear (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_4) integer_4 )argument_list )call (block (while_statement (call (identifier_len) identifier_len (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__panels) identifier__panels )attribute (identifier_i) identifier_i )subscript )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (subscript (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_list) identifier_list (argument_list (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__panels) identifier__panels )attribute (identifier_i) identifier_i )subscript (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_panel) identifier_panel (call (attribute (identifier_self) identifier_self (identifier_remove) identifier_remove )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_panel) identifier_panel (identifier_setParent) identifier_setParent )attribute (argument_list (None) None )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_panel) identifier_panel (identifier_deleteLater) identifier_deleteLater )attribute (argument_list )argument_list )call )expression_statement )block )while_statement )block )for_statement )block )function_definition )module
Removes all panel from the CodeEditor.
(module (function_definition (function_name__raise_on_incompatible) function_name__raise_on_incompatible (parameters (identifier_left) identifier_left (identifier_right) identifier_right )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_right) identifier_right (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )argument_list )call (block (expression_statement (assignment (identifier_other_freq) identifier_other_freq (None) None )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_right) identifier_right (tuple (identifier_ABCPeriodIndex) identifier_ABCPeriodIndex (identifier_PeriodArray) identifier_PeriodArray (identifier_Period) identifier_Period (identifier_DateOffset) identifier_DateOffset )tuple )argument_list )call (block (expression_statement (assignment (identifier_other_freq) identifier_other_freq (attribute (identifier_right) identifier_right (identifier_freqstr) identifier_freqstr )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_other_freq) identifier_other_freq (attribute (call (identifier__delta_to_tick) identifier__delta_to_tick (argument_list (call (identifier_Timedelta) identifier_Timedelta (argument_list (identifier_right) identifier_right )argument_list )call )argument_list )call (identifier_freqstr) identifier_freqstr )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (identifier_DIFFERENT_FREQ) identifier_DIFFERENT_FREQ (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_cls) identifier_cls (attribute (call (identifier_type) identifier_type (argument_list (identifier_left) identifier_left )argument_list )call (identifier___name__) identifier___name__ )attribute )keyword_argument (keyword_argument (identifier_own_freq) identifier_own_freq (attribute (identifier_left) identifier_left (identifier_freqstr) identifier_freqstr )attribute )keyword_argument (keyword_argument (identifier_other_freq) identifier_other_freq (identifier_other_freq) identifier_other_freq )keyword_argument )argument_list )call )assignment )expression_statement (raise_statement (call (identifier_IncompatibleFrequency) identifier_IncompatibleFrequency (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )function_definition )module
Helper function to render a consistent error message when raising IncompatibleFrequency. Parameters ---------- left : PeriodArray right : DateOffset, Period, ndarray, or timedelta-like Raises ------ IncompatibleFrequency
(module (function_definition (function_name__create_bv_circuit) function_name__create_bv_circuit (parameters (identifier_self) identifier_self (typed_parameter (identifier_bit_map) identifier_bit_map (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter )parameters (type (identifier_Program) identifier_Program )type (block (expression_statement (assignment (pattern_list (identifier_unitary) identifier_unitary (identifier__) identifier__ )pattern_list (call (attribute (identifier_self) identifier_self (identifier__compute_unitary_oracle_matrix) identifier__compute_unitary_oracle_matrix )attribute (argument_list (identifier_bit_map) identifier_bit_map )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_full_bv_circuit) identifier_full_bv_circuit (call (identifier_Program) identifier_Program (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_full_bv_circuit) identifier_full_bv_circuit (identifier_defgate) identifier_defgate )attribute (argument_list (string_"BV-ORACLE") string_"BV-ORACLE" (identifier_unitary) identifier_unitary )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_full_bv_circuit) identifier_full_bv_circuit (identifier_inst) identifier_inst )attribute (argument_list (call (identifier_X) identifier_X (argument_list (attribute (identifier_self) identifier_self (identifier_ancilla) identifier_ancilla )attribute )argument_list )call (call (identifier_H) identifier_H (argument_list (attribute (identifier_self) identifier_self (identifier_ancilla) identifier_ancilla )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_full_bv_circuit) identifier_full_bv_circuit (identifier_inst) identifier_inst )attribute (argument_list (list_comprehension (call (identifier_H) identifier_H (argument_list (identifier_i) identifier_i )argument_list )call (for_in_clause (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_computational_qubits) identifier_computational_qubits )attribute )for_in_clause )list_comprehension )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_full_bv_circuit) identifier_full_bv_circuit (identifier_inst) identifier_inst )attribute (argument_list (call (identifier_tuple) identifier_tuple (argument_list (binary_operator (list (string_"BV-ORACLE") string_"BV-ORACLE" )list (call (identifier_sorted) identifier_sorted (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_computational_qubits) identifier_computational_qubits )attribute (list (attribute (identifier_self) identifier_self (identifier_ancilla) identifier_ancilla )attribute )list )binary_operator (keyword_argument (identifier_reverse) identifier_reverse (True) True )keyword_argument )argument_list )call )binary_operator )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_full_bv_circuit) identifier_full_bv_circuit (identifier_inst) identifier_inst )attribute (argument_list (list_comprehension (call (identifier_H) identifier_H (argument_list (identifier_i) identifier_i )argument_list )call (for_in_clause (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_computational_qubits) identifier_computational_qubits )attribute )for_in_clause )list_comprehension )argument_list )call )expression_statement (return_statement (identifier_full_bv_circuit) identifier_full_bv_circuit )return_statement )block )function_definition )module
Implementation of the Bernstein-Vazirani Algorithm. Given a list of input qubits and an ancilla bit, all initially in the :math:`\\vert 0\\rangle` state, create a program that can find :math:`\\vec{a}` with one query to the given oracle. :param Dict[String, String] bit_map: truth-table of a function for Bernstein-Vazirani with the keys being all possible bit vectors strings and the values being the function values :rtype: Program
(module (function_definition (function_name_find_and_reserve_fcp) function_name_find_and_reserve_fcp (parameters (identifier_self) identifier_self (identifier_assigner_id) identifier_assigner_id )parameters (block (expression_statement (assignment (identifier_fcp_list) identifier_fcp_list (call (attribute (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute (identifier_get_from_assigner) identifier_get_from_assigner )attribute (argument_list (identifier_assigner_id) identifier_assigner_id )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_fcp_list) identifier_fcp_list )not_operator (block (expression_statement (assignment (identifier_new_fcp) identifier_new_fcp (call (attribute (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute (identifier_find_and_reserve) identifier_find_and_reserve )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_new_fcp) identifier_new_fcp (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_"no more fcp to be allocated") string_"no more fcp to be allocated" )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_"allocated %s fcp for %s assigner") string_"allocated %s fcp for %s assigner" (tuple (identifier_new_fcp) identifier_new_fcp (identifier_assigner_id) identifier_assigner_id )tuple )binary_operator )argument_list )call )expression_statement (return_statement (identifier_new_fcp) identifier_new_fcp )return_statement )block (else_clause (block (expression_statement (assignment (identifier_old_fcp) identifier_old_fcp (subscript (subscript (identifier_fcp_list) identifier_fcp_list (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute (identifier_reserve) identifier_reserve )attribute (argument_list (subscript (subscript (identifier_fcp_list) identifier_fcp_list (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )argument_list )call )expression_statement (return_statement (identifier_old_fcp) identifier_old_fcp )return_statement )block )else_clause )if_statement )block )function_definition )module
reserve the fcp to assigner_id The function to reserve a fcp for user 1. Check whether assigner_id has a fcp already if yes, make the reserve of that record to 1 2. No fcp, then find a fcp and reserve it fcp will be returned, or None indicate no fcp
(module (function_definition (function_name__coord) function_name__coord (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier__coord) identifier__coord (list )list )assignment )expression_statement (expression_statement (assignment (identifier__node) identifier__node (identifier_self) identifier_self )assignment )expression_statement (while_statement (attribute (identifier__node) identifier__node (identifier_parent) identifier_parent )attribute (block (expression_statement (assignment (identifier__idx) identifier__idx (call (attribute (attribute (attribute (identifier__node) identifier__node (identifier_parent) identifier_parent )attribute (identifier_childs) identifier_childs )attribute (identifier_index) identifier_index )attribute (argument_list (identifier__node) identifier__node )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier__coord) identifier__coord (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier__idx) identifier__idx )argument_list )call )expression_statement (expression_statement (assignment (identifier__node) identifier__node (attribute (identifier__node) identifier__node (identifier_parent) identifier_parent )attribute )assignment )expression_statement )block )while_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list (identifier__coord) identifier__coord )argument_list )call )return_statement )block )function_definition )module
Attribute indicating the tree coordinates for this node. The tree coordinates of a node are expressed as a tuple of the indices of the node and its ancestors, for example: A grandchild node with node path `/root.name/root.childs[2].name/root.childs[2].childs[0].name` would have coordinates `(2,0)`. The root node _coord is an empty tuple: `()` :returns: the tree coordinates for this node. :rtype: tuple
(module (function_definition (function_name_corpus_page_generator) function_name_corpus_page_generator (parameters (identifier_corpus_files) identifier_corpus_files (identifier_tmp_dir) identifier_tmp_dir (identifier_max_page_size_exp) identifier_max_page_size_exp )parameters (block (for_statement (identifier_remote_filepath) identifier_remote_filepath (identifier_corpus_files) identifier_corpus_files (block (expression_statement (assignment (identifier_filepath) identifier_filepath (call (identifier_maybe_copy_file_to_directory) identifier_maybe_copy_file_to_directory (argument_list (identifier_remote_filepath) identifier_remote_filepath (identifier_tmp_dir) identifier_tmp_dir )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_tf) identifier_tf (identifier_logging) identifier_logging )attribute (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"Reading from ") string_"Reading from " (identifier_filepath) identifier_filepath )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_command) identifier_command (list (string_"7z") string_"7z" (string_"x") string_"x" (string_"-so") string_"-so" (identifier_filepath) identifier_filepath )list )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_tf) identifier_tf (identifier_logging) identifier_logging )attribute (identifier_info) identifier_info )attribute (argument_list (string_"Running command: %s") string_"Running command: %s" (identifier_command) identifier_command )argument_list )call )expression_statement (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_subprocess) identifier_subprocess (identifier_Popen) identifier_Popen )attribute (argument_list (identifier_command) identifier_command (keyword_argument (identifier_stdout) identifier_stdout (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument (keyword_argument (identifier_bufsize) identifier_bufsize (unary_operator (integer_1) integer_1 )unary_operator )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_page) identifier_page (call (identifier_file_page_generator) identifier_file_page_generator (argument_list (attribute (identifier_p) identifier_p (identifier_stdout) identifier_stdout )attribute (binary_operator (integer_2) integer_2 (identifier_max_page_size_exp) identifier_max_page_size_exp )binary_operator )argument_list )call (block (expression_statement (yield (identifier_page) identifier_page )yield )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Generate pages from a list of .7z encoded history dumps. Args: corpus_files: a list of strings tmp_dir: a string max_page_size_exp: an integer Yields: strings
(module (function_definition (function_name_receive_reply) function_name_receive_reply (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg (identifier_content) identifier_content )parameters (block (expression_statement (assignment (identifier_reply_head) identifier_reply_head (call (attribute (identifier_content) identifier_content (identifier_head) identifier_head )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_reply_head) identifier_reply_head (string_'error') string_'error' )comparison_operator (block (expression_statement (assignment (identifier_comment) identifier_comment (call (attribute (identifier_content) identifier_content (identifier_gets) identifier_gets )attribute (argument_list (string_'comment') string_'comment' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_'Got error reply: "%s"') string_'Got error reply: "%s"' (identifier_comment) identifier_comment )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_extractions) identifier_extractions (call (attribute (identifier_content) identifier_content (identifier_gets) identifier_gets )attribute (argument_list (string_'ekb') string_'ekb' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_extractions) identifier_extractions )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_extractions) identifier_extractions )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_reply_counter) identifier_reply_counter )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_reply_counter) identifier_reply_counter )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_exit) identifier_exit )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Handle replies with reading results.