sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_rename) function_name_rename (parameters (identifier_self) identifier_self (identifier_arr) identifier_arr (default_parameter (identifier_new_name) identifier_new_name (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_name_in_me) identifier_name_in_me (comparison_operator (attribute (attribute (identifier_arr) identifier_arr (identifier_psy) identifier_psy )attribute (identifier_arr_name) identifier_arr_name )attribute (attribute (identifier_self) identifier_self (identifier_arr_names) identifier_arr_names )attribute )comparison_operator )assignment )expression_statement (if_statement (not_operator (identifier_name_in_me) identifier_name_in_me )not_operator (block (return_statement (expression_list (identifier_arr) identifier_arr (False) False )expression_list )return_statement )block (elif_clause (boolean_operator (identifier_name_in_me) identifier_name_in_me (not_operator (call (attribute (identifier_self) identifier_self (identifier__contains_array) identifier__contains_array )attribute (argument_list (identifier_arr) identifier_arr )argument_list )call )not_operator )boolean_operator (block (if_statement (comparison_operator (identifier_new_name) identifier_new_name (False) False )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_"Array name %s is already in use! Set the `new_name` ") string_"Array name %s is already in use! Set the `new_name` " (string_"parameter to None for renaming!") string_"parameter to None for renaming!" )concatenated_string (attribute (attribute (identifier_arr) identifier_arr (identifier_psy) identifier_psy )attribute (identifier_arr_name) identifier_arr_name )attribute )binary_operator )argument_list )call )raise_statement )block (elif_clause (comparison_operator (identifier_new_name) identifier_new_name (True) True )comparison_operator (block (expression_statement (assignment (identifier_new_name) identifier_new_name (conditional_expression (identifier_new_name) identifier_new_name (call (identifier_isstring) identifier_isstring (argument_list (identifier_new_name) identifier_new_name )argument_list )call (string_'arr{0}') string_'arr{0}' )conditional_expression )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_arr) identifier_arr (identifier_psy) identifier_psy )attribute (identifier_arr_name) identifier_arr_name )attribute (call (attribute (identifier_self) identifier_self (identifier_next_available_name) identifier_next_available_name )attribute (argument_list (identifier_new_name) identifier_new_name )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_arr) identifier_arr (True) True )expression_list )return_statement )block )elif_clause )if_statement )block )elif_clause )if_statement (return_statement (expression_list (identifier_arr) identifier_arr (None) None )expression_list )return_statement )block )function_definition )module
Rename an array to find a name that isn't already in the list Parameters ---------- arr: InteractiveBase A :class:`InteractiveArray` or :class:`InteractiveList` instance whose name shall be checked new_name: bool or str If False, and the ``arr_name`` attribute of the new array is already in the list, a ValueError is raised. If True and the ``arr_name`` attribute of the new array is not already in the list, the name is not changed. Otherwise, if the array name is already in use, `new_name` is set to 'arr{0}'. If not True, this will be used for renaming (if the array name of `arr` is in use or not). ``'{0}'`` is replaced by a counter Returns ------- InteractiveBase `arr` with changed ``arr_name`` attribute bool or None True, if the array has been renamed, False if not and None if the array is already in the list Raises ------ ValueError If it was impossible to find a name that isn't already in the list ValueError If `new_name` is False and the array is already in the list
(module (function_definition (function_name_job) function_name_job (parameters (default_parameter (identifier_func_or_queue) identifier_func_or_queue (None) None )default_parameter (default_parameter (identifier_connection) identifier_connection (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 (if_statement (call (identifier_callable) identifier_callable (argument_list (identifier_func_or_queue) identifier_func_or_queue )argument_list )call (block (expression_statement (assignment (identifier_func) identifier_func (identifier_func_or_queue) identifier_func_or_queue )assignment )expression_statement (expression_statement (assignment (identifier_queue) identifier_queue (string_'default') string_'default' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_func) identifier_func (None) None )assignment )expression_statement (expression_statement (assignment (identifier_queue) identifier_queue (boolean_operator (identifier_func_or_queue) identifier_func_or_queue (string_'default') string_'default' )boolean_operator )assignment )expression_statement )block )else_clause )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_queue) identifier_queue (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (expression_statement (assignment (identifier_queue) identifier_queue (call (identifier_unicode) identifier_unicode (argument_list (identifier_queue) identifier_queue )argument_list )call )assignment )expression_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_queue) identifier_queue (call (identifier_get_queue) identifier_get_queue (argument_list (identifier_queue) identifier_queue )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_connection) identifier_connection (None) None )comparison_operator (block (expression_statement (assignment (identifier_connection) identifier_connection (attribute (identifier_queue) identifier_queue (identifier_connection) identifier_connection )attribute )assignment )expression_statement )block )if_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_decorator) identifier_decorator (call (identifier__job) identifier__job (argument_list (identifier_queue) identifier_queue (keyword_argument (identifier_connection) identifier_connection (identifier_connection) identifier_connection )keyword_argument (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (identifier_func) identifier_func (block (return_statement (call (identifier_decorator) identifier_decorator (argument_list (identifier_func) identifier_func )argument_list )call )return_statement )block )if_statement (return_statement (identifier_decorator) identifier_decorator )return_statement )block )function_definition )module
The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, it allows simplified ``@job`` syntax to put job into default queue.
(module (function_definition (function_name_iter_commit_activity) function_name_iter_commit_activity (parameters (identifier_self) identifier_self (default_parameter (identifier_number) identifier_number (unary_operator (integer_1) integer_1 )unary_operator )default_parameter (default_parameter (identifier_etag) identifier_etag (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__build_url) identifier__build_url )attribute (argument_list (string_'stats') string_'stats' (string_'commit_activity') string_'commit_activity' (keyword_argument (identifier_base_url) identifier_base_url (attribute (identifier_self) identifier_self (identifier__api) identifier__api )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__iter) identifier__iter )attribute (argument_list (call (identifier_int) identifier_int (argument_list (identifier_number) identifier_number )argument_list )call (identifier_url) identifier_url (identifier_dict) identifier_dict (keyword_argument (identifier_etag) identifier_etag (identifier_etag) identifier_etag )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Iterate over last year of commit activity by week. See: http://developer.github.com/v3/repos/statistics/ :param int number: (optional), number of weeks to return. Default -1 will return all of the weeks. :param str etag: (optional), ETag from a previous request to the same endpoint :returns: generator of dictionaries .. note:: All statistics methods may return a 202. On those occasions, you will not receive any objects. You should store your iterator and check the new ``last_status`` attribute. If it is a 202 you should wait before re-requesting. .. versionadded:: 0.7
(module (function_definition (function_name_coltype_as_typeengine) function_name_coltype_as_typeengine (parameters (typed_parameter (identifier_coltype) identifier_coltype (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_VisitableType) identifier_VisitableType )type (type (identifier_TypeEngine) identifier_TypeEngine )type )type_parameter )generic_type )type )typed_parameter )parameters (type (identifier_TypeEngine) identifier_TypeEngine )type (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_coltype) identifier_coltype (identifier_TypeEngine) identifier_TypeEngine )argument_list )call (block (return_statement (identifier_coltype) identifier_coltype )return_statement )block )if_statement (return_statement (call (identifier_coltype) identifier_coltype (argument_list )argument_list )call )return_statement )block )function_definition )module
Instances of SQLAlchemy column types are subclasses of ``TypeEngine``. It's possible to specify column types either as such instances, or as the class type. This function ensures that such classes are converted to instances. To explain: you can specify columns like .. code-block:: python a = Column("a", Integer) b = Column("b", Integer()) c = Column("c", String(length=50)) isinstance(Integer, TypeEngine) # False isinstance(Integer(), TypeEngine) # True isinstance(String(length=50), TypeEngine) # True type(Integer) # <class 'sqlalchemy.sql.visitors.VisitableType'> type(Integer()) # <class 'sqlalchemy.sql.sqltypes.Integer'> type(String) # <class 'sqlalchemy.sql.visitors.VisitableType'> type(String(length=50)) # <class 'sqlalchemy.sql.sqltypes.String'> This function coerces things to a :class:`TypeEngine`.
(module (function_definition (function_name_extract) function_name_extract (parameters (identifier_pattern) identifier_pattern (identifier_string) identifier_string (keyword_separator )keyword_separator (default_parameter (identifier_assert_equal) identifier_assert_equal (False) False )default_parameter (default_parameter (identifier_one) identifier_one (False) False )default_parameter (default_parameter (identifier_condense) identifier_condense (False) False )default_parameter (default_parameter (identifier_default) identifier_default (None) None )default_parameter (default_parameter (identifier_default_if_multiple) identifier_default_if_multiple (True) True )default_parameter (default_parameter (identifier_default_if_none) identifier_default_if_none (True) True )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_pattern) identifier_pattern (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_output) identifier_output (call (identifier_get_content) identifier_get_content (argument_list (identifier_pattern) identifier_pattern (identifier_string) identifier_string )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_output) identifier_output (list )list )assignment )expression_statement (for_statement (identifier_p) identifier_p (identifier_pattern) identifier_pattern (block (expression_statement (augmented_assignment (identifier_output) identifier_output (call (identifier_get_content) identifier_get_content (argument_list (identifier_p) identifier_p (identifier_string) identifier_string )argument_list )call )augmented_assignment )expression_statement )block )for_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_output) identifier_output (call (identifier_process_output) identifier_process_output (argument_list (identifier_output) identifier_output (keyword_argument (identifier_one) identifier_one (identifier_one) identifier_one )keyword_argument (keyword_argument (identifier_condense) identifier_condense (identifier_condense) identifier_condense )keyword_argument (keyword_argument (identifier_default) identifier_default (identifier_default) identifier_default )keyword_argument (keyword_argument (identifier_default_if_multiple) identifier_default_if_multiple (identifier_default_if_multiple) identifier_default_if_multiple )keyword_argument (keyword_argument (identifier_default_if_none) identifier_default_if_none (identifier_default_if_none) identifier_default_if_none )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_assert_equal) identifier_assert_equal (block (expression_statement (call (identifier_assert_output) identifier_assert_output (argument_list (identifier_output) identifier_output (identifier_assert_equal) identifier_assert_equal )argument_list )call )expression_statement )block (else_clause (block (return_statement (identifier_output) identifier_output )return_statement )block )else_clause )if_statement )block )function_definition )module
Used to extract a given regex pattern from a string, given several options
(module (function_definition (function_name_write_dag) function_name_write_dag (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier___nodes_finalized) identifier___nodes_finalized )attribute )not_operator (block (for_statement (identifier_node) identifier_node (attribute (identifier_self) identifier_self (identifier___nodes) identifier___nodes )attribute (block (expression_statement (call (attribute (identifier_node) identifier_node (identifier_finalize) identifier_finalize )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_concrete_dag) identifier_write_concrete_dag )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_abstract_dag) identifier_write_abstract_dag )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Write either a dag or a dax.
(module (function_definition (function_name_deserialize_durable_record_to_current_model) function_name_deserialize_durable_record_to_current_model (parameters (identifier_record) identifier_record (identifier_current_model) identifier_current_model )parameters (block (if_statement (call (attribute (identifier_record) identifier_record (identifier_get) identifier_get )attribute (argument_list (identifier_EVENT_TOO_BIG_FLAG) identifier_EVENT_TOO_BIG_FLAG )argument_list )call (block (return_statement (call (identifier_get_full_current_object) identifier_get_full_current_object (argument_list (subscript (subscript (subscript (subscript (identifier_record) identifier_record (string_'dynamodb') string_'dynamodb' )subscript (string_'Keys') string_'Keys' )subscript (string_'arn') string_'arn' )subscript (string_'S') string_'S' )subscript (identifier_current_model) identifier_current_model )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_new_image) identifier_new_image (call (identifier_remove_durable_specific_fields) identifier_remove_durable_specific_fields (argument_list (subscript (subscript (identifier_record) identifier_record (string_'dynamodb') string_'dynamodb' )subscript (string_'NewImage') string_'NewImage' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_item) identifier_item (identifier_value) identifier_value )pattern_list (call (attribute (identifier_new_image) identifier_new_image (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_data) identifier_data (identifier_item) identifier_item )subscript (call (attribute (identifier_DESER) identifier_DESER (identifier_deserialize) identifier_deserialize )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (call (identifier_current_model) identifier_current_model (argument_list (dictionary_splat (identifier_data) identifier_data )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Utility function that will take a Durable Dynamo event record and turn it into the proper Current Dynamo object. This will properly deserialize the ugly Dynamo datatypes away. :param record: :param current_model: :return:
(module (function_definition (function_name_namedb_account_transaction_save) function_name_namedb_account_transaction_save (parameters (identifier_cur) identifier_cur (identifier_address) identifier_address (identifier_token_type) identifier_token_type (identifier_new_credit_value) identifier_new_credit_value (identifier_new_debit_value) identifier_new_debit_value (identifier_block_id) identifier_block_id (identifier_vtxindex) identifier_vtxindex (identifier_txid) identifier_txid (identifier_existing_account) identifier_existing_account )parameters (block (if_statement (comparison_operator (identifier_existing_account) identifier_existing_account (None) None )comparison_operator (block (expression_statement (assignment (identifier_existing_account) identifier_existing_account (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_accounts_insert) identifier_accounts_insert (dictionary (pair (string_'address') string_'address' (identifier_address) identifier_address )pair (pair (string_'type') string_'type' (identifier_token_type) identifier_token_type )pair (pair (string_'credit_value') string_'credit_value' (call (attribute (string_'{}') string_'{}' (identifier_format) identifier_format )attribute (argument_list (identifier_new_credit_value) identifier_new_credit_value )argument_list )call )pair (pair (string_'debit_value') string_'debit_value' (call (attribute (string_'{}') string_'{}' (identifier_format) identifier_format )attribute (argument_list (identifier_new_debit_value) identifier_new_debit_value )argument_list )call )pair (pair (string_'lock_transfer_block_id') string_'lock_transfer_block_id' (call (attribute (identifier_existing_account) identifier_existing_account (identifier_get) identifier_get )attribute (argument_list (string_'lock_transfer_block_id') string_'lock_transfer_block_id' (integer_0) integer_0 )argument_list )call )pair (pair (string_'receive_whitelisted') string_'receive_whitelisted' (call (attribute (identifier_existing_account) identifier_existing_account (identifier_get) identifier_get )attribute (argument_list (string_'receive_whitelisted') string_'receive_whitelisted' (True) True )argument_list )call )pair (pair (string_'metadata') string_'metadata' (call (attribute (identifier_existing_account) identifier_existing_account (identifier_get) identifier_get )attribute (argument_list (string_'metadata') string_'metadata' (None) None )argument_list )call )pair (pair (string_'block_id') string_'block_id' (identifier_block_id) identifier_block_id )pair (pair (string_'txid') string_'txid' (identifier_txid) identifier_txid )pair (pair (string_'vtxindex') string_'vtxindex' (identifier_vtxindex) identifier_vtxindex )pair )dictionary )assignment )expression_statement (try_statement (block (expression_statement (assignment (pattern_list (identifier_query) identifier_query (identifier_values) identifier_values )pattern_list (call (identifier_namedb_insert_prepare) identifier_namedb_insert_prepare (argument_list (identifier_cur) identifier_cur (identifier_accounts_insert) identifier_accounts_insert (string_'accounts') string_'accounts' )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_fatal) identifier_fatal )attribute (argument_list (call (attribute (string_'FATAL: failed to append account history record for {} at ({},{})') string_'FATAL: failed to append account history record for {} at ({},{})' (identifier_format) identifier_format )attribute (argument_list (identifier_address) identifier_address (identifier_block_id) identifier_block_id (identifier_vtxindex) identifier_vtxindex )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_abort) identifier_abort )attribute (argument_list )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (call (identifier_namedb_query_execute) identifier_namedb_query_execute (argument_list (identifier_cur) identifier_cur (identifier_query) identifier_query (identifier_values) identifier_values )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Insert the new state of an account at a particular point in time. The data must be for a never-before-seen (txid,block_id,vtxindex) set in the accounts table, but must correspond to an entry in the history table. If existing_account is not None, then copy all other remaining fields from it. Return True on success Raise an Exception on error
(module (function_definition (function_name_last_modified) function_name_last_modified (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_httpdate) identifier_httpdate (call (attribute (attribute (identifier_self) identifier_self (identifier__headers) identifier__headers )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_hdrs) identifier_hdrs (identifier_LAST_MODIFIED) identifier_LAST_MODIFIED )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_httpdate) identifier_httpdate (None) None )comparison_operator (block (expression_statement (assignment (identifier_timetuple) identifier_timetuple (call (identifier_parsedate) identifier_parsedate (argument_list (identifier_httpdate) identifier_httpdate )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_timetuple) identifier_timetuple (None) None )comparison_operator (block (return_statement (call (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (argument_list (list_splat (subscript (identifier_timetuple) identifier_timetuple (slice (colon) colon (integer_6) integer_6 )slice )subscript )list_splat (keyword_argument (identifier_tzinfo) identifier_tzinfo (attribute (attribute (identifier_datetime) identifier_datetime (identifier_timezone) identifier_timezone )attribute (identifier_utc) identifier_utc )attribute )keyword_argument )argument_list )call )return_statement )block )if_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
The value of Last-Modified HTTP header, or None. This header is represented as a `datetime` object.
(module (function_definition (function_name_build_body) function_name_build_body (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (identifier__increase_indent) identifier__increase_indent (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_body_array) identifier_body_array (list_comprehension (call (attribute (identifier_x) identifier_x (identifier_build) identifier_build )attribute (argument_list )argument_list )call (for_in_clause (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_iterable) identifier_iterable )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_nl) identifier_nl (conditional_expression (string_'\n') string_'\n' (attribute (identifier_self) identifier_self (identifier_append_extra_newline) identifier_append_extra_newline )attribute (string_'') string_'' )conditional_expression )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_iterable) identifier_iterable )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_body) identifier_body (binary_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_join_body_on) identifier_join_body_on )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_body_array) identifier_body_array )argument_list )call (identifier_nl) identifier_nl )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_body) identifier_body (string_'') string_'' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier__decrease_indent) identifier__decrease_indent (argument_list )argument_list )call )expression_statement (return_statement (identifier_body) identifier_body )return_statement )block )function_definition )module
Builds the body of a syslog-ng configuration object.
(module (function_definition (function_name_get_criteria) function_name_get_criteria (parameters (identifier_self) identifier_self (identifier_sess) identifier_sess (identifier_model) identifier_model (identifier_advx) identifier_advx (identifier_y) identifier_y (default_parameter (identifier_batch_size) identifier_batch_size (identifier_BATCH_SIZE) identifier_BATCH_SIZE )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_names) identifier_names (identifier_factory) identifier_factory )pattern_list (call (attribute (identifier_self) identifier_self (identifier_extra_criteria) identifier_extra_criteria )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_factory) identifier_factory (call (identifier__CriteriaFactory) identifier__CriteriaFactory (argument_list (identifier_model) identifier_model (identifier_factory) identifier_factory )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (call (identifier_batch_eval_multi_worker) identifier_batch_eval_multi_worker (argument_list (identifier_sess) identifier_sess (identifier_factory) identifier_factory (list (identifier_advx) identifier_advx (identifier_y) identifier_y )list (keyword_argument (identifier_batch_size) identifier_batch_size (identifier_batch_size) identifier_batch_size )keyword_argument (keyword_argument (identifier_devices) identifier_devices (identifier_devices) identifier_devices )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_names) identifier_names (binary_operator (list (string_'correctness') string_'correctness' (string_'confidence') string_'confidence' )list (identifier_names) identifier_names )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (call (identifier_dict) identifier_dict (argument_list (call (identifier_safe_zip) identifier_safe_zip (argument_list (identifier_names) identifier_names (identifier_results) identifier_results )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Returns a dictionary mapping the name of each criterion to a NumPy array containing the value of that criterion for each adversarial example. Subclasses can add extra criteria by implementing the `extra_criteria` method. :param sess: tf.session.Session :param model: cleverhans.model.Model :param adv_x: numpy array containing the adversarial examples made so far by earlier work in the bundling process :param y: numpy array containing true labels :param batch_size: int, batch size
(module (function_definition (function_name_date_tuple) function_name_date_tuple (parameters (identifier_ovls) identifier_ovls )parameters (block (expression_statement (assignment (identifier_day) identifier_day (assignment (identifier_month) identifier_month (assignment (identifier_year) identifier_year (integer_0) integer_0 )assignment )assignment )assignment )expression_statement (for_statement (identifier_o) identifier_o (identifier_ovls) identifier_ovls (block (if_statement (comparison_operator (string_'day') string_'day' (attribute (identifier_o) identifier_o (identifier_props) identifier_props )attribute )comparison_operator (block (expression_statement (assignment (identifier_day) identifier_day (attribute (identifier_o) identifier_o (identifier_value) identifier_value )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'month') string_'month' (attribute (identifier_o) identifier_o (identifier_props) identifier_props )attribute )comparison_operator (block (expression_statement (assignment (identifier_month) identifier_month (attribute (identifier_o) identifier_o (identifier_value) identifier_value )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'year') string_'year' (attribute (identifier_o) identifier_o (identifier_props) identifier_props )attribute )comparison_operator (block (expression_statement (assignment (identifier_year) identifier_year (attribute (identifier_o) identifier_o (identifier_value) identifier_value )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'date') string_'date' (attribute (identifier_o) identifier_o (identifier_props) identifier_props )attribute )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_day) identifier_day (identifier_month) identifier_month (identifier_year) identifier_year )pattern_list (list_comprehension (parenthesized_expression (boolean_operator (identifier_o) identifier_o (identifier_n) identifier_n )boolean_operator )parenthesized_expression (for_in_clause (pattern_list (identifier_o) identifier_o (identifier_n) identifier_n )pattern_list (call (identifier_zip) identifier_zip (argument_list (tuple (identifier_day) identifier_day (identifier_month) identifier_month (identifier_year) identifier_year )tuple (attribute (identifier_o) identifier_o (identifier_value) identifier_value )attribute )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (tuple (identifier_day) identifier_day (identifier_month) identifier_month (identifier_year) identifier_year )tuple )return_statement )block )function_definition )module
We should have a list of overlays from which to extract day month year.
(module (function_definition (function_name_get_source) function_name_get_source (parameters (identifier_self) identifier_self (identifier_key) identifier_key (default_parameter (identifier_name_spaces) identifier_name_spaces (None) None )default_parameter (default_parameter (identifier_default_prefix) identifier_default_prefix (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (identifier_source) identifier_source (boolean_operator (attribute (identifier_self) identifier_self (identifier_source) identifier_source )attribute (identifier_key) identifier_key )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_prefix) identifier_prefix (identifier_default_prefix) identifier_default_prefix )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (identifier_name_spaces) identifier_name_spaces (attribute (identifier_self) identifier_self (identifier_name_space) identifier_name_space )attribute )boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_name_space) identifier_name_space )attribute (identifier_name_spaces) identifier_name_spaces )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_prefix) identifier_prefix (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (list (subscript (identifier_name_spaces) identifier_name_spaces (attribute (identifier_self) identifier_self (identifier_name_space) identifier_name_space )attribute )subscript (string_':') string_':' )list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (list (identifier_prefix) identifier_prefix (identifier_source) identifier_source )list )argument_list )call )return_statement )block )function_definition )module
Generates the dictionary key for the serialized representation based on the instance variable source and a provided key. :param str key: name of the field in model :returns: self.source or key
(module (function_definition (function_name_wrap_xblock) function_name_wrap_xblock (parameters (identifier_self) identifier_self (identifier_block) identifier_block (identifier_view) identifier_view (identifier_frag) identifier_frag (identifier_context) identifier_context )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'wrap_child') string_'wrap_child' )argument_list )call (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_"wrap_child is deprecated in favor of wrap_xblock and wrap_aside %s") string_"wrap_child is deprecated in favor of wrap_xblock and wrap_aside %s" (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_wrap_child) identifier_wrap_child )attribute (argument_list (identifier_block) identifier_block (identifier_view) identifier_view (identifier_frag) identifier_frag (identifier_context) identifier_context )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_extra_data) identifier_extra_data (conditional_expression (dictionary (pair (string_'name') string_'name' (attribute (identifier_block) identifier_block (identifier_name) identifier_name )attribute )pair )dictionary (attribute (identifier_block) identifier_block (identifier_name) identifier_name )attribute (dictionary )dictionary )conditional_expression )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__wrap_ele) identifier__wrap_ele )attribute (argument_list (identifier_block) identifier_block (identifier_view) identifier_view (identifier_frag) identifier_frag (identifier_extra_data) identifier_extra_data )argument_list )call )return_statement )block )function_definition )module
Creates a div which identifies the xblock and writes out the json_init_args into a script tag. If there's a `wrap_child` method, it calls that with a deprecation warning. The default implementation creates a frag to wraps frag w/ a div identifying the xblock. If you have javascript, you'll need to override this impl
(module (function_definition (function_name_asscipy) function_name_asscipy (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_asnumpy) identifier_asnumpy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_indices) identifier_indices (call (attribute (attribute (identifier_self) identifier_self (identifier_indices) identifier_indices )attribute (identifier_asnumpy) identifier_asnumpy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_indptr) identifier_indptr (call (attribute (attribute (identifier_self) identifier_self (identifier_indptr) identifier_indptr )attribute (identifier_asnumpy) identifier_asnumpy )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_spsp) identifier_spsp )not_operator (block (raise_statement (call (identifier_ImportError) identifier_ImportError (argument_list (string_"scipy is not available. \ Please check if the scipy python bindings are installed.") string_"scipy is not available. \ Please check if the scipy python bindings are installed." )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_spsp) identifier_spsp (identifier_csr_matrix) identifier_csr_matrix )attribute (argument_list (tuple (identifier_data) identifier_data (identifier_indices) identifier_indices (identifier_indptr) identifier_indptr )tuple (keyword_argument (identifier_shape) identifier_shape (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute )keyword_argument (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_self) identifier_self (identifier_dtype) identifier_dtype )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns a ``scipy.sparse.csr.csr_matrix`` object with value copied from this array Examples -------- >>> x = mx.nd.sparse.zeros('csr', (2,3)) >>> y = x.asscipy() >>> type(y) <type 'scipy.sparse.csr.csr_matrix'> >>> y <2x3 sparse matrix of type '<type 'numpy.float32'>' with 0 stored elements in Compressed Sparse Row format>
(module (function_definition (function_name_rotate) function_name_rotate (parameters (identifier_self) identifier_self (identifier_rad) identifier_rad )parameters (block (expression_statement (assignment (pattern_list (identifier_s) identifier_s (identifier_c) identifier_c )pattern_list (list_comprehension (call (identifier_f) identifier_f (argument_list (identifier_rad) identifier_rad )argument_list )call (for_in_clause (identifier_f) identifier_f (tuple (attribute (identifier_math) identifier_math (identifier_sin) identifier_sin )attribute (attribute (identifier_math) identifier_math (identifier_cos) identifier_cos )attribute )tuple )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (tuple (binary_operator (binary_operator (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute )binary_operator (binary_operator (identifier_s) identifier_s (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute )binary_operator )binary_operator (binary_operator (binary_operator (identifier_s) identifier_s (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute )binary_operator (binary_operator (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute )binary_operator )binary_operator )tuple )assignment )expression_statement (return_statement (call (identifier_Point) identifier_Point (argument_list (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )return_statement )block )function_definition )module
Rotate counter-clockwise by rad radians. Positive y goes *up,* as in traditional mathematics. Interestingly, you can use this in y-down computer graphics, if you just remember that it turns clockwise, rather than counter-clockwise. The new position is returned as a new Point.
(module (function_definition (function_name__set_id) function_name__set_id (parameters (identifier_self) identifier_self (identifier_Id) identifier_Id (identifier_is_added) identifier_is_added (identifier_index) identifier_index )parameters (block (if_statement (identifier_is_added) identifier_is_added (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_selected_ids) identifier_selected_ids )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_Id) identifier_Id )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_selected_ids) identifier_selected_ids )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_Id) identifier_Id )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_dataChanged) identifier_dataChanged )attribute (identifier_emit) identifier_emit )attribute (argument_list (identifier_index) identifier_index (identifier_index) identifier_index )argument_list )call )expression_statement )block )function_definition )module
Update selected_ids and emit dataChanged
(module (function_definition (function_name_get_service_display_name) function_name_get_service_display_name (parameters (identifier_name) identifier_name )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_win32) identifier_win32 (identifier_OpenSCManager) identifier_OpenSCManager )attribute (argument_list (keyword_argument (identifier_dwDesiredAccess) identifier_dwDesiredAccess (attribute (identifier_win32) identifier_win32 (identifier_SC_MANAGER_ENUMERATE_SERVICE) identifier_SC_MANAGER_ENUMERATE_SERVICE )attribute )keyword_argument )argument_list )call (as_pattern_target (identifier_hSCManager) identifier_hSCManager )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (attribute (identifier_win32) identifier_win32 (identifier_GetServiceDisplayName) identifier_GetServiceDisplayName )attribute (argument_list (identifier_hSCManager) identifier_hSCManager (identifier_name) identifier_name )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Get the service display name for the given service name. @see: L{get_service} @type name: str @param name: Service unique name. You can get this value from the C{ServiceName} member of the service descriptors returned by L{get_services} or L{get_active_services}. @rtype: str @return: Service display name.
(module (function_definition (function_name_post_data) function_name_post_data (parameters (identifier_self) identifier_self (identifier_path) identifier_path (default_parameter (identifier_data) identifier_data (None) None )default_parameter (default_parameter (identifier_headers) identifier_headers (None) None )default_parameter (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier_base_url) identifier_base_url )attribute (identifier_path) identifier_path )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'POST URL: %s') string_'POST URL: %s' (identifier_url) identifier_url )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__log_data) identifier__log_data )attribute (argument_list (identifier_data) identifier_data (False) False )argument_list )call )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_resp) identifier_resp (await (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_post) identifier_post )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (conditional_expression (identifier_DEFAULT_TIMEOUT) identifier_DEFAULT_TIMEOUT (comparison_operator (identifier_timeout) identifier_timeout (None) None )comparison_operator (identifier_timeout) identifier_timeout )conditional_expression )keyword_argument )argument_list )call )await )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_resp) identifier_resp (identifier_content_length) identifier_content_length )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_resp_data) identifier_resp_data (await (call (attribute (identifier_resp) identifier_resp (identifier_read) identifier_read )attribute (argument_list )argument_list )call )await )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_resp_data) identifier_resp_data (None) None )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__log_data) identifier__log_data )attribute (argument_list (identifier_resp_data) identifier_resp_data (True) True )argument_list )call )expression_statement (return_statement (expression_list (identifier_resp_data) identifier_resp_data (attribute (identifier_resp) identifier_resp (identifier_status) identifier_status )attribute )expression_list )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (if_statement (comparison_operator (identifier_resp) identifier_resp (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_resp) identifier_resp (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (raise_statement (identifier_ex) identifier_ex )raise_statement )block )except_clause (finally_clause (block (if_statement (comparison_operator (identifier_resp) identifier_resp (None) None )comparison_operator (block (expression_statement (await (call (attribute (identifier_resp) identifier_resp (identifier_release) identifier_release )attribute (argument_list )argument_list )call )await )expression_statement )block )if_statement )block )finally_clause )try_statement )block )function_definition )module
Perform a POST request.
(module (function_definition (function_name_json_compat_obj_encode) function_name_json_compat_obj_encode (parameters (identifier_data_type) identifier_data_type (identifier_obj) identifier_obj (default_parameter (identifier_caller_permissions) identifier_caller_permissions (None) None )default_parameter (default_parameter (identifier_alias_validators) identifier_alias_validators (None) None )default_parameter (default_parameter (identifier_old_style) identifier_old_style (False) False )default_parameter (default_parameter (identifier_for_msgpack) identifier_for_msgpack (False) False )default_parameter (default_parameter (identifier_should_redact) identifier_should_redact (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_serializer) identifier_serializer (call (identifier_StoneToPythonPrimitiveSerializer) identifier_StoneToPythonPrimitiveSerializer (argument_list (identifier_caller_permissions) identifier_caller_permissions (identifier_alias_validators) identifier_alias_validators (identifier_for_msgpack) identifier_for_msgpack (identifier_old_style) identifier_old_style (identifier_should_redact) identifier_should_redact )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_serializer) identifier_serializer (identifier_encode) identifier_encode )attribute (argument_list (identifier_data_type) identifier_data_type (identifier_obj) identifier_obj )argument_list )call )return_statement )block )function_definition )module
Encodes an object into a JSON-compatible dict based on its type. Args: data_type (Validator): Validator for obj. obj (object): Object to be serialized. caller_permissions (list): The list of raw-string caller permissions with which to serialize. Returns: An object that when passed to json.dumps() will produce a string giving the JSON-encoded object. See json_encode() for additional information about validation.
(module (function_definition (function_name_snapshot_folder) function_name_snapshot_folder (parameters )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Snapshot folder") string_"Snapshot folder" )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_stdout) identifier_stdout (call (attribute (identifier_subprocess) identifier_subprocess (identifier_check_output) identifier_check_output )attribute (argument_list (list (string_"git") string_"git" (string_"show") string_"show" (string_"-s") string_"-s" (string_"--format=%cI") string_"--format=%cI" (string_"HEAD") string_"HEAD" )list )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (identifier_subprocess) identifier_subprocess (identifier_CalledProcessError) identifier_CalledProcessError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"Error: {}") string_"Error: {}" (identifier_format) identifier_format )attribute (argument_list (call (attribute (call (attribute (attribute (identifier_e) identifier_e (identifier_output) identifier_output )attribute (identifier_decode) identifier_decode )attribute (argument_list (string_'ascii') string_'ascii' (string_'ignore') string_'ignore' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_2) integer_2 )argument_list )call )expression_statement )block )except_clause (except_clause (as_pattern (identifier_FileNotFoundError) identifier_FileNotFoundError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"Error: {}") string_"Error: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_2) integer_2 )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_ds) identifier_ds (call (attribute (call (attribute (identifier_stdout) identifier_stdout (identifier_decode) identifier_decode )attribute (argument_list (string_'ascii') string_'ascii' (string_'ignore') string_'ignore' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_datetime) identifier_datetime (identifier_fromisoformat) identifier_fromisoformat )attribute (argument_list (identifier_ds) identifier_ds )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_utc) identifier_utc (binary_operator (identifier_dt) identifier_dt (call (attribute (identifier_dt) identifier_dt (identifier_utcoffset) identifier_utcoffset )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_utc) identifier_utc (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y%m%d_%H%M%S") string_"%Y%m%d_%H%M%S" )argument_list )call )return_statement )block )function_definition )module
Use the commit date in UTC as folder name
(module (function_definition (function_name_to_df_CSV) function_name_to_df_CSV (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_tempfile) identifier_tempfile (type (identifier_str) identifier_str )type (None) None )typed_default_parameter (typed_default_parameter (identifier_tempkeep) identifier_tempkeep (type (identifier_bool) identifier_bool )type (False) False )typed_default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (type (string_'pd.DataFrame') string_'pd.DataFrame' )type (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_to_df) identifier_to_df )attribute (argument_list (keyword_argument (identifier_method) identifier_method (string_'CSV') string_'CSV' )keyword_argument (keyword_argument (identifier_tempfile) identifier_tempfile (identifier_tempfile) identifier_tempfile )keyword_argument (keyword_argument (identifier_tempkeep) identifier_tempkeep (identifier_tempkeep) identifier_tempkeep )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Export this SAS Data Set to a Pandas Data Frame via CSV file :param tempfile: [optional] an OS path for a file to use for the local CSV file; default it a temporary file that's cleaned up :param tempkeep: if you specify your own file to use with tempfile=, this controls whether it's cleaned up after using it :param kwargs: :return: Pandas data frame :rtype: 'pd.DataFrame'
(module (function_definition (function_name_GetTransPosition) function_name_GetTransPosition (parameters (identifier_df) identifier_df (identifier_field) identifier_field (identifier_dic) identifier_dic (default_parameter (identifier_refCol) identifier_refCol (string_"transcript_id") string_"transcript_id" )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_gen) identifier_gen (call (identifier_str) identifier_str (argument_list (call (identifier_int) identifier_int (argument_list (subscript (identifier_df) identifier_df (identifier_field) identifier_field )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_transid) identifier_transid (subscript (identifier_df) identifier_df (identifier_refCol) identifier_refCol )subscript )assignment )expression_statement (expression_statement (assignment (identifier_bases) identifier_bases (call (attribute (call (attribute (identifier_dic) identifier_dic (identifier_get) identifier_get )attribute (argument_list (identifier_transid) identifier_transid )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_",") string_"," )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bases) identifier_bases (binary_operator (call (attribute (identifier_bases) identifier_bases (identifier_index) identifier_index )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_gen) identifier_gen )argument_list )call )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement )block (except_clause (block (expression_statement (assignment (identifier_bases) identifier_bases (attribute (identifier_np) identifier_np (identifier_nan) identifier_nan )attribute )assignment )expression_statement )block )except_clause )try_statement (return_statement (identifier_bases) identifier_bases )return_statement )block )function_definition )module
Maps a genome position to transcript positon" :param df: a Pandas dataframe :param field: the head of the column containing the genomic position :param dic: a dictionary containing for each transcript the respective bases eg. {ENST23923910:'234,235,236,1021,..'} :param refCol: header of the reference column with IDs, eg. 'transcript_id' :returns: position on transcript
(module (function_definition (function_name_set_modifier_mapping) function_name_set_modifier_mapping (parameters (identifier_self) identifier_self (identifier_keycodes) identifier_keycodes )parameters (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_request) identifier_request (identifier_SetModifierMapping) identifier_SetModifierMapping )attribute (argument_list (keyword_argument (identifier_display) identifier_display (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute )keyword_argument (keyword_argument (identifier_keycodes) identifier_keycodes (identifier_keycodes) identifier_keycodes )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_r) identifier_r (identifier_status) identifier_status )attribute )return_statement )block )function_definition )module
Set the keycodes for the eight modifiers X.Shift, X.Lock, X.Control, X.Mod1, X.Mod2, X.Mod3, X.Mod4 and X.Mod5. keycodes should be a eight-element list where each entry is a list of the keycodes that should be bound to that modifier. If any changed key is logically in the down state, X.MappingBusy is returned and the mapping is not changed. If the mapping violates some server restriction, X.MappingFailed is returned. Otherwise the mapping is changed and X.MappingSuccess is returned.
(module (function_definition (function_name__badlink) function_name__badlink (parameters (identifier_info) identifier_info (identifier_base) identifier_base )parameters (block (expression_statement (assignment (identifier_tip) identifier_tip (call (identifier__resolved) identifier__resolved (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_base) identifier_base (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (identifier_info) identifier_info (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (identifier__badpath) identifier__badpath (argument_list (attribute (identifier_info) identifier_info (identifier_linkname) identifier_linkname )attribute (keyword_argument (identifier_base) identifier_base (identifier_tip) identifier_tip )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Links are interpreted relative to the directory containing the link
(module (function_definition (function_name_default) function_name_default (parameters (identifier_cls) identifier_cls )parameters (block (with_statement (with_clause (with_item (call (attribute (identifier_enamlnative) identifier_enamlnative (identifier_imports) identifier_imports )attribute (argument_list )argument_list )call )with_item )with_clause (block (for_statement (identifier_impl) identifier_impl (list (identifier_TornadoEventLoop) identifier_TornadoEventLoop (identifier_TwistedEventLoop) identifier_TwistedEventLoop (identifier_BuiltinEventLoop) identifier_BuiltinEventLoop )list (block (if_statement (call (attribute (identifier_impl) identifier_impl (identifier_available) identifier_available )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Using {} event loop!") string_"Using {} event loop!" (identifier_format) identifier_format )attribute (argument_list (identifier_impl) identifier_impl )argument_list )call )argument_list )call )expression_statement (return_statement (call (identifier_impl) identifier_impl (argument_list )argument_list )call )return_statement )block )if_statement )block )for_statement )block )with_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (concatenated_string (string_"No event loop implementation is available. ") string_"No event loop implementation is available. " (string_"Install tornado or twisted.") string_"Install tornado or twisted." )concatenated_string )argument_list )call )raise_statement )block )function_definition )module
Get the first available event loop implementation based on which packages are installed.
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_socket) identifier_socket )attribute (call (attribute (identifier_socket) identifier_socket (identifier_socket) identifier_socket )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute (attribute (identifier_socket) identifier_socket (identifier_SOCK_STREAM) identifier_SOCK_STREAM )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_socket) identifier_socket )attribute (identifier_connect) identifier_connect )attribute (argument_list (tuple (attribute (identifier_self) identifier_self (identifier_host) identifier_host )attribute (attribute (identifier_self) identifier_self (identifier_port) identifier_port )attribute )tuple )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_socket) identifier_socket (identifier_error) identifier_error )attribute (as_pattern_target (tuple (identifier_err) identifier_err (identifier_msg) identifier_msg )tuple )as_pattern_target )as_pattern (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_connected) identifier_connected )attribute (False) False )assignment )expression_statement (raise_statement (call (identifier_ScratchError) identifier_ScratchError (argument_list (binary_operator (string_"[Errno %d] %s") string_"[Errno %d] %s" (tuple (identifier_err) identifier_err (identifier_msg) identifier_msg )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_connected) identifier_connected )attribute (True) True )assignment )expression_statement )block )function_definition )module
Connects to Scratch.
(module (function_definition (function_name_recognize_array) function_name_recognize_array (parameters (identifier_self) identifier_self (identifier_byte_array) identifier_byte_array )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_byte_array) identifier_byte_array )argument_list )call (identifier_bytes) identifier_bytes )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Expected a byte array (string in Python 2, bytes in Python 3)") string_"Expected a byte array (string in Python 2, bytes in Python 3)" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_pb) identifier_pb (call (attribute (identifier_ctypes) identifier_ctypes (identifier_cast) identifier_cast )attribute (argument_list (identifier_byte_array) identifier_byte_array (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (attribute (identifier_ctypes) identifier_ctypes (identifier_c_ubyte) identifier_c_ubyte )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ptr) identifier_ptr (call (attribute (identifier_self) identifier_self (identifier__recognize_array_func) identifier__recognize_array_func )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_alpr_pointer) identifier_alpr_pointer )attribute (identifier_pb) identifier_pb (call (identifier_len) identifier_len (argument_list (identifier_byte_array) identifier_byte_array )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_json_data) identifier_json_data (attribute (call (attribute (identifier_ctypes) identifier_ctypes (identifier_cast) identifier_cast )attribute (argument_list (identifier_ptr) identifier_ptr (attribute (identifier_ctypes) identifier_ctypes (identifier_c_char_p) identifier_c_char_p )attribute )argument_list )call (identifier_value) identifier_value )attribute )assignment )expression_statement (expression_statement (assignment (identifier_json_data) identifier_json_data (call (identifier__convert_from_charp) identifier__convert_from_charp (argument_list (identifier_json_data) identifier_json_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response_obj) identifier_response_obj (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_json_data) identifier_json_data )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__free_json_mem_func) identifier__free_json_mem_func )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_void_p) identifier_c_void_p )attribute (argument_list (identifier_ptr) identifier_ptr )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_response_obj) identifier_response_obj )return_statement )block )function_definition )module
This causes OpenALPR to attempt to recognize an image passed in as a byte array. :param byte_array: This should be a string (Python 2) or a bytes object (Python 3) :return: An OpenALPR analysis in the form of a response dictionary
(module (function_definition (function_name__register) function_name__register (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_registered) identifier_registered )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_"skipping cap registration, already registered!") string_"skipping cap registration, already registered!" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_rawmsg) identifier_rawmsg )attribute (argument_list (string_'CAP') string_'CAP' (string_'LS') string_'LS' (string_'302') string_'302' )argument_list )call )await )expression_statement (expression_statement (await (call (attribute (call (identifier_super) identifier_super (argument_list )argument_list )call (identifier__register) identifier__register )attribute (argument_list )argument_list )call )await )expression_statement )block )function_definition )module
Hijack registration to send a CAP LS first.
(module (function_definition (function_name__update_lock_icon) function_name__update_lock_icon (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_icon) identifier_icon (conditional_expression (call (attribute (identifier_ima) identifier_ima (identifier_icon) identifier_icon )attribute (argument_list (string_'lock') string_'lock' )argument_list )call (attribute (identifier_self) identifier_self (identifier_locked) identifier_locked )attribute (call (attribute (identifier_ima) identifier_ima (identifier_icon) identifier_icon )attribute (argument_list (string_'lock_open') string_'lock_open' )argument_list )call )conditional_expression )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_locked_button) identifier_locked_button )attribute (identifier_setIcon) identifier_setIcon )attribute (argument_list (identifier_icon) identifier_icon )argument_list )call )expression_statement (expression_statement (assignment (identifier_tip) identifier_tip (conditional_expression (call (identifier__) identifier__ (argument_list (string_"Unlock") string_"Unlock" )argument_list )call (attribute (identifier_self) identifier_self (identifier_locked) identifier_locked )attribute (call (identifier__) identifier__ (argument_list (string_"Lock") string_"Lock" )argument_list )call )conditional_expression )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_locked_button) identifier_locked_button )attribute (identifier_setToolTip) identifier_setToolTip )attribute (argument_list (identifier_tip) identifier_tip )argument_list )call )expression_statement )block )function_definition )module
Update locked state icon
(module (function_definition (function_name__remove_watch_block) function_name__remove_watch_block (parameters (identifier_self) identifier_self (identifier_wb) identifier_wb )parameters (block (if_statement (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier__wbslock) identifier__wbslock )attribute (None) None )comparison_operator )parenthesized_expression (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__wbslock) identifier__wbslock )attribute (call (identifier_Lock) identifier_Lock (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__wbslock) identifier__wbslock )attribute (identifier_acquire) identifier_acquire )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__wbs) identifier__wbs )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_wb) identifier_wb )argument_list )call )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__wbs) identifier__wbs )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__stop_enqueue_thread) identifier__stop_enqueue_thread )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__stop_dequeue_thread) identifier__stop_dequeue_thread )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__wbslock) identifier__wbslock )attribute (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Internal method to remove a watch block for stopping event monitoring.
(module (function_definition (function_name__startMqtt) function_name__startMqtt (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Connecting to MQTT... {}:{}') string_'Connecting to MQTT... {}:{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__server) identifier__server )attribute (attribute (identifier_self) identifier_self (identifier__port) identifier__port )attribute )argument_list )call )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__mqttc) identifier__mqttc )attribute (identifier_connect_async) identifier_connect_async )attribute (argument_list (call (attribute (string_'{}') string_'{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__server) identifier__server )attribute )argument_list )call (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier__port) identifier__port )attribute )argument_list )call (integer_10) integer_10 )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__mqttc) identifier__mqttc )attribute (identifier_loop_forever) identifier_loop_forever )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_template) identifier_template (string_"An exception of type {0} occurred. Arguments:\n{1!r}") string_"An exception of type {0} occurred. Arguments:\n{1!r}" )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_template) identifier_template (identifier_format) identifier_format )attribute (argument_list (attribute (call (identifier_type) identifier_type (argument_list (identifier_ex) identifier_ex )argument_list )call (identifier___name__) identifier___name__ )attribute (attribute (identifier_ex) identifier_ex (identifier_args) identifier_args )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"MQTT Connection error: {}") string_"MQTT Connection error: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_message) identifier_message )argument_list )call (keyword_argument (identifier_exc_info) identifier_exc_info (True) True )keyword_argument )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
The client start method. Starts the thread for the MQTT Client and publishes the connected message.
(module (function_definition (function_name__docstring) function_name__docstring (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_s) identifier_s (binary_operator (string_' ') string_' ' (string_"\n") string_"\n" )binary_operator )assignment )expression_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
Generate a docstring for the generated source file. :return: new docstring :rtype: str
(module (function_definition (function_name_load) function_name_load (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_branches) identifier_branches (call (identifier_defaultdict) identifier_defaultdict (argument_list (identifier_list) identifier_list )argument_list )call )assignment )expression_statement (for_statement (identifier_row) identifier_row (identifier_data) identifier_data (block (expression_statement (call (attribute (subscript (identifier_branches) identifier_branches (subscript (identifier_row) identifier_row (unary_operator (integer_4) integer_4 )unary_operator )subscript )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_childbranch) identifier_childbranch (attribute (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute (identifier__childbranch) identifier__childbranch )attribute )assignment )expression_statement (expression_statement (assignment (identifier_branch2do) identifier_branch2do (call (identifier_deque) identifier_deque (argument_list (list (string_'trunk') string_'trunk' )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_store) identifier_store (attribute (identifier_self) identifier_self (identifier__store) identifier__store )attribute )assignment )expression_statement (while_statement (identifier_branch2do) identifier_branch2do (block (expression_statement (assignment (identifier_branch) identifier_branch (call (attribute (identifier_branch2do) identifier_branch2do (identifier_popleft) identifier_popleft )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_row) identifier_row (subscript (identifier_branches) identifier_branches (identifier_branch) identifier_branch )subscript (block (expression_statement (call (identifier_store) identifier_store (argument_list (list_splat (identifier_row) identifier_row )list_splat (keyword_argument (identifier_planning) identifier_planning (False) False )keyword_argument (keyword_argument (identifier_loading) identifier_loading (True) True )keyword_argument )argument_list )call )expression_statement )block )for_statement (if_statement (comparison_operator (identifier_branch) identifier_branch (identifier_childbranch) identifier_childbranch )comparison_operator (block (expression_statement (call (attribute (identifier_branch2do) identifier_branch2do (identifier_extend) identifier_extend )attribute (argument_list (subscript (identifier_childbranch) identifier_childbranch (identifier_branch) identifier_branch )subscript )argument_list )call )expression_statement )block )if_statement )block )while_statement )block )function_definition )module
Add a bunch of data. Must be in chronological order. But it doesn't need to all be from the same branch, as long as each branch is chronological of itself.
(module (function_definition (function_name_on_mode_button) function_name_on_mode_button (parameters (identifier_self) identifier_self (identifier_my_button) identifier_my_button (identifier_state) identifier_state )parameters (block (if_statement (identifier_state) identifier_state (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_controller) identifier_controller )attribute (identifier_set_mode) identifier_set_mode )attribute (argument_list (call (attribute (identifier_my_button) identifier_my_button (identifier_get_label) identifier_get_label )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Notify the controller of a new mode setting.
(module (function_definition (function_name_highlight) function_name_highlight (parameters (typed_parameter (identifier_text) identifier_text (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_color_code) identifier_color_code (type (identifier_int) identifier_int )type )typed_parameter (typed_default_parameter (identifier_bold) identifier_bold (type (identifier_bool) identifier_bool )type (False) False )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (return_statement (call (attribute (string_'{}\033[{}m{}\033[0m') string_'{}\033[{}m{}\033[0m' (identifier_format) identifier_format )attribute (argument_list (conditional_expression (string_'\033[1m') string_'\033[1m' (identifier_bold) identifier_bold (string_'') string_'' )conditional_expression (identifier_color_code) identifier_color_code (identifier_text) identifier_text )argument_list )call )return_statement )block )function_definition )module
Wraps the given string with terminal color codes. Args: text: The content to highlight. color_code: The color to highlight with, e.g. 'shelltools.RED'. bold: Whether to bold the content in addition to coloring. Returns: The highlighted string.
(module (function_definition (function_name_motion_sensor) function_name_motion_sensor (parameters (identifier_self) identifier_self (identifier_enabled) identifier_enabled )parameters (block (if_statement (comparison_operator (identifier_enabled) identifier_enabled (True) True )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (attribute (identifier_CONST) identifier_CONST (identifier_SETTINGS_MOTION_POLICY_ON) identifier_SETTINGS_MOTION_POLICY_ON )attribute )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_enabled) identifier_enabled (False) False )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (attribute (identifier_CONST) identifier_CONST (identifier_SETTINGS_MOTION_POLICY_OFF) identifier_SETTINGS_MOTION_POLICY_OFF )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_SkybellException) identifier_SkybellException (argument_list (attribute (identifier_ERROR) identifier_ERROR (identifier_INVALID_SETTING_VALUE) identifier_INVALID_SETTING_VALUE )attribute (tuple (attribute (identifier_CONST) identifier_CONST (identifier_SETTINGS_MOTION_POLICY) identifier_SETTINGS_MOTION_POLICY )attribute (identifier_enabled) identifier_enabled )tuple )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_setting) identifier__set_setting )attribute (argument_list (dictionary (pair (attribute (identifier_CONST) identifier_CONST (identifier_SETTINGS_MOTION_POLICY) identifier_SETTINGS_MOTION_POLICY )attribute (identifier_value) identifier_value )pair )dictionary )argument_list )call )expression_statement )block )function_definition )module
Set the motion sensor state.
(module (function_definition (function_name__check_sensor_platform_consistency) function_name__check_sensor_platform_consistency (parameters (identifier_self) identifier_self (identifier_sensor) identifier_sensor )parameters (block (expression_statement (assignment (identifier_ref_sensor) identifier_ref_sensor (call (attribute (identifier_SENSORS) identifier_SENSORS (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_platform) identifier_platform )attribute (None) None )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_ref_sensor) identifier_ref_sensor (not_operator (comparison_operator (identifier_sensor) identifier_sensor (identifier_ref_sensor) identifier_ref_sensor )comparison_operator )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (call (attribute (concatenated_string (string_'Sensor-Platform mismatch: {} is not a payload ') string_'Sensor-Platform mismatch: {} is not a payload ' (string_'of {}. Did you choose the correct reader?') string_'of {}. Did you choose the correct reader?' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_sensor) identifier_sensor (attribute (identifier_self) identifier_self (identifier_platform) identifier_platform )attribute )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Make sure sensor and platform are consistent Args: sensor (str) : Sensor name from YAML dataset definition Raises: ValueError if they don't match
(module (function_definition (function_name_appendData) function_name_appendData (parameters (identifier_self) identifier_self (identifier_xdata) identifier_xdata (identifier_ydata) identifier_ydata (default_parameter (identifier_color) identifier_color (string_'b') string_'b' )default_parameter (default_parameter (identifier_legendstr) identifier_legendstr (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_item) identifier_item (call (attribute (identifier_self) identifier_self (identifier_plot) identifier_plot )attribute (argument_list (identifier_xdata) identifier_xdata (identifier_ydata) identifier_ydata (keyword_argument (identifier_pen) identifier_pen (identifier_color) identifier_color )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_legendstr) identifier_legendstr (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_legend) identifier_legend )attribute (identifier_addItem) identifier_addItem )attribute (argument_list (identifier_item) identifier_item (identifier_legendstr) identifier_legendstr )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_item) identifier_item )return_statement )block )function_definition )module
Adds the data to the plot :param xdata: index values for data, plotted on x-axis :type xdata: numpy.ndarray :param ydata: value data to plot, dimension must match xdata :type ydata: numpy.ndarray
(module (function_definition (function_name_run) function_name_run (parameters (identifier_env) identifier_env )parameters (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_putenv) identifier_putenv )attribute (argument_list (string_'CIPR_PACKAGES') string_'CIPR_PACKAGES' (attribute (identifier_env) identifier_env (identifier_package_dir) identifier_package_dir )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_putenv) identifier_putenv )attribute (argument_list (string_'CIPR_PROJECT') string_'CIPR_PROJECT' (attribute (identifier_env) identifier_env (identifier_project_directory) identifier_project_directory )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (identifier_AND) identifier_AND (argument_list (call (attribute (identifier_clom) identifier_clom (identifier_cd) identifier_cd )attribute (argument_list (call (attribute (identifier_path) identifier_path (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (identifier_env) identifier_env (identifier_project_directory) identifier_project_directory )attribute )argument_list )call )argument_list )call (call (subscript (identifier_clom) identifier_clom (identifier_CORONA_SIMULATOR_PATH) identifier_CORONA_SIMULATOR_PATH )subscript (argument_list (call (attribute (identifier_path) identifier_path (identifier_basename) identifier_basename )attribute (argument_list (attribute (identifier_env) identifier_env (identifier_project_directory) identifier_project_directory )attribute )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_cmd) identifier_cmd (identifier_shell) identifier_shell )attribute (identifier_execute) identifier_execute )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_KeyboardInterrupt) identifier_KeyboardInterrupt (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Run current project in the Corona Simulator
(module (function_definition (function_name_get_stripped_file_lines) function_name_get_stripped_file_lines (parameters (identifier_filename) identifier_filename )parameters (block (try_statement (block (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename )argument_list )call (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_FileNotFoundError) identifier_FileNotFoundError (block (expression_statement (call (identifier_fatal) identifier_fatal (argument_list (call (attribute (string_"Could not open file: {!r}") string_"Could not open file: {!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (list_comprehension (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (identifier_lines) identifier_lines )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Return lines of a file with whitespace removed
(module (function_definition (function_name_many_from_config) function_name_many_from_config (parameters (identifier_config) identifier_config )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (expression_statement (assignment (identifier_credentials) identifier_credentials (call (attribute (identifier_config) identifier_config (identifier_get_section) identifier_get_section )attribute (argument_list (string_"credentials") string_"credentials" )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_credentials) identifier_credentials )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_sections_names) identifier_sections_names (call (attribute (identifier_credentials) identifier_credentials (identifier_get_section_names) identifier_get_section_names )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_section) identifier_section (identifier_sections_names) identifier_sections_names (block (expression_statement (assignment (identifier_credential) identifier_credential (call (attribute (identifier_credentials) identifier_credentials (identifier_get_section) identifier_get_section )attribute (argument_list (identifier_section) identifier_section )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (call (identifier_CredentialParams) identifier_CredentialParams (argument_list (identifier_credential) identifier_credential )argument_list )call )argument_list )call )expression_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (identifier_credential) identifier_credential (call (attribute (identifier_config) identifier_config (identifier_get_section) identifier_get_section )attribute (argument_list (string_"credential") string_"credential" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (call (identifier_CredentialParams) identifier_CredentialParams (argument_list (identifier_credential) identifier_credential )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Retrieves all CredentialParams from configuration parameters from "credentials" section. If "credential" section is present instead, than it returns a list with only one CredentialParams. :param config: a configuration parameters to retrieve credentials :return: a list of retrieved CredentialParams
(module (function_definition (function_name_can_delete_assets) function_name_can_delete_assets (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_url_path) identifier_url_path (call (identifier_construct_url) identifier_construct_url (argument_list (string_'authorization') string_'authorization' (keyword_argument (identifier_bank_id) identifier_bank_id (attribute (identifier_self) identifier_self (identifier__catalog_idstr) identifier__catalog_idstr )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (subscript (subscript (call (attribute (identifier_self) identifier_self (identifier__get_request) identifier__get_request )attribute (argument_list (identifier_url_path) identifier_url_path )argument_list )call (string_'assetHints') string_'assetHints' )subscript (string_'canDelete') string_'canDelete' )subscript )return_statement )block )function_definition )module
Tests if this user can delete ``Assets``. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an ``Asset`` will result in a ``PermissionDenied``. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user. :return: ``false`` if ``Asset`` deletion is not authorized, ``true`` otherwise :rtype: ``boolean`` *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_circle_right) function_name_circle_right (parameters (identifier_self) identifier_self (identifier_radius_m) identifier_radius_m (default_parameter (identifier_velocity) identifier_velocity (identifier_VELOCITY) identifier_VELOCITY )default_parameter (default_parameter (identifier_angle_degrees) identifier_angle_degrees (float_360.0) float_360.0 )default_parameter )parameters (block (expression_statement (assignment (identifier_distance) identifier_distance (binary_operator (binary_operator (binary_operator (binary_operator (integer_2) integer_2 (identifier_radius_m) identifier_radius_m )binary_operator (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute )binary_operator (identifier_angle_degrees) identifier_angle_degrees )binary_operator (float_360.0) float_360.0 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_flight_time) identifier_flight_time (binary_operator (identifier_distance) identifier_distance (identifier_velocity) identifier_velocity )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_start_circle_right) identifier_start_circle_right )attribute (argument_list (identifier_radius_m) identifier_radius_m (identifier_velocity) identifier_velocity )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (identifier_flight_time) identifier_flight_time )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Go in circle, clock wise :param radius_m: The radius of the circle (meters) :param velocity: The velocity along the circle (meters/second) :param angle_degrees: How far to go in the circle (degrees) :return:
(module (function_definition (function_name_fix_jp2_image) function_name_fix_jp2_image (parameters (identifier_image) identifier_image (identifier_bit_depth) identifier_bit_depth )parameters (block (if_statement (comparison_operator (identifier_bit_depth) identifier_bit_depth (list (integer_8) integer_8 (integer_16) integer_16 )list )comparison_operator (block (return_statement (identifier_image) identifier_image )return_statement )block )if_statement (if_statement (comparison_operator (identifier_bit_depth) identifier_bit_depth (integer_15) integer_15 )comparison_operator (block (try_statement (block (return_statement (binary_operator (identifier_image) identifier_image (integer_1) integer_1 )binary_operator )return_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (concatenated_string (string_'Failed to read JPEG 2000 image correctly. Most likely reason is that Pillow did not ') string_'Failed to read JPEG 2000 image correctly. Most likely reason is that Pillow did not ' (string_'install OpenJPEG library correctly. Try reinstalling Pillow from a wheel') string_'install OpenJPEG library correctly. Try reinstalling Pillow from a wheel' )concatenated_string )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'Bit depth {} of jp2 image is currently not supported. ') string_'Bit depth {} of jp2 image is currently not supported. ' (string_'Please raise an issue on package Github page') string_'Please raise an issue on package Github page' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_bit_depth) identifier_bit_depth )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Because Pillow library incorrectly reads JPEG 2000 images with 15-bit encoding this function corrects the values in image. :param image: image read by opencv library :type image: numpy array :param bit_depth: bit depth of jp2 image encoding :type bit_depth: int :return: corrected image :rtype: numpy array
(module (function_definition (function_name_update_policy) function_name_update_policy (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_demonstration_buffer) identifier_demonstration_buffer )attribute (identifier_update_buffer) identifier_update_buffer )attribute (identifier_shuffle) identifier_shuffle )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_batch_losses) identifier_batch_losses (list )list )assignment )expression_statement (expression_statement (assignment (identifier_num_batches) identifier_num_batches (call (identifier_min) identifier_min (argument_list (binary_operator (call (identifier_len) identifier_len (argument_list (subscript (attribute (attribute (identifier_self) identifier_self (identifier_demonstration_buffer) identifier_demonstration_buffer )attribute (identifier_update_buffer) identifier_update_buffer )attribute (string_'actions') string_'actions' )subscript )argument_list )call (attribute (identifier_self) identifier_self (identifier_n_sequences) identifier_n_sequences )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier_batches_per_epoch) identifier_batches_per_epoch )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_num_batches) identifier_num_batches )argument_list )call (block (expression_statement (assignment (identifier_update_buffer) identifier_update_buffer (attribute (attribute (identifier_self) identifier_self (identifier_demonstration_buffer) identifier_demonstration_buffer )attribute (identifier_update_buffer) identifier_update_buffer )attribute )assignment )expression_statement (expression_statement (assignment (identifier_start) identifier_start (binary_operator (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_n_sequences) identifier_n_sequences )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (binary_operator (parenthesized_expression (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_n_sequences) identifier_n_sequences )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_mini_batch) identifier_mini_batch (call (attribute (identifier_update_buffer) identifier_update_buffer (identifier_make_mini_batch) identifier_make_mini_batch )attribute (argument_list (identifier_start) identifier_start (identifier_end) identifier_end )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_run_out) identifier_run_out (call (attribute (attribute (identifier_self) identifier_self (identifier_policy) identifier_policy )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_mini_batch) identifier_mini_batch (attribute (identifier_self) identifier_self (identifier_n_sequences) identifier_n_sequences )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_loss) identifier_loss (subscript (identifier_run_out) identifier_run_out (string_'policy_loss') string_'policy_loss' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_batch_losses) identifier_batch_losses (identifier_append) identifier_append )attribute (argument_list (identifier_loss) identifier_loss )argument_list )call )expression_statement )block )for_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_batch_losses) identifier_batch_losses )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_stats) identifier_stats )attribute (string_'Losses/Cloning Loss') string_'Losses/Cloning Loss' )subscript (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_mean) identifier_mean )attribute (argument_list (identifier_batch_losses) identifier_batch_losses )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_stats) identifier_stats )attribute (string_'Losses/Cloning Loss') string_'Losses/Cloning Loss' )subscript (identifier_append) identifier_append )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Updates the policy.
(module (function_definition (function_name_getattribute) function_name_getattribute (parameters (identifier_model) identifier_model (identifier_item) identifier_item )parameters (block (expression_statement (assignment (identifier_elements) identifier_elements (call (attribute (identifier_item) identifier_item (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_element) identifier_element (call (attribute (identifier_elements) identifier_elements (identifier_pop) identifier_pop )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_attr) identifier_attr (call (identifier_getattr) identifier_getattr (argument_list (identifier_model) identifier_model (identifier_element) identifier_element (None) None )argument_list )call )assignment )expression_statement )block (except_clause (block (return_statement )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_attr) identifier_attr (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (call (identifier_callable) identifier_callable (argument_list (identifier_attr) identifier_attr )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_attr) identifier_attr (call (identifier_attr) identifier_attr (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (block (return_statement )return_statement )block )except_clause )try_statement )block )if_statement (if_statement (identifier_elements) identifier_elements (block (return_statement (call (identifier_getattribute) identifier_getattribute (argument_list (identifier_attr) identifier_attr (call (attribute (string_'.') string_'.' (identifier_join) identifier_join )attribute (argument_list (identifier_elements) identifier_elements )argument_list )call )argument_list )call )return_statement )block )if_statement (return_statement (identifier_attr) identifier_attr )return_statement )block )function_definition )module
Chained lookup of item on model If item has dots (eg: 'foo.bar.baz'), recursively call getattribute(): e = getattr(model, 'foo') e = getattr(e, 'bar') e = getattr(e, 'baz') At each step, check if e is a callable, and if so, use e()
(module (function_definition (function_name_from_int) function_name_from_int (parameters (identifier_i) identifier_i )parameters (block (expression_statement (assignment (identifier_point) identifier_point (call (attribute (identifier_ECPointAffine) identifier_ECPointAffine (identifier_from_int) identifier_from_int )attribute (argument_list (identifier_bitcoin_curve) identifier_bitcoin_curve (identifier_i) identifier_i )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_PublicKey) identifier_PublicKey (identifier_from_point) identifier_from_point )attribute (argument_list (identifier_point) identifier_point )argument_list )call )return_statement )block )function_definition )module
Generates a public key object from an integer. Note: This assumes that the upper 32 bytes of the integer are the x component of the public key point and the lower 32 bytes are the y component. Args: i (Bignum): A 512-bit integer representing the public key point on the secp256k1 curve. Returns: PublicKey: A PublicKey object.
(module (function_definition (function_name_get_request_token) function_name_get_request_token (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_oauth) identifier_oauth )attribute (string_'oauth1') string_'oauth1' )comparison_operator (block (expression_statement (assignment (identifier_oauth) identifier_oauth (call (identifier_OAuth1Session) identifier_OAuth1Session (argument_list (attribute (identifier_self) identifier_self (identifier_consumer_key) identifier_consumer_key )attribute (keyword_argument (identifier_client_secret) identifier_client_secret (attribute (identifier_self) identifier_self (identifier_consumer_secret) identifier_consumer_secret )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_request_token) identifier_request_token (call (attribute (identifier_oauth) identifier_oauth (identifier_fetch_request_token) identifier_fetch_request_token )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_REQ_TOKEN) identifier_REQ_TOKEN )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_request) identifier_request (identifier_session) identifier_session )attribute (string_'oauth_token') string_'oauth_token' )subscript (subscript (identifier_request_token) identifier_request_token (string_'oauth_token') string_'oauth_token' )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_request) identifier_request (identifier_session) identifier_session )attribute (string_'oauth_token_secret') string_'oauth_token_secret' )subscript (subscript (identifier_request_token) identifier_request_token (string_'oauth_token_secret') string_'oauth_token_secret' )subscript )assignment )expression_statement (return_statement (identifier_request_token) identifier_request_token )return_statement )block (else_clause (block (expression_statement (assignment (identifier_callback_url) identifier_callback_url (call (attribute (identifier_self) identifier_self (identifier_callback_url) identifier_callback_url )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_oauth) identifier_oauth (call (identifier_OAuth2Session) identifier_OAuth2Session (argument_list (keyword_argument (identifier_client_id) identifier_client_id (attribute (identifier_self) identifier_self (identifier_consumer_key) identifier_consumer_key )attribute )keyword_argument (keyword_argument (identifier_redirect_uri) identifier_redirect_uri (identifier_callback_url) identifier_callback_url )keyword_argument (keyword_argument (identifier_scope) identifier_scope (attribute (identifier_self) identifier_self (identifier_scope) identifier_scope )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_authorization_url) identifier_authorization_url (identifier_state) identifier_state )pattern_list (call (attribute (identifier_oauth) identifier_oauth (identifier_authorization_url) identifier_authorization_url )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_AUTH_URL) identifier_AUTH_URL )attribute )argument_list )call )assignment )expression_statement (return_statement (identifier_authorization_url) identifier_authorization_url )return_statement )block )else_clause )if_statement )block )function_definition )module
request the token to the external service
(module (function_definition (function_name_fw_update) function_name_fw_update (parameters (identifier_self) identifier_self (identifier_data) identifier_data (default_parameter (identifier_fw_name) identifier_fw_name (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_"FW Update %s") string_"FW Update %s" (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__fw_update) identifier__fw_update )attribute (argument_list (identifier_fw_name) identifier_fw_name (identifier_data) identifier_data )argument_list )call )expression_statement )block )function_definition )module
Top level FW update function.
(module (function_definition (function_name_bind) function_name_bind (parameters (identifier_self) identifier_self (identifier_sock) identifier_sock )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (call (attribute (identifier_self) identifier_self (identifier_get_context) identifier_get_context )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier_SSLConnection) identifier_SSLConnection (argument_list (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (identifier_sock) identifier_sock )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__environ) identifier__environ )attribute (call (attribute (identifier_self) identifier_self (identifier_get_environ) identifier_get_environ )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_conn) identifier_conn )return_statement )block )function_definition )module
Wrap and return the given socket.
(module (function_definition (function_name_lock) function_name_lock (parameters (identifier_self) identifier_self (default_parameter (identifier_lease_time) identifier_lease_time (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__encode_invoke) identifier__encode_invoke )attribute (argument_list (identifier_lock_lock_codec) identifier_lock_lock_codec (keyword_argument (identifier_invocation_timeout) identifier_invocation_timeout (identifier_MAX_SIZE) identifier_MAX_SIZE )keyword_argument (keyword_argument (identifier_lease_time) identifier_lease_time (call (identifier_to_millis) identifier_to_millis (argument_list (identifier_lease_time) identifier_lease_time )argument_list )call )keyword_argument (keyword_argument (identifier_thread_id) identifier_thread_id (call (identifier_thread_id) identifier_thread_id (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_reference_id) identifier_reference_id (call (attribute (attribute (identifier_self) identifier_self (identifier_reference_id_generator) identifier_reference_id_generator )attribute (identifier_get_and_increment) identifier_get_and_increment )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Acquires the lock. If a lease time is specified, lock will be released after this lease time. If the lock is not available, the current thread becomes disabled for thread scheduling purposes and lies dormant until the lock has been acquired. :param lease_time: (long), time to wait before releasing the lock (optional).
(module (function_definition (function_name_matchSubset) function_name_matchSubset (parameters (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (for_statement (identifier_m) identifier_m (attribute (identifier_self) identifier_self (identifier_matches) identifier_matches )attribute (block (expression_statement (assignment (identifier_allMatched) identifier_allMatched (True) True )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call (block (expression_statement (assignment (identifier_mVal) identifier_mVal (call (identifier_getattr) identifier_getattr (argument_list (identifier_m) identifier_m (identifier_k) identifier_k )argument_list )call )assignment )expression_statement (try_statement (block (if_statement (boolean_operator (comparison_operator (identifier_v) identifier_v (identifier_mVal) identifier_mVal )comparison_operator (comparison_operator (identifier_v) identifier_v (identifier_mVal) identifier_mVal )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement )block (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_allMatched) identifier_allMatched (False) False )assignment )expression_statement (break_statement )break_statement )block )for_statement (if_statement (identifier_allMatched) identifier_allMatched (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (identifier_m) identifier_m )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
extract matches from player's entire match history given matching criteria kwargs
(module (function_definition (function_name_get_environment) function_name_get_environment (parameters (default_parameter (identifier_default) identifier_default (identifier_DEVELOPMENT) identifier_DEVELOPMENT )default_parameter (default_parameter (identifier_detectors) identifier_detectors (None) None )default_parameter (default_parameter (identifier_detectors_opts) identifier_detectors_opts (None) None )default_parameter (default_parameter (identifier_use_envfiles) identifier_use_envfiles (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_detectors_opts) identifier_detectors_opts (boolean_operator (identifier_detectors_opts) identifier_detectors_opts (dictionary )dictionary )boolean_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_detectors) identifier_detectors (None) None )comparison_operator (block (expression_statement (assignment (identifier_detectors) identifier_detectors (call (attribute (identifier_DETECTORS) identifier_DETECTORS (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_env) identifier_env (None) None )assignment )expression_statement (for_statement (identifier_detector) identifier_detector (identifier_detectors) identifier_detectors (block (expression_statement (assignment (identifier_opts) identifier_opts (call (attribute (identifier_detectors_opts) identifier_detectors_opts (identifier_get) identifier_get )attribute (argument_list (identifier_detector) identifier_detector (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_detector) identifier_detector (call (identifier_get_detector) identifier_get_detector (argument_list (identifier_detector) identifier_detector )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_detector) identifier_detector (call (identifier_detector) identifier_detector (argument_list (dictionary_splat (identifier_opts) identifier_opts )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_env_name) identifier_env_name (call (attribute (identifier_detector) identifier_detector (identifier_probe) identifier_probe )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_env_name) identifier_env_name (block (expression_statement (assignment (identifier_env) identifier_env (call (identifier_get_type) identifier_get_type (argument_list (identifier_env_name) identifier_env_name )argument_list )call )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (boolean_operator (comparison_operator (identifier_env) identifier_env (None) None )comparison_operator (comparison_operator (identifier_default) identifier_default (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_env) identifier_env (call (identifier_get_type) identifier_get_type (argument_list (identifier_default) identifier_default )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_env) identifier_env (None) None )comparison_operator (block (expression_statement (assignment (identifier_env) identifier_env (call (identifier_env) identifier_env (argument_list )argument_list )call )assignment )expression_statement (expression_statement (boolean_operator (identifier_use_envfiles) identifier_use_envfiles (call (attribute (identifier_env) identifier_env (identifier_update_from_envfiles) identifier_update_from_envfiles )attribute (argument_list )argument_list )call )boolean_operator )expression_statement )block )if_statement (return_statement (identifier_env) identifier_env )return_statement )block )function_definition )module
Returns current environment type object. :param str|Environment|None default: Default environment type or alias. :param list[Detector] detectors: List of environment detectors to be used in chain. If not set, default builtin chain is used. :param dict detectors_opts: Detectors options dictionary. Where keys are detector names and values are keyword arguments dicts. :param bool use_envfiles: Whether to set environment variables (if not already set) using data from .env files. :rtype: Environment|None
(module (function_definition (function_name__file_name) function_name__file_name (parameters (identifier_fname) identifier_fname (identifier_base_dir) identifier_base_dir )parameters (block (expression_statement (assignment (identifier_fname) identifier_fname (call (attribute (identifier_fname) identifier_fname (identifier_replace) identifier_replace )attribute (argument_list (string_"\\") string_"\\" (string_"\\\\") string_"\\\\" )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (comparison_operator (identifier_base_dir) identifier_base_dir (string_'') string_'' )comparison_operator (comparison_operator (subscript (identifier_fname) identifier_fname (integer_0) integer_0 )subscript (string_':') string_':' )comparison_operator )boolean_operator (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isabs) identifier_isabs )attribute (argument_list (identifier_fname) identifier_fname )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (identifier_fname) identifier_fname (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_base_dir) identifier_base_dir (identifier_fname) identifier_fname )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_fname) identifier_fname )return_statement )block )function_definition )module
Convert a relative filename if we have a base directory.
(module (function_definition (function_name_check_variable_features) function_name_check_variable_features (parameters (identifier_self) identifier_self (identifier_ds) identifier_ds )parameters (block (expression_statement (assignment (identifier_ret_val) identifier_ret_val (list )list )assignment )expression_statement (expression_statement (assignment (identifier_feature_list) identifier_feature_list (list (string_'point') string_'point' (string_'timeSeries') string_'timeSeries' (string_'trajectory') string_'trajectory' (string_'profile') string_'profile' (string_'timeSeriesProfile') string_'timeSeriesProfile' (string_'trajectoryProfile') string_'trajectoryProfile' )list )assignment )expression_statement (expression_statement (assignment (identifier_feature_type) identifier_feature_type (call (identifier_getattr) identifier_getattr (argument_list (identifier_ds) identifier_ds (string_'featureType') string_'featureType' (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_feature_type) identifier_feature_type (identifier_feature_list) identifier_feature_list )comparison_operator (block (return_statement (list )list )return_statement )block )if_statement (expression_statement (assignment (identifier_feature_type_map) identifier_feature_type_map (dictionary (pair (string_'point') string_'point' (list (string_'point') string_'point' )list )pair (pair (string_'timeSeries') string_'timeSeries' (list (string_'timeseries') string_'timeseries' (string_'multi-timeseries-orthogonal') string_'multi-timeseries-orthogonal' (string_'multi-timeseries-incomplete') string_'multi-timeseries-incomplete' )list )pair (pair (string_'trajectory') string_'trajectory' (list (string_'cf-trajectory') string_'cf-trajectory' (string_'single-trajectory') string_'single-trajectory' )list )pair (pair (string_'profile') string_'profile' (list (string_'profile-orthogonal') string_'profile-orthogonal' (string_'profile-incomplete') string_'profile-incomplete' )list )pair (pair (string_'timeSeriesProfile') string_'timeSeriesProfile' (list (string_'timeseries-profile-single-station') string_'timeseries-profile-single-station' (string_'timeseries-profile-multi-station') string_'timeseries-profile-multi-station' (string_'timeseries-profile-single-ortho-time') string_'timeseries-profile-single-ortho-time' (string_'timeseries-profile-multi-ortho-time') string_'timeseries-profile-multi-ortho-time' (string_'timeseries-profile-ortho-depth') string_'timeseries-profile-ortho-depth' (string_'timeseries-profile-incomplete') string_'timeseries-profile-incomplete' )list )pair (pair (string_'trajectoryProfile') string_'trajectoryProfile' (list (string_'trajectory-profile-orthogonal') string_'trajectory-profile-orthogonal' (string_'trajectory-profile-incomplete') string_'trajectory-profile-incomplete' )list )pair )dictionary )assignment )expression_statement (for_statement (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier__find_geophysical_vars) identifier__find_geophysical_vars )attribute (argument_list (identifier_ds) identifier_ds )argument_list )call (block (expression_statement (assignment (identifier_variable_feature) identifier_variable_feature (call (attribute (identifier_cfutil) identifier_cfutil (identifier_guess_feature_type) identifier_guess_feature_type )attribute (argument_list (identifier_ds) identifier_ds (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_variable_feature) identifier_variable_feature (None) None )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_matching_feature) identifier_matching_feature (call (identifier_TestCtx) identifier_TestCtx (argument_list (attribute (identifier_BaseCheck) identifier_BaseCheck (identifier_MEDIUM) identifier_MEDIUM )attribute (subscript (attribute (identifier_self) identifier_self (identifier_section_titles) identifier_section_titles )attribute (string_'9.1') string_'9.1' )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_matching_feature) identifier_matching_feature (identifier_assert_true) identifier_assert_true )attribute (argument_list (comparison_operator (identifier_variable_feature) identifier_variable_feature (subscript (identifier_feature_type_map) identifier_feature_type_map (identifier_feature_type) identifier_feature_type )subscript )comparison_operator (call (attribute (concatenated_string (string_'{} is not a {}, it is detected as a {}') string_'{} is not a {}, it is detected as a {}' (string_'') string_'' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name (identifier_feature_type) identifier_feature_type (identifier_variable_feature) identifier_variable_feature )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ret_val) identifier_ret_val (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_matching_feature) identifier_matching_feature (identifier_to_result) identifier_to_result )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_ret_val) identifier_ret_val )return_statement )block )function_definition )module
Checks the variable feature types match the dataset featureType attribute :param netCDF4.Dataset ds: An open netCDF dataset :rtype: list :return: List of results
(module (function_definition (function_name_pypi_link) function_name_pypi_link (parameters (identifier_pkg_filename) identifier_pkg_filename )parameters (block (expression_statement (assignment (identifier_root) identifier_root (string_'https://files.pythonhosted.org/packages/source') string_'https://files.pythonhosted.org/packages/source' )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_name) identifier_name (identifier_sep) identifier_sep (identifier_rest) identifier_rest )pattern_list (call (attribute (identifier_pkg_filename) identifier_pkg_filename (identifier_partition) identifier_partition )attribute (argument_list (string_'-') string_'-' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parts) identifier_parts (expression_list (identifier_root) identifier_root (subscript (identifier_name) identifier_name (integer_0) integer_0 )subscript (identifier_name) identifier_name (identifier_pkg_filename) identifier_pkg_filename )expression_list )assignment )expression_statement (return_statement (call (attribute (string_'/') string_'/' (identifier_join) identifier_join )attribute (argument_list (identifier_parts) identifier_parts )argument_list )call )return_statement )block )function_definition )module
Given the filename, including md5 fragment, construct the dependency link for PyPI.
(module (function_definition (function_name_show_active_only) function_name_show_active_only (parameters (identifier_self) identifier_self (identifier_state) identifier_state )parameters (block (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_self) identifier_self (identifier__copy) identifier__copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_query) identifier_query (identifier_active_only) identifier_active_only )attribute (identifier_state) identifier_state )assignment )expression_statement (return_statement (identifier_query) identifier_query )return_statement )block )function_definition )module
Set active only to true or false on a copy of this query
(module (function_definition (function_name_id_unique) function_name_id_unique (parameters (identifier_dict_id) identifier_dict_id (identifier_name) identifier_name (identifier_lineno) identifier_lineno )parameters (block (if_statement (comparison_operator (identifier_dict_id) identifier_dict_id (identifier_name_dict) identifier_name_dict )comparison_operator (block (global_statement (identifier_error_occurred) identifier_error_occurred )global_statement (expression_statement (assignment (identifier_error_occurred) identifier_error_occurred (True) True )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"ERROR - {0:s} definition {1:s} at line {2:d} conflicts with {3:s}") string_"ERROR - {0:s} definition {1:s} at line {2:d} conflicts with {3:s}" (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name (identifier_dict_id) identifier_dict_id (identifier_lineno) identifier_lineno (subscript (identifier_name_dict) identifier_name_dict (identifier_dict_id) identifier_dict_id )subscript )argument_list )call )argument_list )call )expression_statement (return_statement (False) False )return_statement )block (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns True if dict_id not already used. Otherwise, invokes error
(module (function_definition (function_name_find_by_title) function_name_find_by_title (parameters (identifier_self) identifier_self (identifier_title) identifier_title )parameters (block (for_statement (identifier_entry) identifier_entry (attribute (identifier_self) identifier_self (identifier_entries) identifier_entries )attribute (block (if_statement (comparison_operator (attribute (identifier_entry) identifier_entry (identifier_title) identifier_title )attribute (identifier_title) identifier_title )comparison_operator (block (return_statement (identifier_entry) identifier_entry )return_statement )block )if_statement )block )for_statement (raise_statement (call (identifier_EntryNotFoundError) identifier_EntryNotFoundError (argument_list (binary_operator (string_"Entry not found for title: %s") string_"Entry not found for title: %s" (identifier_title) identifier_title )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Find an entry by exact title. :raise: EntryNotFoundError
(module (function_definition (function_name_join_dicts) function_name_join_dicts (parameters (identifier_dicts) identifier_dicts (default_parameter (identifier_delimiter) identifier_delimiter (None) None )default_parameter (default_parameter (identifier_keep_all) identifier_keep_all (False) False )default_parameter )parameters (block (if_statement (not_operator (identifier_dicts) identifier_dicts )not_operator (block (return_statement (dictionary )dictionary )return_statement )block )if_statement (if_statement (identifier_keep_all) identifier_keep_all (block (expression_statement (assignment (identifier_all_keys) identifier_all_keys (call (identifier_set) identifier_set (argument_list (call (identifier_chain) identifier_chain (argument_list (list_splat (generator_expression (call (attribute (identifier_d) identifier_d (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (for_in_clause (identifier_d) identifier_d (identifier_dicts) identifier_dicts )for_in_clause )generator_expression )list_splat )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_all_keys) identifier_all_keys (call (identifier_set) identifier_set (argument_list (subscript (identifier_dicts) identifier_dicts (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (for_statement (identifier_d) identifier_d (subscript (identifier_dicts) identifier_dicts (slice (integer_1) integer_1 (colon) colon )slice )subscript (block (expression_statement (call (attribute (identifier_all_keys) identifier_all_keys (identifier_intersection_update) identifier_intersection_update )attribute (argument_list (identifier_d) identifier_d )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_all_keys) identifier_all_keys (block (expression_statement (assignment (identifier_vals) identifier_vals (binary_operator (set_comprehension (call (identifier_hashable) identifier_hashable (argument_list (call (attribute (identifier_d) identifier_d (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (None) None )argument_list )call )argument_list )call (for_in_clause (identifier_d) identifier_d (identifier_dicts) identifier_dicts )for_in_clause )set_comprehension (set (None) None )set )binary_operator )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_vals) identifier_vals )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_key) identifier_key )subscript (call (identifier_next) identifier_next (argument_list (call (identifier_iter) identifier_iter (argument_list (identifier_vals) identifier_vals )argument_list )call )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_delimiter) identifier_delimiter (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_key) identifier_key )subscript (identifier_vals) identifier_vals )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_key) identifier_key )subscript (call (attribute (identifier_delimiter) identifier_delimiter (identifier_join) identifier_join )attribute (argument_list (call (identifier_map) identifier_map (argument_list (identifier_str) identifier_str (identifier_vals) identifier_vals )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Join multiple dictionaries into one Parameters ---------- dicts: list of dict A list of dictionaries delimiter: str The string that shall be used as the delimiter in case that there are multiple values for one attribute in the arrays. If None, they will be returned as sets keep_all: bool If True, all formatoptions are kept. Otherwise only the intersection Returns ------- dict The combined dictionary
(module (function_definition (function_name_solve_sparse) function_name_solve_sparse (parameters (identifier_self) identifier_self (identifier_B) identifier_B )parameters (block (expression_statement (assignment (identifier_B) identifier_B (call (attribute (identifier_B) identifier_B (identifier_tocsc) identifier_tocsc )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cols) identifier_cols (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_j) identifier_j (call (identifier_xrange) identifier_xrange (argument_list (subscript (attribute (identifier_B) identifier_B (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript )argument_list )call (block (expression_statement (assignment (identifier_col) identifier_col (call (attribute (identifier_self) identifier_self (identifier_solve) identifier_solve )attribute (argument_list (subscript (identifier_B) identifier_B (slice (colon) colon )slice (identifier_j) identifier_j )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cols) identifier_cols (identifier_append) identifier_append )attribute (argument_list (call (identifier_csc_matrix) identifier_csc_matrix (argument_list (identifier_col) identifier_col )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_hstack) identifier_hstack (argument_list (identifier_cols) identifier_cols )argument_list )call )return_statement )block )function_definition )module
Solve linear equation of the form A X = B. Where B and X are sparse matrices. Parameters ---------- B : any scipy.sparse matrix Right-hand side of the matrix equation. Note: it will be converted to csc_matrix via `.tocsc()`. Returns ------- X : csc_matrix Solution to the matrix equation as a csc_matrix
(module (function_definition (function_name_clear_deadline) function_name_clear_deadline (parameters (identifier_self) identifier_self )parameters (block (if_statement (parenthesized_expression (boolean_operator (call (attribute (call (attribute (identifier_self) identifier_self (identifier_get_deadline_metadata) identifier_get_deadline_metadata )attribute (argument_list )argument_list )call (identifier_is_read_only) identifier_is_read_only )attribute (argument_list )argument_list )call (call (attribute (call (attribute (identifier_self) identifier_self (identifier_get_deadline_metadata) identifier_get_deadline_metadata )attribute (argument_list )argument_list )call (identifier_is_required) identifier_is_required )attribute (argument_list )argument_list )call )boolean_operator )parenthesized_expression (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_NoAccess) identifier_NoAccess )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__my_map) identifier__my_map )attribute (string_'deadline') string_'deadline' )subscript (attribute (identifier_self) identifier_self (identifier__deadline_default) identifier__deadline_default )attribute )assignment )expression_statement )block )function_definition )module
Clears the deadline. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_add_association_to_graph) function_name_add_association_to_graph (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_Assoc) identifier_Assoc (identifier_add_association_to_graph) identifier_add_association_to_graph )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_onset) identifier_onset )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_onset) identifier_onset )attribute (string_'') string_'' )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_graph) identifier_graph )attribute (identifier_addTriple) identifier_addTriple )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_assoc_id) identifier_assoc_id )attribute (subscript (attribute (identifier_self) identifier_self (identifier_globaltt) identifier_globaltt )attribute (string_'onset') string_'onset' )subscript (attribute (identifier_self) identifier_self (identifier_onset) identifier_onset )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_frequency) identifier_frequency )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_frequency) identifier_frequency )attribute (string_'') string_'' )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_graph) identifier_graph )attribute (identifier_addTriple) identifier_addTriple )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_assoc_id) identifier_assoc_id )attribute (subscript (attribute (identifier_self) identifier_self (identifier_globaltt) identifier_globaltt )attribute (string_'frequency') string_'frequency' )subscript (attribute (identifier_self) identifier_self (identifier_frequency) identifier_frequency )attribute )argument_list )call )expression_statement )block )if_statement (return_statement )return_statement )block )function_definition )module
The reified relationship between a disease and a phenotype is decorated with some provenance information. This makes the assumption that both the disease and phenotype are classes. :param g: :return:
(module (function_definition (function_name_combine_elem) function_name_combine_elem (parameters (identifier_ind1) identifier_ind1 (identifier_ind2) identifier_ind2 )parameters (block (function_definition (function_name_inner) function_name_inner (parameters (identifier_seq) identifier_seq )parameters (block (expression_statement (assignment (identifier_shift) identifier_shift (binary_operator (integer_2) integer_2 (integer_16) integer_16 )binary_operator )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_seq) identifier_seq (identifier_ind1) identifier_ind1 )subscript (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (subscript (identifier_seq) identifier_seq (identifier_ind1) identifier_ind1 )subscript (identifier_shift) identifier_shift )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_seq) identifier_seq (identifier_ind2) identifier_ind2 )subscript (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (subscript (identifier_seq) identifier_seq (identifier_ind2) identifier_ind2 )subscript (identifier_shift) identifier_shift )augmented_assignment )expression_statement )block )if_statement (return_statement (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_seq) identifier_seq (identifier_ind1) identifier_ind1 )subscript (integer_16) integer_16 )binary_operator )parenthesized_expression (subscript (identifier_seq) identifier_seq (identifier_ind2) identifier_ind2 )subscript )binary_operator )return_statement )block )function_definition (return_statement (identifier_inner) identifier_inner )return_statement )block )function_definition )module
Create a function to combine two specified product-specific blocks into a single int.
(module (function_definition (function_name_soundexCode) function_name_soundexCode (parameters (identifier_self) identifier_self (identifier_char) identifier_char )parameters (block (expression_statement (assignment (identifier_lang) identifier_lang (call (identifier_get_language) identifier_get_language (argument_list (identifier_char) identifier_char )argument_list )call )assignment )expression_statement (try_statement (block (if_statement (comparison_operator (identifier_lang) identifier_lang (string_"en_US") string_"en_US" )comparison_operator (block (return_statement (subscript (subscript (identifier__soundex_map) identifier__soundex_map (string_"soundex_en") string_"soundex_en" )subscript (call (attribute (subscript (identifier_charmap) identifier_charmap (identifier_lang) identifier_lang )subscript (identifier_index) identifier_index )attribute (argument_list (identifier_char) identifier_char )argument_list )call )subscript )return_statement )block (else_clause (block (return_statement (subscript (subscript (identifier__soundex_map) identifier__soundex_map (string_"soundex") string_"soundex" )subscript (call (attribute (subscript (identifier_charmap) identifier_charmap (identifier_lang) identifier_lang )subscript (identifier_index) identifier_index )attribute (argument_list (identifier_char) identifier_char )argument_list )call )subscript )return_statement )block )else_clause )if_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (integer_0) integer_0 )return_statement )block )function_definition )module
Return the soundex code for given character :param char: Character whose soundex code is needed :return: Returns soundex code if character is found in charmap else returns 0
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_url) identifier_url )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Making DELETE request to %s') string_'Making DELETE request to %s' (identifier_url) identifier_url )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_oauth_session) identifier_oauth_session )attribute (identifier_delete) identifier_delete )attribute (argument_list (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
Make a HTTP DELETE request to the Readability API. :param url: The url to which to send a DELETE request.
(module (function_definition (function_name_mutagen_call) function_name_mutagen_call (parameters (identifier_action) identifier_action (identifier_path) identifier_path (identifier_func) identifier_func (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (return_statement (call (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (except_clause (as_pattern (attribute (identifier_mutagen) identifier_mutagen (identifier_MutagenError) identifier_MutagenError )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_u'%s failed: %s') string_u'%s failed: %s' (identifier_action) identifier_action (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_exc) identifier_exc )argument_list )call )argument_list )call )expression_statement (raise_statement (call (identifier_UnreadableFileError) identifier_UnreadableFileError (argument_list (identifier_path) identifier_path (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_exc) identifier_exc )argument_list )call )argument_list )call )raise_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_u'%s') string_u'%s' (call (attribute (identifier_traceback) identifier_traceback (identifier_format_exc) identifier_format_exc )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_u'uncaught Mutagen exception in %s: %s') string_u'uncaught Mutagen exception in %s: %s' (identifier_action) identifier_action (identifier_exc) identifier_exc )argument_list )call )expression_statement (raise_statement (call (identifier_MutagenError) identifier_MutagenError (argument_list (identifier_path) identifier_path (identifier_exc) identifier_exc )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Call a Mutagen function with appropriate error handling. `action` is a string describing what the function is trying to do, and `path` is the relevant filename. The rest of the arguments describe the callable to invoke. We require at least Mutagen 1.33, where `IOError` is *never* used, neither for internal parsing errors *nor* for ordinary IO error conditions such as a bad filename. Mutagen-specific parsing errors and IO errors are reraised as `UnreadableFileError`. Other exceptions raised inside Mutagen---i.e., bugs---are reraised as `MutagenError`.
(module (function_definition (function_name_get_ccle_cna) function_name_get_ccle_cna (parameters (identifier_gene_list) identifier_gene_list (identifier_cell_lines) identifier_cell_lines )parameters (block (expression_statement (assignment (identifier_profile_data) identifier_profile_data (call (identifier_get_profile_data) identifier_get_profile_data (argument_list (identifier_ccle_study) identifier_ccle_study (identifier_gene_list) identifier_gene_list (string_'COPY_NUMBER_ALTERATION') string_'COPY_NUMBER_ALTERATION' (string_'all') string_'all' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_profile_data) identifier_profile_data (call (identifier_dict) identifier_dict (generator_expression (tuple (identifier_key) identifier_key (identifier_value) identifier_value )tuple (for_in_clause (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_profile_data) identifier_profile_data (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_key) identifier_key (identifier_cell_lines) identifier_cell_lines )comparison_operator )if_clause )generator_expression )call )assignment )expression_statement (return_statement (identifier_profile_data) identifier_profile_data )return_statement )block )function_definition )module
Return a dict of CNAs in given genes and cell lines from CCLE. CNA values correspond to the following alterations -2 = homozygous deletion -1 = hemizygous deletion 0 = neutral / no change 1 = gain 2 = high level amplification Parameters ---------- gene_list : list[str] A list of HGNC gene symbols to get mutations in cell_lines : list[str] A list of CCLE cell line names to get mutations for. Returns ------- profile_data : dict[dict[int]] A dict keyed to cases containing a dict keyed to genes containing int
(module (function_definition (function_name_html) function_name_html (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_description) identifier_description )attribute (block (expression_statement (assignment (identifier_tooltip) identifier_tooltip (call (attribute (string_'tooltip="{}"') string_'tooltip="{}"' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_description) identifier_description )attribute )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_tooltip) identifier_tooltip (string_'') string_'' )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_entry_html) identifier_entry_html (argument_list (keyword_argument (identifier_title) identifier_title (attribute (identifier_self) identifier_self (identifier_title) identifier_title )attribute )keyword_argument (keyword_argument (identifier_thumbnail) identifier_thumbnail (attribute (identifier_self) identifier_self (identifier_thumbnail) identifier_thumbnail )attribute )keyword_argument (keyword_argument (identifier_link) identifier_link (attribute (identifier_self) identifier_self (identifier_html_link) identifier_html_link )attribute )keyword_argument (keyword_argument (identifier_tooltip) identifier_tooltip (identifier_tooltip) identifier_tooltip )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return html for a the entry
(module (function_definition (function_name_get_upstream) function_name_get_upstream (parameters (identifier_self) identifier_self (identifier_type_) identifier_type_ )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_self) identifier_self (identifier_type_) identifier_type_ )argument_list )call (block (return_statement (identifier_self) identifier_self )return_statement )block (elif_clause (boolean_operator (attribute (identifier_self) identifier_self (identifier_upstream) identifier_upstream )attribute (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_upstream) identifier_upstream )attribute (identifier_type_) identifier_type_ )argument_list )call )boolean_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_upstream) identifier_upstream )attribute )return_statement )block )elif_clause (elif_clause (attribute (identifier_self) identifier_self (identifier_upstream) identifier_upstream )attribute (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_upstream) identifier_upstream )attribute (identifier_get_upstream) identifier_get_upstream )attribute (argument_list (identifier_type_) identifier_type_ )argument_list )call )return_statement )block )elif_clause (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Return self, or an upstream, that has the given class type. This is typically used to find upstream s that impoement the RemoteInterface
(module (function_definition (function_name_date_decoder) function_name_date_decoder (parameters (identifier_dic) identifier_dic )parameters (block (if_statement (comparison_operator (string_'__date__') string_'__date__' (identifier_dic) identifier_dic )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_datetime) identifier_datetime (identifier_date) identifier_date )attribute (argument_list (dictionary_splat (dictionary_comprehension (pair (identifier_c) identifier_c (identifier_v) identifier_v )pair (for_in_clause (pattern_list (identifier_c) identifier_c (identifier_v) identifier_v )pattern_list (call (attribute (identifier_dic) identifier_dic (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (not_operator (comparison_operator (identifier_c) identifier_c (string_"__date__") string_"__date__" )comparison_operator )not_operator )if_clause )dictionary_comprehension )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_TypeError) identifier_TypeError (identifier_ValueError) identifier_ValueError )tuple (block (raise_statement (call (attribute (identifier_json) identifier_json (identifier_JSONDecodeError) identifier_JSONDecodeError )attribute (argument_list (string_"Corrupted date format !") string_"Corrupted date format !" (call (identifier_str) identifier_str (argument_list (identifier_dic) identifier_dic )argument_list )call (integer_1) integer_1 )argument_list )call )raise_statement )block )except_clause )try_statement )block (elif_clause (comparison_operator (string_'__datetime__') string_'__datetime__' (identifier_dic) identifier_dic )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (argument_list (dictionary_splat (dictionary_comprehension (pair (identifier_c) identifier_c (identifier_v) identifier_v )pair (for_in_clause (pattern_list (identifier_c) identifier_c (identifier_v) identifier_v )pattern_list (call (attribute (identifier_dic) identifier_dic (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (not_operator (comparison_operator (identifier_c) identifier_c (string_"__datetime__") string_"__datetime__" )comparison_operator )not_operator )if_clause )dictionary_comprehension )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_TypeError) identifier_TypeError (identifier_ValueError) identifier_ValueError )tuple (block (raise_statement (call (attribute (identifier_json) identifier_json (identifier_JSONDecodeError) identifier_JSONDecodeError )attribute (argument_list (string_"Corrupted datetime format !") string_"Corrupted datetime format !" (call (identifier_str) identifier_str (argument_list (identifier_dic) identifier_dic )argument_list )call (integer_1) integer_1 )argument_list )call )raise_statement )block )except_clause )try_statement )block )elif_clause (else_clause (block (return_statement (identifier_dic) identifier_dic )return_statement )block )else_clause )if_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Add python types decoding. See JsonEncoder
(module (function_definition (function_name_unit) function_name_unit (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_unit) identifier_unit (call (identifier_ncVarUnit) identifier_ncVarUnit (argument_list (attribute (identifier_self) identifier_self (identifier__ncVar) identifier__ncVar )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fieldNames) identifier_fieldNames (attribute (attribute (attribute (identifier_self) identifier_self (identifier__ncVar) identifier__ncVar )attribute (identifier_dtype) identifier_dtype )attribute (identifier_names) identifier_names )attribute )assignment )expression_statement (if_statement (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_unit) identifier_unit (string_'__len__') string_'__len__' )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_unit) identifier_unit )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_fieldNames) identifier_fieldNames )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_idx) identifier_idx (call (attribute (identifier_fieldNames) identifier_fieldNames (identifier_index) identifier_index )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_nodeName) identifier_nodeName )attribute )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_unit) identifier_unit (identifier_idx) identifier_idx )subscript )return_statement )block (else_clause (block (return_statement (identifier_unit) identifier_unit )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the unit attribute of the underlying ncdf variable. If the units has a length (e.g is a list) and has precisely one element per field, the unit for this field is returned.
(module (function_definition (function_name_extract_journal_reference) function_name_extract_journal_reference (parameters (identifier_line) identifier_line (default_parameter (identifier_override_kbs_files) identifier_override_kbs_files (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_kbs) identifier_kbs (call (identifier_get_kbs) identifier_get_kbs (argument_list (keyword_argument (identifier_custom_kbs_files) identifier_custom_kbs_files (identifier_override_kbs_files) identifier_override_kbs_files )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_references) identifier_references (identifier_dummy_m) identifier_dummy_m (identifier_dummy_c) identifier_dummy_c (identifier_dummy_co) identifier_dummy_co )pattern_list (call (identifier_parse_reference_line) identifier_parse_reference_line (argument_list (identifier_line) identifier_line (identifier_kbs) identifier_kbs )argument_list )call )assignment )expression_statement (for_statement (identifier_elements) identifier_elements (identifier_references) identifier_references (block (for_statement (identifier_el) identifier_el (identifier_elements) identifier_elements (block (if_statement (comparison_operator (subscript (identifier_el) identifier_el (string_'type') string_'type' )subscript (string_'JOURNAL') string_'JOURNAL' )comparison_operator (block (return_statement (identifier_el) identifier_el )return_statement )block )if_statement )block )for_statement )block )for_statement )block )function_definition )module
Extract the journal reference from string. Extracts the journal reference from string and parses for specific journal information.
(module (function_definition (function_name_get_prime) function_name_get_prime (parameters (identifier_bits) identifier_bits (default_parameter (identifier_k) identifier_k (integer_64) integer_64 )default_parameter )parameters (block (if_statement (boolean_operator (comparison_operator (binary_operator (identifier_bits) identifier_bits (integer_8) integer_8 )binary_operator (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_bits) identifier_bits (integer_0) integer_0 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"bits must be >= 0 and divisible by 8") string_"bits must be >= 0 and divisible by 8" )argument_list )call )raise_statement )block )if_statement (while_statement (True) True (block (expression_statement (assignment (identifier_n) identifier_n (call (attribute (identifier_int) identifier_int (identifier_from_bytes) identifier_from_bytes )attribute (argument_list (call (attribute (identifier_os) identifier_os (identifier_urandom) identifier_urandom )attribute (argument_list (binary_operator (identifier_bits) identifier_bits (integer_8) integer_8 )binary_operator )argument_list )call (string_"big") string_"big" )argument_list )call )assignment )expression_statement (if_statement (call (identifier_is_prime) identifier_is_prime (argument_list (identifier_n) identifier_n (identifier_k) identifier_k )argument_list )call (block (return_statement (identifier_n) identifier_n )return_statement )block )if_statement )block )while_statement )block )function_definition )module
Return a random prime up to a certain length. This function uses random.SystemRandom.
(module (function_definition (function_name_parse_response) function_name_parse_response (parameters (identifier_service) identifier_service (identifier_response) identifier_response (identifier_search_type) identifier_search_type )parameters (block (expression_statement (call (attribute (identifier__LOG) identifier__LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'Parse response "%s" from service "%s" of type "%s"') string_'Parse response "%s" from service "%s" of type "%s"' (identifier_response) identifier_response (identifier_service) identifier_service (identifier_search_type) identifier_search_type )argument_list )call )expression_statement (expression_statement (assignment (identifier_items) identifier_items (list )list )assignment )expression_statement (if_statement (comparison_operator (string_'searchResult') string_'searchResult' (identifier_response) identifier_response )comparison_operator (block (expression_statement (assignment (identifier_response) identifier_response (subscript (identifier_response) identifier_response (string_'searchResult') string_'searchResult' )subscript )assignment )expression_statement )block (elif_clause (comparison_operator (string_'getMetadataResult') string_'getMetadataResult' (identifier_response) identifier_response )comparison_operator (block (expression_statement (assignment (identifier_response) identifier_response (subscript (identifier_response) identifier_response (string_'getMetadataResult') string_'getMetadataResult' )subscript )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'"response" should contain either the key ') string_'"response" should contain either the key ' (string_'"searchResult" or "getMetadataResult"') string_'"searchResult" or "getMetadataResult"' )concatenated_string )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_search_metadata) identifier_search_metadata (dictionary (pair (string_'number_returned') string_'number_returned' (subscript (identifier_response) identifier_response (string_'count') string_'count' )subscript )pair (pair (string_'total_matches') string_'total_matches' (None) None )pair (pair (string_'search_type') string_'search_type' (identifier_search_type) identifier_search_type )pair (pair (string_'update_id') string_'update_id' (None) None )pair )dictionary )assignment )expression_statement (for_statement (identifier_result_type) identifier_result_type (tuple (string_'mediaCollection') string_'mediaCollection' (string_'mediaMetadata') string_'mediaMetadata' )tuple (block (expression_statement (assignment (identifier_result_type_proper) identifier_result_type_proper (binary_operator (call (attribute (subscript (identifier_result_type) identifier_result_type (integer_0) integer_0 )subscript (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call (subscript (identifier_result_type) identifier_result_type (slice (integer_1) integer_1 (colon) colon )slice )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_raw_items) identifier_raw_items (call (attribute (identifier_response) identifier_response (identifier_get) identifier_get )attribute (argument_list (identifier_result_type) identifier_result_type (list )list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_raw_items) identifier_raw_items (identifier_OrderedDict) identifier_OrderedDict )argument_list )call (block (expression_statement (assignment (identifier_raw_items) identifier_raw_items (list (identifier_raw_items) identifier_raw_items )list )assignment )expression_statement )block )if_statement (for_statement (identifier_raw_item) identifier_raw_item (identifier_raw_items) identifier_raw_items (block (expression_statement (assignment (identifier_class_key) identifier_class_key (binary_operator (identifier_result_type_proper) identifier_result_type_proper (call (attribute (subscript (identifier_raw_item) identifier_raw_item (string_'itemType') string_'itemType' )subscript (identifier_title) identifier_title )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_cls) identifier_cls (call (identifier_get_class) identifier_get_class (argument_list (identifier_class_key) identifier_class_key )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_items) identifier_items (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_cls) identifier_cls (identifier_from_music_service) identifier_from_music_service )attribute (argument_list (identifier_service) identifier_service (identifier_raw_item) identifier_raw_item )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (call (identifier_SearchResult) identifier_SearchResult (argument_list (identifier_items) identifier_items (dictionary_splat (identifier_search_metadata) identifier_search_metadata )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Parse the response to a music service query and return a SearchResult Args: service (MusicService): The music service that produced the response response (OrderedDict): The response from the soap client call search_type (str): A string that indicates the search type that the response is from Returns: SearchResult: A SearchResult object
(module (function_definition (function_name_poke) function_name_poke (parameters (identifier_self) identifier_self (identifier_session) identifier_session (identifier_address) identifier_address (identifier_width) identifier_width (identifier_data) identifier_data )parameters (block (if_statement (comparison_operator (identifier_width) identifier_width (integer_8) integer_8 )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_poke_8) identifier_poke_8 )attribute (argument_list (identifier_session) identifier_session (identifier_address) identifier_address (identifier_data) identifier_data )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_width) identifier_width (integer_16) integer_16 )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_poke_16) identifier_poke_16 )attribute (argument_list (identifier_session) identifier_session (identifier_address) identifier_address (identifier_data) identifier_data )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_width) identifier_width (integer_32) integer_32 )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_poke_32) identifier_poke_32 )attribute (argument_list (identifier_session) identifier_session (identifier_address) identifier_address (identifier_data) identifier_data )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_width) identifier_width (integer_64) integer_64 )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_poke_64) identifier_poke_64 )attribute (argument_list (identifier_session) identifier_session (identifier_address) identifier_address (identifier_data) identifier_data )argument_list )call )return_statement )block )elif_clause )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'%s is not a valid size. Valid values are 8, 16, 32, or 64') string_'%s is not a valid size. Valid values are 8, 16, 32, or 64' (identifier_width) identifier_width )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Writes an 8, 16, 32, or 64-bit value from the specified address. Corresponds to viPoke* functions of the VISA library. :param session: Unique logical identifier to a session. :param address: Source address to read the value. :param width: Number of bits to read. :param data: Data to be written to the bus. :return: return value of the library call. :rtype: :class:`pyvisa.constants.StatusCode`
(module (function_definition (function_name_close_window) function_name_close_window (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_undocked_window) identifier_undocked_window )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_undocked_window) identifier_undocked_window )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_undocked_window) identifier_undocked_window )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_undock_action) identifier_undock_action )attribute (identifier_setDisabled) identifier_setDisabled )attribute (argument_list (False) False )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_close_plugin_action) identifier_close_plugin_action )attribute (identifier_setDisabled) identifier_setDisabled )attribute (argument_list (False) False )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Close QMainWindow instance that contains this plugin.
(module (function_definition (function_name_linkify_s_by_module) function_name_linkify_s_by_module (parameters (identifier_self) identifier_self (identifier_modules) identifier_modules )parameters (block (for_statement (identifier_i) identifier_i (identifier_self) identifier_self (block (expression_statement (assignment (identifier_links_list) identifier_links_list (call (identifier_strip_and_uniq) identifier_strip_and_uniq (argument_list (attribute (identifier_i) identifier_i (identifier_modules) identifier_modules )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new) identifier_new (list )list )assignment )expression_statement (for_statement (identifier_name) identifier_name (list_comprehension (identifier_e) identifier_e (for_in_clause (identifier_e) identifier_e (identifier_links_list) identifier_links_list )for_in_clause (if_clause (identifier_e) identifier_e )if_clause )list_comprehension (block (expression_statement (assignment (identifier_module) identifier_module (call (attribute (identifier_modules) identifier_modules (identifier_find_by_name) identifier_find_by_name )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_module) identifier_module (None) None )comparison_operator (comparison_operator (attribute (identifier_module) identifier_module (identifier_uuid) identifier_uuid )attribute (identifier_new) identifier_new )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_new) identifier_new (identifier_append) identifier_append )attribute (argument_list (identifier_module) identifier_module )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_i) identifier_i (identifier_add_error) identifier_add_error )attribute (argument_list (binary_operator (string_"Error: the module %s is unknown for %s") string_"Error: the module %s is unknown for %s" (tuple (identifier_name) identifier_name (call (attribute (identifier_i) identifier_i (identifier_get_name) identifier_get_name )attribute (argument_list )argument_list )call )tuple )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_i) identifier_i (identifier_modules) identifier_modules )attribute (identifier_new) identifier_new )assignment )expression_statement )block )for_statement )block )function_definition )module
Link modules to items :param modules: Modules object (list of all the modules found in the configuration) :type modules: alignak.objects.module.Modules :return: None
(module (function_definition (function_name_remove_modifier) function_name_remove_modifier (parameters (identifier_self) identifier_self (identifier_index) identifier_index (default_parameter (identifier_m_type) identifier_m_type (attribute (identifier_XenaModifierType) identifier_XenaModifierType (identifier_standard) identifier_standard )attribute )default_parameter )parameters (block (if_statement (comparison_operator (identifier_m_type) identifier_m_type (attribute (identifier_XenaModifierType) identifier_XenaModifierType (identifier_standard) identifier_standard )attribute )comparison_operator (block (expression_statement (assignment (identifier_current_modifiers) identifier_current_modifiers (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (attribute (identifier_self) identifier_self (identifier_modifiers) identifier_modifiers )attribute )argument_list )call )assignment )expression_statement (delete_statement (subscript (identifier_current_modifiers) identifier_current_modifiers (identifier_index) identifier_index )subscript )delete_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_attributes) identifier_set_attributes )attribute (argument_list (keyword_argument (identifier_ps_modifiercount) identifier_ps_modifiercount (integer_0) integer_0 )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_del_objects_by_type) identifier_del_objects_by_type )attribute (argument_list (string_'modifier') string_'modifier' )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_current_modifiers) identifier_current_modifiers (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (attribute (identifier_self) identifier_self (identifier_xmodifiers) identifier_xmodifiers )attribute )argument_list )call )assignment )expression_statement (delete_statement (subscript (identifier_current_modifiers) identifier_current_modifiers (identifier_index) identifier_index )subscript )delete_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_attributes) identifier_set_attributes )attribute (argument_list (keyword_argument (identifier_ps_modifierextcount) identifier_ps_modifierextcount (integer_0) integer_0 )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_del_objects_by_type) identifier_del_objects_by_type )attribute (argument_list (string_'xmodifier') string_'xmodifier' )argument_list )call )expression_statement )block )else_clause )if_statement (for_statement (identifier_modifier) identifier_modifier (call (attribute (identifier_current_modifiers) identifier_current_modifiers (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_modifier) identifier_add_modifier )attribute (argument_list (identifier_m_type) identifier_m_type (keyword_argument (identifier_mask) identifier_mask (attribute (identifier_modifier) identifier_modifier (identifier_mask) identifier_mask )attribute )keyword_argument (keyword_argument (identifier_action) identifier_action (attribute (identifier_modifier) identifier_modifier (identifier_action) identifier_action )attribute )keyword_argument (keyword_argument (identifier_repeat) identifier_repeat (attribute (identifier_modifier) identifier_modifier (identifier_repeat) identifier_repeat )attribute )keyword_argument (keyword_argument (identifier_min_val) identifier_min_val (attribute (identifier_modifier) identifier_modifier (identifier_min_val) identifier_min_val )attribute )keyword_argument (keyword_argument (identifier_step) identifier_step (attribute (identifier_modifier) identifier_modifier (identifier_step) identifier_step )attribute )keyword_argument (keyword_argument (identifier_max_val) identifier_max_val (attribute (identifier_modifier) identifier_modifier (identifier_max_val) identifier_max_val )attribute )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Remove modifier. :param m_type: modifier type - standard or extended. :param index: index of modifier to remove.
(module (function_definition (function_name_create_CAG_with_indicators) function_name_create_CAG_with_indicators (parameters (identifier_input) identifier_input (identifier_output) identifier_output (default_parameter (identifier_filename) identifier_filename (string_"CAG_with_indicators.pdf") string_"CAG_with_indicators.pdf" )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_input) identifier_input (string_"rb") string_"rb" )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_G) identifier_G (call (attribute (identifier_pickle) identifier_pickle (identifier_load) identifier_load )attribute (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_map_concepts_to_indicators) identifier_map_concepts_to_indicators )attribute (argument_list (keyword_argument (identifier_min_temporal_res) identifier_min_temporal_res (string_"month") string_"month" )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_set_indicator) identifier_set_indicator )attribute (argument_list (string_"UN/events/weather/precipitation") string_"UN/events/weather/precipitation" (string_"Historical Average Total Daily Rainfall (Maize)") string_"Historical Average Total Daily Rainfall (Maize)" (string_"DSSAT") string_"DSSAT" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_set_indicator) identifier_set_indicator )attribute (argument_list (string_"UN/events/human/agriculture/food_production") string_"UN/events/human/agriculture/food_production" (string_"Historical Production (Maize)") string_"Historical Production (Maize)" (string_"DSSAT") string_"DSSAT" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_set_indicator) identifier_set_indicator )attribute (argument_list (string_"UN/entities/human/food/food_security") string_"UN/entities/human/food/food_security" (string_"IPC Phase Classification") string_"IPC Phase Classification" (string_"FEWSNET") string_"FEWSNET" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_set_indicator) identifier_set_indicator )attribute (argument_list (string_"UN/entities/food_availability") string_"UN/entities/food_availability" (string_"Production, Meat indigenous, total") string_"Production, Meat indigenous, total" (string_"FAO") string_"FAO" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_set_indicator) identifier_set_indicator )attribute (argument_list (string_"UN/entities/human/financial/economic/market") string_"UN/entities/human/financial/economic/market" (string_"Inflation Rate") string_"Inflation Rate" (string_"ieconomics.com") string_"ieconomics.com" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_set_indicator) identifier_set_indicator )attribute (argument_list (string_"UN/events/human/death") string_"UN/events/human/death" (string_"Battle-related deaths") string_"Battle-related deaths" (string_"WDI") string_"WDI" )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_output) identifier_output (string_"wb") string_"wb" )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_pickle) identifier_pickle (identifier_dump) identifier_dump )attribute (argument_list (identifier_G) identifier_G (identifier_f) identifier_f )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Create a CAG with mapped indicators
(module (function_definition (function_name_merge) function_name_merge (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_other) identifier_other (identifier_MetadataRb) identifier_MetadataRb )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (concatenated_string (string_"MetadataRb to merge should be a 'MetadataRb' ") string_"MetadataRb to merge should be a 'MetadataRb' " (string_"instance, not %s.") string_"instance, not %s." )concatenated_string (call (identifier_type) identifier_type (argument_list (identifier_other) identifier_other )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_self) identifier_self (identifier_to_dict) identifier_to_dict )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new) identifier_new (call (attribute (identifier_other) identifier_other (identifier_to_dict) identifier_to_dict )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_meta_writelines) identifier_meta_writelines (list_comprehension (binary_operator (string_'%s\n') string_'%s\n' (call (attribute (identifier_self) identifier_self (identifier_depends_statement) identifier_depends_statement )attribute (argument_list (identifier_cbn) identifier_cbn (identifier_meta) identifier_meta )argument_list )call )binary_operator (for_in_clause (pattern_list (identifier_cbn) identifier_cbn (identifier_meta) identifier_meta )pattern_list (call (attribute (call (attribute (identifier_new) identifier_new (identifier_get) identifier_get )attribute (argument_list (string_'depends') string_'depends' (dictionary )dictionary )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_cbn) identifier_cbn (call (attribute (identifier_current) identifier_current (identifier_get) identifier_get )attribute (argument_list (string_'depends') string_'depends' (dictionary )dictionary )argument_list )call )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_statements) identifier_write_statements )attribute (argument_list (identifier_meta_writelines) identifier_meta_writelines )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_to_dict) identifier_to_dict )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Add requirements from 'other' metadata.rb into this one.
(module (function_definition (function_name_destroy_label) function_name_destroy_label (parameters (identifier_self) identifier_self (identifier_label) identifier_label (default_parameter (identifier_callback) identifier_callback (identifier_dummy_progress_cb) identifier_dummy_progress_cb )default_parameter )parameters (block (expression_statement (assignment (identifier_current) identifier_current (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_total) identifier_total (call (attribute (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (identifier_get_nb_docs) identifier_get_nb_docs )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (identifier_start_destroy_label) identifier_start_destroy_label )attribute (argument_list (identifier_label) identifier_label )argument_list )call )expression_statement (while_statement (True) True (block (expression_statement (assignment (tuple_pattern (identifier_op) identifier_op (identifier_doc) identifier_doc )tuple_pattern (call (attribute (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (identifier_continue_destroy_label) identifier_continue_destroy_label )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_op) identifier_op (string_'end') string_'end' )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (call (identifier_callback) identifier_callback (argument_list (identifier_current) identifier_current (identifier_total) identifier_total (attribute (identifier_self) identifier_self (identifier_LABEL_STEP_DESTROYING) identifier_LABEL_STEP_DESTROYING )attribute (identifier_doc) identifier_doc )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_current) identifier_current (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (identifier_end_destroy_label) identifier_end_destroy_label )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Remove the label 'label' from all the documents. Takes care of updating the index.
(module (function_definition (function_name_type_inherits_of_type) function_name_type_inherits_of_type (parameters (identifier_inheriting_type) identifier_inheriting_type (identifier_base_type) identifier_base_type )parameters (block (assert_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_inheriting_type) identifier_inheriting_type (identifier_type) identifier_type )argument_list )call (call (identifier_isclass) identifier_isclass (argument_list (identifier_inheriting_type) identifier_inheriting_type )argument_list )call )boolean_operator )assert_statement (assert_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_base_type) identifier_base_type (identifier_type) identifier_type )argument_list )call (call (identifier_isclass) identifier_isclass (argument_list (identifier_base_type) identifier_base_type )argument_list )call )boolean_operator )assert_statement (if_statement (comparison_operator (identifier_inheriting_type) identifier_inheriting_type (identifier_base_type) identifier_base_type )comparison_operator (block (return_statement (True) True )return_statement )block (else_clause (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_inheriting_type) identifier_inheriting_type (identifier___bases__) identifier___bases__ )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (call (identifier_type_inherits_of_type) identifier_type_inherits_of_type (argument_list (subscript (attribute (identifier_inheriting_type) identifier_inheriting_type (identifier___bases__) identifier___bases__ )attribute (integer_0) integer_0 )subscript (identifier_base_type) identifier_base_type )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Checks whether inheriting_type inherits from base_type :param str inheriting_type: :param str base_type: :return: True is base_type is base of inheriting_type
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_host_value) identifier_host_value )parameters (block (expression_statement (assignment (identifier_host_obj) identifier_host_obj (call (attribute (identifier_self) identifier_self (identifier__host_factory) identifier__host_factory )attribute (argument_list (identifier_host_value) identifier_host_value )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier__get_match) identifier__get_match )attribute (argument_list (identifier_host_obj) identifier_host_obj )argument_list )call (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_new) identifier__add_new )attribute (argument_list (identifier_host_obj) identifier_host_obj )argument_list )call )expression_statement )block )function_definition )module
Add the given value to the collection. :param host: an ip address or a hostname :raises InvalidHostError: raised when the given value is not a valid ip address nor a hostname
(module (function_definition (function_name_add_item) function_name_add_item (parameters (identifier_self) identifier_self (identifier_item) identifier_item (default_parameter (identifier_field_name) identifier_field_name (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_field_name) identifier_field_name (call (attribute (identifier_self) identifier_self (identifier__choose_field_name) identifier__choose_field_name )attribute (argument_list (identifier_field_name) identifier_field_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_related_manager) identifier_related_manager (call (identifier_getattr) identifier_getattr (argument_list (identifier_item) identifier_item (identifier_field_name) identifier_field_name )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_related_manager) identifier_related_manager (identifier_add) identifier_add )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Add the item to the specified section. Intended for use with items of settings.ARMSTRONG_SECTION_ITEM_MODEL. Behavior on other items is undefined.
(module (function_definition (function_name_fetchGroupInfo) function_name_fetchGroupInfo (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_group_ids) identifier_group_ids )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_threads) identifier_threads (call (attribute (identifier_self) identifier_self (identifier_fetchThreadInfo) identifier_fetchThreadInfo )attribute (argument_list (list_splat (identifier_group_ids) identifier_group_ids )list_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_groups) identifier_groups (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_id_) identifier_id_ (identifier_thread) identifier_thread )pattern_list (call (attribute (identifier_threads) identifier_threads (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_thread) identifier_thread (identifier_type) identifier_type )attribute (attribute (identifier_ThreadType) identifier_ThreadType (identifier_GROUP) identifier_GROUP )attribute )comparison_operator (block (expression_statement (assignment (subscript (identifier_groups) identifier_groups (identifier_id_) identifier_id_ )subscript (identifier_thread) identifier_thread )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_FBchatUserError) identifier_FBchatUserError (argument_list (call (attribute (string_"Thread {} was not a group") string_"Thread {} was not a group" (identifier_format) identifier_format )attribute (argument_list (identifier_thread) identifier_thread )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_groups) identifier_groups )return_statement )block )function_definition )module
Get groups' info from IDs, unordered :param group_ids: One or more group ID(s) to query :return: :class:`models.Group` objects, labeled by their ID :rtype: dict :raises: FBchatException if request failed
(module (function_definition (function_name_setting) function_name_setting (parameters (identifier_self) identifier_self (identifier_opt) identifier_opt (identifier_val) identifier_val )parameters (block (expression_statement (assignment (identifier_opt) identifier_opt (call (attribute (identifier_opt) identifier_opt (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (identifier_basestring) identifier_basestring )argument_list )call (block (expression_statement (call (identifier_fluid_settings_setstr) identifier_fluid_settings_setstr (argument_list (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_opt) identifier_opt (identifier_val) identifier_val )argument_list )call )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (identifier_int) identifier_int )argument_list )call (block (expression_statement (call (identifier_fluid_settings_setint) identifier_fluid_settings_setint (argument_list (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_opt) identifier_opt (identifier_val) identifier_val )argument_list )call )expression_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (identifier_float) identifier_float )argument_list )call (block (expression_statement (call (identifier_fluid_settings_setnum) identifier_fluid_settings_setnum (argument_list (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_opt) identifier_opt (identifier_val) identifier_val )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
change an arbitrary synth setting, type-smart
(module (function_definition (function_name__encode_batched_op_msg) function_name__encode_batched_op_msg (parameters (identifier_operation) identifier_operation (identifier_command) identifier_command (identifier_docs) identifier_docs (identifier_check_keys) identifier_check_keys (identifier_ack) identifier_ack (identifier_opts) identifier_opts (identifier_ctx) identifier_ctx )parameters (block (expression_statement (assignment (identifier_buf) identifier_buf (call (identifier_StringIO) identifier_StringIO (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_to_send) identifier_to_send (identifier__) identifier__ )pattern_list (call (identifier__batched_op_msg_impl) identifier__batched_op_msg_impl (argument_list (identifier_operation) identifier_operation (identifier_command) identifier_command (identifier_docs) identifier_docs (identifier_check_keys) identifier_check_keys (identifier_ack) identifier_ack (identifier_opts) identifier_opts (identifier_ctx) identifier_ctx (identifier_buf) identifier_buf )argument_list )call )assignment )expression_statement (return_statement (expression_list (call (attribute (identifier_buf) identifier_buf (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call (identifier_to_send) identifier_to_send )expression_list )return_statement )block )function_definition )module
Encode the next batched insert, update, or delete operation as OP_MSG.
(module (function_definition (function_name_ifaces) function_name_ifaces (parameters (identifier_cls) identifier_cls (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_ifaces) identifier_ifaces (call (attribute (identifier_Iface) identifier_Iface (identifier_list) identifier_list )attribute (argument_list (dictionary (pair (string_'vlan_id') string_'vlan_id' (call (attribute (identifier_cls) identifier_cls (identifier_usable_id) identifier_usable_id )attribute (argument_list (identifier_name) identifier_name )argument_list )call )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (for_statement (identifier_iface) identifier_iface (identifier_ifaces) identifier_ifaces (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_Iface) identifier_Iface (identifier_info) identifier_info )attribute (argument_list (subscript (identifier_iface) identifier_iface (string_'id') string_'id' )subscript )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Get vlan attached ifaces.
(module (function_definition (function_name_use_comparative_catalog_view) function_name_use_comparative_catalog_view (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__catalog_view) identifier__catalog_view )attribute (identifier_COMPARATIVE) identifier_COMPARATIVE )assignment )expression_statement (for_statement (identifier_session) identifier_session (call (attribute (identifier_self) identifier_self (identifier__get_provider_sessions) identifier__get_provider_sessions )attribute (argument_list )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_session) identifier_session (identifier_use_comparative_catalog_view) identifier_use_comparative_catalog_view )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Pass through to provider CatalogLookupSession.use_comparative_catalog_view
(module (function_definition (function_name_tags) function_name_tags (parameters (identifier_self) identifier_self (default_parameter (identifier_resource_id) identifier_resource_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_resource) identifier_resource (call (attribute (identifier_self) identifier_self (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_resource) identifier_resource (identifier__request_entity) identifier__request_entity )attribute (string_'tag') string_'tag' )assignment )expression_statement (expression_statement (assignment (attribute (identifier_resource) identifier_resource (identifier__request_uri) identifier__request_uri )attribute (call (attribute (string_'{}/tags') string_'{}/tags' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_resource) identifier_resource (identifier__request_uri) identifier__request_uri )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_resource_id) identifier_resource_id (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_resource) identifier_resource (identifier__request_uri) identifier__request_uri )attribute (call (attribute (string_'{}/{}') string_'{}/{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_resource) identifier_resource (identifier__request_uri) identifier__request_uri )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_tcex) identifier_tcex )attribute (identifier_safetag) identifier_safetag )attribute (argument_list (identifier_resource_id) identifier_resource_id )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_resource) identifier_resource )return_statement )block )function_definition )module
Tag endpoint for this resource with optional tag name. This method will set the resource endpoint for working with Tags. The HTTP GET method will return all tags applied to this resource or if a resource id (tag name) is provided it will return the provided tag if it has been applied, which could be useful to verify a tag is applied. The provided resource_id (tag) can be applied to this resource using the HTTP POST method. The HTTP DELETE method will remove the provided tag from this resource. **Example Endpoints URI's** +--------------+------------------------------------------------------------+ | HTTP Method | API Endpoint URI's | +==============+============================================================+ | GET | /v2/groups/{resourceType}/{uniqueId}/tags | +--------------+------------------------------------------------------------+ | GET | /v2/groups/{resourceType}/{uniqueId}/tags/{resourceId} | +--------------+------------------------------------------------------------+ | GET | /v2/indicators/{resourceType}/{uniqueId}/tags | +--------------+------------------------------------------------------------+ | GET | /v2/indicators/{resourceType}/{uniqueId}/tags/{resourceId} | +--------------+------------------------------------------------------------+ | DELETE | /v2/groups/{resourceType}/{uniqueId}/tags/{resourceId} | +--------------+------------------------------------------------------------+ | DELETE | /v2/indicators/{resourceType}/{uniqueId}/tags/{resourceId} | +--------------+------------------------------------------------------------+ | POST | /v2/groups/{resourceType}/{uniqueId}/tags/{resourceId} | +--------------+------------------------------------------------------------+ | POST | /v2/indicators/{resourceType}/{uniqueId}/tags/{resourceId} | +--------------+------------------------------------------------------------+ Args: resource_id (Optional [string]): The resource id (tag name).
(module (function_definition (function_name_folding_model_gradient) function_name_folding_model_gradient (parameters (identifier_rvec) identifier_rvec (identifier_rcut) identifier_rcut )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_rnorm) identifier_rnorm (call (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_norm) identifier_norm )attribute (argument_list (identifier_rvec) identifier_rvec )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_rnorm) identifier_rnorm (float_0.0) float_0.0 )comparison_operator (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (attribute (identifier_rvec) identifier_rvec (identifier_shape) identifier_shape )attribute )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_r) identifier_r (binary_operator (identifier_rnorm) identifier_rnorm (identifier_rcut) identifier_rcut )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_r) identifier_r (float_0.0) float_0.0 )comparison_operator (block (return_statement (binary_operator (binary_operator (binary_operator (unary_operator (float_5.0) float_5.0 )unary_operator (identifier_r) identifier_r )binary_operator (identifier_rvec) identifier_rvec )binary_operator (identifier_rnorm) identifier_rnorm )binary_operator )return_statement )block )if_statement (return_statement (binary_operator (binary_operator (parenthesized_expression (binary_operator (binary_operator (float_1.5) float_1.5 (identifier_r) identifier_r )binary_operator (float_2.0) float_2.0 )binary_operator )parenthesized_expression (identifier_rvec) identifier_rvec )binary_operator (identifier_rnorm) identifier_rnorm )binary_operator )return_statement )block )function_definition )module
r"""computes the potential's gradient at point rvec
(module (function_definition (function_name_get_name_DID_info) function_name_get_name_DID_info (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_db) identifier_db (call (identifier_get_db_state) identifier_get_db_state (argument_list (attribute (identifier_self) identifier_self (identifier_working_dir) identifier_working_dir )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_did_info) identifier_did_info (call (attribute (identifier_db) identifier_db (identifier_get_name_DID_info) identifier_get_name_DID_info )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_did_info) identifier_did_info (None) None )comparison_operator (block (return_statement (dictionary (pair (string_'error') string_'error' (string_'No such name') string_'No such name' )pair (pair (string_'http_status') string_'http_status' (integer_404) integer_404 )pair )dictionary )return_statement )block )if_statement (return_statement (identifier_did_info) identifier_did_info )return_statement )block )function_definition )module
Get a name's DID info Returns None if not found
(module (function_definition (function_name_astype) function_name_astype (parameters (identifier_self) identifier_self (identifier_dtype) identifier_dtype )parameters (block (if_statement (comparison_operator (identifier_dtype) identifier_dtype (identifier__supported_dtypes) identifier__supported_dtypes )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Datatype %s not supported. Supported types are %s') string_'Datatype %s not supported. Supported types are %s' (tuple (identifier_dtype) identifier_dtype (identifier__supported_dtypes) identifier__supported_dtypes )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_pixeltype) identifier_pixeltype (subscript (identifier__npy_to_itk_map) identifier__npy_to_itk_map (identifier_dtype) identifier_dtype )subscript )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_clone) identifier_clone )attribute (argument_list (identifier_pixeltype) identifier_pixeltype )argument_list )call )return_statement )block )function_definition )module
Cast & clone an ANTsImage to a given numpy datatype. Map: uint8 : unsigned char uint32 : unsigned int float32 : float float64 : double
(module (function_definition (function_name_execute_java_for_coverage) function_name_execute_java_for_coverage (parameters (identifier_self) identifier_self (identifier_targets) identifier_targets (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_distribution) identifier_distribution (call (attribute (identifier_self) identifier_self (identifier_preferred_jvm_distribution_for_targets) identifier_preferred_jvm_distribution_for_targets )attribute (argument_list (identifier_targets) identifier_targets )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_actual_executor) identifier_actual_executor (call (identifier_SubprocessExecutor) identifier_SubprocessExecutor (argument_list (identifier_distribution) identifier_distribution )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_distribution) identifier_distribution (identifier_execute_java) identifier_execute_java )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (keyword_argument (identifier_executor) identifier_executor (identifier_actual_executor) identifier_actual_executor )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Execute java for targets directly and don't use the test mixin. This execution won't be wrapped with timeouts and other test mixin code common across test targets. Used for coverage instrumentation.
(module (function_definition (function_name__readSentence) function_name__readSentence (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_reply_word) identifier_reply_word (identifier_words) identifier_words )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_protocol) identifier_protocol )attribute (identifier_readSentence) identifier_readSentence )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_words) identifier_words (call (identifier_dict) identifier_dict (generator_expression (call (identifier_parseWord) identifier_parseWord (argument_list (identifier_word) identifier_word )argument_list )call (for_in_clause (identifier_word) identifier_word (identifier_words) identifier_words )for_in_clause )generator_expression )call )assignment )expression_statement (return_statement (expression_list (identifier_reply_word) identifier_reply_word (identifier_words) identifier_words )expression_list )return_statement )block )function_definition )module
Read one sentence and parse words. :returns: Reply word, dict with attribute words.
(module (function_definition (function_name__sendMsg) function_name__sendMsg (parameters (identifier_self) identifier_self (identifier_type) identifier_type (identifier_msg) identifier_msg )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_ALERT_STATUS) identifier_ALERT_STATUS )attribute (comparison_operator (identifier_type) identifier_type (attribute (identifier_self) identifier_self (identifier_ALERT_TYPES) identifier_ALERT_TYPES )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__configMailer) identifier__configMailer )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__MAILER) identifier__MAILER )attribute (identifier_send) identifier_send )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_MAILER_FROM) identifier_MAILER_FROM )attribute (attribute (identifier_self) identifier_self (identifier_ALERT_EMAIL) identifier_ALERT_EMAIL )attribute (attribute (identifier_self) identifier_self (identifier_ALERT_SUBJECT) identifier_ALERT_SUBJECT )attribute (identifier_msg) identifier_msg )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Send Alert Message To Emails
(module (function_definition (function_name_listen) function_name_listen (parameters (identifier_self) identifier_self )parameters (block (while_statement (attribute (identifier_self) identifier_self (identifier__listen) identifier__listen )attribute (block (expression_statement (assignment (identifier_key) identifier_key (string_u'') string_u'' )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (call (attribute (attribute (identifier_self) identifier_self (identifier_term) identifier_term )attribute (identifier_inkey) identifier_inkey )attribute (argument_list (keyword_argument (identifier_timeout) identifier_timeout (float_0.2) float_0.2 )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (if_statement (comparison_operator (attribute (identifier_key) identifier_key (identifier_code) identifier_code )attribute (identifier_KEY_ENTER) identifier_KEY_ENTER )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_on_enter) identifier_on_enter )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_key) identifier_key (identifier_code) identifier_code )attribute (tuple (identifier_KEY_DOWN) identifier_KEY_DOWN (identifier_KEY_UP) identifier_KEY_UP )tuple )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_on_key_arrow) identifier_on_key_arrow )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (attribute (identifier_key) identifier_key (identifier_code) identifier_code )attribute (identifier_KEY_ESCAPE) identifier_KEY_ESCAPE )comparison_operator (comparison_operator (identifier_key) identifier_key (call (identifier_chr) identifier_chr (argument_list (integer_3) integer_3 )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_on_exit) identifier_on_exit )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_key) identifier_key (string_'') string_'' )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_on_key) identifier_on_key )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement )block )elif_clause )if_statement )block (except_clause (identifier_KeyboardInterrupt) identifier_KeyboardInterrupt (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_on_exit) identifier_on_exit )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement )block )except_clause )try_statement )block )while_statement )block )function_definition )module
Blocking call on widgets.
(module (function_definition (function_name_every_match) function_name_every_match (parameters (identifier_self) identifier_self (identifier_callback) identifier_callback (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ArgumentError) identifier_ArgumentError (argument_list (string_"You must specify at least one message field to wait on") string_"You must specify at least one message field to wait on" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_spec) identifier_spec (call (identifier_MessageSpec) identifier_MessageSpec (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_responder) identifier_responder (call (attribute (identifier_self) identifier_self (identifier__add_waiter) identifier__add_waiter )attribute (argument_list (identifier_spec) identifier_spec (identifier_callback) identifier_callback )argument_list )call )assignment )expression_statement (return_statement (tuple (identifier_spec) identifier_spec (identifier_responder) identifier_responder )tuple )return_statement )block )function_definition )module
Invoke callback every time a matching message is received. The callback will be invoked directly inside process_message so that you can guarantee that it has been called by the time process_message has returned. The callback can be removed by a call to remove_waiter(), passing the handle object returned by this call to identify it. Args: callback (callable): A callable function that will be called as callback(message) whenever a matching message is received. Returns: object: An opaque handle that can be passed to remove_waiter(). This handle is the only way to remove this callback if you no longer want it to be called.