sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_is_taps_aff) function_name_is_taps_aff (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (binary_operator (string_'https://www.taps-aff.co.uk/api/%s') string_'https://www.taps-aff.co.uk/api/%s' (attribute (identifier_self) identifier_self (identifier_location) identifier_location )attribute )binary_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_taps) identifier_taps (subscript (subscript (call (attribute (identifier_request) identifier_request (identifier_json) identifier_json )attribute (argument_list )argument_list )call (string_'taps') string_'taps' )subscript (string_'status') string_'status' )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_taps) identifier_taps (string_'aff') string_'aff' )comparison_operator (block (return_statement (True) True )return_statement )block (elif_clause (comparison_operator (identifier_taps) identifier_taps (string_'oan') string_'oan' )comparison_operator (block (return_statement (False) False )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"Unexpected taps value: %s") string_"Unexpected taps value: %s" (identifier_taps) identifier_taps )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"Unexpected response from service") string_"Unexpected response from service" )argument_list )call )raise_statement )block )except_clause )try_statement )block (else_clause (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (string_"Failure downloading from Api") string_"Failure downloading from Api" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Returns True if taps aff for this location
(module (function_definition (function_name_checkAndCreate) function_name_checkAndCreate (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_payload) identifier_payload (identifier_hostgroupConf) identifier_hostgroupConf (identifier_hostgroupParent) identifier_hostgroupParent (identifier_puppetClassesId) identifier_puppetClassesId )parameters (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_self) identifier_self )comparison_operator (block (expression_statement (assignment (subscript (identifier_self) identifier_self (identifier_key) identifier_key )subscript (identifier_payload) identifier_payload )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_oid) identifier_oid (subscript (subscript (identifier_self) identifier_self (identifier_key) identifier_key )subscript (string_'id') string_'id' )subscript )assignment )expression_statement (if_statement (not_operator (identifier_oid) identifier_oid )not_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (string_'classes') string_'classes' (call (attribute (identifier_hostgroupConf) identifier_hostgroupConf (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_classList) identifier_classList (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_c) identifier_c (subscript (identifier_hostgroupConf) identifier_hostgroupConf (string_'classes') string_'classes' )subscript (block (expression_statement (call (attribute (identifier_classList) identifier_classList (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_puppetClassesId) identifier_puppetClassesId (identifier_c) identifier_c )subscript )argument_list )call )expression_statement )block )for_statement (if_statement (not_operator (call (attribute (subscript (identifier_self) identifier_self (identifier_key) identifier_key )subscript (identifier_checkAndCreateClasses) identifier_checkAndCreateClasses )attribute (argument_list (identifier_classList) identifier_classList )argument_list )call )not_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Failed in classes") string_"Failed in classes" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (string_'params') string_'params' (call (attribute (identifier_hostgroupConf) identifier_hostgroupConf (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (if_statement (not_operator (call (attribute (subscript (identifier_self) identifier_self (identifier_key) identifier_key )subscript (identifier_checkAndCreateParams) identifier_checkAndCreateParams )attribute (argument_list (subscript (identifier_hostgroupConf) identifier_hostgroupConf (string_'params') string_'params' )subscript )argument_list )call )not_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Failed in params") string_"Failed in params" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement )block )if_statement (return_statement (identifier_oid) identifier_oid )return_statement )block )function_definition )module
Function checkAndCreate check And Create procedure for an hostgroup - check the hostgroup is not existing - create the hostgroup - Add puppet classes from puppetClassesId - Add params from hostgroupConf @param key: The hostgroup name or ID @param payload: The description of the hostgroup @param hostgroupConf: The configuration of the host group from the foreman.conf @param hostgroupParent: The id of the parent hostgroup @param puppetClassesId: The dict of puppet classes ids in foreman @return RETURN: The ItemHostsGroup object of an host
(module (function_definition (function_name_instance) function_name_instance (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_Config) identifier_Config (string_"_instance") string_"_instance" )argument_list )call )not_operator (comparison_operator (attribute (identifier_Config) identifier_Config (identifier__instance) identifier__instance )attribute (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (attribute (identifier_Config) identifier_Config (identifier__instance) identifier__instance )attribute (call (identifier_Config) identifier_Config (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_Config) identifier_Config (identifier__instance) identifier__instance )attribute )return_statement )block )function_definition )module
Singleton to return only one instance of Config. :returns: instance of Config
(module (function_definition (function_name_deploy_ext) function_name_deploy_ext (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mods) identifier_mods )attribute (identifier_get) identifier_get )attribute (argument_list (string_'file') string_'file' )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_shell) identifier_shell )attribute (identifier_send) identifier_send )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_mods) identifier_mods )attribute (string_'file') string_'file' )subscript (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_thin_dir) identifier_thin_dir )attribute (string_'salt-ext_mods.tgz') string_'salt-ext_mods.tgz' )argument_list )call )argument_list )call )expression_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Deploy the ext_mods tarball
(module (function_definition (function_name_in_to_out) function_name_in_to_out (parameters (identifier_self) identifier_self (identifier_in_path) identifier_in_path (default_parameter (identifier_out_path) identifier_out_path (None) None )default_parameter )parameters (block (if_statement (call (identifier_is_same_file) identifier_is_same_file (argument_list (identifier_in_path) identifier_in_path (identifier_out_path) identifier_out_path )argument_list )call (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (concatenated_string (string_"in path and out path are the same file. writing to temp ") string_"in path and out path are the same file. writing to temp " (string_"file and then replacing in path with the temp file.") string_"file and then replacing in path with the temp file." )concatenated_string )argument_list )call )expression_statement (expression_statement (assignment (identifier_out_path) identifier_out_path (None) None )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_f"opening source file: {in_path}") string_f"opening source file: {in_path}" )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_in_path) identifier_in_path )argument_list )call (as_pattern_target (identifier_infile) identifier_infile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (attribute (identifier_self) identifier_self (identifier_object_representer) identifier_object_representer )attribute (identifier_load) identifier_load )attribute (argument_list (identifier_infile) identifier_infile )argument_list )call )assignment )expression_statement )block )with_statement (if_statement (identifier_out_path) identifier_out_path (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_f"opening destination file for writing: {out_path}") string_f"opening destination file for writing: {out_path}" )argument_list )call )expression_statement (expression_statement (call (identifier_ensure_dir) identifier_ensure_dir (argument_list (identifier_out_path) identifier_out_path )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_out_path) identifier_out_path (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_outfile) identifier_outfile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_object_representer) identifier_object_representer )attribute (identifier_dump) identifier_dump )attribute (argument_list (identifier_outfile) identifier_outfile (call (attribute (identifier_self) identifier_self (identifier_formatter) identifier_formatter )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )argument_list )call )expression_statement )block )with_statement (return_statement )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"opening temp file for writing...") string_"opening temp file for writing..." )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_NamedTemporaryFile) identifier_NamedTemporaryFile (argument_list (keyword_argument (identifier_mode) identifier_mode (string_'w+t') string_'w+t' )keyword_argument (keyword_argument (identifier_dir) identifier_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_in_path) identifier_in_path )argument_list )call )keyword_argument (keyword_argument (identifier_delete) identifier_delete (False) False )keyword_argument )argument_list )call (as_pattern_target (identifier_outfile) identifier_outfile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_object_representer) identifier_object_representer )attribute (identifier_dump) identifier_dump )attribute (argument_list (identifier_outfile) identifier_outfile (call (attribute (identifier_self) identifier_self (identifier_formatter) identifier_formatter )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )argument_list )call )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_f"moving temp file to: {in_path}") string_f"moving temp file to: {in_path}" )argument_list )call )expression_statement (expression_statement (call (identifier_move_temp_file) identifier_move_temp_file (argument_list (attribute (identifier_outfile) identifier_outfile (identifier_name) identifier_name )attribute (attribute (identifier_infile) identifier_infile (identifier_name) identifier_name )attribute )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Load file into object, formats, writes object to out. If in_path and out_path point to the same thing it will in-place edit and overwrite the in path. Even easier, if you do want to edit a file in place, don't specify out_path, or set it to None. Args: in_path: str or path-like. Must refer to a single existing file. out_path: str or path-like. Must refer to a single destination file location. will create directory structure if it doesn't exist. If out_path is not specified or None, will in-place edit and overwrite the in-files. Returns: None.
(module (function_definition (function_name_get_meta_references) function_name_get_meta_references (parameters (identifier_self) identifier_self (identifier_datas) identifier_datas )parameters (block (expression_statement (assignment (identifier_rule) identifier_rule (call (attribute (identifier_datas) identifier_datas (identifier_get) identifier_get )attribute (argument_list (identifier_RULE_META_REFERENCES) identifier_RULE_META_REFERENCES (dictionary )dictionary )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_rule) identifier_rule )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_"Manifest lacks of '.{}' or is empty") string_"Manifest lacks of '.{}' or is empty" )assignment )expression_statement (raise_statement (call (identifier_SerializerError) identifier_SerializerError (argument_list (call (attribute (identifier_msg) identifier_msg (identifier_format) identifier_format )attribute (argument_list (identifier_RULE_META_REFERENCES) identifier_RULE_META_REFERENCES )argument_list )call )argument_list )call )raise_statement )block (else_clause (block (if_statement (call (attribute (identifier_rule) identifier_rule (identifier_get) identifier_get )attribute (argument_list (string_'names') string_'names' (None) None )argument_list )call (block (expression_statement (assignment (identifier_names) identifier_names (call (attribute (call (attribute (identifier_rule) identifier_rule (identifier_get) identifier_get )attribute (argument_list (string_'names') string_'names' )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_" ") string_" " )argument_list )call )assignment )expression_statement )block (elif_clause (call (attribute (identifier_rule) identifier_rule (identifier_get) identifier_get )attribute (argument_list (string_'auto') string_'auto' (None) None )argument_list )call (block (expression_statement (assignment (identifier_names) identifier_names (call (attribute (identifier_self) identifier_self (identifier_get_available_references) identifier_get_available_references )attribute (argument_list (identifier_datas) identifier_datas )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_msg) identifier_msg (parenthesized_expression (concatenated_string (string_"'.{}' either require '--names' or '--auto' variable ") string_"'.{}' either require '--names' or '--auto' variable " (string_"to be defined") string_"to be defined" )concatenated_string )parenthesized_expression )assignment )expression_statement (raise_statement (call (identifier_SerializerError) identifier_SerializerError (argument_list (call (attribute (identifier_msg) identifier_msg (identifier_format) identifier_format )attribute (argument_list (identifier_RULE_META_REFERENCES) identifier_RULE_META_REFERENCES )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )else_clause )if_statement (for_statement (identifier_item) identifier_item (identifier_names) identifier_names (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_validate_rule_name) identifier_validate_rule_name )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_names) identifier_names )return_statement )block )function_definition )module
Get manifest enabled references declaration This required declaration is readed from ``styleguide-metas-references`` rule that require either a ``--names`` or ``--auto`` variable, each one define the mode to enable reference: Manually Using ``--names`` which define a list of names to enable, every other non enabled rule will be ignored. Section name (and so Reference name also) must not contains special character nor ``-`` so they still be valid variable name for almost any languages. For word separator inside name, use ``_``. Automatic Using ``--auto`` variable every reference rules will be enabled. The value of this variable is not important since it is not empty. If both of these variables are defined, the manual enable mode is used. Arguments: datas (dict): Data where to search for meta references declaration. This is commonly the fully parsed manifest. Returns: list: A list of reference names.
(module (function_definition (function_name__pretrain_layer_and_gen_feed) function_name__pretrain_layer_and_gen_feed (parameters (identifier_self) identifier_self (identifier_layer_obj) identifier_layer_obj (identifier_set_params_func) identifier_set_params_func (identifier_train_set) identifier_train_set (identifier_validation_set) identifier_validation_set (identifier_graph) identifier_graph )parameters (block (expression_statement (call (attribute (identifier_layer_obj) identifier_layer_obj (identifier_fit) identifier_fit )attribute (argument_list (identifier_train_set) identifier_train_set (identifier_train_set) identifier_train_set (identifier_validation_set) identifier_validation_set (identifier_validation_set) identifier_validation_set (keyword_argument (identifier_graph) identifier_graph (identifier_graph) identifier_graph )keyword_argument )argument_list )call )expression_statement (with_statement (with_clause (with_item (call (attribute (identifier_graph) identifier_graph (identifier_as_default) identifier_as_default )attribute (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (call (identifier_set_params_func) identifier_set_params_func (argument_list (identifier_layer_obj) identifier_layer_obj (identifier_graph) identifier_graph )argument_list )call )expression_statement (expression_statement (assignment (identifier_next_train) identifier_next_train (call (attribute (identifier_layer_obj) identifier_layer_obj (identifier_transform) identifier_transform )attribute (argument_list (identifier_train_set) identifier_train_set (keyword_argument (identifier_graph) identifier_graph (identifier_graph) identifier_graph )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_validation_set) identifier_validation_set (None) None )comparison_operator (block (expression_statement (assignment (identifier_next_valid) identifier_next_valid (call (attribute (identifier_layer_obj) identifier_layer_obj (identifier_transform) identifier_transform )attribute (argument_list (identifier_validation_set) identifier_validation_set (keyword_argument (identifier_graph) identifier_graph (identifier_graph) identifier_graph )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_next_valid) identifier_next_valid (None) None )assignment )expression_statement )block )else_clause )if_statement )block )with_statement (return_statement (expression_list (identifier_next_train) identifier_next_train (identifier_next_valid) identifier_next_valid )expression_list )return_statement )block )function_definition )module
Pretrain a single autoencoder and encode the data for the next layer. :param layer_obj: layer model :param set_params_func: function used to set the parameters after pretraining :param train_set: training set :param validation_set: validation set :param graph: tf object for the rbm :return: encoded train data, encoded validation data
(module (function_definition (function_name_release_key) function_name_release_key (parameters (identifier_self) identifier_self (identifier_key) identifier_key (default_parameter (identifier_chat) identifier_chat (None) None )default_parameter (default_parameter (identifier_user) identifier_user (None) None )default_parameter )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_storage) identifier_storage )attribute (identifier_has_bucket) identifier_has_bucket )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_'This storage does not provide Leaky Bucket') string_'This storage does not provide Leaky Bucket' )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_user) identifier_user (None) None )comparison_operator (comparison_operator (identifier_chat) identifier_chat (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_user) identifier_user (call (attribute (attribute (identifier_types) identifier_types (identifier_User) identifier_User )attribute (identifier_get_current) identifier_get_current )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_chat) identifier_chat (call (attribute (attribute (identifier_types) identifier_types (identifier_Chat) identifier_Chat )attribute (identifier_get_current) identifier_get_current )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_bucket) identifier_bucket (await (call (attribute (attribute (identifier_self) identifier_self (identifier_storage) identifier_storage )attribute (identifier_get_bucket) identifier_get_bucket )attribute (argument_list (keyword_argument (identifier_chat) identifier_chat (identifier_chat) identifier_chat )keyword_argument (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument )argument_list )call )await )assignment )expression_statement (if_statement (boolean_operator (identifier_bucket) identifier_bucket (comparison_operator (identifier_key) identifier_key (identifier_bucket) identifier_bucket )comparison_operator )boolean_operator (block (delete_statement (subscript (identifier_bucket) identifier_bucket (string_'key') string_'key' )subscript )delete_statement (expression_statement (await (call (attribute (attribute (identifier_self) identifier_self (identifier_storage) identifier_storage )attribute (identifier_set_bucket) identifier_set_bucket )attribute (argument_list (keyword_argument (identifier_chat) identifier_chat (identifier_chat) identifier_chat )keyword_argument (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_bucket) identifier_bucket (identifier_bucket) identifier_bucket )keyword_argument )argument_list )call )await )expression_statement (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Release blocked key :param key: :param chat: :param user: :return:
(module (function_definition (function_name__get_cursor) function_name__get_cursor (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier__options) identifier__options (call (attribute (identifier_self) identifier_self (identifier__get_options) identifier__get_options )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_MySQLdb) identifier_MySQLdb (identifier_connect) identifier_connect )attribute (argument_list (keyword_argument (identifier_host) identifier_host (subscript (identifier__options) identifier__options (string_'host') string_'host' )subscript )keyword_argument (keyword_argument (identifier_user) identifier_user (subscript (identifier__options) identifier__options (string_'user') string_'user' )subscript )keyword_argument (keyword_argument (identifier_passwd) identifier_passwd (subscript (identifier__options) identifier__options (string_'pass') string_'pass' )subscript )keyword_argument (keyword_argument (identifier_db) identifier_db (subscript (identifier__options) identifier__options (string_'db') string_'db' )subscript )keyword_argument (keyword_argument (identifier_port) identifier_port (subscript (identifier__options) identifier__options (string_'port') string_'port' )subscript )keyword_argument (keyword_argument (identifier_ssl) identifier_ssl (subscript (identifier__options) identifier__options (string_'ssl') string_'ssl' )subscript )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (identifier_conn) identifier_conn (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (yield (identifier_cursor) identifier_cursor )yield )expression_statement )block (except_clause (as_pattern (attribute (identifier_MySQLdb) identifier_MySQLdb (identifier_DatabaseError) identifier_DatabaseError )attribute (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (string_'Error in ext_pillar MySQL: %s') string_'Error in ext_pillar MySQL: %s' (attribute (identifier_err) identifier_err (identifier_args) identifier_args )attribute )argument_list )call )expression_statement )block )except_clause (finally_clause (block (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Yield a MySQL cursor
(module (function_definition (function_name_titles2marc) function_name_titles2marc (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_values) identifier_values )parameters (block (expression_statement (assignment (pattern_list (identifier_first) identifier_first (identifier_rest) identifier_rest )pattern_list (expression_list (subscript (identifier_values) identifier_values (integer_0) integer_0 )subscript (subscript (identifier_values) identifier_values (slice (integer_1) integer_1 (colon) colon )slice )subscript )expression_list )assignment )expression_statement (expression_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'245') string_'245' (list )list )argument_list )call (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'a') string_'a' (call (attribute (identifier_first) identifier_first (identifier_get) identifier_get )attribute (argument_list (string_'title') string_'title' )argument_list )call )pair (pair (string_'b') string_'b' (call (attribute (identifier_first) identifier_first (identifier_get) identifier_get )attribute (argument_list (string_'subtitle') string_'subtitle' )argument_list )call )pair (pair (string_'9') string_'9' (call (attribute (identifier_first) identifier_first (identifier_get) identifier_get )attribute (argument_list (string_'source') string_'source' )argument_list )call )pair )dictionary )argument_list )call )expression_statement (return_statement (list_comprehension (dictionary (pair (string_'a') string_'a' (call (attribute (identifier_value) identifier_value (identifier_get) identifier_get )attribute (argument_list (string_'title') string_'title' )argument_list )call )pair (pair (string_'b') string_'b' (call (attribute (identifier_value) identifier_value (identifier_get) identifier_get )attribute (argument_list (string_'subtitle') string_'subtitle' )argument_list )call )pair (pair (string_'9') string_'9' (call (attribute (identifier_value) identifier_value (identifier_get) identifier_get )attribute (argument_list (string_'source') string_'source' )argument_list )call )pair )dictionary (for_in_clause (identifier_value) identifier_value (identifier_rest) identifier_rest )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Populate the ``246`` MARC field. Also populates the ``245`` MARC field through side effects.
(module (function_definition (function_name_complete_pool_members) function_name_complete_pool_members (parameters (identifier_arg) identifier_arg )parameters (block (expression_statement (assignment (identifier_res) identifier_res (list )list )assignment )expression_statement (for_statement (identifier_member) identifier_member (call (attribute (identifier_Prefix) identifier_Prefix (identifier_list) identifier_list )attribute (argument_list (dictionary (pair (string_'pool_id') string_'pool_id' (attribute (identifier_pool) identifier_pool (identifier_id) identifier_id )attribute )pair )dictionary )argument_list )call (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_member) identifier_member (identifier_prefix) identifier_prefix )attribute )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier__complete_string) identifier__complete_string (argument_list (identifier_arg) identifier_arg (identifier_res) identifier_res )argument_list )call )return_statement )block )function_definition )module
Complete member prefixes of pool
(module (function_definition (function_name_main) function_name_main (parameters )parameters (block (expression_statement (assignment (identifier_command) identifier_command (call (attribute (identifier_Command) identifier_Command (identifier_lookup) identifier_lookup )attribute (argument_list (call (attribute (identifier_args) identifier_args (identifier_get) identifier_get )attribute (argument_list (integer_0) integer_0 )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_0) integer_0 )comparison_operator (call (attribute (identifier_args) identifier_args (identifier_contains) identifier_contains )attribute (argument_list (tuple (string_'-h') string_'-h' (string_'--help') string_'--help' (string_'help') string_'help' )tuple )argument_list )call )boolean_operator (block (expression_statement (call (identifier_display_info) identifier_display_info (argument_list (identifier_args) identifier_args )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block (elif_clause (call (attribute (identifier_args) identifier_args (identifier_contains) identifier_contains )attribute (argument_list (tuple (string_'-v') string_'-v' (string_'--version') string_'--version' )tuple )argument_list )call (block (expression_statement (call (identifier_display_version) identifier_display_version (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )elif_clause (elif_clause (identifier_command) identifier_command (block (expression_statement (assignment (identifier_arg) identifier_arg (call (attribute (identifier_args) identifier_args (identifier_get) identifier_get )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_args) identifier_args (identifier_remove) identifier_remove )attribute (argument_list (identifier_arg) identifier_arg )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_command) identifier_command (identifier___call__) identifier___call__ )attribute (argument_list (identifier_command) identifier_command (identifier_args) identifier_args )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (identifier_show_error) identifier_show_error (argument_list (call (attribute (identifier_colored) identifier_colored (identifier_red) identifier_red )attribute (argument_list (call (attribute (string_'Error! Unknown command \'{0}\'.\n') string_'Error! Unknown command \'{0}\'.\n' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_args) identifier_args (identifier_get) identifier_get )attribute (argument_list (integer_0) integer_0 )argument_list )call )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_display_info) identifier_display_info (argument_list (identifier_args) identifier_args )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Primary Tarbell command dispatch.
(module (function_definition (function_name__ioctl) function_name__ioctl (parameters (identifier_self) identifier_self (identifier_func) identifier_func (identifier_arg) identifier_arg )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__fd) identifier__fd )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_WatchdogError) identifier_WatchdogError (argument_list (string_"Watchdog device is closed") string_"Watchdog device is closed" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_os) identifier_os (identifier_name) identifier_name )attribute (string_'nt') string_'nt' )comparison_operator (block (import_statement (dotted_name (identifier_fcntl) identifier_fcntl )dotted_name )import_statement (expression_statement (call (attribute (identifier_fcntl) identifier_fcntl (identifier_ioctl) identifier_ioctl )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__fd) identifier__fd )attribute (identifier_func) identifier_func (identifier_arg) identifier_arg (True) True )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Runs the specified ioctl on the underlying fd. Raises WatchdogError if the device is closed. Raises OSError or IOError (Python 2) when the ioctl fails.
(module (function_definition (function_name_get_state) function_name_get_state (parameters (identifier_self) identifier_self (identifier_sls) identifier_sls (identifier_saltenv) identifier_saltenv (default_parameter (identifier_cachedir) identifier_cachedir (None) None )default_parameter )parameters (block (if_statement (comparison_operator (string_'.') string_'.' (identifier_sls) identifier_sls )comparison_operator (block (expression_statement (assignment (identifier_sls) identifier_sls (call (attribute (identifier_sls) identifier_sls (identifier_replace) identifier_replace )attribute (argument_list (string_'.') string_'.' (string_'/') string_'/' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_sls_url) identifier_sls_url (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_url) identifier_url )attribute (identifier_create) identifier_create )attribute (argument_list (binary_operator (identifier_sls) identifier_sls (string_'.sls') string_'.sls' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_init_url) identifier_init_url (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_url) identifier_url )attribute (identifier_create) identifier_create )attribute (argument_list (binary_operator (identifier_sls) identifier_sls (string_'/init.sls') string_'/init.sls' )binary_operator )argument_list )call )assignment )expression_statement (for_statement (identifier_path) identifier_path (list (identifier_sls_url) identifier_sls_url (identifier_init_url) identifier_init_url )list (block (expression_statement (assignment (identifier_dest) identifier_dest (call (attribute (identifier_self) identifier_self (identifier_cache_file) identifier_cache_file )attribute (argument_list (identifier_path) identifier_path (identifier_saltenv) identifier_saltenv (keyword_argument (identifier_cachedir) identifier_cachedir (identifier_cachedir) identifier_cachedir )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_dest) identifier_dest (block (return_statement (dictionary (pair (string_'source') string_'source' (identifier_path) identifier_path )pair (pair (string_'dest') string_'dest' (identifier_dest) identifier_dest )pair )dictionary )return_statement )block )if_statement )block )for_statement (return_statement (dictionary )dictionary )return_statement )block )function_definition )module
Get a state file from the master and store it in the local minion cache; return the location of the file
(module (function_definition (function_name_add_child) function_name_add_child (parameters (identifier_self) identifier_self (identifier_id_) identifier_id_ (identifier_child_id) identifier_child_id )parameters (block (if_statement (call (identifier_bool) identifier_bool (argument_list (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__rls) identifier__rls )attribute (identifier_get_relationships_by_genus_type_for_peers) identifier_get_relationships_by_genus_type_for_peers )attribute (argument_list (identifier_id_) identifier_id_ (identifier_child_id) identifier_child_id (attribute (identifier_self) identifier_self (identifier__relationship_type) identifier__relationship_type )attribute )argument_list )call (identifier_available) identifier_available )attribute (argument_list )argument_list )call )argument_list )call (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_AlreadyExists) identifier_AlreadyExists )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_rfc) identifier_rfc (call (attribute (attribute (identifier_self) identifier_self (identifier__ras) identifier__ras )attribute (identifier_get_relationship_form_for_create) identifier_get_relationship_form_for_create )attribute (argument_list (identifier_id_) identifier_id_ (identifier_child_id) identifier_child_id (list )list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_rfc) identifier_rfc (identifier_set_display_name) identifier_set_display_name )attribute (argument_list (binary_operator (binary_operator (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_id_) identifier_id_ )argument_list )call (string_' to ') string_' to ' )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_child_id) identifier_child_id )argument_list )call )binary_operator (string_' Parent-Child Relationship') string_' Parent-Child Relationship' )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_rfc) identifier_rfc (identifier_set_description) identifier_set_description )attribute (argument_list (binary_operator (binary_operator (binary_operator (binary_operator (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__relationship_type) identifier__relationship_type )attribute (identifier_get_display_name) identifier_get_display_name )attribute (argument_list )argument_list )call (identifier_get_text) identifier_get_text )attribute (argument_list )argument_list )call (string_' relationship for parent: ') string_' relationship for parent: ' )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_id_) identifier_id_ )argument_list )call )binary_operator (string_' and child: ') string_' and child: ' )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_child_id) identifier_child_id )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_rfc) identifier_rfc (identifier_set_genus_type) identifier_set_genus_type )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__relationship_type) identifier__relationship_type )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__ras) identifier__ras )attribute (identifier_create_relationship) identifier_create_relationship )attribute (argument_list (identifier_rfc) identifier_rfc )argument_list )call )expression_statement )block )function_definition )module
Adds a child to a ``Id``. arg: id (osid.id.Id): the ``Id`` of the node arg: child_id (osid.id.Id): the ``Id`` of the new child raise: AlreadyExists - ``child_id`` is already a child of ``id`` raise: NotFound - ``id`` or ``child_id`` not found raise: NullArgument - ``id`` or ``child_id`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_steal_page) function_name_steal_page (parameters (identifier_self) identifier_self (identifier_page) identifier_page )parameters (block (if_statement (comparison_operator (attribute (identifier_page) identifier_page (identifier_doc) identifier_doc )attribute (identifier_self) identifier_self )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_fs) identifier_fs )attribute (identifier_mkdir_p) identifier_mkdir_p )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_new_page) identifier_new_page (call (identifier_ImgPage) identifier_ImgPage (argument_list (identifier_self) identifier_self (attribute (identifier_self) identifier_self (identifier_nb_pages) identifier_nb_pages )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"%s --> %s") string_"%s --> %s" (tuple (call (identifier_str) identifier_str (argument_list (identifier_page) identifier_page )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_new_page) identifier_new_page )argument_list )call )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_new_page) identifier_new_page (identifier__steal_content) identifier__steal_content )attribute (argument_list (identifier_page) identifier_page )argument_list )call )expression_statement )block )function_definition )module
Steal a page from another document
(module (function_definition (function_name_get_dataset_meta) function_name_get_dataset_meta (parameters (identifier_label) identifier_label )parameters (block (expression_statement (assignment (identifier_data_url) identifier_data_url (subscript (identifier_data_urls) identifier_data_urls (identifier_label) identifier_label )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_data_url) identifier_data_url )argument_list )call (identifier_str) identifier_str )comparison_operator (block (expression_statement (assignment (identifier_data_url) identifier_data_url (list (identifier_data_url) identifier_data_url )list )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_data_url) identifier_data_url )argument_list )call (identifier_list) identifier_list )comparison_operator (block (expression_statement (call (attribute (identifier_data_url) identifier_data_url (identifier_extend) identifier_extend )attribute (argument_list (list (None) None (None) None (None) None (None) None )list )argument_list )call )expression_statement (expression_statement (assignment (identifier_data_url) identifier_data_url (subscript (identifier_data_url) identifier_data_url (slice (colon) colon (integer_4) integer_4 )slice )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_url) identifier_url (identifier_expected_hash) identifier_expected_hash (identifier_hash_path) identifier_hash_path (identifier_relative_donwload_dir) identifier_relative_donwload_dir )pattern_list (identifier_data_url) identifier_data_url )assignment )expression_statement (if_statement (comparison_operator (identifier_hash_path) identifier_hash_path (None) None )comparison_operator (block (expression_statement (assignment (identifier_hash_path) identifier_hash_path (identifier_label) identifier_label )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (expression_list (identifier_data_url) identifier_data_url (identifier_url) identifier_url (identifier_expected_hash) identifier_expected_hash (identifier_hash_path) identifier_hash_path (identifier_relative_donwload_dir) identifier_relative_donwload_dir )expression_list )return_statement )block )function_definition )module
Gives you metadata for dataset chosen via 'label' param :param label: label = key in data_url dict (that big dict containing all possible datasets) :return: tuple (data_url, url, expected_hash, hash_path, relative_download_dir) relative_download_dir says where will be downloaded the file from url and eventually unzipped
(module (function_definition (function_name_async_delete_device) function_name_async_delete_device (parameters (identifier_self) identifier_self (typed_parameter (identifier_device_id) identifier_device_id (type (identifier_int) identifier_int )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (assignment (identifier_device) identifier_device (subscript (attribute (identifier_self) identifier_self (identifier__devices) identifier__devices )attribute (identifier_device_id) identifier_device_id )subscript )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (await (call (attribute (attribute (identifier_self) identifier_self (identifier__protocol) identifier__protocol )attribute (identifier_async_execute) identifier_async_execute )attribute (argument_list (call (identifier_GetDeviceCommand) identifier_GetDeviceCommand (argument_list (attribute (identifier_device) identifier_device (identifier_category) identifier_category )attribute (attribute (identifier_device) identifier_device (identifier_group_number) identifier_group_number )attribute (attribute (identifier_device) identifier_device (identifier_unit_number) identifier_unit_number )attribute )argument_list )call )argument_list )call )await )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_response) identifier_response (identifier_DeviceInfoResponse) identifier_DeviceInfoResponse )argument_list )call (block (expression_statement (assignment (identifier_response) identifier_response (await (call (attribute (attribute (identifier_self) identifier_self (identifier__protocol) identifier__protocol )attribute (identifier_async_execute) identifier_async_execute )attribute (argument_list (call (identifier_DeleteDeviceCommand) identifier_DeleteDeviceCommand (argument_list (attribute (identifier_device) identifier_device (identifier_category) identifier_category )attribute (attribute (identifier_response) identifier_response (identifier_index) identifier_index )attribute )argument_list )call )argument_list )call )await )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_response) identifier_response (identifier_DeviceDeletedResponse) identifier_DeviceDeletedResponse )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__devices) identifier__devices )attribute (identifier__delete) identifier__delete )attribute (argument_list (identifier_device) identifier_device )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__on_device_deleted) identifier__on_device_deleted )attribute (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__on_device_deleted) identifier__on_device_deleted )attribute (argument_list (identifier_self) identifier_self (identifier_device) identifier_device )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_error) identifier_error )attribute (argument_list (string_"Unhandled exception in on_device_deleted callback") string_"Unhandled exception in on_device_deleted callback" (keyword_argument (identifier_exc_info) identifier_exc_info (True) True )keyword_argument )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement )block )if_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_response) identifier_response (identifier_DeviceNotFoundResponse) identifier_DeviceNotFoundResponse )argument_list )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Device to be deleted was not found") string_"Device to be deleted was not found" )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Delete an enrolled device. :param device_id: unique identifier for the device to be deleted
(module (function_definition (function_name_hbar_stack) function_name_hbar_stack (parameters (identifier_self) identifier_self (identifier_stackers) identifier_stackers (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (identifier_kw) identifier_kw (call (identifier__double_stack) identifier__double_stack (argument_list (identifier_stackers) identifier_stackers (string_"left") string_"left" (string_"right") string_"right" (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_hbar) identifier_hbar )attribute (argument_list (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Generate multiple ``HBar`` renderers for levels stacked left to right. Args: stackers (seq[str]) : a list of data source field names to stack successively for ``left`` and ``right`` bar coordinates. Additionally, the ``name`` of the renderer will be set to the value of each successive stacker (this is useful with the special hover variable ``$name``) Any additional keyword arguments are passed to each call to ``hbar``. If a keyword value is a list or tuple, then each call will get one value from the sequence. Returns: list[GlyphRenderer] Examples: Assuming a ``ColumnDataSource`` named ``source`` with columns *2106* and *2017*, then the following call to ``hbar_stack`` will will create two ``HBar`` renderers that stack: .. code-block:: python p.hbar_stack(['2016', '2017'], x=10, width=0.9, color=['blue', 'red'], source=source) This is equivalent to the following two separate calls: .. code-block:: python p.hbar(bottom=stack(), top=stack('2016'), x=10, width=0.9, color='blue', source=source, name='2016') p.hbar(bottom=stack('2016'), top=stack('2016', '2017'), x=10, width=0.9, color='red', source=source, name='2017')
(module (function_definition (function_name_initialize) function_name_initialize (parameters (identifier_self) identifier_self (default_parameter (identifier_size) identifier_size (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_fs) identifier_fs (identifier_path) identifier_path )pattern_list (call (attribute (identifier_self) identifier_self (identifier__get_fs) identifier__get_fs )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_fs) identifier_fs (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (expression_statement (assignment (identifier_fp) identifier_fp (call (attribute (identifier_fs) identifier_fs (identifier_open) identifier_open )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_mode) identifier_mode (string_'r+b') string_'r+b' )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_fp) identifier_fp (call (attribute (identifier_fs) identifier_fs (identifier_open) identifier_open )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_mode) identifier_mode (string_'wb') string_'wb' )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (try_statement (block (expression_statement (call (attribute (identifier_fp) identifier_fp (identifier_truncate) identifier_truncate )attribute (argument_list (identifier_size) identifier_size )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier_fp) identifier_fp (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause (finally_clause (block (expression_statement (call (attribute (identifier_fp) identifier_fp (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__size) identifier__size )attribute (identifier_size) identifier_size )assignment )expression_statement (return_statement (expression_list (attribute (identifier_self) identifier_self (identifier_fileurl) identifier_fileurl )attribute (identifier_size) identifier_size (None) None )expression_list )return_statement )block )function_definition )module
Initialize file on storage and truncate to given size.
(module (function_definition (function_name_geopy_geolocator) function_name_geopy_geolocator (parameters )parameters (block (global_statement (identifier_geolocator) identifier_geolocator )global_statement (if_statement (comparison_operator (identifier_geolocator) identifier_geolocator (None) None )comparison_operator (block (try_statement (block (import_from_statement (dotted_name (identifier_geopy) identifier_geopy (identifier_geocoders) identifier_geocoders )dotted_name (dotted_name (identifier_Nominatim) identifier_Nominatim )dotted_name )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (return_statement (None) None )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_geolocator) identifier_geolocator (call (identifier_Nominatim) identifier_Nominatim (argument_list (keyword_argument (identifier_user_agent) identifier_user_agent (identifier_geolocator_user_agent) identifier_geolocator_user_agent )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_geolocator) identifier_geolocator )return_statement )block )if_statement (return_statement (identifier_geolocator) identifier_geolocator )return_statement )block )function_definition )module
Lazy loader for geocoder from geopy. This currently loads the `Nominatim` geocode and returns an instance of it, taking ~2 us.
(module (function_definition (function_name_set_buf_size) function_name_set_buf_size (parameters (identifier_fd) identifier_fd )parameters (block (if_statement (boolean_operator (identifier_OS_PIPE_SZ) identifier_OS_PIPE_SZ (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_fcntl) identifier_fcntl (string_'F_SETPIPE_SZ') string_'F_SETPIPE_SZ' )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_fcntl) identifier_fcntl (identifier_fcntl) identifier_fcntl )attribute (argument_list (identifier_fd) identifier_fd (attribute (identifier_fcntl) identifier_fcntl (identifier_F_SETPIPE_SZ) identifier_F_SETPIPE_SZ )attribute (identifier_OS_PIPE_SZ) identifier_OS_PIPE_SZ )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Set up os pipe buffer size, if applicable
(module (function_definition (function_name_eat_string) function_name_eat_string (parameters (identifier_self) identifier_self (identifier_string) identifier_string )parameters (block (expression_statement (assignment (identifier_pos) identifier_pos (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute )assignment )expression_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_eos) identifier_eos )attribute (comparison_operator (binary_operator (identifier_pos) identifier_pos (call (identifier_len) identifier_len (argument_list (identifier_string) identifier_string )argument_list )call )binary_operator (attribute (identifier_self) identifier_self (identifier_length) identifier_length )attribute )comparison_operator )boolean_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_col) identifier_col (attribute (identifier_self) identifier_self (identifier_col) identifier_col )attribute )assignment )expression_statement (expression_statement (assignment (identifier_row) identifier_row (attribute (identifier_self) identifier_self (identifier_row) identifier_row )attribute )assignment )expression_statement (for_statement (identifier_char) identifier_char (identifier_string) identifier_string (block (expression_statement (augmented_assignment (identifier_col) identifier_col (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_pos) identifier_pos (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_char) identifier_char (string_'\n') string_'\n' )comparison_operator (block (expression_statement (assignment (identifier_col) identifier_col (integer_0) integer_0 )assignment )expression_statement (expression_statement (augmented_assignment (identifier_row) identifier_row (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (identifier_pos) identifier_pos )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_col) identifier_col )attribute (identifier_col) identifier_col )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_row) identifier_row )attribute (identifier_row) identifier_row )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_has_space) identifier_has_space )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_eos) identifier_eos )attribute (integer_1) integer_1 )assignment )expression_statement )block )if_statement )block )function_definition )module
Move current position by length of string and count lines by \n.
(module (function_definition (function_name_list) function_name_list (parameters )parameters (block (expression_statement (assignment (identifier_infos) identifier_infos (call (attribute (identifier_manager) identifier_manager (identifier_get_all) identifier_get_all )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_infos) identifier_infos )not_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"No known TensorBoard instances running.") string_"No known TensorBoard instances running." )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Known TensorBoard instances:") string_"Known TensorBoard instances:" )argument_list )call )expression_statement (for_statement (identifier_info) identifier_info (identifier_infos) identifier_infos (block (expression_statement (assignment (identifier_template) identifier_template (string_" - port {port}: {data_source} (started {delta} ago; pid {pid})") string_" - port {port}: {data_source} (started {delta} ago; pid {pid})" )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (identifier_template) identifier_template (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_port) identifier_port (attribute (identifier_info) identifier_info (identifier_port) identifier_port )attribute )keyword_argument (keyword_argument (identifier_data_source) identifier_data_source (call (attribute (identifier_manager) identifier_manager (identifier_data_source_from_info) identifier_data_source_from_info )attribute (argument_list (identifier_info) identifier_info )argument_list )call )keyword_argument (keyword_argument (identifier_delta) identifier_delta (call (identifier__time_delta_from_info) identifier__time_delta_from_info (argument_list (identifier_info) identifier_info )argument_list )call )keyword_argument (keyword_argument (identifier_pid) identifier_pid (attribute (identifier_info) identifier_info (identifier_pid) identifier_pid )attribute )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Print a listing of known running TensorBoard instances. TensorBoard instances that were killed uncleanly (e.g., with SIGKILL or SIGQUIT) may appear in this list even if they are no longer running. Conversely, this list may be missing some entries if your operating system's temporary directory has been cleared since a still-running TensorBoard instance started.
(module (function_definition (function_name_clear) function_name_clear (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_u"Clearing cache...") string_u"Clearing cache..." )argument_list )call )expression_statement (for_statement (pattern_list (identifier_file_handler) identifier_file_handler (identifier_file_info) identifier_file_info )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (list (string_u" Removing file '%s'") string_u" Removing file '%s'" (identifier_file_info) identifier_file_info )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_gf) identifier_gf (identifier_delete_file) identifier_delete_file )attribute (argument_list (identifier_file_handler) identifier_file_handler (identifier_file_info) identifier_file_info )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__initialize_cache) identifier__initialize_cache )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_u"Clearing cache... done") string_u"Clearing cache... done" )argument_list )call )expression_statement )block )function_definition )module
Clear the cache and remove all the files from disk.
(module (function_definition (function_name_associate) function_name_associate (parameters (identifier_self) identifier_self (identifier_floating_ip_id) identifier_floating_ip_id (identifier_port_id) identifier_port_id )parameters (block (expression_statement (assignment (pattern_list (identifier_pid) identifier_pid (identifier_ip_address) identifier_ip_address )pattern_list (call (attribute (identifier_port_id) identifier_port_id (identifier_split) identifier_split )attribute (argument_list (string_'_') string_'_' (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_update_dict) identifier_update_dict (dictionary (pair (string_'port_id') string_'port_id' (identifier_pid) identifier_pid )pair (pair (string_'fixed_ip_address') string_'fixed_ip_address' (identifier_ip_address) identifier_ip_address )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_update_floatingip) identifier_update_floatingip )attribute (argument_list (identifier_floating_ip_id) identifier_floating_ip_id (dictionary (pair (string_'floatingip') string_'floatingip' (identifier_update_dict) identifier_update_dict )pair )dictionary )argument_list )call )expression_statement )block )function_definition )module
Associates the floating IP to the port. ``port_id`` represents a VNIC of an instance. ``port_id`` argument is different from a normal neutron port ID. A value passed as ``port_id`` must be one of target_id returned by ``list_targets``, ``get_target_by_instance`` or ``list_targets_by_instance`` method.
(module (function_definition (function_name_items) function_name_items (parameters (identifier_self) identifier_self (default_parameter (identifier_offset) identifier_offset (None) None )default_parameter (default_parameter (identifier_limit) identifier_limit (integer_20) integer_20 )default_parameter (default_parameter (identifier_since) identifier_since (None) None )default_parameter (default_parameter (identifier_before) identifier_before (None) None )default_parameter (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (identifier_ItemList) identifier_ItemList (argument_list (identifier_self) identifier_self (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_since) identifier_since (identifier_since) identifier_since )keyword_argument (keyword_argument (identifier_before) identifier_before (identifier_before) identifier_before )keyword_argument (keyword_argument (identifier_cached) identifier_cached (attribute (identifier_self) identifier_self (identifier_is_cached) identifier_is_cached )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get a feed's items. :param offset: Amount of items to skip before returning data :param since: Return items added after this id (ordered old -> new) :param before: Return items added before this id (ordered new -> old) :param limit: Amount of items to return
(module (function_definition (function_name_add_note) function_name_add_note (parameters (identifier_self) identifier_self (identifier_content) identifier_content )parameters (block (expression_statement (assignment (identifier_args) identifier_args (dictionary (pair (string_'project_id') string_'project_id' (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )pair (pair (string_'content') string_'content' (identifier_content) identifier_content )pair )dictionary )assignment )expression_statement (expression_statement (call (identifier__perform_command) identifier__perform_command (argument_list (attribute (identifier_self) identifier_self (identifier_owner) identifier_owner )attribute (string_'note_add') string_'note_add' (identifier_args) identifier_args )argument_list )call )expression_statement )block )function_definition )module
Add a note to the project. .. warning:: Requires Todoist premium. :param content: The note content. :type content: str >>> from pytodoist import todoist >>> user = todoist.login('john.doe@gmail.com', 'password') >>> project = user.get_project('PyTodoist') >>> project.add_note('Remember to update to the latest version.')
(module (function_definition (function_name_Sign) function_name_Sign (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_signing_key) identifier_signing_key (default_parameter (identifier_verify_key) identifier_verify_key (None) None )default_parameter )parameters (block (if_statement (comparison_operator (call (attribute (identifier_signing_key) identifier_signing_key (identifier_KeyLen) identifier_KeyLen )attribute (argument_list )argument_list )call (integer_2048) integer_2048 )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_warning) identifier_warning )attribute (argument_list (string_"signing key is too short.") string_"signing key is too short." )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_signature) identifier_signature )attribute (call (attribute (identifier_signing_key) identifier_signing_key (identifier_Sign) identifier_Sign )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_signature_type) identifier_signature_type )attribute (attribute (attribute (identifier_self) identifier_self (identifier_SignatureType) identifier_SignatureType )attribute (identifier_RSA_PKCS1v15) identifier_RSA_PKCS1v15 )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_digest) identifier_digest )attribute (call (attribute (call (attribute (identifier_hashlib) identifier_hashlib (identifier_sha256) identifier_sha256 )attribute (argument_list (identifier_data) identifier_data )argument_list )call (identifier_digest) identifier_digest )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_digest_type) identifier_digest_type )attribute (attribute (attribute (identifier_self) identifier_self (identifier_HashType) identifier_HashType )attribute (identifier_SHA256) identifier_SHA256 )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_data) identifier_data )assignment )expression_statement (if_statement (comparison_operator (identifier_verify_key) identifier_verify_key (None) None )comparison_operator (block (expression_statement (assignment (identifier_verify_key) identifier_verify_key (call (attribute (identifier_signing_key) identifier_signing_key (identifier_GetPublicKey) identifier_GetPublicKey )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_Verify) identifier_Verify )attribute (argument_list (identifier_verify_key) identifier_verify_key )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Use the data to sign this blob. Args: data: String containing the blob data. signing_key: The key to sign with. verify_key: Key to verify with. If None we assume the signing key also contains the public key. Returns: self for call chaining.
(module (function_definition (function_name_log_normal) function_name_log_normal (parameters (identifier_self) identifier_self (identifier_x) identifier_x )parameters (block (expression_statement (assignment (identifier_d) identifier_d (subscript (attribute (attribute (identifier_self) identifier_self (identifier_mu) identifier_mu )attribute (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_xc) identifier_xc (binary_operator (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_mu) identifier_mu )attribute )binary_operator )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_x) identifier_x (identifier_shape) identifier_shape )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_exp_term) identifier_exp_term (call (attribute (identifier_numpy) identifier_numpy (identifier_sum) identifier_sum )attribute (argument_list (call (attribute (identifier_numpy) identifier_numpy (identifier_multiply) identifier_multiply )attribute (argument_list (identifier_xc) identifier_xc (call (attribute (identifier_numpy) identifier_numpy (identifier_dot) identifier_dot )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_inv) identifier_inv )attribute (identifier_xc) identifier_xc )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_exp_term) identifier_exp_term (call (attribute (identifier_numpy) identifier_numpy (identifier_sum) identifier_sum )attribute (argument_list (call (attribute (identifier_numpy) identifier_numpy (identifier_multiply) identifier_multiply )attribute (argument_list (identifier_xc) identifier_xc (call (attribute (identifier_numpy) identifier_numpy (identifier_dot) identifier_dot )attribute (argument_list (identifier_xc) identifier_xc (attribute (identifier_self) identifier_self (identifier_inv) identifier_inv )attribute )argument_list )call )argument_list )call (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (binary_operator (unary_operator (float_.5) float_.5 )unary_operator (parenthesized_expression (binary_operator (binary_operator (binary_operator (identifier_d) identifier_d (call (attribute (identifier_numpy) identifier_numpy (identifier_log) identifier_log )attribute (argument_list (binary_operator (integer_2) integer_2 (attribute (identifier_numpy) identifier_numpy (identifier_pi) identifier_pi )attribute )binary_operator )argument_list )call )binary_operator (call (attribute (identifier_numpy) identifier_numpy (identifier_log) identifier_log )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_det) identifier_det )attribute )argument_list )call )binary_operator (identifier_exp_term) identifier_exp_term )binary_operator )parenthesized_expression )binary_operator )return_statement )block )function_definition )module
Returns the log density of probability of x or the one dimensional array of all log probabilities if many vectors are given. @param x : may be of (n,) shape
(module (function_definition (function_name__validate_alias_command_level) function_name__validate_alias_command_level (parameters (identifier_alias) identifier_alias (identifier_command) identifier_command )parameters (block (expression_statement (assignment (identifier_alias_collision_table) identifier_alias_collision_table (call (attribute (identifier_AliasManager) identifier_AliasManager (identifier_build_collision_table) identifier_build_collision_table )attribute (argument_list (list (identifier_alias) identifier_alias )list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_alias_collision_table) identifier_alias_collision_table )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_command_collision_table) identifier_command_collision_table (call (attribute (identifier_AliasManager) identifier_AliasManager (identifier_build_collision_table) identifier_build_collision_table )attribute (argument_list (list (identifier_command) identifier_command )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_alias_collision_levels) identifier_alias_collision_levels (call (attribute (identifier_alias_collision_table) identifier_alias_collision_table (identifier_get) identifier_get )attribute (argument_list (subscript (call (attribute (identifier_alias) identifier_alias (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (list )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_command_collision_levels) identifier_command_collision_levels (call (attribute (identifier_command_collision_table) identifier_command_collision_table (identifier_get) identifier_get )attribute (argument_list (subscript (call (attribute (identifier_command) identifier_command (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (list )list )argument_list )call )assignment )expression_statement (if_statement (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_alias_collision_levels) identifier_alias_collision_levels )argument_list )call (call (identifier_set) identifier_set (argument_list (identifier_command_collision_levels) identifier_command_collision_levels )argument_list )call )binary_operator (block (raise_statement (call (identifier_CLIError) identifier_CLIError (argument_list (call (attribute (identifier_COMMAND_LVL_ERROR) identifier_COMMAND_LVL_ERROR (identifier_format) identifier_format )attribute (argument_list (identifier_alias) identifier_alias (identifier_command) identifier_command )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Make sure that if the alias is a reserved command, the command that the alias points to in the command tree does not conflict in levels. e.g. 'dns' -> 'network dns' is valid because dns is a level 2 command and network dns starts at level 1. However, 'list' -> 'show' is not valid because list and show are both reserved commands at level 2. Args: alias: The name of the alias. command: The command that the alias points to.
(module (function_definition (function_name_asarray2d) function_name_asarray2d (parameters (identifier_a) identifier_a )parameters (block (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_a) identifier_a )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_arr) identifier_arr (identifier_ndim) identifier_ndim )attribute (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_arr) identifier_arr (identifier_reshape) identifier_reshape )attribute (argument_list (unary_operator (integer_1) integer_1 )unary_operator (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_arr) identifier_arr )return_statement )block )function_definition )module
Cast to 2d array
(module (function_definition (function_name_metadata_to_double_percent_options) function_name_metadata_to_double_percent_options (parameters (identifier_metadata) identifier_metadata )parameters (block (expression_statement (assignment (identifier_options) identifier_options (list )list )assignment )expression_statement (if_statement (comparison_operator (string_'cell_depth') string_'cell_depth' (identifier_metadata) identifier_metadata )comparison_operator (block (expression_statement (call (attribute (identifier_options) identifier_options (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'%') string_'%' (call (attribute (identifier_metadata) identifier_metadata (identifier_pop) identifier_pop )attribute (argument_list (string_'cell_depth') string_'cell_depth' )argument_list )call )binary_operator )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (string_'title') string_'title' (identifier_metadata) identifier_metadata )comparison_operator (block (expression_statement (call (attribute (identifier_options) identifier_options (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_metadata) identifier_metadata (identifier_pop) identifier_pop )attribute (argument_list (string_'title') string_'title' )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (string_'cell_type') string_'cell_type' (identifier_metadata) identifier_metadata )comparison_operator (block (expression_statement (call (attribute (identifier_options) identifier_options (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_'[{}]') string_'[{}]' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_metadata) identifier_metadata (identifier_pop) identifier_pop )attribute (argument_list (string_'cell_type') string_'cell_type' )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_metadata) identifier_metadata (call (identifier_metadata_to_json_options) identifier_metadata_to_json_options (argument_list (identifier_metadata) identifier_metadata )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_metadata) identifier_metadata (string_'{}') string_'{}' )comparison_operator (block (expression_statement (call (attribute (identifier_options) identifier_options (identifier_append) identifier_append )attribute (argument_list (identifier_metadata) identifier_metadata )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_options) identifier_options )argument_list )call )return_statement )block )function_definition )module
Metadata to double percent lines
(module (function_definition (function_name_external_dependencies) function_name_external_dependencies (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_found) identifier_found (list )list )assignment )expression_statement (for_statement (identifier_dep) identifier_dep (attribute (identifier_self) identifier_self (identifier_dependent_images) identifier_dependent_images )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_dep) identifier_dep (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (if_statement (comparison_operator (identifier_dep) identifier_dep (identifier_found) identifier_found )comparison_operator (block (expression_statement (yield (identifier_dep) identifier_dep )yield )expression_statement (expression_statement (call (attribute (identifier_found) identifier_found (identifier_append) identifier_append )attribute (argument_list (identifier_dep) identifier_dep )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )for_statement )block )function_definition )module
Return all the external images this Dockerfile will depend on These are images from self.dependent_images that aren't defined in this configuration.
(module (function_definition (function_name_lock) function_name_lock (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_component) identifier_component (attribute (identifier_self) identifier_self (identifier_component) identifier_component )attribute )assignment )expression_statement (while_statement (True) True (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_component) identifier_component (attribute (attribute (attribute (identifier_smartcard) identifier_smartcard (identifier_pcsc) identifier_pcsc )attribute (identifier_PCSCCardConnection) identifier_PCSCCardConnection )attribute (identifier_PCSCCardConnection) identifier_PCSCCardConnection )attribute )argument_list )call (block (expression_statement (assignment (identifier_hresult) identifier_hresult (call (identifier_SCardBeginTransaction) identifier_SCardBeginTransaction (argument_list (attribute (identifier_component) identifier_component (identifier_hcard) identifier_hcard )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (integer_0) integer_0 (identifier_hresult) identifier_hresult )comparison_operator (block (raise_statement (call (identifier_CardConnectionException) identifier_CardConnectionException (argument_list (binary_operator (string_'Failed to lock with SCardBeginTransaction: ') string_'Failed to lock with SCardBeginTransaction: ' (call (identifier_SCardGetErrorMessage) identifier_SCardGetErrorMessage (argument_list (identifier_hresult) identifier_hresult )argument_list )call )binary_operator )argument_list )call )raise_statement )block (else_clause (block (pass_statement )pass_statement )block )else_clause )if_statement (break_statement )break_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_component) identifier_component (string_'component') string_'component' )argument_list )call (block (expression_statement (assignment (identifier_component) identifier_component (attribute (identifier_component) identifier_component (identifier_component) identifier_component )attribute )assignment )expression_statement )block (else_clause (block (break_statement )break_statement )block )else_clause )if_statement )block )while_statement )block )function_definition )module
Lock card with SCardBeginTransaction.
(module (function_definition (function_name_load_train_file) function_name_load_train_file (parameters (identifier_config_file_path) identifier_config_file_path )parameters (block (import_from_statement (dotted_name (identifier_pylearn2) identifier_pylearn2 (identifier_config) identifier_config )dotted_name (dotted_name (identifier_yaml_parse) identifier_yaml_parse )dotted_name )import_from_statement (expression_statement (assignment (identifier_suffix_to_strip) identifier_suffix_to_strip (string_'.yaml') string_'.yaml' )assignment )expression_statement (if_statement (call (attribute (identifier_config_file_path) identifier_config_file_path (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_suffix_to_strip) identifier_suffix_to_strip )argument_list )call (block (expression_statement (assignment (identifier_config_file_full_stem) identifier_config_file_full_stem (subscript (identifier_config_file_path) identifier_config_file_path (slice (integer_0) integer_0 (colon) colon (unary_operator (call (identifier_len) identifier_len (argument_list (identifier_suffix_to_strip) identifier_suffix_to_strip )argument_list )call )unary_operator )slice )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_config_file_full_stem) identifier_config_file_full_stem (identifier_config_file_path) identifier_config_file_path )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_varname) identifier_varname (list (string_"PYLEARN2_TRAIN_FILE_NAME") string_"PYLEARN2_TRAIN_FILE_NAME" (string_"PYLEARN2_TRAIN_FILE_FULL_STEM") string_"PYLEARN2_TRAIN_FILE_FULL_STEM" )list (block (expression_statement (call (attribute (identifier_environ) identifier_environ (identifier_putenv) identifier_putenv )attribute (argument_list (identifier_varname) identifier_varname (identifier_config_file_full_stem) identifier_config_file_full_stem )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_directory) identifier_directory (subscript (call (attribute (identifier_config_file_path) identifier_config_file_path (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_directory) identifier_directory (call (attribute (string_'/') string_'/' (identifier_join) identifier_join )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_directory) identifier_directory (string_'') string_'' )comparison_operator (block (expression_statement (augmented_assignment (identifier_directory) identifier_directory (string_'/') string_'/' )augmented_assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_environ) identifier_environ (identifier_putenv) identifier_putenv )attribute (argument_list (string_"PYLEARN2_TRAIN_DIR") string_"PYLEARN2_TRAIN_DIR" (identifier_directory) identifier_directory )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_environ) identifier_environ (identifier_putenv) identifier_putenv )attribute (argument_list (string_"PYLEARN2_TRAIN_BASE_NAME") string_"PYLEARN2_TRAIN_BASE_NAME" (subscript (call (attribute (identifier_config_file_path) identifier_config_file_path (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_environ) identifier_environ (identifier_putenv) identifier_putenv )attribute (argument_list (string_"PYLEARN2_TRAIN_FILE_STEM") string_"PYLEARN2_TRAIN_FILE_STEM" (subscript (call (attribute (identifier_config_file_full_stem) identifier_config_file_full_stem (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call )expression_statement (return_statement (call (attribute (identifier_yaml_parse) identifier_yaml_parse (identifier_load_path) identifier_load_path )attribute (argument_list (identifier_config_file_path) identifier_config_file_path )argument_list )call )return_statement )block )function_definition )module
Loads and parses a yaml file for a Train object. Publishes the relevant training environment variables
(module (function_definition (function_name_chainproperty) function_name_chainproperty (parameters (identifier_func) identifier_func )parameters (block (expression_statement (assignment (identifier_func) identifier_func (call (identifier_assertionproperty) identifier_assertionproperty (argument_list (identifier_func) identifier_func )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_AssertionBuilder) identifier_AssertionBuilder (attribute (attribute (identifier_func) identifier_func (identifier_fget) identifier_fget )attribute (identifier___name__) identifier___name__ )attribute (identifier_func) identifier_func )argument_list )call )expression_statement (return_statement (identifier_func) identifier_func )return_statement )block )function_definition )module
Extend sure with a custom chain property.
(module (function_definition (function_name_config_insync) function_name_config_insync (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_status) identifier_status (call (attribute (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (string_'config/insync') string_'config/insync' )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'configInSync') string_'configInSync' (False) False )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_status) identifier_status (None) None )comparison_operator (block (expression_statement (assignment (identifier_status) identifier_status (False) False )assignment )expression_statement )block )if_statement (return_statement (identifier_status) identifier_status )return_statement )block )function_definition )module
Returns whether the config is in sync, i.e. whether the running configuration is the same as that on disk. Returns: bool
(module (function_definition (function_name_create_hammersley_samples) function_name_create_hammersley_samples (parameters (identifier_order) identifier_order (default_parameter (identifier_dim) identifier_dim (integer_1) integer_1 )default_parameter (default_parameter (identifier_burnin) identifier_burnin (unary_operator (integer_1) integer_1 )unary_operator )default_parameter (default_parameter (identifier_primes) identifier_primes (tuple )tuple )default_parameter )parameters (block (if_statement (comparison_operator (identifier_dim) identifier_dim (integer_1) integer_1 )comparison_operator (block (return_statement (call (identifier_create_halton_samples) identifier_create_halton_samples (argument_list (keyword_argument (identifier_order) identifier_order (identifier_order) identifier_order )keyword_argument (keyword_argument (identifier_dim) identifier_dim (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_burnin) identifier_burnin (identifier_burnin) identifier_burnin )keyword_argument (keyword_argument (identifier_primes) identifier_primes (identifier_primes) identifier_primes )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_out) identifier_out (call (attribute (identifier_numpy) identifier_numpy (identifier_empty) identifier_empty )attribute (argument_list (tuple (identifier_dim) identifier_dim (identifier_order) identifier_order )tuple (keyword_argument (identifier_dtype) identifier_dtype (identifier_float) identifier_float )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_out) identifier_out (slice (colon) colon (binary_operator (identifier_dim) identifier_dim (integer_1) integer_1 )binary_operator )slice )subscript (call (identifier_create_halton_samples) identifier_create_halton_samples (argument_list (keyword_argument (identifier_order) identifier_order (identifier_order) identifier_order )keyword_argument (keyword_argument (identifier_dim) identifier_dim (binary_operator (identifier_dim) identifier_dim (integer_1) integer_1 )binary_operator )keyword_argument (keyword_argument (identifier_burnin) identifier_burnin (identifier_burnin) identifier_burnin )keyword_argument (keyword_argument (identifier_primes) identifier_primes (identifier_primes) identifier_primes )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_out) identifier_out (binary_operator (identifier_dim) identifier_dim (integer_1) integer_1 )binary_operator )subscript (subscript (call (attribute (identifier_numpy) identifier_numpy (identifier_linspace) identifier_linspace )attribute (argument_list (integer_0) integer_0 (integer_1) integer_1 (binary_operator (identifier_order) identifier_order (integer_2) integer_2 )binary_operator )argument_list )call (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Create samples from the Hammersley set. For ``dim == 1`` the sequence falls back to Van Der Corput sequence. Args: order (int): The order of the Hammersley sequence. Defines the number of samples. dim (int): The number of dimensions in the Hammersley sequence. burnin (int): Skip the first ``burnin`` samples. If negative, the maximum of ``primes`` is used. primes (tuple): The (non-)prime base to calculate values along each axis. If empty, growing prime values starting from 2 will be used. Returns: (numpy.ndarray): Hammersley set with ``shape == (dim, order)``.
(module (function_definition (function_name__parse_roles) function_name__parse_roles (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_roles) identifier_roles (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_keystone_role) identifier_keystone_role (identifier_flask_role) identifier_flask_role )pattern_list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_roles) identifier_roles )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (call (attribute (identifier_roles) identifier_roles (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_flask_role) identifier_flask_role (call (identifier_set) identifier_set (argument_list )argument_list )call )argument_list )call (identifier_add) identifier_add )attribute (argument_list (identifier_keystone_role) identifier_keystone_role )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_roles) identifier_roles )return_statement )block )function_definition )module
Generate a dictionary for configured roles from oslo_config. Due to limitations in ini format, it's necessary to specify roles in a flatter format than a standard dictionary. This function serves to transform these roles into a standard python dictionary.
(module (function_definition (function_name_memoized_property) function_name_memoized_property (parameters (identifier_fget) identifier_fget )parameters (block (expression_statement (assignment (identifier_attr_name) identifier_attr_name (call (attribute (string_'_{}') string_'_{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_fget) identifier_fget (identifier___name__) identifier___name__ )attribute )argument_list )call )assignment )expression_statement (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_fget) identifier_fget )argument_list )call )decorator (function_definition (function_name_fget_memoized) function_name_fget_memoized (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (identifier_attr_name) identifier_attr_name )argument_list )call )not_operator (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_attr_name) identifier_attr_name (call (identifier_fget) identifier_fget (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_attr_name) identifier_attr_name )argument_list )call )return_statement )block )function_definition )decorated_definition (return_statement (call (identifier_property) identifier_property (argument_list (identifier_fget_memoized) identifier_fget_memoized )argument_list )call )return_statement )block )function_definition )module
Decorator to create memoized properties.
(module (function_definition (function_name_amplitude) function_name_amplitude (parameters (identifier_self) identifier_self (identifier_caldb) identifier_caldb (identifier_calv) identifier_calv (default_parameter (identifier_atten) identifier_atten (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_amp) identifier_amp (parenthesized_expression (binary_operator (binary_operator (integer_10) integer_10 (parenthesized_expression (binary_operator (call (identifier_float) identifier_float (argument_list (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier__intensity) identifier__intensity )attribute (identifier_atten) identifier_atten )binary_operator (identifier_caldb) identifier_caldb )binary_operator )argument_list )call (integer_20) integer_20 )binary_operator )parenthesized_expression )binary_operator (identifier_calv) identifier_calv )binary_operator )parenthesized_expression )assignment )expression_statement (return_statement (identifier_amp) identifier_amp )return_statement )block )function_definition )module
Calculates the voltage amplitude for this stimulus, using internal intensity value and the given reference intensity & voltage :param caldb: calibration intensity in dbSPL :type caldb: float :param calv: calibration voltage that was used to record the intensity provided :type calv: float
(module (function_definition (function_name_get_override_votes) function_name_get_override_votes (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_obj) identifier_obj (string_"meta") string_"meta" )argument_list )call (block (if_statement (attribute (attribute (identifier_obj) identifier_obj (identifier_meta) identifier_meta )attribute (identifier_override_ap_votes) identifier_override_ap_votes )attribute (block (expression_statement (assignment (identifier_all_votes) identifier_all_votes (None) None )assignment )expression_statement (for_statement (identifier_ce) identifier_ce (call (attribute (attribute (identifier_obj) identifier_obj (identifier_candidate_elections) identifier_candidate_elections )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call (block (if_statement (identifier_all_votes) identifier_all_votes (block (expression_statement (assignment (identifier_all_votes) identifier_all_votes (binary_operator (identifier_all_votes) identifier_all_votes (call (attribute (attribute (identifier_ce) identifier_ce (identifier_votes) identifier_votes )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_all_votes) identifier_all_votes (call (attribute (attribute (identifier_ce) identifier_ce (identifier_votes) identifier_votes )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (attribute (call (identifier_VotesSerializer) identifier_VotesSerializer (argument_list (identifier_all_votes) identifier_all_votes (keyword_argument (identifier_many) identifier_many (True) True )keyword_argument )argument_list )call (identifier_data) identifier_data )attribute )return_statement )block )if_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Votes entered into backend. Only used if ``override_ap_votes = True``.
(module (function_definition (function_name_get_ssl) function_name_get_ssl (parameters (identifier_database) identifier_database )parameters (block (if_statement (comparison_operator (subscript (identifier_database) identifier_database (string_'engine') string_'engine' )subscript (string_'postgresql') string_'postgresql' )comparison_operator (block (expression_statement (assignment (identifier_keys) identifier_keys (list (string_'sslmode') string_'sslmode' (string_'sslcert') string_'sslcert' (string_'sslkey') string_'sslkey' (string_'sslrootcert') string_'sslrootcert' (string_'sslcrl') string_'sslcrl' (string_'sslcompression') string_'sslcompression' )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_keys) identifier_keys (list (string_'ssl_ca') string_'ssl_ca' (string_'ssl_capath') string_'ssl_capath' (string_'ssl_cert') string_'ssl_cert' (string_'ssl_key') string_'ssl_key' (string_'ssl_cipher') string_'ssl_cipher' (string_'ssl_check_hostname') string_'ssl_check_hostname' )list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_ssl) identifier_ssl (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_database) identifier_database (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_ssl) identifier_ssl (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_ssl) identifier_ssl )return_statement )block )function_definition )module
Returns SSL options for the selected engine
(module (function_definition (function_name_agent_heartbeat) function_name_agent_heartbeat (parameters (identifier_self) identifier_self (identifier_agent_id) identifier_agent_id (identifier_metrics) identifier_metrics (identifier_run_states) identifier_run_states )parameters (block (expression_statement (assignment (identifier_mutation) identifier_mutation (call (identifier_gql) identifier_gql (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_gql) identifier_gql )attribute (argument_list (identifier_mutation) identifier_mutation (keyword_argument (identifier_variable_values) identifier_variable_values (dictionary (pair (string_'id') string_'id' (identifier_agent_id) identifier_agent_id )pair (pair (string_'metrics') string_'metrics' (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_metrics) identifier_metrics )argument_list )call )pair (pair (string_'runState') string_'runState' (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_run_states) identifier_run_states )argument_list )call )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_message) identifier_message (subscript (call (attribute (identifier_ast) identifier_ast (identifier_literal_eval) identifier_literal_eval )attribute (argument_list (subscript (attribute (identifier_e) identifier_e (identifier_args) identifier_args )attribute (integer_0) integer_0 )subscript )argument_list )call (string_"message") string_"message" )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_'Error communicating with W&B: %s') string_'Error communicating with W&B: %s' (identifier_message) identifier_message )argument_list )call )expression_statement (return_statement (list )list )return_statement )block )except_clause (else_clause (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (subscript (subscript (identifier_response) identifier_response (string_'agentHeartbeat') string_'agentHeartbeat' )subscript (string_'commands') string_'commands' )subscript )argument_list )call )return_statement )block )else_clause )try_statement )block )function_definition )module
Notify server about agent state, receive commands. Args: agent_id (str): agent_id metrics (dict): system metrics run_states (dict): run_id: state mapping Returns: List of commands to execute.
(module (function_definition (function_name__finalise_figure) function_name__finalise_figure (parameters (identifier_fig) identifier_fig (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_title) identifier_title (boolean_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"title") string_"title" )argument_list )call (None) None )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_show) identifier_show (boolean_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"show") string_"show" )argument_list )call (False) False )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_save) identifier_save (boolean_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"save") string_"save" )argument_list )call (False) False )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_savefile) identifier_savefile (boolean_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"savefile") string_"savefile" )argument_list )call (string_"EQcorrscan_figure.png") string_"EQcorrscan_figure.png" )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_return_fig) identifier_return_fig (boolean_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"return_figure") string_"return_figure" )argument_list )call (False) False )boolean_operator )assignment )expression_statement (if_statement (identifier_title) identifier_title (block (expression_statement (call (attribute (identifier_fig) identifier_fig (identifier_suptitle) identifier_suptitle )attribute (argument_list (identifier_title) identifier_title )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_show) identifier_show (block (expression_statement (call (attribute (identifier_fig) identifier_fig (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_save) identifier_save (block (expression_statement (call (attribute (identifier_fig) identifier_fig (identifier_savefig) identifier_savefig )attribute (argument_list (identifier_savefile) identifier_savefile )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Saved figure to {0}") string_"Saved figure to {0}" (identifier_format) identifier_format )attribute (argument_list (identifier_savefile) identifier_savefile )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_return_fig) identifier_return_fig (block (return_statement (identifier_fig) identifier_fig )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Internal function to wrap up a figure. Possible arguments: :type title: str :type show: bool :type save: bool :type savefile: str :type return_figure: bool
(module (function_definition (function_name__pad_block) function_name__pad_block (parameters (identifier_self) identifier_self (identifier_handle) identifier_handle )parameters (block (expression_statement (assignment (identifier_extra) identifier_extra (binary_operator (call (attribute (identifier_handle) identifier_handle (identifier_tell) identifier_tell )attribute (argument_list )argument_list )call (integer_512) integer_512 )binary_operator )assignment )expression_statement (if_statement (identifier_extra) identifier_extra (block (expression_statement (call (attribute (identifier_handle) identifier_handle (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_b'\x00') string_b'\x00' (parenthesized_expression (binary_operator (integer_512) integer_512 (identifier_extra) identifier_extra )binary_operator )parenthesized_expression )binary_operator )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Pad the file with 0s to the end of the next block boundary.
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_doc) identifier_doc )parameters (block (expression_statement (assignment (identifier_array) identifier_array (call (attribute (identifier_doc) identifier_doc (identifier_to_array) identifier_to_array )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_attrs) identifier_attrs )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_array) identifier_array (identifier_shape) identifier_shape )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_array) identifier_array (call (attribute (identifier_array) identifier_array (identifier_reshape) identifier_reshape )attribute (argument_list (tuple (subscript (attribute (identifier_array) identifier_array (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (integer_1) integer_1 )tuple )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_tokens) identifier_tokens )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_array) identifier_array )argument_list )call )expression_statement (expression_statement (assignment (identifier_spaces) identifier_spaces (call (attribute (identifier_doc) identifier_doc (identifier_to_array) identifier_to_array )attribute (argument_list (identifier_SPACY) identifier_SPACY )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (subscript (attribute (identifier_array) identifier_array (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_spaces) identifier_spaces (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )comparison_operator )assert_statement (expression_statement (assignment (identifier_spaces) identifier_spaces (call (attribute (identifier_spaces) identifier_spaces (identifier_reshape) identifier_reshape )attribute (argument_list (tuple (subscript (attribute (identifier_spaces) identifier_spaces (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (integer_1) integer_1 )tuple )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_spaces) identifier_spaces )attribute (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_numpy) identifier_numpy (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_spaces) identifier_spaces (keyword_argument (identifier_dtype) identifier_dtype (identifier_bool) identifier_bool )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_strings) identifier_strings )attribute (identifier_update) identifier_update )attribute (generator_expression (attribute (identifier_w) identifier_w (identifier_text) identifier_text )attribute (for_in_clause (identifier_w) identifier_w (identifier_doc) identifier_doc )for_in_clause )generator_expression )call )expression_statement )block )function_definition )module
Add a doc's annotations to the binder for serialization.
(module (function_definition (function_name_flush) function_name_flush (parameters (identifier_cls) identifier_cls (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (return_statement (call (identifier__remove_keys) identifier__remove_keys (argument_list (list )list (list (binary_operator (parenthesized_expression (conditional_expression (call (attribute (identifier_cls) identifier_cls (identifier__make_key) identifier__make_key )attribute (argument_list (identifier_args) identifier_args )argument_list )call (identifier_args) identifier_args (attribute (identifier_cls) identifier_cls (identifier_PREFIX) identifier_PREFIX )attribute )conditional_expression )parenthesized_expression (string_'*') string_'*' )binary_operator )list )argument_list )call )return_statement )block )function_definition )module
Removes all keys of this namespace Without args, clears all keys starting with cls.PREFIX if called with args, clears keys starting with given cls.PREFIX + args Args: *args: Arbitrary number of arguments. Returns: List of removed keys.
(module (function_definition (function_name_get_default_project_directory) function_name_get_default_project_directory (parameters )parameters (block (expression_statement (assignment (identifier_server_config) identifier_server_config (call (attribute (call (attribute (identifier_Config) identifier_Config (identifier_instance) identifier_instance )attribute (argument_list )argument_list )call (identifier_get_section_config) identifier_get_section_config )attribute (argument_list (string_"Server") string_"Server" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (call (attribute (identifier_server_config) identifier_server_config (identifier_get) identifier_get )attribute (argument_list (string_"projects_path") string_"projects_path" (string_"~/GNS3/projects") string_"~/GNS3/projects" )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_exist_ok) identifier_exist_ok (True) True )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (attribute (attribute (identifier_aiohttp) identifier_aiohttp (identifier_web) identifier_web )attribute (identifier_HTTPInternalServerError) identifier_HTTPInternalServerError )attribute (argument_list (keyword_argument (identifier_text) identifier_text (call (attribute (string_"Could not create project directory: {}") string_"Could not create project directory: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_e) identifier_e )argument_list )call )keyword_argument )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (identifier_path) identifier_path )return_statement )block )function_definition )module
Return the default location for the project directory depending of the operating system
(module (function_definition (function_name__mask) function_name__mask (parameters (identifier_self) identifier_self (identifier_tensor) identifier_tensor (identifier_length) identifier_length (default_parameter (identifier_padding_value) identifier_padding_value (integer_0) integer_0 )default_parameter )parameters (block (with_statement (with_clause (with_item (call (attribute (identifier_tf) identifier_tf (identifier_name_scope) identifier_name_scope )attribute (argument_list (string_'mask') string_'mask' )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_range_) identifier_range_ (call (attribute (identifier_tf) identifier_tf (identifier_range) identifier_range )attribute (argument_list (attribute (subscript (attribute (identifier_tensor) identifier_tensor (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript (identifier_value) identifier_value )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mask) identifier_mask (comparison_operator (subscript (identifier_range_) identifier_range_ (None) None (slice (colon) colon )slice )subscript (subscript (identifier_length) identifier_length (slice (colon) colon )slice (None) None )subscript )comparison_operator )assignment )expression_statement (if_statement (comparison_operator (attribute (attribute (identifier_tensor) identifier_tensor (identifier_shape) identifier_shape )attribute (identifier_ndims) identifier_ndims )attribute (integer_2) integer_2 )comparison_operator (block (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (binary_operator (attribute (attribute (identifier_tensor) identifier_tensor (identifier_shape) identifier_shape )attribute (identifier_ndims) identifier_ndims )attribute (integer_2) integer_2 )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_mask) identifier_mask (subscript (identifier_mask) identifier_mask (ellipsis_...) ellipsis_... (None) None )subscript )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_mask) identifier_mask (call (attribute (identifier_tf) identifier_tf (identifier_tile) identifier_tile )attribute (argument_list (identifier_mask) identifier_mask (binary_operator (list (integer_1) integer_1 (integer_1) integer_1 )list (call (attribute (subscript (attribute (identifier_tensor) identifier_tensor (identifier_shape) identifier_shape )attribute (slice (integer_2) integer_2 (colon) colon )slice )subscript (identifier_as_list) identifier_as_list )attribute (argument_list )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_masked) identifier_masked (call (attribute (identifier_tf) identifier_tf (identifier_where) identifier_where )attribute (argument_list (identifier_mask) identifier_mask (identifier_tensor) identifier_tensor (binary_operator (identifier_padding_value) identifier_padding_value (call (attribute (identifier_tf) identifier_tf (identifier_ones_like) identifier_ones_like )attribute (argument_list (identifier_tensor) identifier_tensor )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_tf) identifier_tf (identifier_check_numerics) identifier_check_numerics )attribute (argument_list (identifier_masked) identifier_masked (string_'masked') string_'masked' )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Set padding elements of a batch of sequences to a constant. Useful for setting padding elements to zero before summing along the time dimension, or for preventing infinite results in padding elements. Args: tensor: Tensor of sequences. length: Batch of sequence lengths. padding_value: Value to write into padding elements. Returns: Masked sequences.
(module (function_definition (function_name_zeros) function_name_zeros (parameters (identifier_shape) identifier_shape (default_parameter (identifier_dtype) identifier_dtype (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_dtype) identifier_dtype (None) None )comparison_operator (block (expression_statement (assignment (identifier_dtype) identifier_dtype (attribute (identifier__numpy) identifier__numpy (identifier_float32) identifier_float32 )attribute )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier__internal) identifier__internal (identifier__zeros) identifier__zeros )attribute (argument_list (keyword_argument (identifier_shape) identifier_shape (identifier_shape) identifier_shape )keyword_argument (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Returns a new symbol of given shape and type, filled with zeros. Parameters ---------- shape : int or sequence of ints Shape of the new array. dtype : str or numpy.dtype, optional The value type of the inner value, default to ``np.float32``. Returns ------- out : Symbol The created Symbol.
(module (function_definition (function_name_register_pb_devices) function_name_register_pb_devices (parameters (typed_default_parameter (identifier_num_pbs) identifier_num_pbs (type (identifier_int) identifier_int )type (integer_100) integer_100 )typed_default_parameter )parameters (block (expression_statement (assignment (identifier_tango_db) identifier_tango_db (call (identifier_Database) identifier_Database (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_"Registering PB devices:") string_"Registering PB devices:" )argument_list )call )expression_statement (expression_statement (assignment (identifier_dev_info) identifier_dev_info (call (identifier_DbDevInfo) identifier_DbDevInfo (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_dev_info) identifier_dev_info (identifier__class) identifier__class )attribute (string_'ProcessingBlockDevice') string_'ProcessingBlockDevice' )assignment )expression_statement (expression_statement (assignment (attribute (identifier_dev_info) identifier_dev_info (identifier_server) identifier_server )attribute (string_'processing_block_ds/1') string_'processing_block_ds/1' )assignment )expression_statement (for_statement (identifier_index) identifier_index (call (identifier_range) identifier_range (argument_list (identifier_num_pbs) identifier_num_pbs )argument_list )call (block (expression_statement (assignment (attribute (identifier_dev_info) identifier_dev_info (identifier_name) identifier_name )attribute (call (attribute (string_'sip_sdp/pb/{:05d}') string_'sip_sdp/pb/{:05d}' (identifier_format) identifier_format )attribute (argument_list (identifier_index) identifier_index )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_"\t%s") string_"\t%s" (attribute (identifier_dev_info) identifier_dev_info (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_tango_db) identifier_tango_db (identifier_add_device) identifier_add_device )attribute (argument_list (identifier_dev_info) identifier_dev_info )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Register PBs devices. Note(BMo): Ideally we do not want to register any devices here. There does not seem to be a way to create a device server with no registered devices in Tango. This is (probably) because Tango devices must have been registered before the server starts ...
(module (function_definition (function_name_prepare_intervals) function_name_prepare_intervals (parameters (identifier_data) identifier_data (identifier_region_file) identifier_region_file (identifier_work_dir) identifier_work_dir )parameters (block (expression_statement (assignment (identifier_target_file) identifier_target_file (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_work_dir) identifier_work_dir (binary_operator (string_"%s-target.interval_list") string_"%s-target.interval_list" (call (attribute (identifier_dd) identifier_dd (identifier_get_sample_name) identifier_get_sample_name )attribute (argument_list (identifier_data) identifier_data )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_utils) identifier_utils (identifier_file_uptodate) identifier_file_uptodate )attribute (argument_list (identifier_target_file) identifier_target_file (identifier_region_file) identifier_region_file )argument_list )call )not_operator (block (with_statement (with_clause (with_item (as_pattern (call (identifier_file_transaction) identifier_file_transaction (argument_list (identifier_data) identifier_data (identifier_target_file) identifier_target_file )argument_list )call (as_pattern_target (identifier_tx_out_file) identifier_tx_out_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_params) identifier_params (list (string_"-T") string_"-T" (string_"PreprocessIntervals") string_"PreprocessIntervals" (string_"-R") string_"-R" (call (attribute (identifier_dd) identifier_dd (identifier_get_ref_file) identifier_get_ref_file )attribute (argument_list (identifier_data) identifier_data )argument_list )call (string_"--interval-merging-rule") string_"--interval-merging-rule" (string_"OVERLAPPING_ONLY") string_"OVERLAPPING_ONLY" (string_"-O") string_"-O" (identifier_tx_out_file) identifier_tx_out_file )list )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_dd) identifier_dd (identifier_get_coverage_interval) identifier_get_coverage_interval )attribute (argument_list (identifier_data) identifier_data )argument_list )call (string_"genome") string_"genome" )comparison_operator (block (expression_statement (augmented_assignment (identifier_params) identifier_params (list (string_"--bin-length") string_"--bin-length" (string_"1000") string_"1000" (string_"--padding") string_"--padding" (string_"0") string_"0" )list )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_params) identifier_params (list (string_"-L") string_"-L" (identifier_region_file) identifier_region_file (string_"--bin-length") string_"--bin-length" (string_"0") string_"0" (string_"--padding") string_"--padding" (string_"250") string_"250" )list )augmented_assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier__run_with_memory_scaling) identifier__run_with_memory_scaling (argument_list (identifier_params) identifier_params (identifier_tx_out_file) identifier_tx_out_file (identifier_data) identifier_data )argument_list )call )expression_statement )block )with_statement )block )if_statement (return_statement (identifier_target_file) identifier_target_file )return_statement )block )function_definition )module
Prepare interval regions for targeted and gene based regions.
(module (function_definition (function_name_dir_list) function_name_dir_list (parameters (identifier_self) identifier_self (identifier_tgt_env) identifier_tgt_env )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tree) identifier_tree (call (attribute (identifier_self) identifier_self (identifier_get_tree) identifier_get_tree )attribute (argument_list (identifier_tgt_env) identifier_tgt_env )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_tree) identifier_tree )not_operator (block (return_statement (identifier_ret) identifier_ret )return_statement )block )if_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (argument_list (identifier_tgt_env) identifier_tgt_env )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_tree) identifier_tree (binary_operator (identifier_tree) identifier_tree (call (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (argument_list (identifier_tgt_env) identifier_tgt_env )argument_list )call )binary_operator )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (identifier_ret) identifier_ret )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_relpath) identifier_relpath (lambda (lambda_parameters (identifier_path) identifier_path )lambda_parameters (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_relpath) identifier_relpath )attribute (argument_list (identifier_path) identifier_path (call (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (argument_list (identifier_tgt_env) identifier_tgt_env )argument_list )call )argument_list )call )lambda )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_relpath) identifier_relpath (lambda (lambda_parameters (identifier_path) identifier_path )lambda_parameters (identifier_path) identifier_path )lambda )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_add_mountpoint) identifier_add_mountpoint (lambda (lambda_parameters (identifier_path) identifier_path )lambda_parameters (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_mountpoint) identifier_mountpoint )attribute (argument_list (identifier_tgt_env) identifier_tgt_env )argument_list )call (identifier_path) identifier_path (keyword_argument (identifier_use_posixpath) identifier_use_posixpath (True) True )keyword_argument )argument_list )call )lambda )assignment )expression_statement (for_statement (identifier_blob) identifier_blob (call (attribute (identifier_tree) identifier_tree (identifier_traverse) identifier_traverse )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_blob) identifier_blob (attribute (identifier_git) identifier_git (identifier_Tree) identifier_Tree )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_add) identifier_add )attribute (argument_list (call (identifier_add_mountpoint) identifier_add_mountpoint (argument_list (call (identifier_relpath) identifier_relpath (argument_list (attribute (identifier_blob) identifier_blob (identifier_path) identifier_path )attribute )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_mountpoint) identifier_mountpoint )attribute (argument_list (identifier_tgt_env) identifier_tgt_env )argument_list )call (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_add) identifier_add )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_mountpoint) identifier_mountpoint )attribute (argument_list (identifier_tgt_env) identifier_tgt_env )argument_list )call )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Get list of directories for the target environment using GitPython
(module (function_definition (function_name_add_frequency) function_name_add_frequency (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_value) identifier_value )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Adding frequency {0} with value {1} to variant {2}") string_"Adding frequency {0} with value {1} to variant {2}" (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name (identifier_value) identifier_value (subscript (identifier_self) identifier_self (string_'variant_id') string_'variant_id' )subscript )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (identifier_self) identifier_self (string_'frequencies') string_'frequencies' )subscript (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'label') string_'label' (identifier_name) identifier_name )pair (pair (string_'value') string_'value' (identifier_value) identifier_value )pair )dictionary )argument_list )call )expression_statement )block )function_definition )module
Add a frequency that will be displayed on the variant level Args: name (str): The name of the frequency field
(module (function_definition (function_name_set_partition) function_name_set_partition (parameters (identifier_self) identifier_self (identifier_partition) identifier_partition )parameters (block (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_partition) identifier_partition )argument_list )call (attribute (identifier_self) identifier_self (identifier_numgrp) identifier_numgrp )attribute )comparison_operator )assert_statement (expression_statement (assignment (pattern_list (attribute (identifier_self) identifier_self (identifier_partition) identifier_partition )attribute (attribute (identifier_self) identifier_self (identifier_prev_partition) identifier_prev_partition )attribute )pattern_list (expression_list (identifier_partition) identifier_partition (attribute (identifier_self) identifier_self (identifier_partition) identifier_partition )attribute )expression_list )assignment )expression_statement )block )function_definition )module
Store the partition in self.partition, and move the old self.partition into self.prev_partition
(module (function_definition (function_name_get_restored) function_name_get_restored (parameters (identifier_self) identifier_self )parameters (block (return_statement (expression_list (comparison_operator (attribute (attribute (attribute (identifier_self) identifier_self (identifier__header) identifier__header )attribute (identifier_initial) identifier_initial )attribute (identifier_restore_time) identifier_restore_time )attribute (integer_0) integer_0 )comparison_operator (attribute (attribute (attribute (identifier_self) identifier_self (identifier__header) identifier__header )attribute (identifier_initial) identifier_initial )attribute (identifier_restore_time) identifier_restore_time )attribute )expression_list )return_statement )block )function_definition )module
Check for restored game.
(module (function_definition (function_name_stream_subsegments) function_name_stream_subsegments (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_segment) identifier_segment (call (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_streaming) identifier_streaming )attribute (identifier_is_eligible) identifier_is_eligible )attribute (argument_list (identifier_segment) identifier_segment )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_streaming) identifier_streaming )attribute (identifier_stream) identifier_stream )attribute (argument_list (identifier_segment) identifier_segment (attribute (identifier_self) identifier_self (identifier__stream_subsegment_out) identifier__stream_subsegment_out )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Stream all closed subsegments to the daemon and remove reference to the parent segment. No-op for a not sampled segment.
(module (function_definition (function_name_prefix_iter) function_name_prefix_iter (parameters (identifier_self) identifier_self (identifier_ns_uri) identifier_ns_uri )parameters (block (expression_statement (assignment (identifier_ni) identifier_ni (call (attribute (identifier_self) identifier_self (identifier___lookup_uri) identifier___lookup_uri )attribute (argument_list (identifier_ns_uri) identifier_ns_uri )argument_list )call )assignment )expression_statement (return_statement (call (identifier_iter) identifier_iter (argument_list (attribute (identifier_ni) identifier_ni (identifier_prefixes) identifier_prefixes )attribute )argument_list )call )return_statement )block )function_definition )module
Gets an iterator over the prefixes for the given namespace.
(module (function_definition (function_name_pad) function_name_pad (parameters (identifier_self) identifier_self (identifier_sid) identifier_sid (identifier_date) identifier_date )parameters (block (expression_statement (assignment (identifier_table) identifier_table (call (attribute (identifier_self) identifier_self (identifier__ensure_ctable) identifier__ensure_ctable )attribute (argument_list (identifier_sid) identifier_sid )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_last_date) identifier_last_date (call (attribute (identifier_self) identifier_self (identifier_last_date_in_output_for_sid) identifier_last_date_in_output_for_sid )attribute (argument_list (identifier_sid) identifier_sid )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tds) identifier_tds (attribute (identifier_self) identifier_self (identifier__session_labels) identifier__session_labels )attribute )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_date) identifier_date (identifier_last_date) identifier_last_date )comparison_operator (comparison_operator (identifier_date) identifier_date (subscript (identifier_tds) identifier_tds (integer_0) integer_0 )subscript )comparison_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (identifier_last_date) identifier_last_date (attribute (identifier_pd) identifier_pd (identifier_NaT) identifier_NaT )attribute )comparison_operator (block (expression_statement (assignment (identifier_days_to_zerofill) identifier_days_to_zerofill (subscript (identifier_tds) identifier_tds (call (attribute (identifier_tds) identifier_tds (identifier_slice_indexer) identifier_slice_indexer )attribute (argument_list (keyword_argument (identifier_end) identifier_end (identifier_date) identifier_date )keyword_argument )argument_list )call )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_days_to_zerofill) identifier_days_to_zerofill (subscript (identifier_tds) identifier_tds (call (attribute (identifier_tds) identifier_tds (identifier_slice_indexer) identifier_slice_indexer )attribute (argument_list (keyword_argument (identifier_start) identifier_start (binary_operator (identifier_last_date) identifier_last_date (attribute (identifier_tds) identifier_tds (identifier_freq) identifier_freq )attribute )binary_operator )keyword_argument (keyword_argument (identifier_end) identifier_end (identifier_date) identifier_date )keyword_argument )argument_list )call )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__zerofill) identifier__zerofill )attribute (argument_list (identifier_table) identifier_table (call (identifier_len) identifier_len (argument_list (identifier_days_to_zerofill) identifier_days_to_zerofill )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_new_last_date) identifier_new_last_date (call (attribute (identifier_self) identifier_self (identifier_last_date_in_output_for_sid) identifier_last_date_in_output_for_sid )attribute (argument_list (identifier_sid) identifier_sid )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (identifier_new_last_date) identifier_new_last_date (identifier_date) identifier_date )comparison_operator (call (attribute (string_"new_last_date={0} != date={1}") string_"new_last_date={0} != date={1}" (identifier_format) identifier_format )attribute (argument_list (identifier_new_last_date) identifier_new_last_date (identifier_date) identifier_date )argument_list )call )assert_statement )block )function_definition )module
Fill sid container with empty data through the specified date. If the last recorded trade is not at the close, then that day will be padded with zeros until its close. Any day after that (up to and including the specified date) will be padded with `minute_per_day` worth of zeros Parameters ---------- sid : int The asset identifier for the data being written. date : datetime-like The date used to calculate how many slots to be pad. The padding is done through the date, i.e. after the padding is done the `last_date_in_output_for_sid` will be equal to `date`
(module (function_definition (function_name___format_error) function_name___format_error (parameters (identifier_self) identifier_self (identifier_error_list_tag) identifier_error_list_tag )parameters (block (expression_statement (assignment (identifier_error) identifier_error (dictionary (pair (string_'domain') string_'domain' (call (attribute (identifier_self) identifier_self (identifier_domain) identifier_domain )attribute (argument_list )argument_list )call )pair (pair (string_'reason') string_'reason' (call (attribute (identifier_self) identifier_self (identifier_reason) identifier_reason )attribute (argument_list )argument_list )call )pair (pair (string_'message') string_'message' (call (attribute (identifier_self) identifier_self (identifier_message) identifier_message )attribute (argument_list )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_error) identifier_error (identifier_update) identifier_update )attribute (argument_list (boolean_operator (call (attribute (identifier_self) identifier_self (identifier_extra_fields) identifier_extra_fields )attribute (argument_list )argument_list )call (dictionary )dictionary )boolean_operator )argument_list )call )expression_statement (return_statement (dictionary (pair (string_'error') string_'error' (dictionary (pair (identifier_error_list_tag) identifier_error_list_tag (list (identifier_error) identifier_error )list )pair (pair (string_'code') string_'code' (call (attribute (identifier_self) identifier_self (identifier_status_code) identifier_status_code )attribute (argument_list )argument_list )call )pair (pair (string_'message') string_'message' (call (attribute (identifier_self) identifier_self (identifier_message) identifier_message )attribute (argument_list )argument_list )call )pair )dictionary )pair )dictionary )return_statement )block )function_definition )module
Format this error into a JSON response. Args: error_list_tag: A string specifying the name of the tag to use for the error list. Returns: A dict containing the reformatted JSON error response.
(module (function_definition (function_name_cache_node_list) function_name_cache_node_list (parameters (identifier_nodes) identifier_nodes (identifier_provider) identifier_provider (identifier_opts) identifier_opts )parameters (block (if_statement (boolean_operator (comparison_operator (string_'update_cachedir') string_'update_cachedir' (identifier_opts) identifier_opts )comparison_operator (not_operator (subscript (identifier_opts) identifier_opts (string_'update_cachedir') string_'update_cachedir' )subscript )not_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_base) identifier_base (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (identifier_init_cachedir) identifier_init_cachedir (argument_list )argument_list )call (string_'active') string_'active' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_driver) identifier_driver (call (identifier_next) identifier_next (argument_list (call (attribute (identifier_six) identifier_six (identifier_iterkeys) identifier_iterkeys )attribute (argument_list (subscript (subscript (identifier_opts) identifier_opts (string_'providers') string_'providers' )subscript (identifier_provider) identifier_provider )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_prov_dir) identifier_prov_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_base) identifier_base (identifier_driver) identifier_driver (identifier_provider) identifier_provider )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_prov_dir) identifier_prov_dir )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_prov_dir) identifier_prov_dir )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_missing_node_cache) identifier_missing_node_cache (argument_list (identifier_prov_dir) identifier_prov_dir (identifier_nodes) identifier_nodes (identifier_provider) identifier_provider (identifier_opts) identifier_opts )argument_list )call )expression_statement (for_statement (identifier_node) identifier_node (identifier_nodes) identifier_nodes (block (expression_statement (call (identifier_diff_node_cache) identifier_diff_node_cache (argument_list (identifier_prov_dir) identifier_prov_dir (identifier_node) identifier_node (subscript (identifier_nodes) identifier_nodes (identifier_node) identifier_node )subscript (identifier_opts) identifier_opts )argument_list )call )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_prov_dir) identifier_prov_dir (call (attribute (string_'{0}.p') string_'{0}.p' (identifier_format) identifier_format )attribute (argument_list (identifier_node) identifier_node )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mode) identifier_mode (conditional_expression (string_'wb') string_'wb' (attribute (identifier_six) identifier_six (identifier_PY3) identifier_PY3 )attribute (string_'w') string_'w' )conditional_expression )assignment )expression_statement (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_fopen) identifier_fopen )attribute (argument_list (identifier_path) identifier_path (identifier_mode) identifier_mode )argument_list )call (as_pattern_target (identifier_fh_) identifier_fh_ )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_msgpack) identifier_msgpack )attribute (identifier_dump) identifier_dump )attribute (argument_list (subscript (identifier_nodes) identifier_nodes (identifier_node) identifier_node )subscript (identifier_fh_) identifier_fh_ (keyword_argument (identifier_encoding) identifier_encoding (identifier_MSGPACK_ENCODING) identifier_MSGPACK_ENCODING )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )for_statement )block )function_definition )module
If configured to do so, update the cloud cachedir with the current list of nodes. Also fires configured events pertaining to the node list. .. versionadded:: 2014.7.0
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_copy) identifier_copy (call (identifier_JunctionTree) identifier_JunctionTree (argument_list (call (attribute (identifier_self) identifier_self (identifier_edges) identifier_edges )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_copy) identifier_copy (identifier_add_nodes_from) identifier_add_nodes_from )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_nodes) identifier_nodes )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_factors) identifier_factors )attribute (block (expression_statement (assignment (identifier_factors_copy) identifier_factors_copy (list_comprehension (call (attribute (identifier_factor) identifier_factor (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call (for_in_clause (identifier_factor) identifier_factor (attribute (identifier_self) identifier_self (identifier_factors) identifier_factors )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_copy) identifier_copy (identifier_add_factors) identifier_add_factors )attribute (argument_list (list_splat (identifier_factors_copy) identifier_factors_copy )list_splat )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_copy) identifier_copy )return_statement )block )function_definition )module
Returns a copy of JunctionTree. Returns ------- JunctionTree : copy of JunctionTree Examples -------- >>> import numpy as np >>> from pgmpy.factors.discrete import DiscreteFactor >>> from pgmpy.models import JunctionTree >>> G = JunctionTree() >>> G.add_edges_from([(('a', 'b', 'c'), ('a', 'b')), (('a', 'b', 'c'), ('a', 'c'))]) >>> phi1 = DiscreteFactor(['a', 'b'], [1, 2], np.random.rand(2)) >>> phi2 = DiscreteFactor(['a', 'c'], [1, 2], np.random.rand(2)) >>> G.add_factors(phi1,phi2) >>> modelCopy = G.copy() >>> modelCopy.edges() [(('a', 'b'), ('a', 'b', 'c')), (('a', 'c'), ('a', 'b', 'c'))] >>> G.factors [<DiscreteFactor representing phi(a:1, b:2) at 0xb720ee4c>, <DiscreteFactor representing phi(a:1, c:2) at 0xb4e1e06c>] >>> modelCopy.factors [<DiscreteFactor representing phi(a:1, b:2) at 0xb4bd11ec>, <DiscreteFactor representing phi(a:1, c:2) at 0xb4bd138c>]
(module (function_definition (function_name_play_sound) function_name_play_sound (parameters (identifier_self) identifier_self (identifier_sound_file) identifier_sound_file )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stop_sound) identifier_stop_sound )attribute (argument_list )argument_list )call )expression_statement (if_statement (identifier_sound_file) identifier_sound_file (block (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (identifier_self) identifier_self (identifier_check_commands) identifier_check_commands )attribute (argument_list (list (string_"ffplay") string_"ffplay" (string_"paplay") string_"paplay" (string_"play") string_"play" )list )argument_list )call )assignment )expression_statement (if_statement (identifier_cmd) identifier_cmd (block (if_statement (comparison_operator (identifier_cmd) identifier_cmd (string_"ffplay") string_"ffplay" )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (string_"ffplay -autoexit -nodisp -loglevel 0") string_"ffplay -autoexit -nodisp -loglevel 0" )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_sound_file) identifier_sound_file (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_sound_file) identifier_sound_file )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_shlex) identifier_shlex (identifier_split) identifier_split )attribute (argument_list (call (attribute (string_"{} {}") string_"{} {}" (identifier_format) identifier_format )attribute (argument_list (identifier_cmd) identifier_cmd (identifier_sound_file) identifier_sound_file )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__audio) identifier__audio )attribute (call (identifier_Popen) identifier_Popen (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement )block )function_definition )module
Plays sound_file if possible.
(module (function_definition (function_name_from_array) function_name_from_array (parameters (identifier_cls) identifier_cls (identifier_arr) identifier_arr (default_parameter (identifier_index) identifier_index (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_dtype) identifier_dtype (None) None )default_parameter (default_parameter (identifier_copy) identifier_copy (False) False )default_parameter (default_parameter (identifier_fastpath) identifier_fastpath (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (concatenated_string (string_"'from_array' is deprecated and will be removed in a ") string_"'from_array' is deprecated and will be removed in a " (string_"future version. Please use the pd.Series(..) ") string_"future version. Please use the pd.Series(..) " (string_"constructor instead.") string_"constructor instead." )concatenated_string (identifier_FutureWarning) identifier_FutureWarning (keyword_argument (identifier_stacklevel) identifier_stacklevel (integer_2) integer_2 )keyword_argument )argument_list )call )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_arr) identifier_arr (identifier_ABCSparseArray) identifier_ABCSparseArray )argument_list )call (block (import_from_statement (dotted_name (identifier_pandas) identifier_pandas (identifier_core) identifier_core (identifier_sparse) identifier_sparse (identifier_series) identifier_series )dotted_name (dotted_name (identifier_SparseSeries) identifier_SparseSeries )dotted_name )import_from_statement (expression_statement (assignment (identifier_cls) identifier_cls (identifier_SparseSeries) identifier_SparseSeries )assignment )expression_statement )block )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_arr) identifier_arr (keyword_argument (identifier_index) identifier_index (identifier_index) identifier_index )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument (keyword_argument (identifier_copy) identifier_copy (identifier_copy) identifier_copy )keyword_argument (keyword_argument (identifier_fastpath) identifier_fastpath (identifier_fastpath) identifier_fastpath )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Construct Series from array. .. deprecated :: 0.23.0 Use pd.Series(..) constructor instead.
(module (function_definition (function_name_countdown_timer) function_name_countdown_timer (parameters (default_parameter (identifier_seconds) identifier_seconds (integer_10) integer_10 )default_parameter )parameters (block (expression_statement (assignment (identifier_tick) identifier_tick (float_0.1) float_0.1 )assignment )expression_statement (expression_statement (assignment (identifier_n_ticks) identifier_n_ticks (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_seconds) identifier_seconds (identifier_tick) identifier_tick )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_widgets) identifier_widgets (list (string_'Pause for panic: ') string_'Pause for panic: ' (call (attribute (identifier_progressbar) identifier_progressbar (identifier_ETA) identifier_ETA )attribute (argument_list )argument_list )call (string_' ') string_' ' (call (attribute (identifier_progressbar) identifier_progressbar (identifier_Bar) identifier_Bar )attribute (argument_list )argument_list )call )list )assignment )expression_statement (expression_statement (assignment (identifier_pbar) identifier_pbar (call (attribute (call (attribute (identifier_progressbar) identifier_progressbar (identifier_ProgressBar) identifier_ProgressBar )attribute (argument_list (keyword_argument (identifier_widgets) identifier_widgets (identifier_widgets) identifier_widgets )keyword_argument (keyword_argument (identifier_max_value) identifier_max_value (identifier_n_ticks) identifier_n_ticks )keyword_argument )argument_list )call (identifier_start) identifier_start )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_n_ticks) identifier_n_ticks )argument_list )call (block (expression_statement (call (attribute (identifier_pbar) identifier_pbar (identifier_update) identifier_update )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement (expression_statement (call (identifier_sleep) identifier_sleep (argument_list (identifier_tick) identifier_tick )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_pbar) identifier_pbar (identifier_finish) identifier_finish )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Show a simple countdown progress bar Parameters ---------- seconds Period of time the progress bar takes to reach zero.
(module (function_definition (function_name_rm_field) function_name_rm_field (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (if_statement (not_operator (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute )comparison_operator )not_operator (block (raise_statement (identifier_ValueError) identifier_ValueError )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (identifier_name) identifier_name )subscript )delete_statement )block )function_definition )module
Remove a field from the datamat. Parameters: name : string Name of the field to be removed
(module (function_definition (function_name_createproject) function_name_createproject (parameters (identifier_self) identifier_self (identifier_name) identifier_name (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair )dictionary )assignment )expression_statement (if_statement (identifier_kwargs) identifier_kwargs (block (expression_statement (call (attribute (identifier_data) identifier_data (identifier_update) identifier_update )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_requests) identifier_requests (identifier_post) identifier_post )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_projects_url) identifier_projects_url )attribute (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_verify) identifier_verify (attribute (identifier_self) identifier_self (identifier_verify_ssl) identifier_verify_ssl )attribute )keyword_argument (keyword_argument (identifier_auth) identifier_auth (attribute (identifier_self) identifier_self (identifier_auth) identifier_auth )attribute )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (attribute (identifier_self) identifier_self (identifier_timeout) identifier_timeout )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_status_code) identifier_status_code )attribute (integer_201) integer_201 )comparison_operator (block (return_statement (call (attribute (identifier_request) identifier_request (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block (elif_clause (comparison_operator (attribute (identifier_request) identifier_request (identifier_status_code) identifier_status_code )attribute (integer_403) integer_403 )comparison_operator (block (if_statement (comparison_operator (string_'Your own projects limit is 0') string_'Your own projects limit is 0' (attribute (identifier_request) identifier_request (identifier_text) identifier_text )attribute )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (attribute (identifier_request) identifier_request (identifier_text) identifier_text )attribute )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement )block )elif_clause (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )function_definition )module
Creates a new project owned by the authenticated user. :param name: new project name :param path: custom repository name for new project. By default generated based on name :param namespace_id: namespace for the new project (defaults to user) :param description: short project description :param issues_enabled: :param merge_requests_enabled: :param wiki_enabled: :param snippets_enabled: :param public: if true same as setting visibility_level = 20 :param visibility_level: :param sudo: :param import_url: :return:
(module (function_definition (function_name_int_input) function_name_int_input (parameters (identifier_message) identifier_message (identifier_low) identifier_low (identifier_high) identifier_high (default_parameter (identifier_show_range) identifier_show_range (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_int_in) identifier_int_in (binary_operator (identifier_low) identifier_low (integer_1) integer_1 )binary_operator )assignment )expression_statement (while_statement (boolean_operator (parenthesized_expression (comparison_operator (identifier_int_in) identifier_int_in (identifier_low) identifier_low )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (identifier_int_in) identifier_int_in (identifier_high) identifier_high )comparison_operator )parenthesized_expression )boolean_operator (block (if_statement (identifier_show_range) identifier_show_range (block (expression_statement (assignment (identifier_suffix) identifier_suffix (binary_operator (binary_operator (binary_operator (binary_operator (string_' (integer between ') string_' (integer between ' (call (identifier_str) identifier_str (argument_list (identifier_low) identifier_low )argument_list )call )binary_operator (string_' and ') string_' and ' )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_high) identifier_high )argument_list )call )binary_operator (string_')') string_')' )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_suffix) identifier_suffix (string_'') string_'' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_inp) identifier_inp (call (identifier_input) identifier_input (argument_list (binary_operator (binary_operator (binary_operator (string_'Enter a ') string_'Enter a ' (identifier_message) identifier_message )binary_operator (identifier_suffix) identifier_suffix )binary_operator (string_': ') string_': ' )binary_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_'^-?[0-9]+$') string_'^-?[0-9]+$' (identifier_inp) identifier_inp )argument_list )call (None) None )comparison_operator (block (expression_statement (assignment (identifier_int_in) identifier_int_in (call (identifier_int) identifier_int (argument_list (identifier_inp) identifier_inp )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_colored) identifier_colored (argument_list (string_'Must be an integer, try again!') string_'Must be an integer, try again!' (string_'red') string_'red' )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )while_statement (return_statement (identifier_int_in) identifier_int_in )return_statement )block )function_definition )module
Ask a user for a int input between two values args: message (str): Prompt for user low (int): Low value, user entered value must be > this value to be accepted high (int): High value, user entered value must be < this value to be accepted show_range (boolean, Default True): Print hint to user the range returns: int_in (int): Input integer
(module (function_definition (function_name_setup_logging) function_name_setup_logging (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_is_custom_logging) identifier_is_custom_logging (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_logging_config) identifier_logging_config )attribute )argument_list )call (integer_0) integer_0 )comparison_operator )assignment )expression_statement (expression_statement (assignment (identifier_is_custom_logging) identifier_is_custom_logging (boolean_operator (identifier_is_custom_logging) identifier_is_custom_logging (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_logging_config) identifier_logging_config )attribute )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_is_custom_logging) identifier_is_custom_logging (boolean_operator (identifier_is_custom_logging) identifier_is_custom_logging (not_operator (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_dry_run) identifier_dry_run )attribute )not_operator )boolean_operator )assignment )expression_statement (if_statement (identifier_is_custom_logging) identifier_is_custom_logging (block (expression_statement (call (attribute (identifier_Logger) identifier_Logger (identifier_configure_by_file) identifier_configure_by_file )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_logging_config) identifier_logging_config )attribute )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_logging_format) identifier_logging_format (string_"%(asctime)-15s - %(name)s - %(message)s") string_"%(asctime)-15s - %(name)s - %(message)s" )assignment )expression_statement (if_statement (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_dry_run) identifier_dry_run )attribute (block (expression_statement (assignment (identifier_logging_format) identifier_logging_format (string_"%(name)s - %(message)s") string_"%(name)s - %(message)s" )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_Logger) identifier_Logger (identifier_configure_default) identifier_configure_default )attribute (argument_list (identifier_logging_format) identifier_logging_format (attribute (identifier_self) identifier_self (identifier_logging_level) identifier_logging_level )attribute )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Setup of application logging.
(module (function_definition (function_name_append_row) function_name_append_row (parameters (identifier_self) identifier_self (identifier_index) identifier_index (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_index) identifier_index (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute )comparison_operator (block (raise_statement (call (identifier_IndexError) identifier_IndexError (argument_list (string_'index already in Series') string_'index already in Series' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
Appends a row of value to the end of the data. Be very careful with this function as for sorted Series it will not enforce sort order. Use this only for speed when needed, be careful. :param index: index :param value: value :return: nothing
(module (function_definition (function_name_view_as_consumer) function_name_view_as_consumer (parameters (typed_parameter (identifier_wrapped_view) identifier_wrapped_view (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Callable) identifier_Callable )attribute (list (identifier_HttpRequest) identifier_HttpRequest )list (identifier_HttpResponse) identifier_HttpResponse )subscript )type )typed_parameter (typed_default_parameter (identifier_mapped_actions) identifier_mapped_actions (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Optional) identifier_Optional )attribute (subscript (attribute (identifier_typing) identifier_typing (identifier_Dict) identifier_Dict )attribute (identifier_str) identifier_str (identifier_str) identifier_str )subscript )subscript )type (None) None )typed_default_parameter )parameters (type (generic_type (identifier_Type) identifier_Type (type_parameter (type (identifier_AsyncConsumer) identifier_AsyncConsumer )type )type_parameter )generic_type )type (block (if_statement (comparison_operator (identifier_mapped_actions) identifier_mapped_actions (None) None )comparison_operator (block (expression_statement (assignment (identifier_mapped_actions) identifier_mapped_actions (dictionary (pair (string_'create') string_'create' (string_'PUT') string_'PUT' )pair (pair (string_'update') string_'update' (string_'PATCH') string_'PATCH' )pair (pair (string_'list') string_'list' (string_'GET') string_'GET' )pair (pair (string_'retrieve') string_'retrieve' (string_'GET') string_'GET' )pair )dictionary )assignment )expression_statement )block )if_statement (class_definition (identifier_DjangoViewWrapper) identifier_DjangoViewWrapper (argument_list (identifier_DjangoViewAsConsumer) identifier_DjangoViewAsConsumer )argument_list (block (expression_statement (assignment (identifier_view) identifier_view (identifier_wrapped_view) identifier_wrapped_view )assignment )expression_statement (expression_statement (assignment (identifier_actions) identifier_actions (identifier_mapped_actions) identifier_mapped_actions )assignment )expression_statement )block )class_definition (return_statement (identifier_DjangoViewWrapper) identifier_DjangoViewWrapper )return_statement )block )function_definition )module
Wrap a django View so that it will be triggered by actions over this json websocket consumer.
(module (function_definition (function_name_get_sourcefile) function_name_get_sourcefile (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_buff) identifier_buff (call (attribute (identifier_self) identifier_self (identifier_get_attribute) identifier_get_attribute )attribute (argument_list (string_"SourceFile") string_"SourceFile" )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_buff) identifier_buff (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_unpack) identifier_unpack (argument_list (identifier_buff) identifier_buff )argument_list )call (as_pattern_target (identifier_up) identifier_up )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (tuple_pattern (identifier_ref) identifier_ref )tuple_pattern (call (attribute (identifier_up) identifier_up (identifier_unpack_struct) identifier_unpack_struct )attribute (argument_list (identifier__H) identifier__H )argument_list )call )assignment )expression_statement )block )with_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_deref_const) identifier_deref_const )attribute (argument_list (identifier_ref) identifier_ref )argument_list )call )return_statement )block )function_definition )module
the name of thie file this class was compiled from, or None if not indicated reference: http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.10
(module (function_definition (function_name_on_person_new) function_name_on_person_new (parameters (identifier_self) identifier_self (identifier_people) identifier_people )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_debug) identifier_debug )attribute (argument_list (string_"()") string_"()" )argument_list )call )expression_statement (expression_statement (assignment (identifier_changed) identifier_changed (list )list )assignment )expression_statement (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier__people_lock) identifier__people_lock )attribute )with_item )with_clause (block (for_statement (identifier_p) identifier_p (identifier_people) identifier_people (block (expression_statement (assignment (identifier_person) identifier_person (call (attribute (identifier_Person) identifier_Person (identifier_from_person) identifier_from_person )attribute (argument_list (identifier_p) identifier_p )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_person) identifier_person (identifier_id) identifier_id )attribute (attribute (identifier_self) identifier_self (identifier__people) identifier__people )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (string_u"{} already in audience") string_u"{} already in audience" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_person) identifier_person (identifier_id) identifier_id )attribute )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__people) identifier__people )attribute (attribute (identifier_person) identifier_person (identifier_id) identifier_id )attribute )subscript (identifier_person) identifier_person )assignment )expression_statement (expression_statement (call (attribute (identifier_changed) identifier_changed (identifier_append) identifier_append )attribute (argument_list (identifier_person) identifier_person )argument_list )call )expression_statement )block )for_statement )block )with_statement (for_statement (identifier_plugin) identifier_plugin (attribute (identifier_self) identifier_self (identifier_plugins) identifier_plugins )attribute (block (try_statement (block (expression_statement (call (attribute (identifier_plugin) identifier_plugin (identifier_on_person_new) identifier_on_person_new )attribute (argument_list (identifier_changed) identifier_changed )argument_list )call )expression_statement )block (except_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_exception) identifier_exception )attribute (argument_list (call (attribute (string_u"Failed to send new people to {}") string_u"Failed to send new people to {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_plugin) identifier_plugin (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
New people joined the audience :param people: People that just joined the audience :type people: list[paps.person.Person] :rtype: None
(module (function_definition (function_name_suspendJustTabProviders) function_name_suspendJustTabProviders (parameters (identifier_installation) identifier_installation )parameters (block (if_statement (attribute (identifier_installation) identifier_installation (identifier_suspended) identifier_suspended )attribute (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"Installation already suspended") string_"Installation already suspended" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_powerups) identifier_powerups (call (identifier_list) identifier_list (argument_list (attribute (identifier_installation) identifier_installation (identifier_allPowerups) identifier_allPowerups )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_p) identifier_p (identifier_powerups) identifier_powerups (block (if_statement (call (attribute (identifier_INavigableElement) identifier_INavigableElement (identifier_providedBy) identifier_providedBy )attribute (argument_list (identifier_p) identifier_p )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_p) identifier_p (identifier_store) identifier_store )attribute (identifier_powerDown) identifier_powerDown )attribute (argument_list (identifier_p) identifier_p (identifier_INavigableElement) identifier_INavigableElement )argument_list )call )expression_statement (expression_statement (assignment (identifier_sne) identifier_sne (call (identifier_SuspendedNavigableElement) identifier_SuspendedNavigableElement (argument_list (keyword_argument (identifier_store) identifier_store (attribute (identifier_p) identifier_p (identifier_store) identifier_store )attribute )keyword_argument (keyword_argument (identifier_originalNE) identifier_originalNE (identifier_p) identifier_p )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_p) identifier_p (identifier_store) identifier_store )attribute (identifier_powerUp) identifier_powerUp )attribute (argument_list (identifier_sne) identifier_sne (identifier_INavigableElement) identifier_INavigableElement )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_p) identifier_p (identifier_store) identifier_store )attribute (identifier_powerUp) identifier_powerUp )attribute (argument_list (identifier_sne) identifier_sne (identifier_ISuspender) identifier_ISuspender )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_installation) identifier_installation (identifier_suspended) identifier_suspended )attribute (True) True )assignment )expression_statement )block )function_definition )module
Replace INavigableElements with facades that indicate their suspension.
(module (function_definition (function_name_sendto) function_name_sendto (parameters (identifier_self) identifier_self (identifier_transport) identifier_transport (identifier_addr) identifier_addr )parameters (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (call (identifier_bytes) identifier_bytes (argument_list (identifier_self) identifier_self )argument_list )call (string_b'\r\n') string_b'\r\n' )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"%s:%s < %s") string_"%s:%s < %s" (list_splat (parenthesized_expression (binary_operator (identifier_addr) identifier_addr (tuple (identifier_self) identifier_self )tuple )binary_operator )parenthesized_expression )list_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_transport) identifier_transport (identifier_sendto) identifier_sendto )attribute (argument_list (identifier_msg) identifier_msg (identifier_addr) identifier_addr )argument_list )call )expression_statement )block )function_definition )module
Send request to a given address via given transport. Args: transport (asyncio.DatagramTransport): Write transport to send the message on. addr (Tuple[str, int]): IP address and port pair to send the message to.
(module (function_definition (function_name_readFILTER) function_name_readFILTER (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_filterId) identifier_filterId (call (attribute (identifier_self) identifier_self (identifier_readUI8) identifier_readUI8 )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_filter) identifier_filter (call (attribute (identifier_SWFFilterFactory) identifier_SWFFilterFactory (identifier_create) identifier_create )attribute (argument_list (identifier_filterId) identifier_filterId )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_filter) identifier_filter (identifier_parse) identifier_parse )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (return_statement (identifier_filter) identifier_filter )return_statement )block )function_definition )module
Read a SWFFilter
(module (function_definition (function_name_load_HEP_data) function_name_load_HEP_data (parameters (default_parameter (identifier_ROOT_filename) identifier_ROOT_filename (string_"output.root") string_"output.root" )default_parameter (default_parameter (identifier_tree_name) identifier_tree_name (string_"nominal") string_"nominal" )default_parameter (default_parameter (identifier_maximum_number_of_events) identifier_maximum_number_of_events (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ROOT_file) identifier_ROOT_file (call (identifier_open_ROOT_file) identifier_open_ROOT_file (argument_list (identifier_ROOT_filename) identifier_ROOT_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tree) identifier_tree (call (attribute (identifier_ROOT_file) identifier_ROOT_file (identifier_Get) identifier_Get )attribute (argument_list (identifier_tree_name) identifier_tree_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_number_of_events) identifier_number_of_events (call (attribute (identifier_tree) identifier_tree (identifier_GetEntries) identifier_GetEntries )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_datavision) identifier_datavision (identifier_Dataset) identifier_Dataset )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_progress) identifier_progress (call (attribute (identifier_shijian) identifier_shijian (identifier_Progress) identifier_Progress )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_progress) identifier_progress (identifier_engage_quick_calculation_mode) identifier_engage_quick_calculation_mode )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_number_of_events_loaded) identifier_number_of_events_loaded (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"") string_"" )argument_list )call )expression_statement (expression_statement (assignment (identifier_index) identifier_index (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_event) identifier_event (identifier_tree) identifier_tree (block (if_statement (boolean_operator (comparison_operator (identifier_maximum_number_of_events) identifier_maximum_number_of_events (None) None )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (identifier_number_of_events_loaded) identifier_number_of_events_loaded (call (identifier_int) identifier_int (argument_list (identifier_maximum_number_of_events) identifier_maximum_number_of_events )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"loaded maximum requested number of events ") string_"loaded maximum requested number of events " (call (attribute (string_"({maximum_number_of_events})\r") string_"({maximum_number_of_events})\r" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_maximum_number_of_events) identifier_maximum_number_of_events (identifier_maximum_number_of_events) identifier_maximum_number_of_events )keyword_argument )argument_list )call )binary_operator )argument_list )call )expression_statement (break_statement )break_statement )block )if_statement (print_statement (call (attribute (identifier_progress) identifier_progress (identifier_add_datum) identifier_add_datum )attribute (argument_list (keyword_argument (identifier_fraction) identifier_fraction (binary_operator (parenthesized_expression (binary_operator (identifier_index) identifier_index (integer_2) integer_2 )binary_operator )parenthesized_expression (identifier_number_of_events) identifier_number_of_events )binary_operator )keyword_argument )argument_list )call )print_statement (if_statement (call (identifier_select_event) identifier_select_event (argument_list (identifier_event) identifier_event )argument_list )call (block (expression_statement (augmented_assignment (identifier_index) identifier_index (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_variable) identifier_variable )attribute (argument_list (keyword_argument (identifier_index) identifier_index (identifier_index) identifier_index )keyword_argument (keyword_argument (identifier_name) identifier_name (string_"el_1_pt") string_"el_1_pt" )keyword_argument (keyword_argument (identifier_value) identifier_value (subscript (attribute (identifier_event) identifier_event (identifier_el_pt) identifier_el_pt )attribute (integer_0) integer_0 )subscript )keyword_argument )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_number_of_events_loaded) identifier_number_of_events_loaded (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"") string_"" )argument_list )call )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Load HEP data and return dataset.
(module (function_definition (function_name__get_fname_len) function_name__get_fname_len (parameters (identifier_self) identifier_self (default_parameter (identifier_bufflen) identifier_bufflen (integer_128) integer_128 )default_parameter )parameters (block (expression_statement (assignment (identifier_buff) identifier_buff (call (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_peek) identifier_peek )attribute (argument_list (identifier_bufflen) identifier_bufflen )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_strlen) identifier_strlen (call (attribute (identifier_buff) identifier_buff (identifier_find) identifier_find )attribute (argument_list (string_'\0') string_'\0' )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_b) identifier_b )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (subscript (identifier_buff) identifier_buff (slice (identifier_strlen) identifier_strlen (colon) colon )slice )subscript )argument_list )call (block (if_statement (comparison_operator (identifier_b) identifier_b (string_'\0') string_'\0' )comparison_operator (block (return_statement (binary_operator (identifier_strlen) identifier_strlen (identifier_i) identifier_i )binary_operator )return_statement )block )if_statement )block )for_statement (return_statement (identifier_bufflen) identifier_bufflen )return_statement )block )function_definition )module
Returns the number of bytes designated for the filename.
(module (function_definition (function_name_export) function_name_export (parameters (identifier_self) identifier_self (identifier_id) identifier_id (default_parameter (identifier_exclude_captures) identifier_exclude_captures (False) False )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_service) identifier_service )attribute (identifier_export) identifier_export )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_base) identifier_base )attribute (identifier_id) identifier_id (keyword_argument (identifier_params) identifier_params (dictionary (pair (string_'exclude_captures') string_'exclude_captures' (identifier_exclude_captures) identifier_exclude_captures )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Export a result. :param id: Result ID as an int. :param exclude_captures: If bool `True`, don't export capture files :rtype: tuple `(io.BytesIO, 'filename')`
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_gandi) identifier_gandi (identifier_domain) identifier_domain (identifier_zone_id) identifier_zone_id (identifier_name) identifier_name (identifier_type) identifier_type (identifier_value) identifier_value )parameters (block (if_statement (not_operator (identifier_zone_id) identifier_zone_id )not_operator (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_gandi) identifier_gandi (identifier_domain) identifier_domain )attribute (identifier_info) identifier_info )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_zone_id) identifier_zone_id (subscript (identifier_result) identifier_result (string_'zone_id') string_'zone_id' )subscript )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_zone_id) identifier_zone_id )not_operator (block (expression_statement (call (attribute (identifier_gandi) identifier_gandi (identifier_echo) identifier_echo )attribute (argument_list (binary_operator (concatenated_string (string_'No zone records found, domain %s doesn\'t seems to be ') string_'No zone records found, domain %s doesn\'t seems to be ' (string_'managed at Gandi.') string_'managed at Gandi.' )concatenated_string (identifier_domain) identifier_domain )binary_operator )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (boolean_operator (not_operator (identifier_name) identifier_name )not_operator (not_operator (identifier_type) identifier_type )not_operator )boolean_operator (not_operator (identifier_value) identifier_value )not_operator )boolean_operator (block (expression_statement (assignment (identifier_proceed) identifier_proceed (call (attribute (identifier_click) identifier_click (identifier_confirm) identifier_confirm )attribute (argument_list (concatenated_string (string_'This command without parameters --type, ') string_'This command without parameters --type, ' (string_'--name or --value will remove all records') string_'--name or --value will remove all records' (string_' in this zone file. Are you sur to ') string_' in this zone file. Are you sur to ' (string_'perform this action ?') string_'perform this action ?' )concatenated_string )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_proceed) identifier_proceed )not_operator (block (return_statement )return_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_record) identifier_record (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'type') string_'type' (identifier_type) identifier_type )pair (pair (string_'value') string_'value' (identifier_value) identifier_value )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_gandi) identifier_gandi (identifier_record) identifier_record )attribute (identifier_delete) identifier_delete )attribute (argument_list (identifier_zone_id) identifier_zone_id (identifier_record) identifier_record )argument_list )call )assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Delete a record entry for a domain
(module (function_definition (function_name_check_errors) function_name_check_errors (parameters (identifier_self) identifier_self (identifier_response) identifier_response )parameters (block (expression_statement (string_" Check some common errors.") string_" Check some common errors." )expression_statement (expression_statement (assignment (identifier_content) identifier_content (attribute (identifier_response) identifier_response (identifier_content) identifier_content )attribute )assignment )expression_statement (if_statement (comparison_operator (string_'status') string_'status' (identifier_content) identifier_content )comparison_operator (block (raise_statement (call (attribute (identifier_self) identifier_self (identifier_GeneralError) identifier_GeneralError )attribute (argument_list (string_'We expect a status field.') string_'We expect a status field.' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_content) identifier_content (string_'status') string_'status' )subscript (string_'success') string_'success' )comparison_operator (block (expression_statement (assignment (attribute (identifier_response) identifier_response (identifier__content) identifier__content )attribute (identifier_content) identifier_content )assignment )expression_statement (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (string_'msgs') string_'msgs' (identifier_content) identifier_content )comparison_operator (block (raise_statement (call (attribute (identifier_self) identifier_self (identifier_GeneralError) identifier_GeneralError )attribute (argument_list (string_'We expcet messages in case of error.') string_'We expcet messages in case of error.' )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_messages) identifier_messages (call (identifier_list) identifier_list (argument_list (subscript (identifier_content) identifier_content (string_'msgs') string_'msgs' )subscript )argument_list )call )assignment )expression_statement )block (except_clause (block (raise_statement (call (attribute (identifier_self) identifier_self (identifier_GeneralError) identifier_GeneralError )attribute (argument_list (string_"Messages must be a list.") string_"Messages must be a list." )argument_list )call )raise_statement )block )except_clause )try_statement (for_statement (identifier_msg) identifier_msg (identifier_messages) identifier_messages (block (if_statement (boolean_operator (comparison_operator (string_'LVL') string_'LVL' (identifier_msg) identifier_msg )comparison_operator (comparison_operator (subscript (identifier_msg) identifier_msg (string_'LVL') string_'LVL' )subscript (string_'ERROR') string_'ERROR' )comparison_operator )boolean_operator (block (if_statement (comparison_operator (subscript (identifier_msg) identifier_msg (string_'ERR_CD') string_'ERR_CD' )subscript (string_'NOT_FOUND') string_'NOT_FOUND' )comparison_operator (block (raise_statement (call (attribute (identifier_self) identifier_self (identifier_NotFoundError) identifier_NotFoundError )attribute (argument_list (subscript (identifier_msg) identifier_msg (string_'INFO') string_'INFO' )subscript )argument_list )call )raise_statement )block (elif_clause (comparison_operator (subscript (identifier_msg) identifier_msg (string_'ERR_CD') string_'ERR_CD' )subscript (string_'TARGET_EXISTS') string_'TARGET_EXISTS' )comparison_operator (block (raise_statement (call (attribute (identifier_self) identifier_self (identifier_TargetExistsError) identifier_TargetExistsError )attribute (argument_list (subscript (identifier_msg) identifier_msg (string_'INFO') string_'INFO' )subscript )argument_list )call )raise_statement )block )elif_clause (else_clause (block (raise_statement (call (attribute (identifier_self) identifier_self (identifier_DynectError) identifier_DynectError )attribute (argument_list (subscript (identifier_msg) identifier_msg (string_'INFO') string_'INFO' )subscript )argument_list )call )raise_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (raise_statement (call (attribute (identifier_self) identifier_self (identifier_GeneralError) identifier_GeneralError )attribute (argument_list (string_"We need at least one error message.") string_"We need at least one error message." )argument_list )call )raise_statement )block )function_definition )module
Check some common errors.
(module (function_definition (function_name_on_isupport_excepts) function_name_on_isupport_excepts (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (not_operator (identifier_value) identifier_value )not_operator (block (expression_statement (assignment (identifier_value) identifier_value (identifier_BAN_EXCEPT_MODE) identifier_BAN_EXCEPT_MODE )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__channel_modes) identifier__channel_modes )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__channel_modes_behaviour) identifier__channel_modes_behaviour )attribute (attribute (attribute (identifier_rfc1459) identifier_rfc1459 (identifier_protocol) identifier_protocol )attribute (identifier_BEHAVIOUR_LIST) identifier_BEHAVIOUR_LIST )attribute )subscript (identifier_add) identifier_add )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
Server allows ban exceptions.
(module (function_definition (function_name_remove_network_from_dhcp_agent) function_name_remove_network_from_dhcp_agent (parameters (identifier_self) identifier_self (identifier_dhcp_agent) identifier_dhcp_agent (identifier_network_id) identifier_network_id )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_delete) identifier_delete )attribute (argument_list (binary_operator (parenthesized_expression (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_agent_path) identifier_agent_path )attribute (attribute (identifier_self) identifier_self (identifier_DHCP_NETS) identifier_DHCP_NETS )attribute )binary_operator (string_"/%s") string_"/%s" )binary_operator )parenthesized_expression (tuple (identifier_dhcp_agent) identifier_dhcp_agent (identifier_network_id) identifier_network_id )tuple )binary_operator )argument_list )call )return_statement )block )function_definition )module
Remove a network from dhcp agent.
(module (function_definition (function_name_save_token) function_name_save_token (parameters (identifier_self) identifier_self (identifier_access_token) identifier_access_token )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (attribute (identifier_access_token) identifier_access_token (identifier_token) identifier_token )attribute (attribute (identifier_access_token) identifier_access_token (identifier___dict__) identifier___dict__ )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_unique_token_key) identifier_unique_token_key (call (attribute (identifier_self) identifier_self (identifier__unique_token_key) identifier__unique_token_key )attribute (argument_list (attribute (identifier_access_token) identifier_access_token (identifier_client_id) identifier_client_id )attribute (attribute (identifier_access_token) identifier_access_token (identifier_grant_type) identifier_grant_type )attribute (attribute (identifier_access_token) identifier_access_token (identifier_user_id) identifier_user_id )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (identifier_unique_token_key) identifier_unique_token_key (attribute (identifier_access_token) identifier_access_token (identifier___dict__) identifier___dict__ )attribute )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_access_token) identifier_access_token (identifier_refresh_token) identifier_refresh_token )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (attribute (identifier_access_token) identifier_access_token (identifier_refresh_token) identifier_refresh_token )attribute (attribute (identifier_access_token) identifier_access_token (identifier___dict__) identifier___dict__ )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Stores the access token and additional data in redis. See :class:`oauth2.store.AccessTokenStore`.
(module (function_definition (function_name_mark_good) function_name_mark_good (parameters (identifier_self) identifier_self (identifier_server_addr) identifier_server_addr )parameters (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_list) identifier_list )attribute (identifier_server_addr) identifier_server_addr )subscript (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'quality') string_'quality' (attribute (identifier_CMServerList) identifier_CMServerList (identifier_Good) identifier_Good )attribute )pair (pair (string_'timestamp') string_'timestamp' (call (identifier_time) identifier_time (argument_list )argument_list )call )pair )dictionary )argument_list )call )expression_statement )block )function_definition )module
Mark server address as good :param server_addr: (ip, port) tuple :type server_addr: :class:`tuple`
(module (function_definition (function_name_get_par_box) function_name_get_par_box (parameters (identifier_domain) identifier_domain (default_parameter (identifier_last) identifier_last (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_u_range) identifier_u_range (subscript (identifier_domain) identifier_domain (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_v_range) identifier_v_range (subscript (identifier_domain) identifier_domain (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_verts) identifier_verts (list (tuple (subscript (identifier_u_range) identifier_u_range (integer_0) integer_0 )subscript (subscript (identifier_v_range) identifier_v_range (integer_0) integer_0 )subscript )tuple (tuple (subscript (identifier_u_range) identifier_u_range (integer_1) integer_1 )subscript (subscript (identifier_v_range) identifier_v_range (integer_0) integer_0 )subscript )tuple (tuple (subscript (identifier_u_range) identifier_u_range (integer_1) integer_1 )subscript (subscript (identifier_v_range) identifier_v_range (integer_1) integer_1 )subscript )tuple (tuple (subscript (identifier_u_range) identifier_u_range (integer_0) integer_0 )subscript (subscript (identifier_v_range) identifier_v_range (integer_1) integer_1 )subscript )tuple )list )assignment )expression_statement (if_statement (identifier_last) identifier_last (block (expression_statement (call (attribute (identifier_verts) identifier_verts (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_verts) identifier_verts (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list (identifier_verts) identifier_verts )argument_list )call )return_statement )block )function_definition )module
Returns the bounding box of the surface parametric domain in ccw direction. :param domain: parametric domain :type domain: list, tuple :param last: if True, adds the first vertex to the end of the return list :type last: bool :return: edges of the parametric domain :rtype: tuple
(module (function_definition (function_name_delete_service_settings_on_service_delete) function_name_delete_service_settings_on_service_delete (parameters (identifier_sender) identifier_sender (identifier_instance) identifier_instance (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_service) identifier_service (identifier_instance) identifier_instance )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_service_settings) identifier_service_settings (attribute (identifier_service) identifier_service (identifier_settings) identifier_settings )attribute )assignment )expression_statement )block (except_clause (attribute (identifier_ServiceSettings) identifier_ServiceSettings (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (return_statement )return_statement )block )except_clause )try_statement (if_statement (not_operator (attribute (identifier_service_settings) identifier_service_settings (identifier_shared) identifier_shared )attribute )not_operator (block (expression_statement (call (attribute (attribute (identifier_service) identifier_service (identifier_settings) identifier_settings )attribute (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Delete not shared service settings without services
(module (function_definition (function_name_get_nodesitemtypeinsertion) function_name_get_nodesitemtypeinsertion (parameters (identifier_cls) identifier_cls (identifier_itemgroup) identifier_itemgroup (identifier_indent) identifier_indent )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_blanks) identifier_blanks (binary_operator (string_' ') string_' ' (parenthesized_expression (binary_operator (identifier_indent) identifier_indent (integer_4) integer_4 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_subs) identifier_subs (list (string_f'{blanks}<complexType name="nodes_{itemgroup}Type">') string_f'{blanks}<complexType name="nodes_{itemgroup}Type">' (string_f'{blanks} <sequence>') string_f'{blanks} <sequence>' (string_f'{blanks} <element ref="hpcb:selections"') string_f'{blanks} <element ref="hpcb:selections"' (string_f'{blanks} minOccurs="0"/>') string_f'{blanks} minOccurs="0"/>' (string_f'{blanks} <element ref="hpcb:devices"') string_f'{blanks} <element ref="hpcb:devices"' (string_f'{blanks} minOccurs="0"/>') string_f'{blanks} minOccurs="0"/>' )list )assignment )expression_statement (expression_statement (assignment (identifier_type_) identifier_type_ (conditional_expression (string_'getitemType') string_'getitemType' (comparison_operator (identifier_itemgroup) identifier_itemgroup (string_'getitems') string_'getitems' )comparison_operator (string_'setitemType') string_'setitemType' )conditional_expression )assignment )expression_statement (for_statement (identifier_name) identifier_name (tuple (string_'sim') string_'sim' (string_'obs') string_'obs' (string_'sim.series') string_'sim.series' (string_'obs.series') string_'obs.series' )tuple (block (expression_statement (call (attribute (identifier_subs) identifier_subs (identifier_extend) identifier_extend )attribute (argument_list (list (string_f'{blanks} <element name="{name}"') string_f'{blanks} <element name="{name}"' (string_f'{blanks} type="hpcb:{type_}"') string_f'{blanks} type="hpcb:{type_}"' (string_f'{blanks} minOccurs="0"') string_f'{blanks} minOccurs="0"' (string_f'{blanks} maxOccurs="unbounded"/>') string_f'{blanks} maxOccurs="unbounded"/>' )list )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_subs) identifier_subs (identifier_extend) identifier_extend )attribute (argument_list (list (string_f'{blanks} </sequence>') string_f'{blanks} </sequence>' (string_f'{blanks}</complexType>') string_f'{blanks}</complexType>' (string_f'') string_f'' )list )argument_list )call )expression_statement (return_statement (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (argument_list (identifier_subs) identifier_subs )argument_list )call )return_statement )block )function_definition )module
Return a string defining the required types for the given combination of an exchange item group and |Node| objects. >>> from hydpy.auxs.xmltools import XSDWriter >>> print(XSDWriter.get_nodesitemtypeinsertion( ... 'setitems', 1)) # doctest: +ELLIPSIS <complexType name="nodes_setitemsType"> <sequence> <element ref="hpcb:selections" minOccurs="0"/> <element ref="hpcb:devices" minOccurs="0"/> <element name="sim" type="hpcb:setitemType" minOccurs="0" maxOccurs="unbounded"/> <element name="obs" type="hpcb:setitemType" minOccurs="0" maxOccurs="unbounded"/> <element name="sim.series" type="hpcb:setitemType" minOccurs="0" maxOccurs="unbounded"/> <element name="obs.series" type="hpcb:setitemType" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <BLANKLINE>
(module (function_definition (function_name_dump_image_data) function_name_dump_image_data (parameters (identifier_dataset_dir) identifier_dataset_dir (identifier_data_dir) identifier_data_dir (identifier_dataset) identifier_dataset (identifier_color_array_info) identifier_color_array_info (default_parameter (identifier_root) identifier_root (None) None )default_parameter (default_parameter (identifier_compress) identifier_compress (True) True )default_parameter )parameters (block (if_statement (comparison_operator (identifier_root) identifier_root (None) None )comparison_operator (block (expression_statement (assignment (identifier_root) identifier_root (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_root) identifier_root (string_'vtkClass') string_'vtkClass' )subscript (string_'vtkImageData') string_'vtkImageData' )assignment )expression_statement (expression_statement (assignment (identifier_container) identifier_container (identifier_root) identifier_root )assignment )expression_statement (expression_statement (assignment (subscript (identifier_container) identifier_container (string_'spacing') string_'spacing' )subscript (call (attribute (identifier_dataset) identifier_dataset (identifier_GetSpacing) identifier_GetSpacing )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_container) identifier_container (string_'origin') string_'origin' )subscript (call (attribute (identifier_dataset) identifier_dataset (identifier_GetOrigin) identifier_GetOrigin )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_container) identifier_container (string_'extent') string_'extent' )subscript (call (attribute (identifier_dataset) identifier_dataset (identifier_GetExtent) identifier_GetExtent )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_dump_all_arrays) identifier_dump_all_arrays (argument_list (identifier_dataset_dir) identifier_dataset_dir (identifier_data_dir) identifier_data_dir (identifier_dataset) identifier_dataset (identifier_container) identifier_container (identifier_compress) identifier_compress )argument_list )call )expression_statement (return_statement (identifier_root) identifier_root )return_statement )block )function_definition )module
Dump image data object to vtkjs
(module (function_definition (function_name_sanitize_mimetype) function_name_sanitize_mimetype (parameters (identifier_mimetype) identifier_mimetype (default_parameter (identifier_filename) identifier_filename (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_mimetype) identifier_mimetype (identifier_MIMETYPE_WHITELIST) identifier_MIMETYPE_WHITELIST )comparison_operator (block (return_statement (identifier_mimetype) identifier_mimetype )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_mimetype) identifier_mimetype (identifier_MIMETYPE_PLAINTEXT) identifier_MIMETYPE_PLAINTEXT )comparison_operator (line_continuation_\) line_continuation_\ (parenthesized_expression (boolean_operator (identifier_filename) identifier_filename (comparison_operator (call (attribute (identifier_filename) identifier_filename (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_MIMETYPE_TEXTFILES) identifier_MIMETYPE_TEXTFILES )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (return_statement (string_'text/plain') string_'text/plain' )return_statement )block )if_statement (return_statement (string_'application/octet-stream') string_'application/octet-stream' )return_statement )block )function_definition )module
Sanitize a MIME type so the browser does not render the file.
(module (function_definition (function_name_check_hash) function_name_check_hash (parameters (identifier_path) identifier_path (identifier_checksum) identifier_checksum (default_parameter (identifier_hash_type) identifier_hash_type (string_'md5') string_'md5' )default_parameter )parameters (block (expression_statement (assignment (identifier_actual_checksum) identifier_actual_checksum (call (identifier_file_hash) identifier_file_hash (argument_list (identifier_path) identifier_path (identifier_hash_type) identifier_hash_type )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_checksum) identifier_checksum (identifier_actual_checksum) identifier_actual_checksum )comparison_operator (block (raise_statement (call (identifier_ChecksumError) identifier_ChecksumError (argument_list (binary_operator (string_"'%s' != '%s'") string_"'%s' != '%s'" (tuple (identifier_checksum) identifier_checksum (identifier_actual_checksum) identifier_actual_checksum )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Validate a file using a cryptographic checksum. :param str checksum: Value of the checksum used to validate the file. :param str hash_type: Hash algorithm used to generate `checksum`. Can be any hash alrgorithm supported by :mod:`hashlib`, such as md5, sha1, sha256, sha512, etc. :raises ChecksumError: If the file fails the checksum
(module (function_definition (function_name__create_path) function_name__create_path (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_driver) identifier_driver )attribute (string_'sqlite') string_'sqlite' )comparison_operator (comparison_operator (string_'memory') string_'memory' (attribute (identifier_self) identifier_self (identifier_dsn) identifier_dsn )attribute )comparison_operator )boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_dsn) identifier_dsn )attribute (string_'sqlite://') string_'sqlite://' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_dir_) identifier_dir_ (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_dir_) identifier_dir_ (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_dir_) identifier_dir_ )argument_list )call )not_operator )boolean_operator (block (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_dir_) identifier_dir_ )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_dir_) identifier_dir_ )argument_list )call )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (string_"Couldn't create directory ") string_"Couldn't create directory " (identifier_dir_) identifier_dir_ )binary_operator )argument_list )call )raise_statement )block )if_statement )block )if_statement )block )if_statement )block )function_definition )module
Create the path to hold the database, if one wwas specified.
(module (function_definition (function_name_set_list) function_name_set_list (parameters (identifier_self) identifier_self (identifier_mutagen_file) identifier_mutagen_file (identifier_values) identifier_values )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (argument_list (identifier_mutagen_file) identifier_mutagen_file (list_comprehension (call (attribute (identifier_self) identifier_self (identifier_serialize) identifier_serialize )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 )argument_list )call )expression_statement )block )function_definition )module
Set all values for the field using this style. `values` should be an iterable.
(module (function_definition (function_name_detect) function_name_detect (parameters (identifier_self) identifier_self )parameters (block (if_statement (identifier_PY3) identifier_PY3 (block (import_statement (dotted_name (identifier_subprocess) identifier_subprocess )dotted_name )import_statement )block (else_clause (block (import_statement (aliased_import (dotted_name (identifier_commands) identifier_commands )dotted_name (identifier_subprocess) identifier_subprocess )aliased_import )import_statement )block )else_clause )if_statement (try_statement (block (expression_statement (assignment (identifier_theip) identifier_theip (call (attribute (identifier_subprocess) identifier_subprocess (identifier_getoutput) identifier_getoutput )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_opts_command) identifier_opts_command )attribute )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (assignment (identifier_theip) identifier_theip (None) None )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_current_value) identifier_set_current_value )attribute (argument_list (identifier_theip) identifier_theip )argument_list )call )expression_statement (return_statement (identifier_theip) identifier_theip )return_statement )block )function_definition )module
Detect and return the IP address.
(module (function_definition (function_name_fullName) function_name_fullName (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_parentName) identifier_parentName )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )boolean_operator (block (return_statement (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_parentName) identifier_parentName )attribute (string_'_') string_'_' )binary_operator (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )binary_operator )return_statement )block )if_statement (return_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier_parentName) identifier_parentName )attribute )boolean_operator )return_statement )block )function_definition )module
A full name, intended to uniquely identify a parameter
(module (function_definition (function_name_getGrid) function_name_getGrid (parameters (identifier_self) identifier_self (default_parameter (identifier_use_mask) identifier_use_mask (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_grid_card_name) identifier_grid_card_name (string_"WATERSHED_MASK") string_"WATERSHED_MASK" )assignment )expression_statement (if_statement (not_operator (identifier_use_mask) identifier_use_mask )not_operator (block (expression_statement (assignment (identifier_grid_card_name) identifier_grid_card_name (string_"ELEVATION") string_"ELEVATION" )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_getGridByCard) identifier_getGridByCard )attribute (argument_list (identifier_grid_card_name) identifier_grid_card_name )argument_list )call )return_statement )block )function_definition )module
Returns GDALGrid object of GSSHA model bounds Paramters: use_mask(bool): If True, uses watershed mask. Otherwise, it uses the elevaiton grid. Returns: GDALGrid
(module (function_definition (function_name_substitute) function_name_substitute (parameters (identifier_search) identifier_search (identifier_replace) identifier_replace (identifier_text) identifier_text )parameters (block (expression_statement (string_'Regex substitution function. Replaces regex ``search`` with ``replace`` in ``text``') string_'Regex substitution function. Replaces regex ``search`` with ``replace`` in ``text``' )expression_statement (return_statement (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_search) identifier_search )argument_list )call )argument_list )call (identifier_replace) identifier_replace (identifier_text) identifier_text )argument_list )call )return_statement )block )function_definition )module
Regex substitution function. Replaces regex ``search`` with ``replace`` in ``text``
(module (function_definition (function_name_to_database) function_name_to_database (parameters (identifier_self) identifier_self (default_parameter (identifier_manager) identifier_manager (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_network) identifier_network (call (attribute (identifier_pybel) identifier_pybel (identifier_to_database) identifier_to_database )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (keyword_argument (identifier_manager) identifier_manager (identifier_manager) identifier_manager )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_network) identifier_network )return_statement )block )function_definition )module
Send the model to the PyBEL database This function wraps :py:func:`pybel.to_database`. Parameters ---------- manager : Optional[pybel.manager.Manager] A PyBEL database manager. If none, first checks the PyBEL configuration for ``PYBEL_CONNECTION`` then checks the environment variable ``PYBEL_REMOTE_HOST``. Finally, defaults to using SQLite database in PyBEL data directory (automatically configured by PyBEL) Returns ------- network : Optional[pybel.manager.models.Network] The SQLAlchemy model representing the network that was uploaded. Returns None if upload fails.