sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_all) function_name_all (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (identifier_account) identifier_account (call (attribute (identifier_cls) identifier_cls (identifier_info) identifier_info )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_creditusage) identifier_creditusage (call (attribute (identifier_cls) identifier_cls (identifier_creditusage) identifier_creditusage )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_creditusage) identifier_creditusage )not_operator (block (return_statement (identifier_account) identifier_account )return_statement )block )if_statement (expression_statement (assignment (identifier_left) identifier_left (binary_operator (subscript (identifier_account) identifier_account (string_'credits') string_'credits' )subscript (identifier_creditusage) identifier_creditusage )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_years) identifier_years (identifier_hours) identifier_hours )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_left) identifier_left (binary_operator (integer_365) integer_365 (integer_24) integer_24 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_months) identifier_months (identifier_hours) identifier_hours )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_hours) identifier_hours (binary_operator (integer_31) integer_31 (integer_24) integer_24 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_days) identifier_days (identifier_hours) identifier_hours )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_hours) identifier_hours (integer_24) integer_24 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_account) identifier_account (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'credit_usage') string_'credit_usage' (identifier_creditusage) identifier_creditusage )pair (pair (string_'left') string_'left' (tuple (identifier_years) identifier_years (identifier_months) identifier_months (identifier_days) identifier_days (identifier_hours) identifier_hours )tuple )pair )dictionary )argument_list )call )expression_statement (return_statement (identifier_account) identifier_account )return_statement )block )function_definition )module
Get all informations about this account
(module (function_definition (function_name__compute_site_scaling) function_name__compute_site_scaling (parameters (identifier_self) identifier_self (identifier_C) identifier_C (identifier_vs30) identifier_vs30 )parameters (block (expression_statement (assignment (identifier_site_term) identifier_site_term (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_vs30) identifier_vs30 )argument_list )call (keyword_argument (identifier_dtype) identifier_dtype (identifier_float) identifier_float )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_site_term) identifier_site_term (comparison_operator (identifier_vs30) identifier_vs30 (float_760.0) float_760.0 )comparison_operator )subscript (subscript (identifier_C) identifier_C (string_"e") string_"e" )subscript )assignment )expression_statement (return_statement (identifier_site_term) identifier_site_term )return_statement )block )function_definition )module
Returns the site scaling term as a simple coefficient
(module (function_definition (function_name_fit) function_name_fit (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_labels) identifier_labels (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__som) identifier__som )attribute (identifier_train) identifier_train )attribute (argument_list (identifier_data) identifier_data (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_bmus) identifier_bmus (identifier_q_error) identifier_q_error (identifier_t_error) identifier_t_error )pattern_list (call (attribute (identifier_self) identifier_self (identifier_bmus_with_errors) identifier_bmus_with_errors )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_quant_error) identifier_quant_error )attribute (identifier_q_error) identifier_q_error )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_topog_error) identifier_topog_error )attribute (identifier_t_error) identifier_t_error )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__bmus) identifier__bmus )attribute (identifier_bmus) identifier_bmus )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__calibrate) identifier__calibrate )attribute (argument_list (identifier_data) identifier_data (identifier_labels) identifier_labels )argument_list )call )expression_statement )block )function_definition )module
\ Training the SOM on the the data and calibrate itself. After the training, `self.quant_error` and `self.topog_error` are respectively set. :param data: sparse input matrix (ideal dtype is `numpy.float32`) :type data: :class:`scipy.sparse.csr_matrix` :param labels: the labels associated with data :type labels: iterable :param \**kwargs: optional parameters for :meth:`train`
(module (function_definition (function_name_handle) function_name_handle (parameters (identifier_self) identifier_self (identifier_handler_name) identifier_handler_name (identifier_request) identifier_request (default_parameter (identifier_suffix) identifier_suffix (string_'') string_'' )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_runtime) identifier_runtime )attribute (identifier_handle) identifier_handle )attribute (argument_list (identifier_self) identifier_self (identifier_handler_name) identifier_handler_name (identifier_request) identifier_request (identifier_suffix) identifier_suffix )argument_list )call )return_statement )block )function_definition )module
Handle `request` with this block's runtime.
(module (function_definition (function_name_should_obfuscate_filename) function_name_should_obfuscate_filename (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_pattern) identifier_pattern (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_hide_file_names) identifier_hide_file_names )attribute (block (try_statement (block (expression_statement (assignment (identifier_compiled) identifier_compiled (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_pattern) identifier_pattern (attribute (identifier_re) identifier_re (identifier_IGNORECASE) identifier_IGNORECASE )attribute )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_compiled) identifier_compiled (identifier_search) identifier_search )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_entity) identifier_entity )attribute )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block (except_clause (as_pattern (attribute (identifier_re) identifier_re (identifier_error) identifier_error )attribute (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (call (identifier_u) identifier_u (argument_list (string_'Regex error ({msg}) for hide_file_names pattern: {pattern}') string_'Regex error ({msg}) for hide_file_names pattern: {pattern}' )argument_list )call (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_msg) identifier_msg (call (identifier_u) identifier_u (argument_list (identifier_ex) identifier_ex )argument_list )call )keyword_argument (keyword_argument (identifier_pattern) identifier_pattern (call (identifier_u) identifier_u (argument_list (identifier_pattern) identifier_pattern )argument_list )call )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Returns True if hide_file_names is true or the entity file path matches one in the list of obfuscated file paths.
(module (function_definition (function_name__make_connection) function_name__make_connection (parameters (identifier_self) identifier_self )parameters (block (return_statement (await (call (attribute (identifier_aioredis) identifier_aioredis (identifier_create_redis) identifier_create_redis )attribute (argument_list (call (attribute (string_'redis://{}:{}') string_'redis://{}:{}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__redis_params) identifier__redis_params )attribute (identifier_get) identifier_get )attribute (argument_list (string_'host') string_'host' (string_'localhost') string_'localhost' )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier__redis_params) identifier__redis_params )attribute (identifier_get) identifier_get )attribute (argument_list (string_'port') string_'port' (integer_6379) integer_6379 )argument_list )call )argument_list )call (keyword_argument (identifier_db) identifier_db (call (identifier_int) identifier_int (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__redis_params) identifier__redis_params )attribute (identifier_get) identifier_get )attribute (argument_list (string_'db') string_'db' (integer_1) integer_1 )argument_list )call )argument_list )call )keyword_argument )argument_list )call )await )return_statement )block )function_definition )module
Construct a connection to Redis.
(module (function_definition (function_name_sg_seek_streamer) function_name_sg_seek_streamer (parameters (identifier_self) identifier_self (identifier_index) identifier_index (identifier_force) identifier_force (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_force) identifier_force (call (identifier_bool) identifier_bool (argument_list (identifier_force) identifier_force )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_err) identifier_err (call (attribute (attribute (identifier_self) identifier_self (identifier_sensor_graph) identifier_sensor_graph )attribute (identifier_acknowledge_streamer) identifier_acknowledge_streamer )attribute (argument_list (identifier_index) identifier_index (identifier_value) identifier_value (identifier_force) identifier_force )argument_list )call )assignment )expression_statement (return_statement (list (identifier_err) identifier_err )list )return_statement )block )function_definition )module
Ackowledge a streamer.
(module (function_definition (function_name__bind_method) function_name__bind_method (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_unconditionally) identifier_unconditionally (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_exists) identifier_exists (comparison_operator (subscript (call (attribute (identifier_self) identifier_self (identifier_run_func) identifier_run_func )attribute (argument_list (string_'exist') string_'exist' (identifier_name) identifier_name )argument_list )call (string_'result') string_'result' )subscript (list (integer_2) integer_2 (integer_3) integer_3 (integer_5) integer_5 )list )comparison_operator )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_unconditionally) identifier_unconditionally )not_operator (not_operator (identifier_exists) identifier_exists )not_operator )boolean_operator (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (binary_operator (string_"'Matlab' object has no attribute '%s'") string_"'Matlab' object has no attribute '%s'" (identifier_name) identifier_name )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_method_instance) identifier_method_instance (call (identifier_MatlabFunction) identifier_MatlabFunction (argument_list (call (attribute (identifier_weakref) identifier_weakref (identifier_ref) identifier_ref )attribute (argument_list (identifier_self) identifier_self )argument_list )call (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_method_instance) identifier_method_instance (identifier___name__) identifier___name__ )attribute (identifier_name) identifier_name )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_version) identifier_version )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (string_'3') string_'3' )argument_list )call (block (expression_statement (assignment (identifier_method) identifier_method (call (attribute (identifier_types) identifier_types (identifier_MethodType) identifier_MethodType )attribute (argument_list (identifier_method_instance) identifier_method_instance (call (attribute (identifier_weakref) identifier_weakref (identifier_ref) identifier_ref )attribute (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_method) identifier_method (call (attribute (identifier_types) identifier_types (identifier_MethodType) identifier_MethodType )attribute (argument_list (identifier_method_instance) identifier_method_instance (call (attribute (identifier_weakref) identifier_weakref (identifier_ref) identifier_ref )attribute (argument_list (identifier_self) identifier_self )argument_list )call (identifier__Session) identifier__Session )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_name) identifier_name (identifier_method) identifier_method )argument_list )call )expression_statement (return_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_name) identifier_name )argument_list )call )return_statement )block )function_definition )module
Generate a Matlab function and bind it to the instance This is where the magic happens. When an unknown attribute of the Matlab class is requested, it is assumed to be a call to a Matlab function, and is generated and bound to the instance. This works because getattr() falls back to __getattr__ only if no attributes of the requested name can be found through normal routes (__getattribute__, __dict__, class tree). bind_method first checks whether the requested name is a callable Matlab function before generating a binding. Parameters ---------- name : str The name of the Matlab function to call e.g. 'sqrt', 'sum', 'svd', etc unconditionally : bool, optional Bind the method without performing checks. Used to bootstrap methods that are required and know to exist Returns ------- MatlabFunction A reference to a newly bound MatlabFunction instance if the requested name is determined to be a callable function Raises ------ AttributeError: if the requested name is not a callable Matlab function
(module (function_definition (function_name_load_trajectory) function_name_load_trajectory (parameters (identifier_name) identifier_name (default_parameter (identifier_format) identifier_format (None) None )default_parameter (default_parameter (identifier_skip) identifier_skip (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_df) identifier_df (call (identifier_datafile) identifier_datafile (argument_list (identifier_name) identifier_name (keyword_argument (identifier_format) identifier_format (identifier_format) identifier_format )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_t) identifier_t (identifier_coords) identifier_coords )pattern_list (call (attribute (identifier_df) identifier_df (identifier_read) identifier_read )attribute (argument_list (string_'trajectory') string_'trajectory' (keyword_argument (identifier_skip) identifier_skip (identifier_skip) identifier_skip )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_boxes) identifier_boxes (call (attribute (identifier_df) identifier_df (identifier_read) identifier_read )attribute (argument_list (string_'boxes') string_'boxes' )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'t') string_'t' )subscript (identifier_t) identifier_t )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'coords') string_'coords' )subscript (identifier_coords) identifier_coords )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'boxes') string_'boxes' )subscript (identifier_boxes) identifier_boxes )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Read a trajectory from a file. .. seealso:: `chemlab.io.datafile`
(module (function_definition (function_name__serve_forever_wrapper) function_name__serve_forever_wrapper (parameters (identifier_self) identifier_self (identifier__srv) identifier__srv (default_parameter (identifier_poll_interval) identifier_poll_interval (float_0.1) float_0.1 )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Opening tunnel: {0} <> {1}') string_'Opening tunnel: {0} <> {1}' (identifier_format) identifier_format )attribute (argument_list (call (identifier_address_to_str) identifier_address_to_str (argument_list (attribute (identifier__srv) identifier__srv (identifier_local_address) identifier_local_address )attribute )argument_list )call (call (identifier_address_to_str) identifier_address_to_str (argument_list (attribute (identifier__srv) identifier__srv (identifier_remote_address) identifier_remote_address )attribute )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier__srv) identifier__srv (identifier_serve_forever) identifier_serve_forever )attribute (argument_list (identifier_poll_interval) identifier_poll_interval )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Tunnel: {0} <> {1} released') string_'Tunnel: {0} <> {1} released' (identifier_format) identifier_format )attribute (argument_list (call (identifier_address_to_str) identifier_address_to_str (argument_list (attribute (identifier__srv) identifier__srv (identifier_local_address) identifier_local_address )attribute )argument_list )call (call (identifier_address_to_str) identifier_address_to_str (argument_list (attribute (identifier__srv) identifier__srv (identifier_remote_address) identifier_remote_address )attribute )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Wrapper for the server created for a SSH forward
(module (function_definition (function_name_ctrl_transfer) function_name_ctrl_transfer (parameters (identifier_self) identifier_self (identifier_dev_handle) identifier_dev_handle (identifier_bmRequestType) identifier_bmRequestType (identifier_bRequest) identifier_bRequest (identifier_wValue) identifier_wValue (identifier_wIndex) identifier_wIndex (identifier_data) identifier_data (identifier_timeout) identifier_timeout )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (call (identifier__not_implemented) identifier__not_implemented (argument_list (attribute (identifier_self) identifier_self (identifier_ctrl_transfer) identifier_ctrl_transfer )attribute )argument_list )call )expression_statement )block )function_definition )module
r"""Perform a control transfer on the endpoint 0. The direction of the transfer is inferred from the bmRequestType field of the setup packet. dev_handle is the value returned by the open_device() method. bmRequestType, bRequest, wValue and wIndex are the same fields of the setup packet. data is an array object, for OUT requests it contains the bytes to transmit in the data stage and for IN requests it is the buffer to hold the data read. The number of bytes requested to transmit or receive is equal to the length of the array times the data.itemsize field. The timeout parameter specifies a time limit to the operation in miliseconds. Return the number of bytes written (for OUT transfers) or the data read (for IN transfers), as an array.array object.
(module (function_definition (function_name_get_subscriptions) function_name_get_subscriptions (parameters (identifier_self) identifier_self (default_parameter (identifier_limit) identifier_limit (integer_100) integer_100 )default_parameter (default_parameter (identifier_offset) identifier_offset (integer_0) integer_0 )default_parameter (default_parameter (identifier_params) identifier_params (dictionary )dictionary )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier_SUBSCRIPTIONS_URL) identifier_SUBSCRIPTIONS_URL )attribute (binary_operator (string_"?limit=%s&offset=%s") string_"?limit=%s&offset=%s" (tuple (identifier_limit) identifier_limit (identifier_offset) identifier_offset )tuple )binary_operator )binary_operator )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_params) identifier_params (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (string_'ids') string_'ids' )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_url) identifier_url (binary_operator (string_'&%s=%s') string_'&%s=%s' (tuple (identifier_key) identifier_key (identifier_value) identifier_value )tuple )binary_operator )augmented_assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_connection) identifier_connection (call (identifier_Connection) identifier_Connection (argument_list (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_connection) identifier_connection (identifier_set_url) identifier_set_url )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_production) identifier_production )attribute (identifier_url) identifier_url )argument_list )call )expression_statement (return_statement (call (attribute (identifier_connection) identifier_connection (identifier_get_request) identifier_get_request )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Get all subscriptions
(module (function_definition (function_name_read_hdf5_array) function_name_read_hdf5_array (parameters (identifier_source) identifier_source (default_parameter (identifier_path) identifier_path (None) None )default_parameter (default_parameter (identifier_array_type) identifier_array_type (identifier_Array) identifier_Array )default_parameter )parameters (block (expression_statement (assignment (identifier_dataset) identifier_dataset (call (attribute (identifier_io_hdf5) identifier_io_hdf5 (identifier_find_dataset) identifier_find_dataset )attribute (argument_list (identifier_source) identifier_source (keyword_argument (identifier_path) identifier_path (identifier_path) identifier_path )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_attrs) identifier_attrs (call (identifier_dict) identifier_dict (argument_list (attribute (identifier_dataset) identifier_dataset (identifier_attrs) identifier_attrs )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (subscript (identifier_attrs) identifier_attrs (string_'channel') string_'channel' )subscript (call (identifier__unpickle_channel) identifier__unpickle_channel (argument_list (subscript (identifier_attrs) identifier_attrs (string_'channel') string_'channel' )subscript )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement (for_statement (identifier_key) identifier_key (identifier_attrs) identifier_attrs (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_attrs) identifier_attrs (identifier_key) identifier_key )subscript (identifier_bytes) identifier_bytes )argument_list )call (block (expression_statement (assignment (subscript (identifier_attrs) identifier_attrs (identifier_key) identifier_key )subscript (call (attribute (subscript (identifier_attrs) identifier_attrs (identifier_key) identifier_key )subscript (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (call (identifier_array_type) identifier_array_type (argument_list (subscript (identifier_dataset) identifier_dataset (tuple )tuple )subscript (dictionary_splat (identifier_attrs) identifier_attrs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Read an `Array` from the given HDF5 object Parameters ---------- source : `str`, :class:`h5py.HLObject` path to HDF file on disk, or open `h5py.HLObject`. path : `str` path in HDF hierarchy of dataset. array_type : `type` desired return type
(module (function_definition (function_name_request_done) function_name_request_done (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__requests) identifier__requests )attribute (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (assert_statement (comparison_operator (identifier_request) identifier_request (subscript (attribute (identifier_self) identifier_self (identifier__requests) identifier__requests )attribute (integer_0) integer_0 )subscript )comparison_operator (string_"Unexpected request done") string_"Unexpected request done" )assert_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__requests) identifier__requests )attribute (integer_0) integer_0 )subscript )delete_statement (if_statement (attribute (identifier_request) identifier_request (identifier_persistent) identifier_persistent )attribute (block (if_statement (attribute (identifier_self) identifier_self (identifier__requests) identifier__requests )attribute (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__requests) identifier__requests )attribute (integer_0) integer_0 )subscript (identifier_activate) identifier_activate )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute (identifier_loseConnection) identifier_loseConnection )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Called by the active request when it is done writing
(module (function_definition (function_name_symbolize) function_name_symbolize (parameters (typed_parameter (identifier_flt) identifier_flt (type (identifier_float) identifier_float )type )typed_parameter )parameters (type (attribute (identifier_sympy) identifier_sympy (identifier_Symbol) identifier_Symbol )attribute )type (block (try_statement (block (expression_statement (assignment (identifier_ratio) identifier_ratio (call (identifier_rationalize) identifier_rationalize (argument_list (identifier_flt) identifier_flt )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_sympy) identifier_sympy (identifier_simplify) identifier_simplify )attribute (argument_list (identifier_ratio) identifier_ratio )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (identifier_ratio) identifier_ratio (call (identifier_rationalize) identifier_rationalize (argument_list (binary_operator (identifier_flt) identifier_flt (attribute (identifier_np) identifier_np (identifier_pi) identifier_pi )attribute )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (binary_operator (call (attribute (identifier_sympy) identifier_sympy (identifier_simplify) identifier_simplify )attribute (argument_list (identifier_ratio) identifier_ratio )argument_list )call (attribute (identifier_sympy) identifier_sympy (identifier_pi) identifier_pi )attribute )binary_operator )assignment )expression_statement )block )except_clause )try_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Attempt to convert a real number into a simpler symbolic representation. Returns: A sympy Symbol. (Convert to string with str(sym) or to latex with sympy.latex(sym) Raises: ValueError: If cannot simplify float
(module (function_definition (function_name_start_wsgi_server) function_name_start_wsgi_server (parameters (identifier_port) identifier_port (default_parameter (identifier_addr) identifier_addr (string_'') string_'' )default_parameter (default_parameter (identifier_registry) identifier_registry (identifier_REGISTRY) identifier_REGISTRY )default_parameter )parameters (block (expression_statement (assignment (identifier_app) identifier_app (call (identifier_make_wsgi_app) identifier_make_wsgi_app (argument_list (identifier_registry) identifier_registry )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_httpd) identifier_httpd (call (identifier_make_server) identifier_make_server (argument_list (identifier_addr) identifier_addr (identifier_port) identifier_port (identifier_app) identifier_app (keyword_argument (identifier_handler_class) identifier_handler_class (identifier__SilentHandler) identifier__SilentHandler )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_t) identifier_t (call (attribute (identifier_threading) identifier_threading (identifier_Thread) identifier_Thread )attribute (argument_list (keyword_argument (identifier_target) identifier_target (attribute (identifier_httpd) identifier_httpd (identifier_serve_forever) identifier_serve_forever )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_t) identifier_t (identifier_daemon) identifier_daemon )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier_t) identifier_t (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Starts a WSGI server for prometheus metrics as a daemon thread.
(module (function_definition (function_name_decode_html) function_name_decode_html (parameters (identifier_html) identifier_html )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_html) identifier_html (identifier_unicode) identifier_unicode )argument_list )call (block (return_statement (identifier_html) identifier_html )return_statement )block )if_statement (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_CHARSET_META_TAG_PATTERN) identifier_CHARSET_META_TAG_PATTERN (identifier_search) identifier_search )attribute (argument_list (identifier_html) identifier_html )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (expression_statement (assignment (identifier_declared_encoding) identifier_declared_encoding (call (attribute (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (string_"ASCII") string_"ASCII" )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (call (identifier_ignored) identifier_ignored (argument_list (identifier_LookupError) identifier_LookupError )argument_list )call )with_item )with_clause (block (return_statement (call (attribute (identifier_html) identifier_html (identifier_decode) identifier_decode )attribute (argument_list (identifier_declared_encoding) identifier_declared_encoding (string_"ignore") string_"ignore" )argument_list )call )return_statement )block )with_statement )block )if_statement (with_statement (with_clause (with_item (call (identifier_ignored) identifier_ignored (argument_list (identifier_UnicodeDecodeError) identifier_UnicodeDecodeError )argument_list )call )with_item )with_clause (block (return_statement (call (attribute (identifier_html) identifier_html (identifier_decode) identifier_decode )attribute (argument_list (string_"utf8") string_"utf8" )argument_list )call )return_statement )block )with_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_TAG_MARK_PATTERN) identifier_TAG_MARK_PATTERN (identifier_sub) identifier_sub )attribute (argument_list (call (identifier_to_bytes) identifier_to_bytes (argument_list (string_" ") string_" " )argument_list )call (identifier_html) identifier_html )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_diff) identifier_diff (call (attribute (call (attribute (identifier_text) identifier_text (identifier_decode) identifier_decode )attribute (argument_list (string_"utf8") string_"utf8" (string_"ignore") string_"ignore" )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (string_"utf8") string_"utf8" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sizes) identifier_sizes (expression_list (call (identifier_len) identifier_len (argument_list (identifier_diff) identifier_diff )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_text) identifier_text )argument_list )call )expression_list )assignment )expression_statement (if_statement (comparison_operator (call (identifier_abs) identifier_abs (argument_list (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_text) identifier_text )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_diff) identifier_diff )argument_list )call )binary_operator )argument_list )call (binary_operator (call (identifier_max) identifier_max (argument_list (identifier_sizes) identifier_sizes )argument_list )call (float_0.01) float_0.01 )binary_operator )comparison_operator (block (return_statement (call (attribute (identifier_html) identifier_html (identifier_decode) identifier_decode )attribute (argument_list (string_"utf8") string_"utf8" (string_"ignore") string_"ignore" )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_encoding) identifier_encoding (string_"utf8") string_"utf8" )assignment )expression_statement (expression_statement (assignment (identifier_encoding_detector) identifier_encoding_detector (call (attribute (identifier_chardet) identifier_chardet (identifier_detect) identifier_detect )attribute (argument_list (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (if_statement (subscript (identifier_encoding_detector) identifier_encoding_detector (string_"encoding") string_"encoding" )subscript (block (expression_statement (assignment (identifier_encoding) identifier_encoding (subscript (identifier_encoding_detector) identifier_encoding_detector (string_"encoding") string_"encoding" )subscript )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_html) identifier_html (identifier_decode) identifier_decode )attribute (argument_list (identifier_encoding) identifier_encoding (string_"ignore") string_"ignore" )argument_list )call )return_statement )block )function_definition )module
Converts bytes stream containing an HTML page into Unicode. Tries to guess character encoding from meta tag of by "chardet" library.
(module (function_definition (function_name_consecutive_ones_property) function_name_consecutive_ones_property (parameters (identifier_sets) identifier_sets (default_parameter (identifier_universe) identifier_universe (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_universe) identifier_universe (None) None )comparison_operator (block (expression_statement (assignment (identifier_universe) identifier_universe (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_S) identifier_S (identifier_sets) identifier_sets (block (expression_statement (augmented_assignment (identifier_universe) identifier_universe (call (identifier_set) identifier_set (argument_list (identifier_S) identifier_S )argument_list )call )augmented_assignment )expression_statement )block )for_statement )block )if_statement (expression_statement (assignment (identifier_tree) identifier_tree (call (identifier_PQ_tree) identifier_PQ_tree (argument_list (identifier_universe) identifier_universe )argument_list )call )assignment )expression_statement (try_statement (block (for_statement (identifier_S) identifier_S (identifier_sets) identifier_sets (block (expression_statement (call (attribute (identifier_tree) identifier_tree (identifier_reduce) identifier_reduce )attribute (argument_list (identifier_S) identifier_S )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (identifier_tree) identifier_tree (identifier_border) identifier_border )attribute (argument_list )argument_list )call )return_statement )block (except_clause (identifier_IsNotC1P) identifier_IsNotC1P (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition )module
Check the consecutive ones property. :param list sets: is a list of subsets of the ground set. :param groundset: is the set of all elements, by default it is the union of the given sets :returns: returns a list of the ordered ground set where every given set is consecutive, or None if there is no solution. :complexity: O(len(groundset) * len(sets)) :disclaimer: an optimal implementation would have complexity O(len(groundset) + len(sets) + sum(map(len,sets))), and there are more recent easier algorithms for this problem.
(module (function_definition (function_name_translate_labels) function_name_translate_labels (parameters (identifier_val) identifier_val )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (identifier_dict) identifier_dict )argument_list )call )not_operator (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (identifier_list) identifier_list )argument_list )call )not_operator (block (expression_statement (assignment (identifier_val) identifier_val (call (identifier_split) identifier_split (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_new_val) identifier_new_val (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_val) identifier_val (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_item) identifier_item (identifier_dict) identifier_dict )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_item) identifier_item )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_SaltInvocationError) identifier_SaltInvocationError (argument_list (string_'Invalid label(s)') string_'Invalid label(s)' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_key) identifier_key (call (identifier_next) identifier_next (argument_list (call (identifier_iter) identifier_iter (argument_list (identifier_item) identifier_item )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_val) identifier_val (subscript (identifier_item) identifier_item (identifier_key) identifier_key )subscript )assignment )expression_statement )block (else_clause (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_key) identifier_key (identifier_val) identifier_val )pattern_list (call (identifier_split) identifier_split (argument_list (identifier_item) identifier_item (string_'=') string_'=' (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (identifier_key) identifier_key (identifier_item) identifier_item )assignment )expression_statement (expression_statement (assignment (identifier_val) identifier_val (string_'') string_'' )assignment )expression_statement )block )except_clause )try_statement )block )else_clause )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_key) identifier_key (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call )not_operator (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call )not_operator (block (expression_statement (assignment (identifier_val) identifier_val (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_new_val) identifier_new_val (identifier_key) identifier_key )subscript (identifier_val) identifier_val )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_val) identifier_val (identifier_new_val) identifier_new_val )assignment )expression_statement )block )if_statement (return_statement (identifier_val) identifier_val )return_statement )block )function_definition )module
Can either be a list of label names, or a list of name=value pairs. The API can accept either a list of label names or a dictionary mapping names to values, so the value we translate will be different depending on the input.
(module (function_definition (function_name_filter) function_name_filter (parameters (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_OptionParser) identifier_OptionParser (argument_list (attribute (identifier_filter) identifier_filter (identifier___doc__) identifier___doc__ )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_p) identifier_p (identifier_add_option) identifier_add_option )attribute (argument_list (string_"--less") string_"--less" (keyword_argument (identifier_default) identifier_default (False) False )keyword_argument (keyword_argument (identifier_action) identifier_action (string_"store_true") string_"store_true" )keyword_argument (keyword_argument (identifier_help) identifier_help (string_"filter the sizes < certain cutoff [default: >=]") string_"filter the sizes < certain cutoff [default: >=]" )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_p) identifier_p (identifier_set_outfile) identifier_set_outfile )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_opts) identifier_opts (identifier_args) identifier_args )pattern_list (call (attribute (identifier_p) identifier_p (identifier_parse_args) identifier_parse_args )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_2) integer_2 )comparison_operator (block (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (not_operator (call (attribute (identifier_p) identifier_p (identifier_print_help) identifier_print_help )attribute (argument_list )argument_list )call )not_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_fastafile) identifier_fastafile (identifier_cutoff) identifier_cutoff )pattern_list (identifier_args) identifier_args )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_cutoff) identifier_cutoff (call (identifier_int) identifier_int (argument_list (identifier_cutoff) identifier_cutoff )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (not_operator (call (attribute (identifier_p) identifier_p (identifier_print_help) identifier_print_help )attribute (argument_list )argument_list )call )not_operator )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_f) identifier_f (call (identifier_Fasta) identifier_Fasta (argument_list (identifier_fastafile) identifier_fastafile (keyword_argument (identifier_lazy) identifier_lazy (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fw) identifier_fw (call (identifier_must_open) identifier_must_open (argument_list (attribute (identifier_opts) identifier_opts (identifier_outfile) identifier_outfile )attribute (string_"w") string_"w" )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_rec) identifier_rec )pattern_list (call (attribute (identifier_f) identifier_f (identifier_iteritems_ordered) identifier_iteritems_ordered )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (attribute (identifier_opts) identifier_opts (identifier_less) identifier_less )attribute (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_rec) identifier_rec )argument_list )call (identifier_cutoff) identifier_cutoff )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (boolean_operator (parenthesized_expression (not_operator (attribute (identifier_opts) identifier_opts (identifier_less) identifier_less )attribute )not_operator )parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_rec) identifier_rec )argument_list )call (identifier_cutoff) identifier_cutoff )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_SeqIO) identifier_SeqIO (identifier_write) identifier_write )attribute (argument_list (list (identifier_rec) identifier_rec )list (identifier_fw) identifier_fw (string_"fasta") string_"fasta" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_fw) identifier_fw (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (return_statement (attribute (identifier_fw) identifier_fw (identifier_name) identifier_name )attribute )return_statement )block )function_definition )module
%prog filter fastafile 100 Filter the FASTA file to contain records with size >= or <= certain cutoff.
(module (function_definition (function_name_get_as_nullable_parameters) function_name_get_as_nullable_parameters (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier_get_as_nullable_map) identifier_get_as_nullable_map )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (call (identifier_Parameters) identifier_Parameters (argument_list (identifier_value) identifier_value )argument_list )call (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (None) None )conditional_expression )return_statement )block )function_definition )module
Converts map element into an Parameters or returns null if conversion is not possible. :param key: a key of element to get. :return: Parameters value of the element or null if conversion is not supported.
(module (function_definition (function_name_blast) function_name_blast (parameters (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_OptionParser) identifier_OptionParser (argument_list (attribute (identifier_blast) identifier_blast (identifier___doc__) identifier___doc__ )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_opts) identifier_opts (identifier_args) identifier_args )pattern_list (call (attribute (identifier_p) identifier_p (identifier_parse_args) identifier_parse_args )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (not_operator (call (attribute (identifier_p) identifier_p (identifier_print_help) identifier_print_help )attribute (argument_list )argument_list )call )not_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_btabfile) identifier_btabfile )pattern_list (identifier_args) identifier_args )assignment )expression_statement (expression_statement (assignment (identifier_btab) identifier_btab (call (identifier_Btab) identifier_Btab (argument_list (identifier_btabfile) identifier_btabfile )argument_list )call )assignment )expression_statement (for_statement (identifier_b) identifier_b (identifier_btab) identifier_btab (block (expression_statement (call (identifier_print) identifier_print (argument_list (attribute (identifier_b) identifier_b (identifier_blastline) identifier_blastline )attribute )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
%prog blast btabfile Convert to BLAST -m8 format.
(module (function_definition (function_name_to_mongo) function_name_to_mongo (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__slices) identifier__slices )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_d) identifier_d (identifier_k) identifier_k )subscript (dictionary (pair (string_'$slice') string_'$slice' (identifier_v) identifier_v )pair )dictionary )assignment )expression_statement )block )for_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Translate projection to MongoDB query form. :return: Dictionary to put into a MongoDB JSON query :rtype: dict
(module (function_definition (function_name_isfile) function_name_isfile (parameters (identifier_self) identifier_self (identifier_path) identifier_path (default_parameter (identifier_follow_symlinks) identifier_follow_symlinks (True) True )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__is_of_type) identifier__is_of_type )attribute (argument_list (identifier_path) identifier_path (identifier_S_IFREG) identifier_S_IFREG (identifier_follow_symlinks) identifier_follow_symlinks )argument_list )call )return_statement )block )function_definition )module
Determine if path identifies a regular file. Args: path: Path to filesystem object. Returns: `True` if path points to a regular file (following symlinks). Raises: TypeError: if path is None.
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self (default_parameter (identifier_raise_exc) identifier_raise_exc (True) True )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (argument_list (identifier_GET) identifier_GET (keyword_argument (identifier_raise_exc) identifier_raise_exc (identifier_raise_exc) identifier_raise_exc )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_fetched) identifier_fetched )attribute (True) True )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Performs a GET request to the uri of this navigator
(module (function_definition (function_name_update_snapshot_schedule) function_name_update_snapshot_schedule (parameters (identifier_cls) identifier_cls (identifier_cluster_id_label) identifier_cluster_id_label (default_parameter (identifier_s3_location) identifier_s3_location (None) None )default_parameter (default_parameter (identifier_frequency_unit) identifier_frequency_unit (None) None )default_parameter (default_parameter (identifier_frequency_num) identifier_frequency_num (None) None )default_parameter (default_parameter (identifier_status) identifier_status (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_Qubole) identifier_Qubole (identifier_agent) identifier_agent )attribute (argument_list (keyword_argument (identifier_version) identifier_version (attribute (identifier_Cluster) identifier_Cluster (identifier_api_version) identifier_api_version )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_s3_location) identifier_s3_location (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"s3_location") string_"s3_location" )subscript (identifier_s3_location) identifier_s3_location )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_frequency_unit) identifier_frequency_unit (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"frequency_unit") string_"frequency_unit" )subscript (identifier_frequency_unit) identifier_frequency_unit )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_frequency_num) identifier_frequency_num (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"frequency_num") string_"frequency_num" )subscript (identifier_frequency_num) identifier_frequency_num )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_status) identifier_status (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"status") string_"status" )subscript (identifier_status) identifier_status )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_conn) identifier_conn (identifier_put) identifier_put )attribute (argument_list (binary_operator (call (attribute (identifier_cls) identifier_cls (identifier_element_path) identifier_element_path )attribute (argument_list (identifier_cluster_id_label) identifier_cluster_id_label )argument_list )call (string_"/snapshot_schedule") string_"/snapshot_schedule" )binary_operator (identifier_data) identifier_data )argument_list )call )return_statement )block )function_definition )module
Update for snapshot schedule
(module (function_definition (function_name_migrate) function_name_migrate (parameters (typed_parameter (identifier_belstr) identifier_belstr (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (attribute (identifier_bo) identifier_bo (identifier_ast) identifier_ast )attribute (call (attribute (attribute (attribute (identifier_bel) identifier_bel (identifier_lang) identifier_lang )attribute (identifier_partialparse) identifier_partialparse )attribute (identifier_get_ast_obj) identifier_get_ast_obj )attribute (argument_list (identifier_belstr) identifier_belstr (string_"2.0.0") string_"2.0.0" )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (identifier_migrate_ast) identifier_migrate_ast (argument_list (attribute (identifier_bo) identifier_bo (identifier_ast) identifier_ast )attribute )argument_list )call (identifier_to_string) identifier_to_string )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Migrate BEL 1 to 2.0.0 Args: bel: BEL 1 Returns: bel: BEL 2
(module (function_definition (function_name_atanh) function_name_atanh (parameters (identifier_x) identifier_x )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_UncertainFunction) identifier_UncertainFunction )argument_list )call (block (expression_statement (assignment (identifier_mcpts) identifier_mcpts (call (attribute (identifier_np) identifier_np (identifier_arctanh) identifier_arctanh )attribute (argument_list (attribute (identifier_x) identifier_x (identifier__mcpts) identifier__mcpts )attribute )argument_list )call )assignment )expression_statement (return_statement (call (identifier_UncertainFunction) identifier_UncertainFunction (argument_list (identifier_mcpts) identifier_mcpts )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_arctanh) identifier_arctanh )attribute (argument_list (identifier_x) identifier_x )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Inverse hyperbolic tangent
(module (function_definition (function_name_prob) function_name_prob (parameters (identifier_self) identifier_self (identifier_pw) identifier_pw )parameters (block (expression_statement (assignment (identifier_tokens) identifier_tokens (call (attribute (identifier_self) identifier_self (identifier_pcfgtokensofw) identifier_pcfgtokensofw )attribute (argument_list (identifier_pw) identifier_pw )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_S) identifier_S (identifier_tokens) identifier_tokens )pattern_list (expression_list (subscript (identifier_tokens) identifier_tokens (integer_0) integer_0 )subscript (subscript (identifier_tokens) identifier_tokens (slice (integer_1) integer_1 (colon) colon )slice )subscript )expression_list )assignment )expression_statement (expression_statement (assignment (identifier_l) identifier_l (call (identifier_len) identifier_len (argument_list (identifier_tokens) identifier_tokens )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (binary_operator (identifier_l) identifier_l (integer_2) integer_2 )binary_operator (integer_0) integer_0 )comparison_operator (call (attribute (string_"Expecting even number of tokens!. got {}") string_"Expecting even number of tokens!. got {}" (identifier_format) identifier_format )attribute (argument_list (identifier_tokens) identifier_tokens )argument_list )call )assert_statement (expression_statement (assignment (identifier_p) identifier_p (binary_operator (call (identifier_float) identifier_float (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__T) identifier__T )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_S) identifier_S (float_0.0) float_0.0 )argument_list )call )argument_list )call (call (identifier_sum) identifier_sum (generator_expression (identifier_v) identifier_v (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__T) identifier__T )attribute (identifier_items) identifier_items )attribute (argument_list (string_'__S__') string_'__S__' )argument_list )call )for_in_clause )generator_expression )call )binary_operator )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_t) identifier_t )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_tokens) identifier_tokens )argument_list )call (block (expression_statement (assignment (identifier_f) identifier_f (call (attribute (attribute (identifier_self) identifier_self (identifier__T) identifier__T )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_t) identifier_t (float_0.0) float_0.0 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_f) identifier_f (integer_0) integer_0 )comparison_operator (block (return_statement (float_0.0) float_0.0 )return_statement )block )if_statement (if_statement (comparison_operator (identifier_i) identifier_i (binary_operator (identifier_l) identifier_l (integer_2) integer_2 )binary_operator )comparison_operator (block (expression_statement (augmented_assignment (identifier_p) identifier_p (identifier_f) identifier_f )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_p) identifier_p (identifier_f) identifier_f )augmented_assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_p) identifier_p )return_statement )block )function_definition )module
Return the probability of pw under the Weir PCFG model. P[{S -> L2D1Y3, L2 -> 'ab', D1 -> '1', Y3 -> '!@#'}]
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_self) identifier_self (identifier_protocolFactory) identifier_protocolFactory )parameters (block (expression_statement (assignment (identifier_deferred) identifier_deferred (call (attribute (identifier_self) identifier_self (identifier__startProcess) identifier__startProcess )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_deferred) identifier_deferred (identifier_addCallback) identifier_addCallback )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__connectRelay) identifier__connectRelay )attribute (identifier_protocolFactory) identifier_protocolFactory )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_deferred) identifier_deferred (identifier_addCallback) identifier_addCallback )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__startRelay) identifier__startRelay )attribute )argument_list )call )expression_statement (return_statement (identifier_deferred) identifier_deferred )return_statement )block )function_definition )module
Starts a process and connect a protocol to it.
(module (function_definition (function_name_absolute_magnitude) function_name_absolute_magnitude (parameters (identifier_distance_modulus) identifier_distance_modulus (identifier_g) identifier_g (identifier_r) identifier_r (default_parameter (identifier_prob) identifier_prob (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_V) identifier_V (binary_operator (binary_operator (identifier_g) identifier_g (binary_operator (float_0.487) float_0.487 (parenthesized_expression (binary_operator (identifier_g) identifier_g (identifier_r) identifier_r )binary_operator )parenthesized_expression )binary_operator )binary_operator (float_0.0249) float_0.0249 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_flux) identifier_flux (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (binary_operator (integer_10) integer_10 (parenthesized_expression (binary_operator (unary_operator (parenthesized_expression (binary_operator (identifier_V) identifier_V (identifier_distance_modulus) identifier_distance_modulus )binary_operator )parenthesized_expression )unary_operator (float_2.5) float_2.5 )binary_operator )parenthesized_expression )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_Mv) identifier_Mv (binary_operator (unary_operator (float_2.5) float_2.5 )unary_operator (call (attribute (identifier_np) identifier_np (identifier_log10) identifier_log10 )attribute (argument_list (identifier_flux) identifier_flux )argument_list )call )binary_operator )assignment )expression_statement (return_statement (identifier_Mv) identifier_Mv )return_statement )block )function_definition )module
Calculate the absolute magnitude from a set of bands
(module (function_definition (function_name__dict_to_obj) function_name__dict_to_obj (parameters (identifier_self) identifier_self (identifier_d) identifier_d )parameters (block (if_statement (comparison_operator (attribute (identifier_JsonEncoder) identifier_JsonEncoder (identifier_TYPE_ID) identifier_TYPE_ID )attribute (identifier_d) identifier_d )comparison_operator (block (return_statement (identifier_d) identifier_d )return_statement )block )if_statement (expression_statement (assignment (identifier_type_name) identifier_type_name (call (attribute (identifier_d) identifier_d (identifier_pop) identifier_pop )attribute (argument_list (attribute (identifier_JsonEncoder) identifier_JsonEncoder (identifier_TYPE_ID) identifier_TYPE_ID )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_type_name) identifier_type_name (identifier__TYPE_NAME_TO_DECODER) identifier__TYPE_NAME_TO_DECODER )comparison_operator (block (expression_statement (assignment (identifier_decoder) identifier_decoder (subscript (identifier__TYPE_NAME_TO_DECODER) identifier__TYPE_NAME_TO_DECODER (identifier_type_name) identifier_type_name )subscript )assignment )expression_statement (return_statement (call (identifier_decoder) identifier_decoder (argument_list (identifier_d) identifier_d )argument_list )call )return_statement )block (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Invalid type %s.") string_"Invalid type %s." (identifier_type_name) identifier_type_name )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Converts a dictionary of json object to a Python object.
(module (function_definition (function_name_devserver_cmd) function_name_devserver_cmd (parameters (default_parameter (identifier_argv) identifier_argv (subscript (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )default_parameter )parameters (block (expression_statement (assignment (identifier_arguments) identifier_arguments (call (identifier_docopt) identifier_docopt (argument_list (attribute (identifier_devserver_cmd) identifier_devserver_cmd (identifier___doc__) identifier___doc__ )attribute (keyword_argument (identifier_argv) identifier_argv (identifier_argv) identifier_argv )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_initialize_config) identifier_initialize_config (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_app) identifier_app (identifier_run) identifier_run )attribute (argument_list (keyword_argument (identifier_host) identifier_host (subscript (identifier_arguments) identifier_arguments (string_'--host') string_'--host' )subscript )keyword_argument (keyword_argument (identifier_port) identifier_port (call (identifier_int) identifier_int (argument_list (subscript (identifier_arguments) identifier_arguments (string_'--port') string_'--port' )subscript )argument_list )call )keyword_argument (keyword_argument (identifier_debug) identifier_debug (call (identifier_int) identifier_int (argument_list (subscript (identifier_arguments) identifier_arguments (string_'--debug') string_'--debug' )subscript )argument_list )call )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
\ Serve the web API for development. Usage: pld-devserver [options] Options: -h --help Show this screen. --host=<host> The host to use [default: 0.0.0.0]. --port=<port> The port to use [default: 5000]. --debug=<debug> Whether or not to use debug mode [default: 0].
(module (function_definition (function_name_canonical_new_peer_list) function_name_canonical_new_peer_list (parameters (identifier_self) identifier_self (identifier_peers_to_add) identifier_peers_to_add )parameters (block (expression_statement (assignment (identifier_new_peers) identifier_new_peers (call (identifier_list) identifier_list (argument_list (call (identifier_set) identifier_set (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_new_peers) identifier_new_peers )attribute (identifier_peers_to_add) identifier_peers_to_add )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_random) identifier_random (identifier_shuffle) identifier_shuffle )attribute (argument_list (identifier_new_peers) identifier_new_peers )argument_list )call )expression_statement (expression_statement (assignment (identifier_tmp) identifier_tmp (list )list )assignment )expression_statement (for_statement (identifier_peer) identifier_peer (identifier_new_peers) identifier_new_peers (block (expression_statement (call (attribute (identifier_tmp) identifier_tmp (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_canonical_peer) identifier_canonical_peer )attribute (argument_list (identifier_peer) identifier_peer )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_new_peers) identifier_new_peers (identifier_tmp) identifier_tmp )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_my_hostport) identifier_my_hostport )attribute (identifier_new_peers) identifier_new_peers )comparison_operator (block (expression_statement (call (attribute (identifier_new_peers) identifier_new_peers (identifier_remove) identifier_remove )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_my_hostport) identifier_my_hostport )attribute )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_new_peers) identifier_new_peers )return_statement )block )function_definition )module
Make a list of canonical new peers, using the self.new_peers and the given peers to add Return a shuffled list of canonicalized host:port strings.
(module (function_definition (function_name_qteUpdateLogSlot) function_name_qteUpdateLogSlot (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_log) identifier_log (call (attribute (attribute (identifier_self) identifier_self (identifier_logHandler) identifier_logHandler )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (keyword_argument (identifier_start) identifier_start (attribute (identifier_self) identifier_self (identifier_qteLogCnt) identifier_qteLogCnt )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_qteLogCnt) identifier_qteLogCnt )attribute (call (identifier_len) identifier_len (argument_list (identifier_log) identifier_log )argument_list )call )augmented_assignment )expression_statement (if_statement (not_operator (call (identifier_len) identifier_len (argument_list (identifier_log) identifier_log )argument_list )call )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_log_pruned) identifier_log_pruned (list )list )assignment )expression_statement (expression_statement (assignment (identifier_last_entry) identifier_last_entry (subscript (identifier_log) identifier_log (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_num_rep) identifier_num_rep (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement (for_statement (identifier_cur_entry) identifier_cur_entry (identifier_log) identifier_log (block (if_statement (comparison_operator (attribute (identifier_last_entry) identifier_last_entry (identifier_msg) identifier_msg )attribute (attribute (identifier_cur_entry) identifier_cur_entry (identifier_msg) identifier_msg )attribute )comparison_operator (block (expression_statement (augmented_assignment (identifier_num_rep) identifier_num_rep (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_log_pruned) identifier_log_pruned (identifier_append) identifier_append )attribute (argument_list (list (identifier_last_entry) identifier_last_entry (identifier_num_rep) identifier_num_rep )list )argument_list )call )expression_statement (expression_statement (assignment (identifier_num_rep) identifier_num_rep (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_last_entry) identifier_last_entry (identifier_cur_entry) identifier_cur_entry )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (call (attribute (identifier_log_pruned) identifier_log_pruned (identifier_append) identifier_append )attribute (argument_list (list (identifier_cur_entry) identifier_cur_entry (identifier_num_rep) identifier_num_rep )list )argument_list )call )expression_statement (expression_statement (assignment (identifier_log_formatted) identifier_log_formatted (string_"") string_"" )assignment )expression_statement (for_statement (identifier_cur_entry) identifier_cur_entry (identifier_log_pruned) identifier_log_pruned (block (expression_statement (augmented_assignment (identifier_log_formatted) identifier_log_formatted (call (attribute (identifier_self) identifier_self (identifier_qteFormatMessage) identifier_qteFormatMessage )attribute (argument_list (subscript (identifier_cur_entry) identifier_cur_entry (integer_0) integer_0 )subscript (subscript (identifier_cur_entry) identifier_cur_entry (integer_1) integer_1 )subscript )argument_list )call )augmented_assignment )expression_statement (expression_statement (binary_operator (identifier_log_formatted) identifier_log_formatted (string_'\n') string_'\n' )binary_operator )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_qteText) identifier_qteText )attribute (identifier_insertHtml) identifier_insertHtml )attribute (argument_list (identifier_log_formatted) identifier_log_formatted )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_qteMoveToEndOfBuffer) identifier_qteMoveToEndOfBuffer )attribute (argument_list )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_qteAutoActivate) identifier_qteAutoActivate )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_qteAutoActivate) identifier_qteAutoActivate )attribute (False) False )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_qteMain) identifier_qteMain )attribute (identifier_qteMakeAppletActive) identifier_qteMakeAppletActive )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Fetch and display the next batch of log messages.
(module (function_definition (function_name_add_alias) function_name_add_alias (parameters (identifier_agent) identifier_agent (identifier_prefix) identifier_prefix (identifier_alias) identifier_alias )parameters (block (return_statement (call (identifier__broadcast) identifier__broadcast (argument_list (identifier_agent) identifier_agent (identifier_AddMappingManager) identifier_AddMappingManager (attribute (identifier_RecordType) identifier_RecordType (identifier_record_CNAME) identifier_record_CNAME )attribute (identifier_prefix) identifier_prefix (identifier_alias) identifier_alias )argument_list )call )return_statement )block )function_definition )module
Adds an alias mapping with a contract. It has high latency but gives some kind of guarantee.
(module (function_definition (function_name_info_hash_base32) function_name_info_hash_base32 (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (string_'_data') string_'_data' (None) None )argument_list )call (block (return_statement (call (identifier_b32encode) identifier_b32encode (argument_list (call (attribute (call (identifier_sha1) identifier_sha1 (argument_list (call (identifier_bencode) identifier_bencode (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (string_'info') string_'info' )subscript )argument_list )call )argument_list )call (identifier_digest) identifier_digest )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block (else_clause (block (raise_statement (attribute (identifier_exceptions) identifier_exceptions (identifier_TorrentNotGeneratedException) identifier_TorrentNotGeneratedException )attribute )raise_statement )block )else_clause )if_statement )block )function_definition )module
Returns the base32 info hash of the torrent. Useful for generating magnet links. .. note:: ``generate()`` must be called first.
(module (function_definition (function_name_write_content) function_name_write_content (parameters (identifier_self) identifier_self (identifier_content) identifier_content (identifier_destination) identifier_destination )parameters (block (expression_statement (assignment (identifier_directory) identifier_directory (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_destination) identifier_destination )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_directory) identifier_directory (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )expression_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_io) identifier_io (identifier_open) identifier_open )attribute (argument_list (identifier_destination) identifier_destination (string_'w') string_'w' (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (identifier_content) identifier_content )argument_list )call )expression_statement )block )with_statement (return_statement (identifier_destination) identifier_destination )return_statement )block )function_definition )module
Write given content to destination path. It will create needed directory structure first if it contain some directories that does not allready exists. Args: content (str): Content to write to target file. destination (str): Destination path for target file. Returns: str: Path where target file has been written.
(module (function_definition (function_name_all_errors) function_name_all_errors (parameters (identifier_self) identifier_self (default_parameter (identifier_joiner) identifier_joiner (string_"; ") string_"; " )default_parameter )parameters (block (expression_statement (assignment (identifier_parts) identifier_parts (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_pname) identifier_pname (identifier_errs) identifier_errs )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_errors) identifier_errors )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (identifier_err) identifier_err (identifier_errs) identifier_errs (block (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_"{0}: {1}") string_"{0}: {1}" (identifier_format) identifier_format )attribute (argument_list (identifier_pname) identifier_pname (identifier_err) identifier_err )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (call (attribute (identifier_joiner) identifier_joiner (identifier_join) identifier_join )attribute (argument_list (identifier_parts) identifier_parts )argument_list )call )return_statement )block )function_definition )module
Returns a string representation of all errors recorded for the instance.
(module (function_definition (function_name_safe_type) function_name_safe_type (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_tree) identifier_tree )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_list) identifier_list )argument_list )call )not_operator (block (expression_statement (assignment (identifier_name) identifier_name (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (string_"did not pass validation against callable: %s") string_"did not pass validation against callable: %s" (identifier_name) identifier_name )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_reason) identifier_reason (binary_operator (string_'expected a list but got %s') string_'expected a list but got %s' (call (identifier_safe_repr) identifier_safe_repr (argument_list (identifier_data) identifier_data )argument_list )call )binary_operator )assignment )expression_statement (raise_statement (call (identifier_Invalid) identifier_Invalid (argument_list (attribute (identifier_self) identifier_self (identifier_schema) identifier_schema )attribute (identifier_tree) identifier_tree (keyword_argument (identifier_reason) identifier_reason (identifier_reason) identifier_reason )keyword_argument (keyword_argument (identifier_pair) identifier_pair (string_'value') string_'value' )keyword_argument (keyword_argument (identifier_msg) identifier_msg (identifier_msg) identifier_msg )keyword_argument )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Make sure that the incoming data complies with the class type we are expecting it to be. In this case, classes that inherit from this base class expect data to be of type ``list``.
(module (function_definition (function_name_read_git_commit_timestamp_for_file) function_name_read_git_commit_timestamp_for_file (parameters (identifier_filepath) identifier_filepath (default_parameter (identifier_repo_path) identifier_repo_path (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_repo) identifier_repo (call (attribute (attribute (attribute (identifier_git) identifier_git (identifier_repo) identifier_repo )attribute (identifier_base) identifier_base )attribute (identifier_Repo) identifier_Repo )attribute (argument_list (keyword_argument (identifier_path) identifier_path (identifier_repo_path) identifier_repo_path )keyword_argument (keyword_argument (identifier_search_parent_directories) identifier_search_parent_directories (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_head_commit) identifier_head_commit (attribute (attribute (identifier_repo) identifier_repo (identifier_head) identifier_head )attribute (identifier_commit) identifier_commit )attribute )assignment )expression_statement (for_statement (identifier_commit) identifier_commit (call (attribute (identifier_head_commit) identifier_head_commit (identifier_iter_parents) identifier_iter_parents )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call (block (return_statement (attribute (identifier_commit) identifier_commit (identifier_committed_datetime) identifier_committed_datetime )attribute )return_statement )block )for_statement (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (call (attribute (string_'File {} not found') string_'File {} not found' (identifier_format) identifier_format )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Obtain the timestamp for the most recent commit to a given file in a Git repository. Parameters ---------- filepath : `str` Repository-relative path for a file. repo_path : `str`, optional Path to the Git repository. Leave as `None` to use the current working directory. Returns ------- commit_timestamp : `datetime.datetime` The datetime of a the most recent commit to the given file. Raises ------ IOError Raised if the ``filepath`` does not exist in the Git repository.
(module (function_definition (function_name_compute_K_analytical) function_name_compute_K_analytical (parameters (identifier_self) identifier_self (identifier_spacing) identifier_spacing )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_spacing) identifier_spacing (identifier_Number) identifier_Number )argument_list )call )assert_statement (expression_statement (assignment (identifier_K) identifier_K (call (attribute (identifier_geometric_factors) identifier_geometric_factors (identifier_compute_K_analytical) identifier_compute_K_analytical )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_spacing) identifier_spacing )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (call (attribute (identifier_geometric_factors) identifier_geometric_factors (identifier_apply_K) identifier_apply_K )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_K) identifier_K )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_fix_sign_with_K) identifier_fix_sign_with_K (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )argument_list )call )expression_statement )block )function_definition )module
Assuming an equal electrode spacing, compute the K-factor over a homogeneous half-space. For more complex grids, please refer to the module: reda.utils.geometric_factors Parameters ---------- spacing: float Electrode spacing
(module (function_definition (function_name_sync_files) function_name_sync_files (parameters (identifier_self) identifier_self (identifier_dataset_key) identifier_dataset_key )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__datasets_api) identifier__datasets_api )attribute (identifier_sync) identifier_sync )attribute (argument_list (list_splat (parenthesized_expression (call (identifier_parse_dataset_key) identifier_parse_dataset_key (argument_list (identifier_dataset_key) identifier_dataset_key )argument_list )call )parenthesized_expression )list_splat )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (attribute (identifier__swagger) identifier__swagger (identifier_rest) identifier_rest )attribute (identifier_ApiException) identifier_ApiException )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_RestApiError) identifier_RestApiError (argument_list (keyword_argument (identifier_cause) identifier_cause (identifier_e) identifier_e )keyword_argument )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Trigger synchronization process to update all dataset files linked to source URLs. :param dataset_key: Dataset identifier, in the form of owner/id :type dataset_key: str :raises RestApiException: If a server error occurs Examples -------- >>> import datadotworld as dw >>> api_client = dw.api_client() >>> api_client.sync_files('username/test-dataset') # doctest: +SKIP
(module (function_definition (function_name_detect) function_name_detect (parameters (identifier_self) identifier_self (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_t) identifier_t (call (attribute (identifier_text) identifier_text (identifier_encode) identifier_encode )attribute (argument_list (string_"utf-8") string_"utf-8" )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_reliable) identifier_reliable (identifier_index) identifier_index (identifier_top_3_choices) identifier_top_3_choices )pattern_list (call (attribute (identifier_cld2) identifier_cld2 (identifier_detect) identifier_detect )attribute (argument_list (identifier_t) identifier_t (keyword_argument (identifier_bestEffort) identifier_bestEffort (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_reliable) identifier_reliable )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_reliable) identifier_reliable )attribute (False) False )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_reliable) identifier_reliable (identifier_index) identifier_index (identifier_top_3_choices) identifier_top_3_choices )pattern_list (call (attribute (identifier_cld2) identifier_cld2 (identifier_detect) identifier_detect )attribute (argument_list (identifier_t) identifier_t (keyword_argument (identifier_bestEffort) identifier_bestEffort (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_quiet) identifier_quiet )attribute )not_operator (block (if_statement (not_operator (identifier_reliable) identifier_reliable )not_operator (block (raise_statement (call (identifier_UnknownLanguage) identifier_UnknownLanguage (argument_list (string_"Try passing a longer snippet of text") string_"Try passing a longer snippet of text" )argument_list )call )raise_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_"Detector is not able to detect the language reliably.") string_"Detector is not able to detect the language reliably." )argument_list )call )expression_statement )block )else_clause )if_statement )block )if_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_languages) identifier_languages )attribute (list_comprehension (call (identifier_Language) identifier_Language (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_top_3_choices) identifier_top_3_choices )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_language) identifier_language )attribute (subscript (attribute (identifier_self) identifier_self (identifier_languages) identifier_languages )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_language) identifier_language )attribute )return_statement )block )function_definition )module
Decide which language is used to write the text. The method tries first to detect the language with high reliability. If that is not possible, the method switches to best effort strategy. Args: text (string): A snippet of text, the longer it is the more reliable we can detect the language used to write the text.
(module (function_definition (function_name_keep_only_update_source_in_field) function_name_keep_only_update_source_in_field (parameters (identifier_field) identifier_field (identifier_root) identifier_root (identifier_head) identifier_head (identifier_update) identifier_update )parameters (block (expression_statement (assignment (identifier_update_sources) identifier_update_sources (set_comprehension (call (attribute (identifier_source) identifier_source (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (for_in_clause (identifier_source) identifier_source (call (identifier_get_value) identifier_get_value (argument_list (call (identifier_thaw) identifier_thaw (argument_list (identifier_update) identifier_update )argument_list )call (call (attribute (string_'.') string_'.' (identifier_join) identifier_join )attribute (argument_list (list (identifier_field) identifier_field (string_'source') string_'source' )list )argument_list )call (list )list )argument_list )call )for_in_clause )set_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_update_sources) identifier_update_sources )argument_list )call (integer_1) integer_1 )comparison_operator (block (return_statement (expression_list (identifier_root) identifier_root (identifier_head) identifier_head (identifier_update) identifier_update )expression_list )return_statement )block )if_statement (expression_statement (assignment (identifier_source) identifier_source (call (attribute (identifier_update_sources) identifier_update_sources (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_field) identifier_field (identifier_root) identifier_root )comparison_operator (block (expression_statement (assignment (identifier_root) identifier_root (call (attribute (identifier_root) identifier_root (identifier_set) identifier_set )attribute (argument_list (identifier_field) identifier_field (call (identifier_remove_elements_with_source) identifier_remove_elements_with_source (argument_list (identifier_source) identifier_source (subscript (identifier_root) identifier_root (identifier_field) identifier_field )subscript )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_field) identifier_field (identifier_head) identifier_head )comparison_operator (block (expression_statement (assignment (identifier_head) identifier_head (call (attribute (identifier_head) identifier_head (identifier_set) identifier_set )attribute (argument_list (identifier_field) identifier_field (call (identifier_remove_elements_with_source) identifier_remove_elements_with_source (argument_list (identifier_source) identifier_source (subscript (identifier_head) identifier_head (identifier_field) identifier_field )subscript )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (expression_list (identifier_root) identifier_root (identifier_head) identifier_head (identifier_update) identifier_update )expression_list )return_statement )block )function_definition )module
Remove elements from root and head where ``source`` matches the update. This is useful if the update needs to overwrite all elements with the same source. .. note:: If the update doesn't contain exactly one source in ``field``, the records are returned with no modifications. Args: field (str): the field to filter out. root (pmap): the root record, whose ``field`` will be cleaned. head (pmap): the head record, whose ``field`` will be cleaned. update (pmap): the update record, from which the ``source`` is read. Returns: tuple: ``(root, head, update)`` with some elements filtered out from ``root`` and ``head``.
(module (function_definition (function_name_results) function_name_results (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (function_definition (function_name_worker) function_name_worker (parameters )parameters (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'page') string_'page' )subscript (integer_1) integer_1 )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_response) identifier_response (identifier_list) identifier_list )argument_list )call (block (expression_statement (yield (identifier_response) identifier_response )yield )expression_statement (break_statement )break_statement )block (elif_clause (call (identifier__is_page) identifier__is_page (argument_list (identifier_response) identifier_response )argument_list )call (block (expression_statement (yield (subscript (identifier_response) identifier_response (string_'results') string_'results' )subscript )yield )expression_statement (if_statement (subscript (identifier_response) identifier_response (string_'next') string_'next' )subscript (block (expression_statement (augmented_assignment (subscript (identifier_kwargs) identifier_kwargs (string_'page') string_'page' )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (break_statement )break_statement )block )else_clause )if_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_NoResultsError) identifier_NoResultsError (argument_list (identifier_response) identifier_response )argument_list )call )raise_statement )block )else_clause )if_statement )block )while_statement )block )function_definition (return_statement (call (attribute (attribute (identifier_itertools) identifier_itertools (identifier_chain) identifier_chain )attribute (identifier_from_iterable) identifier_from_iterable )attribute (argument_list (call (identifier_worker) identifier_worker (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return an iterator with all pages of data. Return NoResultsError with response if there is unexpected data.
(module (function_definition (function_name_ContainsNone) function_name_ContainsNone (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_values) identifier_values )list_splat_pattern )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__awql) identifier__awql )attribute (call (attribute (identifier_self) identifier_self (identifier__CreateMultipleValuesCondition) identifier__CreateMultipleValuesCondition )attribute (argument_list (identifier_values) identifier_values (string_'CONTAINS_NONE') string_'CONTAINS_NONE' )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__query_builder) identifier__query_builder )attribute )return_statement )block )function_definition )module
Sets the type of the WHERE clause as "contains none". Args: *values: The values to be used in the WHERE condition. Returns: The query builder that this WHERE builder links to.
(module (function_definition (function_name_get_module_attr) function_name_get_module_attr (parameters (identifier_module_filename) identifier_module_filename (identifier_module_attr) identifier_module_attr (default_parameter (identifier_namespace) identifier_namespace (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_namespace) identifier_namespace (None) None )comparison_operator (block (expression_statement (assignment (identifier_namespace) identifier_namespace (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_module_filename) identifier_module_filename (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_module_filename) identifier_module_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_namespace) identifier_namespace (string_'__file__') string_'__file__' )subscript (identifier_module_filename) identifier_module_filename )assignment )expression_statement (expression_statement (assignment (identifier_module_dir) identifier_module_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_module_filename) identifier_module_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_old_cwd) identifier_old_cwd (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_old_sys_path) identifier_old_sys_path (subscript (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (slice (colon) colon )slice )subscript )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (identifier_module_dir) identifier_module_dir )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_module_dir) identifier_module_dir )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_module_filename) identifier_module_filename (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_mf) identifier_mf )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (identifier_exec) identifier_exec (argument_list (call (identifier_compile) identifier_compile (argument_list (call (attribute (identifier_mf) identifier_mf (identifier_read) identifier_read )attribute (argument_list )argument_list )call (identifier_module_filename) identifier_module_filename (string_'exec') string_'exec' )argument_list )call (identifier_namespace) identifier_namespace )argument_list )call )expression_statement )block )with_statement (return_statement (subscript (identifier_namespace) identifier_namespace (identifier_module_attr) identifier_module_attr )subscript )return_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (identifier_old_cwd) identifier_old_cwd )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (identifier_old_sys_path) identifier_old_sys_path )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Get an attribute from a module. This uses exec to load the module with a private namespace, and then plucks and returns the given attribute from that module's namespace. Note that, while this method doesn't have any explicit unit tests, it is tested implicitly by the doctor's own documentation. The Sphinx build process will fail to generate docs if this does not work. :param str module_filename: Path to the module to execute (e.g. "../src/app.py"). :param str module_attr: Attribute to pluck from the module's namespace. (e.g. "app"). :param dict namespace: Optional namespace. If one is not passed, an empty dict will be used instead. Note that this function mutates the passed namespace, so you can inspect a passed dict after calling this method to see how the module changed it. :returns: The attribute from the module. :raises KeyError: if the module doesn't have the given attribute.
(module (function_definition (function_name___identify_user) function_name___identify_user (parameters (identifier_self) identifier_self (identifier_username) identifier_username (identifier_csrf) identifier_csrf )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_"username") string_"username" (identifier_username) identifier_username )pair (pair (string_"csrf") string_"csrf" (identifier_csrf) identifier_csrf )pair (pair (string_"apiClient") string_"apiClient" (string_"WEB") string_"WEB" )pair (pair (string_"bindDevice") string_"bindDevice" (string_"false") string_"false" )pair (pair (string_"skipLinkAccount") string_"skipLinkAccount" (string_"false") string_"false" )pair (pair (string_"redirectTo") string_"redirectTo" (string_"") string_"" )pair (pair (string_"skipFirstUse") string_"skipFirstUse" (string_"") string_"" )pair (pair (string_"referrerId") string_"referrerId" (string_"") string_"" )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_self) identifier_self (identifier_post) identifier_post )attribute (argument_list (string_"/login/identifyUser") string_"/login/identifyUser" (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (attribute (attribute (identifier_requests) identifier_requests (identifier_codes) identifier_codes )attribute (identifier_ok) identifier_ok )attribute )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new_csrf) identifier_new_csrf (call (identifier_getSpHeaderValue) identifier_getSpHeaderValue (argument_list (identifier_result) identifier_result (identifier_CSRF_KEY) identifier_CSRF_KEY )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_auth_level) identifier_auth_level (call (identifier_getSpHeaderValue) identifier_getSpHeaderValue (argument_list (identifier_result) identifier_result (identifier_AUTH_LEVEL_KEY) identifier_AUTH_LEVEL_KEY )argument_list )call )assignment )expression_statement (return_statement (tuple (identifier_new_csrf) identifier_new_csrf (identifier_auth_level) identifier_auth_level )tuple )return_statement )block )if_statement (return_statement (tuple (None) None (None) None )tuple )return_statement )block )function_definition )module
Returns reusable CSRF code and the auth level as a 2-tuple
(module (function_definition (function_name__import_plugins) function_name__import_plugins (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_detected) identifier_detected )attribute (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_scanLock) identifier_scanLock )attribute (identifier_acquire) identifier_acquire )attribute (argument_list )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_detected) identifier_detected )attribute (block (return_statement )return_statement )block )if_statement (try_statement (block (expression_statement (call (identifier_import_apps_submodule) identifier_import_apps_submodule (argument_list (string_"content_plugins") string_"content_plugins" )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_detected) identifier_detected )attribute (True) True )assignment )expression_statement )block (finally_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_scanLock) identifier_scanLock )attribute (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Internal function, ensure all plugin packages are imported.
(module (function_definition (function_name__vertex_net_cost) function_name__vertex_net_cost (parameters (identifier_vertex) identifier_vertex (identifier_v2n) identifier_v2n (identifier_placements) identifier_placements (identifier_has_wrap_around_links) identifier_has_wrap_around_links (identifier_machine) identifier_machine )parameters (block (expression_statement (assignment (identifier_total_cost) identifier_total_cost (float_0.0) float_0.0 )assignment )expression_statement (for_statement (identifier_net) identifier_net (subscript (identifier_v2n) identifier_v2n (identifier_vertex) identifier_vertex )subscript (block (expression_statement (augmented_assignment (identifier_total_cost) identifier_total_cost (call (identifier__net_cost) identifier__net_cost (argument_list (identifier_net) identifier_net (identifier_placements) identifier_placements (identifier_has_wrap_around_links) identifier_has_wrap_around_links (identifier_machine) identifier_machine )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_total_cost) identifier_total_cost )return_statement )block )function_definition )module
Get the total cost of the nets connected to the given vertex. Parameters ---------- vertex The vertex whose nets we're interested in. v2n : {vertex: [:py:class:`rig.netlist.Net`, ...], ...} placements : {vertex: (x, y), ...} has_wrap_around_links : bool machine : :py:class:`rig.place_and_route.Machine` Returns ------- float
(module (function_definition (function_name_abort_now) function_name_abort_now (parameters )parameters (block (if_statement (comparison_operator (attribute (identifier_os) identifier_os (identifier_name) identifier_name )attribute (string_'posix') string_'posix' )comparison_operator (block (import_statement (dotted_name (identifier_signal) identifier_signal )dotted_name )import_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_kill) identifier_kill )attribute (argument_list (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call (attribute (identifier_signal) identifier_signal (identifier_SIGTERM) identifier_SIGTERM )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_kill) identifier_kill )attribute (argument_list (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call (attribute (identifier_signal) identifier_signal (identifier_SIGKILL) identifier_SIGKILL )attribute )argument_list )call )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_os) identifier_os (identifier_name) identifier_name )attribute (string_'nt') string_'nt' )comparison_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_abort) identifier_abort )attribute (argument_list )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier__exit) identifier__exit )attribute (argument_list (integer_3) integer_3 )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Force exit of current process without cleanup.
(module (function_definition (function_name_warning) function_name_warning (parameters (identifier_message) identifier_message )parameters (block (import_statement (aliased_import (dotted_name (identifier_lltk) identifier_lltk (identifier_config) identifier_config )dotted_name (identifier_config) identifier_config )aliased_import )import_statement (if_statement (subscript (identifier_config) identifier_config (string_'warnings') string_'warnings' )subscript (block (try_statement (block (import_from_statement (dotted_name (identifier_termcolor) identifier_termcolor )dotted_name (dotted_name (identifier_colored) identifier_colored )dotted_name )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (function_definition (function_name_colored) function_name_colored (parameters (identifier_message) identifier_message (identifier_color) identifier_color )parameters (block (return_statement (identifier_message) identifier_message )return_statement )block )function_definition )block )except_clause )try_statement (print_statement (call (identifier_colored) identifier_colored (argument_list (binary_operator (string_'@LLTK-WARNING: ') string_'@LLTK-WARNING: ' (identifier_message) identifier_message )binary_operator (string_'red') string_'red' )argument_list )call )print_statement )block )if_statement )block )function_definition )module
Prints a message if warning mode is enabled.
(module (function_definition (function_name_search) function_name_search (parameters (identifier_self) identifier_self (typed_parameter (identifier_id_list) identifier_id_list (type (identifier_List) identifier_List )type )typed_parameter (typed_parameter (identifier_negated_classes) identifier_negated_classes (type (identifier_List) identifier_List )type )typed_parameter (typed_parameter (identifier_limit) identifier_limit (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_int) identifier_int )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (identifier_method) identifier_method (type (identifier_Optional) identifier_Optional )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_SimResult) identifier_SimResult )type )type_parameter )generic_type )type (block (raise_statement (identifier_NotImplementedError) identifier_NotImplementedError )raise_statement )block )function_definition )module
Given an input list of classes or individuals, provides a ranking of similar profiles
(module (function_definition (function_name_mimf_ferrario) function_name_mimf_ferrario (parameters (identifier_mi) identifier_mi )parameters (block (expression_statement (assignment (identifier_mf) identifier_mf (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (unary_operator (float_0.00012336) float_0.00012336 )unary_operator (binary_operator (identifier_mi) identifier_mi (integer_6) integer_6 )binary_operator )binary_operator (binary_operator (float_0.003160) float_0.003160 (binary_operator (identifier_mi) identifier_mi (integer_5) integer_5 )binary_operator )binary_operator )binary_operator (binary_operator (float_0.02960) float_0.02960 (binary_operator (identifier_mi) identifier_mi (integer_4) integer_4 )binary_operator )binary_operator )binary_operator (line_continuation_\) line_continuation_\ (binary_operator (float_0.12350) float_0.12350 (binary_operator (identifier_mi) identifier_mi (integer_3) integer_3 )binary_operator )binary_operator )binary_operator (binary_operator (float_0.21550) float_0.21550 (binary_operator (identifier_mi) identifier_mi (integer_2) integer_2 )binary_operator )binary_operator )binary_operator (binary_operator (float_0.19022) float_0.19022 (identifier_mi) identifier_mi )binary_operator )binary_operator (float_0.46575) float_0.46575 )binary_operator )assignment )expression_statement (return_statement (identifier_mf) identifier_mf )return_statement )block )function_definition )module
Curvature MiMf from Ferrario etal. 2005MNRAS.361.1131.
(module (function_definition (function_name_GetOptions) function_name_GetOptions (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute (block (return_statement (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute )return_statement )block )if_statement (import_from_statement (dotted_name (identifier_google) identifier_google (identifier_protobuf) identifier_protobuf )dotted_name (dotted_name (identifier_descriptor_pb2) identifier_descriptor_pb2 )dotted_name )import_from_statement (try_statement (block (expression_statement (assignment (identifier_options_class) identifier_options_class (call (identifier_getattr) identifier_getattr (argument_list (identifier_descriptor_pb2) identifier_descriptor_pb2 (attribute (identifier_self) identifier_self (identifier__options_class_name) identifier__options_class_name )attribute )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_'Unknown options class name %s!') string_'Unknown options class name %s!' (parenthesized_expression (attribute (identifier_self) identifier_self (identifier__options_class_name) identifier__options_class_name )attribute )parenthesized_expression )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute (call (identifier_options_class) identifier_options_class (argument_list )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute )return_statement )block )function_definition )module
Retrieves descriptor options. This method returns the options set or creates the default options for the descriptor.
(module (function_definition (function_name_actualize_source_type) function_name_actualize_source_type (parameters (identifier_self) identifier_self (identifier_sources) identifier_sources (identifier_prop_set) identifier_prop_set )parameters (block (assert_statement (call (identifier_is_iterable_typed) identifier_is_iterable_typed (argument_list (identifier_sources) identifier_sources (identifier_VirtualTarget) identifier_VirtualTarget )argument_list )call )assert_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_prop_set) identifier_prop_set (attribute (identifier_property_set) identifier_property_set (identifier_PropertySet) identifier_PropertySet )attribute )argument_list )call )assert_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (identifier_i) identifier_i (identifier_sources) identifier_sources (block (expression_statement (assignment (identifier_scanner) identifier_scanner (None) None )assignment )expression_statement (if_statement (call (attribute (identifier_i) identifier_i (identifier_type) identifier_type )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_scanner) identifier_scanner (call (attribute (attribute (attribute (identifier_b2) identifier_b2 (identifier_build) identifier_build )attribute (identifier_type) identifier_type )attribute (identifier_get_scanner) identifier_get_scanner )attribute (argument_list (call (attribute (identifier_i) identifier_i (identifier_type) identifier_type )attribute (argument_list )argument_list )call (identifier_prop_set) identifier_prop_set )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_i) identifier_i (identifier_actualize) identifier_actualize )attribute (argument_list (identifier_scanner) identifier_scanner )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_r) identifier_r )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Helper for 'actualize_sources'. For each passed source, actualizes it with the appropriate scanner. Returns the actualized virtual targets.
(module (function_definition (function_name_patch_wave_header) function_name_patch_wave_header (parameters (identifier_body) identifier_body )parameters (block (expression_statement (assignment (identifier_length) identifier_length (call (identifier_len) identifier_len (argument_list (identifier_body) identifier_body )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_padded) identifier_padded (binary_operator (identifier_length) identifier_length (binary_operator (identifier_length) identifier_length (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_total) identifier_total (binary_operator (identifier_WAVE_HEADER_LENGTH) identifier_WAVE_HEADER_LENGTH (identifier_padded) identifier_padded )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_header) identifier_header (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (identifier_WAVE_HEADER) identifier_WAVE_HEADER )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_header) identifier_header (slice (integer_4) integer_4 (colon) colon (integer_8) integer_8 )slice )subscript (call (identifier_bytearray) identifier_bytearray (argument_list (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'<I') string_'<I' (identifier_total) identifier_total )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_header) identifier_header (call (identifier_bytearray) identifier_bytearray (argument_list (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'<I') string_'<I' (identifier_length) identifier_length )argument_list )call )argument_list )call )augmented_assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (binary_operator (identifier_header) identifier_header (identifier_body) identifier_body )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_length) identifier_length (identifier_padded) identifier_padded )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (binary_operator (identifier_data) identifier_data (call (identifier_bytearray) identifier_bytearray (argument_list (list (integer_0) integer_0 )list )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Patch header to the given wave body. :param body: the wave content body, it should be bytearray.
(module (function_definition (function_name_mifare_classic_read_block) function_name_mifare_classic_read_block (parameters (identifier_self) identifier_self (identifier_block_number) identifier_block_number )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_call_function) identifier_call_function )attribute (argument_list (identifier_PN532_COMMAND_INDATAEXCHANGE) identifier_PN532_COMMAND_INDATAEXCHANGE (keyword_argument (identifier_params) identifier_params (list (integer_0x01) integer_0x01 (identifier_MIFARE_CMD_READ) identifier_MIFARE_CMD_READ (binary_operator (identifier_block_number) identifier_block_number (integer_0xFF) integer_0xFF )binary_operator )list )keyword_argument (keyword_argument (identifier_response_length) identifier_response_length (integer_17) integer_17 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_response) identifier_response (integer_0) integer_0 )subscript (integer_0x00) integer_0x00 )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (subscript (identifier_response) identifier_response (slice (integer_1) integer_1 (colon) colon )slice )subscript )return_statement )block )function_definition )module
Read a block of data from the card. Block number should be the block to read. If the block is successfully read a bytearray of length 16 with data starting at the specified block will be returned. If the block is not read then None will be returned.
(module (function_definition (function_name_pull_full_properties) function_name_pull_full_properties (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_full_properties) identifier_full_properties (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_session) identifier_session )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__uri) identifier__uri )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__properties) identifier__properties )attribute (call (identifier_dict) identifier_dict (argument_list (identifier_full_properties) identifier_full_properties )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__properties_timestamp) identifier__properties_timestamp )attribute (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__full_properties) identifier__full_properties )attribute (True) True )assignment )expression_statement )block )function_definition )module
Retrieve the full set of resource properties and cache them in this object. Authorization requirements: * Object-access permission to this resource. Raises: :exc:`~zhmcclient.HTTPError` :exc:`~zhmcclient.ParseError` :exc:`~zhmcclient.AuthError` :exc:`~zhmcclient.ConnectionError`
(module (function_definition (function_name_thread) function_name_thread (parameters (identifier_self) identifier_self (typed_parameter (identifier_value) identifier_value (type (identifier_str) identifier_str )type )typed_parameter )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_str) identifier_str )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"'thread' MUST be a string") string_"'thread' MUST be a string" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__thread) identifier__thread )attribute (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Set thread id of the message Args: value (str): the thread id
(module (function_definition (function_name_cli_login) function_name_cli_login (parameters (identifier_self) identifier_self (default_parameter (identifier_password) identifier_password (string_'') string_'' )default_parameter (default_parameter (identifier_captcha) identifier_captcha (string_'') string_'' )default_parameter (default_parameter (identifier_email_code) identifier_email_code (string_'') string_'' )default_parameter (default_parameter (identifier_twofactor_code) identifier_twofactor_code (string_'') string_'' )default_parameter (default_parameter (identifier_language) identifier_language (string_'english') string_'english' )default_parameter )parameters (block (while_statement (True) True (block (try_statement (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_login) identifier_login )attribute (argument_list (identifier_password) identifier_password (identifier_captcha) identifier_captcha (identifier_email_code) identifier_email_code (identifier_twofactor_code) identifier_twofactor_code (identifier_language) identifier_language )argument_list )call )return_statement )block (except_clause (as_pattern (tuple (identifier_LoginIncorrect) identifier_LoginIncorrect (identifier_CaptchaRequired) identifier_CaptchaRequired )tuple (as_pattern_target (identifier_exp) identifier_exp )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_email_code) identifier_email_code (assignment (identifier_twofactor_code) identifier_twofactor_code (string_'') string_'' )assignment )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_exp) identifier_exp (identifier_LoginIncorrect) identifier_LoginIncorrect )argument_list )call (block (expression_statement (assignment (identifier_prompt) identifier_prompt (parenthesized_expression (conditional_expression (string_"Enter password for %s: ") string_"Enter password for %s: " (not_operator (identifier_password) identifier_password )not_operator (string_"Invalid password for %s. Enter password: ") string_"Invalid password for %s. Enter password: " )conditional_expression )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_password) identifier_password (call (identifier_getpass) identifier_getpass (argument_list (binary_operator (identifier_prompt) identifier_prompt (call (identifier_repr) identifier_repr (argument_list (attribute (identifier_self) identifier_self (identifier_username) identifier_username )attribute )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_exp) identifier_exp (identifier_CaptchaRequired) identifier_CaptchaRequired )argument_list )call (block (expression_statement (assignment (identifier_prompt) identifier_prompt (binary_operator (string_"Solve CAPTCHA at %s\nCAPTCHA code: ") string_"Solve CAPTCHA at %s\nCAPTCHA code: " (attribute (identifier_self) identifier_self (identifier_captcha_url) identifier_captcha_url )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_captcha) identifier_captcha (call (identifier__cli_input) identifier__cli_input (argument_list (identifier_prompt) identifier_prompt )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_captcha) identifier_captcha (string_'') string_'' )assignment )expression_statement )block )else_clause )if_statement )block )except_clause (except_clause (identifier_EmailCodeRequired) identifier_EmailCodeRequired (block (expression_statement (assignment (identifier_prompt) identifier_prompt (parenthesized_expression (conditional_expression (string_"Enter email code: ") string_"Enter email code: " (not_operator (identifier_email_code) identifier_email_code )not_operator (string_"Incorrect code. Enter email code: ") string_"Incorrect code. Enter email code: " )conditional_expression )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_email_code) identifier_email_code (identifier_twofactor_code) identifier_twofactor_code )pattern_list (expression_list (call (identifier__cli_input) identifier__cli_input (argument_list (identifier_prompt) identifier_prompt )argument_list )call (string_'') string_'' )expression_list )assignment )expression_statement )block )except_clause (except_clause (identifier_TwoFactorCodeRequired) identifier_TwoFactorCodeRequired (block (expression_statement (assignment (identifier_prompt) identifier_prompt (parenthesized_expression (conditional_expression (string_"Enter 2FA code: ") string_"Enter 2FA code: " (not_operator (identifier_twofactor_code) identifier_twofactor_code )not_operator (string_"Incorrect code. Enter 2FA code: ") string_"Incorrect code. Enter 2FA code: " )conditional_expression )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_email_code) identifier_email_code (identifier_twofactor_code) identifier_twofactor_code )pattern_list (expression_list (string_'') string_'' (call (identifier__cli_input) identifier__cli_input (argument_list (identifier_prompt) identifier_prompt )argument_list )call )expression_list )assignment )expression_statement )block )except_clause )try_statement )block )while_statement )block )function_definition )module
Generates CLI prompts to perform the entire login process :param password: password, if it wasn't provided on instance init :type password: :class:`str` :param captcha: text reponse for captcha challenge :type captcha: :class:`str` :param email_code: email code for steam guard :type email_code: :class:`str` :param twofactor_code: 2FA code for steam guard :type twofactor_code: :class:`str` :param language: select language for steam web pages (sets language cookie) :type language: :class:`str` :return: a session on success and :class:`None` otherwise :rtype: :class:`requests.Session`, :class:`None` .. code:: python In [3]: user.cli_login() Enter password for 'steamuser': Solve CAPTCHA at https://steamcommunity.com/login/rendercaptcha/?gid=1111111111111111111 CAPTCHA code: 123456 Invalid password for 'steamuser'. Enter password: Solve CAPTCHA at https://steamcommunity.com/login/rendercaptcha/?gid=2222222222222222222 CAPTCHA code: abcdef Enter 2FA code: AB123 Out[3]: <requests.sessions.Session at 0x6fffe56bef0>
(module (function_definition (function_name_get_installed_extension) function_name_get_installed_extension (parameters (identifier_name) identifier_name (default_parameter (identifier_user) identifier_user (None) None )default_parameter (default_parameter (identifier_host) identifier_host (None) None )default_parameter (default_parameter (identifier_port) identifier_port (None) None )default_parameter (default_parameter (identifier_maintenance_db) identifier_maintenance_db (None) None )default_parameter (default_parameter (identifier_password) identifier_password (None) None )default_parameter (default_parameter (identifier_runas) identifier_runas (None) None )default_parameter )parameters (block (return_statement (call (attribute (call (identifier_installed_extensions) identifier_installed_extensions (argument_list (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_host) identifier_host (identifier_host) identifier_host )keyword_argument (keyword_argument (identifier_port) identifier_port (identifier_port) identifier_port )keyword_argument (keyword_argument (identifier_maintenance_db) identifier_maintenance_db (identifier_maintenance_db) identifier_maintenance_db )keyword_argument (keyword_argument (identifier_password) identifier_password (identifier_password) identifier_password )keyword_argument (keyword_argument (identifier_runas) identifier_runas (identifier_runas) identifier_runas )keyword_argument )argument_list )call (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (None) None )argument_list )call )return_statement )block )function_definition )module
Get info about an installed postgresql extension CLI Example: .. code-block:: bash salt '*' postgres.get_installed_extension plpgsql
(module (function_definition (function_name_resource_filename) function_name_resource_filename (parameters (identifier_package_or_requirement) identifier_package_or_requirement (identifier_resource_name) identifier_resource_name )parameters (block (if_statement (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_resource_exists) identifier_resource_exists )attribute (argument_list (identifier_package_or_requirement) identifier_package_or_requirement (identifier_resource_name) identifier_resource_name )argument_list )call (block (return_statement (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_resource_filename) identifier_resource_filename )attribute (argument_list (identifier_package_or_requirement) identifier_package_or_requirement (identifier_resource_name) identifier_resource_name )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_path) identifier_path (call (identifier__search_in_share_folders) identifier__search_in_share_folders (argument_list (identifier_package_or_requirement) identifier_package_or_requirement (identifier_resource_name) identifier_resource_name )argument_list )call )assignment )expression_statement (if_statement (identifier_path) identifier_path (block (return_statement (identifier_path) identifier_path )return_statement )block )if_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (call (attribute (string_"Resource {} not found in {}") string_"Resource {} not found in {}" (identifier_format) identifier_format )attribute (argument_list (identifier_package_or_requirement) identifier_package_or_requirement (identifier_resource_name) identifier_resource_name )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Similar to pkg_resources.resource_filename but if the resource it not found via pkg_resources it also looks in a predefined list of paths in order to find the resource :param package_or_requirement: the module in which the resource resides :param resource_name: the name of the resource :return: the path to the resource :rtype: str
(module (function_definition (function_name__CreateDynamicDisplayAdSettings) function_name__CreateDynamicDisplayAdSettings (parameters (identifier_media_service) identifier_media_service (identifier_opener) identifier_opener )parameters (block (expression_statement (assignment (identifier_image) identifier_image (call (identifier__CreateImage) identifier__CreateImage (argument_list (identifier_media_service) identifier_media_service (identifier_opener) identifier_opener (string_'https://goo.gl/dEvQeF') string_'https://goo.gl/dEvQeF' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_logo) identifier_logo (dictionary (pair (string_'type') string_'type' (string_'IMAGE') string_'IMAGE' )pair (pair (string_'mediaId') string_'mediaId' (subscript (identifier_image) identifier_image (string_'mediaId') string_'mediaId' )subscript )pair (pair (string_'xsi_type') string_'xsi_type' (string_'Image') string_'Image' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_dynamic_settings) identifier_dynamic_settings (dictionary (pair (string_'landscapeLogoImage') string_'landscapeLogoImage' (identifier_logo) identifier_logo )pair (pair (string_'pricePrefix') string_'pricePrefix' (string_'as low as') string_'as low as' )pair (pair (string_'promoText') string_'promoText' (string_'Free shipping!') string_'Free shipping!' )pair (pair (string_'xsi_type') string_'xsi_type' (string_'DynamicSettings') string_'DynamicSettings' )pair )dictionary )assignment )expression_statement (return_statement (identifier_dynamic_settings) identifier_dynamic_settings )return_statement )block )function_definition )module
Creates settings for dynamic display ad. Args: media_service: a SudsServiceProxy instance for AdWords's MediaService. opener: an OpenerDirector instance. Returns: The dynamic display ad settings.
(module (function_definition (function_name_get_lib_from) function_name_get_lib_from (parameters (identifier_search_directory) identifier_search_directory (default_parameter (identifier_lib_extension) identifier_lib_extension (string_'.so') string_'.so' )default_parameter )parameters (block (for_statement (pattern_list (identifier_root) identifier_root (identifier_dirs) identifier_dirs (identifier_files) identifier_files )pattern_list (call (identifier_walk) identifier_walk (argument_list (identifier_search_directory) identifier_search_directory )argument_list )call (block (for_statement (identifier_file) identifier_file (identifier_files) identifier_files (block (if_statement (call (attribute (identifier_file) identifier_file (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_lib_extension) identifier_lib_extension )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'get_lib_from: {}\n\t- {}') string_'get_lib_from: {}\n\t- {}' (identifier_format) identifier_format )attribute (argument_list (identifier_search_directory) identifier_search_directory (call (identifier_join) identifier_join (argument_list (identifier_root) identifier_root (identifier_file) identifier_file )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement (call (identifier_join) identifier_join (argument_list (identifier_root) identifier_root (identifier_file) identifier_file )argument_list )call )return_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Scan directories recursively until find any file with the given extension. The default extension to search is ``.so``.
(module (function_definition (function_name_execute) function_name_execute (parameters (identifier_self) identifier_self (identifier_sql) identifier_sql (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 (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_cursor) identifier_cursor )attribute (identifier_execute) identifier_execute )attribute (argument_list (identifier_sql) identifier_sql (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )expression_statement )block (except_clause (attribute (attribute (identifier_self) identifier_self (identifier_sqlite3) identifier_sqlite3 )attribute (identifier_InterfaceError) identifier_InterfaceError )attribute (identifier_msg) identifier_msg (block (raise_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sqlite3) identifier_sqlite3 )attribute (identifier_InterfaceError) identifier_InterfaceError )attribute (argument_list (binary_operator (call (identifier_unicode) identifier_unicode (argument_list (identifier_msg) identifier_msg )argument_list )call (string_'\nTry converting types or pickling.') string_'\nTry converting types or pickling.' )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_rows) identifier_rows (call (attribute (attribute (identifier_self) identifier_self (identifier_cursor) identifier_cursor )attribute (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___commit_if_necessary) identifier___commit_if_necessary )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement (if_statement (comparison_operator (None) None (attribute (attribute (identifier_self) identifier_self (identifier_cursor) identifier_cursor )attribute (identifier_description) identifier_description )attribute )comparison_operator (block (return_statement (None) None )return_statement )block (else_clause (block (expression_statement (assignment (identifier_colnames) identifier_colnames (list_comprehension (call (attribute (subscript (identifier_d) identifier_d (integer_0) integer_0 )subscript (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call (for_in_clause (identifier_d) identifier_d (attribute (attribute (identifier_self) identifier_self (identifier_cursor) identifier_cursor )attribute (identifier_description) identifier_description )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_rawdata) identifier_rawdata (list_comprehension (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (call (identifier_zip) identifier_zip (argument_list (identifier_colnames) identifier_colnames (identifier_row) identifier_row )argument_list )call )argument_list )call (for_in_clause (identifier_row) identifier_row (identifier_rows) identifier_rows )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_rawdata) identifier_rawdata )return_statement )block )else_clause )if_statement )block )function_definition )module
Run raw SQL on the database, and receive relaxing output. This is sort of the foundational method that most of the others build on.
(module (function_definition (function_name_set_direct) function_name_set_direct (parameters (identifier_self) identifier_self (identifier_address_value_dict) identifier_address_value_dict )parameters (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier__lock) identifier__lock )attribute )with_item )with_clause (block (for_statement (pattern_list (identifier_address) identifier_address (identifier_value) identifier_value )pattern_list (call (attribute (identifier_address_value_dict) identifier_address_value_dict (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__validate_write) identifier__validate_write )attribute (argument_list (identifier_address) identifier_address )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_address) identifier_address (attribute (identifier_self) identifier_self (identifier__state) identifier__state )attribute )comparison_operator (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__state) identifier__state )attribute (identifier_address) identifier_address )subscript (identifier_set_result) identifier_set_result )attribute (argument_list (keyword_argument (identifier_result) identifier_result (identifier_value) identifier_value )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_fut) identifier_fut (call (identifier__ContextFuture) identifier__ContextFuture (argument_list (keyword_argument (identifier_address) identifier_address (identifier_address) identifier_address )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__state) identifier__state )attribute (identifier_address) identifier_address )subscript (identifier_fut) identifier_fut )assignment )expression_statement (expression_statement (call (attribute (identifier_fut) identifier_fut (identifier_set_result) identifier_set_result )attribute (argument_list (keyword_argument (identifier_result) identifier_result (identifier_value) identifier_value )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )with_statement )block )function_definition )module
Called in the context manager's set method to either overwrite the value for an address, or create a new future and immediately set a value in the future. Args: address_value_dict (dict of str:bytes): The unique full addresses with bytes to set at that address. Raises: AuthorizationException
(module (function_definition (function_name_reorder) function_name_reorder (parameters (identifier_self) identifier_self (identifier_dst_order) identifier_dst_order (identifier_arr) identifier_arr (default_parameter (identifier_src_order) identifier_src_order (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_dst_order) identifier_dst_order (None) None )comparison_operator (block (expression_statement (assignment (identifier_dst_order) identifier_dst_order (attribute (attribute (identifier_self) identifier_self (identifier_viewer) identifier_viewer )attribute (identifier_rgb_order) identifier_rgb_order )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_src_order) identifier_src_order (None) None )comparison_operator (block (expression_statement (assignment (identifier_src_order) identifier_src_order (attribute (identifier_self) identifier_self (identifier_rgb_order) identifier_rgb_order )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_src_order) identifier_src_order (identifier_dst_order) identifier_dst_order )comparison_operator (block (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_trcalc) identifier_trcalc (identifier_reorder_image) identifier_reorder_image )attribute (argument_list (identifier_dst_order) identifier_dst_order (identifier_arr) identifier_arr (identifier_src_order) identifier_src_order )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_arr) identifier_arr )return_statement )block )function_definition )module
Reorder the output array to match that needed by the viewer.
(module (function_definition (function_name_execute_once) function_name_execute_once (parameters (identifier_self) identifier_self (identifier_string) identifier_string )parameters (block (for_statement (identifier_rule) identifier_rule (attribute (identifier_self) identifier_self (identifier_rules) identifier_rules )attribute (block (if_statement (comparison_operator (subscript (identifier_rule) identifier_rule (integer_0) integer_0 )subscript (identifier_string) identifier_string )comparison_operator (block (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_string) identifier_string (identifier_find) identifier_find )attribute (argument_list (subscript (identifier_rule) identifier_rule (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_last_rule) identifier_last_rule )attribute (identifier_rule) identifier_rule )assignment )expression_statement (return_statement (binary_operator (binary_operator (subscript (identifier_string) identifier_string (slice (colon) colon (identifier_pos) identifier_pos )slice )subscript (subscript (identifier_rule) identifier_rule (integer_1) integer_1 )subscript )binary_operator (subscript (identifier_string) identifier_string (slice (binary_operator (identifier_pos) identifier_pos (call (identifier_len) identifier_len (argument_list (subscript (identifier_rule) identifier_rule (integer_0) integer_0 )subscript )argument_list )call )binary_operator (colon) colon )slice )subscript )binary_operator )return_statement )block )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_last_rule) identifier_last_rule )attribute (None) None )assignment )expression_statement (return_statement (identifier_string) identifier_string )return_statement )block )function_definition )module
Execute only one rule.
(module (function_definition (function_name_exit) function_name_exit (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_Export) identifier_Export (identifier_self) identifier_self )argument_list )call (identifier_exit) identifier_exit )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Close the Kafka export module.
(module (function_definition (function_name_resolve) function_name_resolve (parameters (identifier_self) identifier_self (default_parameter (identifier_notes) identifier_notes (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_status) identifier_set_status )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__redmine) identifier__redmine )attribute (identifier_ISSUE_STATUS_ID_RESOLVED) identifier_ISSUE_STATUS_ID_RESOLVED )attribute (keyword_argument (identifier_notes) identifier_notes (identifier_notes) identifier_notes )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Save all changes and resolve this issue
(module (function_definition (function_name_force_directed) function_name_force_directed (parameters (identifier_self) identifier_self (default_parameter (identifier_defaultEdgeWeight) identifier_defaultEdgeWeight (None) None )default_parameter (default_parameter (identifier_defaultNodeMass) identifier_defaultNodeMass (None) None )default_parameter (line_continuation_\) line_continuation_\ (default_parameter (identifier_defaultSpringCoefficient) identifier_defaultSpringCoefficient (None) None )default_parameter (default_parameter (identifier_defaultSpringLength) identifier_defaultSpringLength (None) None )default_parameter (default_parameter (identifier_EdgeAttribute) identifier_EdgeAttribute (None) None )default_parameter (line_continuation_\) line_continuation_\ (default_parameter (identifier_isDeterministic) identifier_isDeterministic (None) None )default_parameter (default_parameter (identifier_maxWeightCutoff) identifier_maxWeightCutoff (None) None )default_parameter (default_parameter (identifier_minWeightCutoff) identifier_minWeightCutoff (None) None )default_parameter (default_parameter (identifier_network) identifier_network (None) None )default_parameter (line_continuation_\) line_continuation_\ (default_parameter (identifier_NodeAttribute) identifier_NodeAttribute (None) None )default_parameter (default_parameter (identifier_nodeList) identifier_nodeList (None) None )default_parameter (default_parameter (identifier_numIterations) identifier_numIterations (None) None )default_parameter (default_parameter (identifier_singlePartition) identifier_singlePartition (None) None )default_parameter (line_continuation_\) line_continuation_\ (default_parameter (identifier_Type) identifier_Type (None) None )default_parameter (default_parameter (identifier_verbose) identifier_verbose (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_network) identifier_network (call (identifier_check_network) identifier_check_network (argument_list (identifier_self) identifier_self (identifier_network) identifier_network (keyword_argument (identifier_verbose) identifier_verbose (identifier_verbose) identifier_verbose )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_PARAMS) identifier_PARAMS (call (identifier_set_param) identifier_set_param (argument_list (list (string_'defaultEdgeWeight') string_'defaultEdgeWeight' (string_'defaultNodeMass') string_'defaultNodeMass' (string_'defaultSpringCoefficient') string_'defaultSpringCoefficient' (string_'defaultSpringLength') string_'defaultSpringLength' (string_'EdgeAttribute') string_'EdgeAttribute' (string_'isDeterministic') string_'isDeterministic' (string_'maxWeightCutoff') string_'maxWeightCutoff' (string_'minWeightCutoff') string_'minWeightCutoff' (string_'network') string_'network' (string_'NodeAttribute') string_'NodeAttribute' (string_'nodeList') string_'nodeList' (string_'numIterations') string_'numIterations' (string_'singlePartition') string_'singlePartition' (string_'Type') string_'Type' )list (list (identifier_defaultEdgeWeight) identifier_defaultEdgeWeight (identifier_defaultNodeMass) identifier_defaultNodeMass (line_continuation_\) line_continuation_\ (identifier_defaultSpringCoefficient) identifier_defaultSpringCoefficient (identifier_defaultSpringLength) identifier_defaultSpringLength (identifier_EdgeAttribute) identifier_EdgeAttribute (identifier_isDeterministic) identifier_isDeterministic (line_continuation_\) line_continuation_\ (identifier_maxWeightCutoff) identifier_maxWeightCutoff (identifier_minWeightCutoff) identifier_minWeightCutoff (identifier_network) identifier_network (identifier_NodeAttribute) identifier_NodeAttribute (identifier_nodeList) identifier_nodeList (identifier_numIterations) identifier_numIterations (line_continuation_\) line_continuation_\ (identifier_singlePartition) identifier_singlePartition (identifier_Type) identifier_Type )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (identifier_api) identifier_api (argument_list (keyword_argument (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier___url) identifier___url )attribute (string_"/force-directed") string_"/force-directed" )binary_operator )keyword_argument (keyword_argument (identifier_PARAMS) identifier_PARAMS (identifier_PARAMS) identifier_PARAMS )keyword_argument (keyword_argument (identifier_method) identifier_method (string_"POST") string_"POST" )keyword_argument (keyword_argument (identifier_verbose) identifier_verbose (identifier_verbose) identifier_verbose )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Execute the Prefuse Force Directed Layout on a network :param defaultEdgeWeight (string, optional): The default edge weight to con sider, default is 0.5 :param defaultNodeMass (string, optional): Default Node Mass, in numeric va lue :param defaultSpringCoefficient (string, optional): Default Spring Coeffici ent, in numeric value :param defaultSpringLength (string, optional): Default Spring Length, in nu meric value :param EdgeAttribute (string, optional): The name of the edge column contai ning numeric values that will be used as weights in the layout algor ithm. Only columns containing numeric values are shown :param isDeterministic (string, optional): Force deterministic layouts (slo wer); boolean values only, true or false; defaults to false :param maxWeightCutoff (string, optional): The maximum edge weight to consi der, default to the Double.MAX value :param minWeightCutoff (string, optional): The minimum edge weight to consi der, numeric values, default is 0 :param network (string, optional): Specifies a network by name, or by SUID if the prefix SUID: is used. The keyword CURRENT, or a blank value c an also be used to specify the current network. :param NodeAttribute (string, optional): The name of the node column contai ning numeric values that will be used as weights in the layout algor ithm. Only columns containing numeric values are shown :param nodeList (string, optional): Specifies a list of nodes. The keywords all, selected, or unselected can be used to specify nodes by their selection state. The pattern COLUMN:VALUE sets this parameter to any rows that contain the specified column value; if the COLUMN prefix is not used, the NAME column is matched by default. A list of COLUMN :VALUE pairs of the format COLUMN1:VALUE1,COLUMN2:VALUE2,... can be used to match multiple values. :param numIterations (string, optional): Number of Iterations, in numeric v alue :param singlePartition (string, optional): Don't partition graph before lay out; boolean values only, true or false; defaults to false :param Type (string, optional): How to interpret weight values; must be one of Heuristic, -Log(value), 1 - normalized value and normalized valu e. Defaults to Heuristic = ['Heuristic', '-Log(value)', '1 - normali zed value', 'normalized value']
(module (function_definition (function_name_multivariate_hypergeometric_expval) function_name_multivariate_hypergeometric_expval (parameters (identifier_n) identifier_n (identifier_m) identifier_m )parameters (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_m) identifier_m (identifier_float) identifier_float )argument_list )call )assignment )expression_statement (return_statement (binary_operator (identifier_n) identifier_n (parenthesized_expression (binary_operator (identifier_m) identifier_m (call (attribute (identifier_m) identifier_m (identifier_sum) identifier_sum )attribute (argument_list )argument_list )call )binary_operator )parenthesized_expression )binary_operator )return_statement )block )function_definition )module
Expected value of multivariate hypergeometric distribution. Parameters: - `n` : Number of draws. - `m` : Number of items in each categoy.
(module (function_definition (function_name_uninstall_hook) function_name_uninstall_hook (parameters (identifier_ctx) identifier_ctx )parameters (block (try_statement (block (expression_statement (assignment (identifier_lint_config) identifier_lint_config (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_hooks) identifier_hooks (identifier_GitHookInstaller) identifier_GitHookInstaller )attribute (identifier_uninstall_commit_msg_hook) identifier_uninstall_commit_msg_hook )attribute (argument_list (identifier_lint_config) identifier_lint_config )argument_list )call )expression_statement (expression_statement (assignment (identifier_hook_path) identifier_hook_path (call (attribute (attribute (identifier_hooks) identifier_hooks (identifier_GitHookInstaller) identifier_GitHookInstaller )attribute (identifier_commit_msg_hook_path) identifier_commit_msg_hook_path )attribute (argument_list (identifier_lint_config) identifier_lint_config )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (string_u"Successfully uninstalled gitlint commit-msg hook from {0}") string_u"Successfully uninstalled gitlint commit-msg hook from {0}" (identifier_format) identifier_format )attribute (argument_list (identifier_hook_path) identifier_hook_path )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_exit) identifier_exit )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_hooks) identifier_hooks (identifier_GitHookInstallerError) identifier_GitHookInstallerError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (identifier_ustr) identifier_ustr (argument_list (identifier_e) identifier_e )argument_list )call (keyword_argument (identifier_err) identifier_err (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_exit) identifier_exit )attribute (argument_list (identifier_GIT_CONTEXT_ERROR_CODE) identifier_GIT_CONTEXT_ERROR_CODE )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Uninstall gitlint commit-msg hook.
(module (function_definition (function_name_bbox_flip) function_name_bbox_flip (parameters (identifier_bbox) identifier_bbox (identifier_d) identifier_d (identifier_rows) identifier_rows (identifier_cols) identifier_cols )parameters (block (if_statement (comparison_operator (identifier_d) identifier_d (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_bbox) identifier_bbox (call (identifier_bbox_vflip) identifier_bbox_vflip (argument_list (identifier_bbox) identifier_bbox (identifier_rows) identifier_rows (identifier_cols) identifier_cols )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_d) identifier_d (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_bbox) identifier_bbox (call (identifier_bbox_hflip) identifier_bbox_hflip (argument_list (identifier_bbox) identifier_bbox (identifier_rows) identifier_rows (identifier_cols) identifier_cols )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_d) identifier_d (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (identifier_bbox) identifier_bbox (call (identifier_bbox_hflip) identifier_bbox_hflip (argument_list (identifier_bbox) identifier_bbox (identifier_rows) identifier_rows (identifier_cols) identifier_cols )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bbox) identifier_bbox (call (identifier_bbox_vflip) identifier_bbox_vflip (argument_list (identifier_bbox) identifier_bbox (identifier_rows) identifier_rows (identifier_cols) identifier_cols )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'Invalid d value {}. Valid values are -1, 0 and 1') string_'Invalid d value {}. Valid values are -1, 0 and 1' (identifier_format) identifier_format )attribute (argument_list (identifier_d) identifier_d )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (identifier_bbox) identifier_bbox )return_statement )block )function_definition )module
Flip a bounding box either vertically, horizontally or both depending on the value of `d`. Raises: ValueError: if value of `d` is not -1, 0 or 1.
(module (function_definition (function_name_time_estimate) function_name_time_estimate (parameters (identifier_self) identifier_self (identifier_duration) identifier_duration (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (string_'%s/%s/time_estimate') string_'%s/%s/time_estimate' (tuple (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_path) identifier_path )attribute (call (attribute (identifier_self) identifier_self (identifier_get_id) identifier_get_id )attribute (argument_list )argument_list )call )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_'duration') string_'duration' (identifier_duration) identifier_duration )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_gitlab) identifier_gitlab )attribute (identifier_http_post) identifier_http_post )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_post_data) identifier_post_data (identifier_data) identifier_data )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Set an estimated time of work for the object. Args: duration (str): Duration in human format (e.g. 3h30) **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabTimeTrackingError: If the time tracking update cannot be done
(module (function_definition (function_name_compare_config) function_name_compare_config (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_ssh_connection) identifier_ssh_connection )attribute (False) False )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__open_ssh) identifier__open_ssh )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ssh_device) identifier_ssh_device )attribute (identifier_exit_config_mode) identifier_exit_config_mode )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_diff) identifier_diff (call (attribute (attribute (identifier_self) identifier_self (identifier_ssh_device) identifier_ssh_device )attribute (identifier_send_command) identifier_send_command )attribute (argument_list (string_"show config diff") string_"show config diff" )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_diff) identifier_diff (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Netmiko is being used to obtain config diffs because pan-python doesn't support the needed command.
(module (function_definition (function_name__init_grps) function_name__init_grps (parameters (identifier_code2nt) identifier_code2nt )parameters (block (expression_statement (assignment (identifier_seen) identifier_seen (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seen_add) identifier_seen_add (attribute (identifier_seen) identifier_seen (identifier_add) identifier_add )attribute )assignment )expression_statement (expression_statement (assignment (identifier_groups) identifier_groups (list_comprehension (attribute (identifier_nt) identifier_nt (identifier_group) identifier_group )attribute (for_in_clause (identifier_nt) identifier_nt (call (attribute (identifier_code2nt) identifier_code2nt (identifier_values) identifier_values )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (list_comprehension (identifier_g) identifier_g (for_in_clause (identifier_g) identifier_g (identifier_groups) identifier_groups )for_in_clause (if_clause (not_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_g) identifier_g (identifier_seen) identifier_seen )comparison_operator (call (identifier_seen_add) identifier_seen_add (argument_list (identifier_g) identifier_g )argument_list )call )boolean_operator )parenthesized_expression )not_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Return list of groups in same order as in code2nt
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_self) identifier_self (identifier_signal) identifier_signal (identifier_slot) identifier_slot (default_parameter (identifier_transform) identifier_transform (None) None )default_parameter (default_parameter (identifier_condition) identifier_condition (None) None )default_parameter )parameters (block (if_statement (not_operator (comparison_operator (identifier_signal) identifier_signal (attribute (identifier_self) identifier_self (identifier_signals) identifier_signals )attribute )comparison_operator )not_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"WARNING: {0} is trying to connect a slot to an undefined signal: {1}") string_"WARNING: {0} is trying to connect a slot to an undefined signal: {1}" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (call (identifier_str) identifier_str (argument_list (identifier_signal) identifier_signal )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'connections') string_'connections' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_connections) identifier_connections )attribute (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_connection) identifier_connection (call (attribute (attribute (identifier_self) identifier_self (identifier_connections) identifier_connections )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_signal) identifier_signal (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_connection) identifier_connection (call (attribute (identifier_connection) identifier_connection (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_condition) identifier_condition (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_connection) identifier_connection (identifier_slot) identifier_slot )subscript (identifier_transform) identifier_transform )assignment )expression_statement )block )function_definition )module
Defines a connection between this objects signal and another objects slot signal: the signal this class will emit, to cause the slot method to be called receiver: the object containing the slot method to be called slot: the slot method to call transform: an optional value override to pass into the slot method as the first variable condition: only call the slot if the value emitted matches the required value or calling required returns True
(module (function_definition (function_name_InternalExchange) function_name_InternalExchange (parameters (identifier_self) identifier_self (identifier_cmd) identifier_cmd (identifier_payload_in) identifier_payload_in )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'payload: ') string_'payload: ' (call (identifier_str) identifier_str (argument_list (call (identifier_list) identifier_list (argument_list (identifier_payload_in) identifier_payload_in )argument_list )call )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (identifier_bytearray) identifier_bytearray (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_payload) identifier_payload (slice (colon) colon )slice )subscript (identifier_payload_in) identifier_payload_in )assignment )expression_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (integer_2) integer_2 )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_InternalSend) identifier_InternalSend )attribute (argument_list (identifier_cmd) identifier_cmd (identifier_payload) identifier_payload )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_ret_cmd) identifier_ret_cmd (identifier_ret_payload) identifier_ret_payload )pattern_list (call (attribute (identifier_self) identifier_self (identifier_InternalRecv) identifier_InternalRecv )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_ret_cmd) identifier_ret_cmd (attribute (identifier_UsbHidTransport) identifier_UsbHidTransport (identifier_U2FHID_ERROR) identifier_U2FHID_ERROR )attribute )comparison_operator (block (if_statement (comparison_operator (identifier_ret_payload) identifier_ret_payload (attribute (identifier_UsbHidTransport) identifier_UsbHidTransport (identifier_ERR_CHANNEL_BUSY) identifier_ERR_CHANNEL_BUSY )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.5) float_0.5 )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_HidError) identifier_HidError )attribute (argument_list (binary_operator (string_'Device error: %d') string_'Device error: %d' (call (identifier_int) identifier_int (argument_list (subscript (identifier_ret_payload) identifier_ret_payload (integer_0) integer_0 )subscript )argument_list )call )binary_operator )argument_list )call )raise_statement )block (elif_clause (comparison_operator (identifier_ret_cmd) identifier_ret_cmd (identifier_cmd) identifier_cmd )comparison_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_HidError) identifier_HidError )attribute (argument_list (string_'Command mismatch!') string_'Command mismatch!' )argument_list )call )raise_statement )block )elif_clause )if_statement (return_statement (identifier_ret_payload) identifier_ret_payload )return_statement )block )for_statement (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_HidError) identifier_HidError )attribute (argument_list (string_'Device Busy. Please retry') string_'Device Busy. Please retry' )argument_list )call )raise_statement )block )function_definition )module
Sends and receives a message from the device.
(module (function_definition (function_name___learn_oneself) function_name___learn_oneself (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier___parent_path) identifier___parent_path )attribute )not_operator (not_operator (attribute (identifier_self) identifier_self (identifier___text_nodes) identifier___text_nodes )attribute )not_operator )boolean_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"This error occurred because the step constructor\ had insufficient textnodes or it had empty string\ for its parent xpath") string_"This error occurred because the step constructor\ had insufficient textnodes or it had empty string\ for its parent xpath" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_tnodes_cnt) identifier_tnodes_cnt )attribute (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier___text_nodes) identifier___text_nodes )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_ttl_strlen) identifier_ttl_strlen )attribute (call (identifier_sum) identifier_sum (argument_list (list_comprehension (call (identifier_len) identifier_len (argument_list (identifier_tnode) identifier_tnode )argument_list )call (for_in_clause (identifier_tnode) identifier_tnode (attribute (identifier_self) identifier_self (identifier___text_nodes) identifier___text_nodes )attribute )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_avg_strlen) identifier_avg_strlen )attribute (binary_operator (attribute (identifier_self) identifier_self (identifier_ttl_strlen) identifier_ttl_strlen )attribute (attribute (identifier_self) identifier_self (identifier_tnodes_cnt) identifier_tnodes_cnt )attribute )binary_operator )assignment )expression_statement )block )function_definition )module
calculate cardinality, total and average string length
(module (function_definition (function_name_open) function_name_open (parameters (identifier_self) identifier_self )parameters (type (string_'_BaseAgent') string_'_BaseAgent' )type (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'_BaseAgent.open >>>') string_'_BaseAgent.open >>>' )argument_list )call )expression_statement (expression_statement (await (call (attribute (attribute (identifier_self) identifier_self (identifier_wallet) identifier_wallet )attribute (identifier_open) identifier_open )attribute (argument_list )argument_list )call )await )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'_BaseAgent.open <<<') string_'_BaseAgent.open <<<' )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Context manager entry; open wallet. For use when keeping agent open across multiple calls. :return: current object
(module (function_definition (function_name_variance_larger_than_standard_deviation) function_name_variance_larger_than_standard_deviation (parameters (identifier_x) identifier_x )parameters (block (expression_statement (assignment (identifier_y) identifier_y (call (attribute (identifier_np) identifier_np (identifier_var) identifier_var )attribute (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (identifier_y) identifier_y (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (identifier_y) identifier_y )argument_list )call )comparison_operator )return_statement )block )function_definition )module
Boolean variable denoting if the variance of x is greater than its standard deviation. Is equal to variance of x being larger than 1 :param x: the time series to calculate the feature of :type x: numpy.ndarray :return: the value of this feature :return type: bool
(module (function_definition (function_name_getPlaintextLen) function_name_getPlaintextLen (parameters (identifier_self) identifier_self (identifier_ciphertext) identifier_ciphertext )parameters (block (expression_statement (assignment (identifier_completeCiphertextHeader) identifier_completeCiphertextHeader (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_ciphertext) identifier_ciphertext )argument_list )call (integer_16) integer_16 )comparison_operator )parenthesized_expression )assignment )expression_statement (if_statement (comparison_operator (identifier_completeCiphertextHeader) identifier_completeCiphertextHeader (False) False )comparison_operator (block (raise_statement (call (identifier_RecoverableDecryptionError) identifier_RecoverableDecryptionError (argument_list (string_'Incomplete ciphertext header.') string_'Incomplete ciphertext header.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_ciphertext_header) identifier_ciphertext_header (subscript (identifier_ciphertext) identifier_ciphertext (slice (colon) colon (integer_16) integer_16 )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_L) identifier_L (call (attribute (attribute (identifier_self) identifier_self (identifier__ecb_enc_K1) identifier__ecb_enc_K1 )attribute (identifier_decrypt) identifier_decrypt )attribute (argument_list (identifier_ciphertext_header) identifier_ciphertext_header )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_padding_expected) identifier_padding_expected (string_'\x00\x00\x00\x00') string_'\x00\x00\x00\x00' )assignment )expression_statement (expression_statement (assignment (identifier_padding_actual) identifier_padding_actual (subscript (identifier_L) identifier_L (slice (unary_operator (integer_8) integer_8 )unary_operator (colon) colon (unary_operator (integer_4) integer_4 )unary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_validPadding) identifier_validPadding (parenthesized_expression (comparison_operator (identifier_padding_actual) identifier_padding_actual (identifier_padding_expected) identifier_padding_expected )comparison_operator )parenthesized_expression )assignment )expression_statement (if_statement (comparison_operator (identifier_validPadding) identifier_validPadding (False) False )comparison_operator (block (raise_statement (call (identifier_UnrecoverableDecryptionError) identifier_UnrecoverableDecryptionError (argument_list (binary_operator (string_'Invalid padding: ') string_'Invalid padding: ' (identifier_padding_actual) identifier_padding_actual )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_message_length) identifier_message_length (call (attribute (attribute (identifier_fte) identifier_fte (identifier_bit_ops) identifier_bit_ops )attribute (identifier_bytes_to_long) identifier_bytes_to_long )attribute (argument_list (subscript (identifier_L) identifier_L (slice (unary_operator (integer_8) integer_8 )unary_operator (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_msgLenNonNegative) identifier_msgLenNonNegative (parenthesized_expression (comparison_operator (identifier_message_length) identifier_message_length (integer_0) integer_0 )comparison_operator )parenthesized_expression )assignment )expression_statement (if_statement (comparison_operator (identifier_msgLenNonNegative) identifier_msgLenNonNegative (False) False )comparison_operator (block (raise_statement (call (identifier_UnrecoverableDecryptionError) identifier_UnrecoverableDecryptionError (argument_list (string_'Negative message length.') string_'Negative message length.' )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_message_length) identifier_message_length )return_statement )block )function_definition )module
Given a ``ciphertext`` with a valid header, returns the length of the plaintext payload.
(module (function_definition (function_name__create_mappings) function_name__create_mappings (parameters (identifier_self) identifier_self (identifier_spec) identifier_spec )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (call (identifier_set) identifier_set (argument_list (attribute (identifier_spec) identifier_spec (identifier_fields) identifier_fields )attribute )argument_list )call (call (identifier_set) identifier_set (argument_list (attribute (identifier_spec) identifier_spec (identifier_fields) identifier_fields )attribute )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_update) identifier_update )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (list_comprehension (tuple (identifier_n) identifier_n (attribute (identifier_s) identifier_s (identifier_alias) identifier_alias )attribute )tuple (for_in_clause (pattern_list (identifier_n) identifier_n (identifier_s) identifier_s )pattern_list (call (attribute (attribute (identifier_spec) identifier_spec (identifier_fields) identifier_fields )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (attribute (identifier_s) identifier_s (identifier_alias) identifier_alias )attribute )if_clause )list_comprehension )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Create property name map based on aliases.
(module (function_definition (function_name_get_predecessors) function_name_get_predecessors (parameters (identifier_self) identifier_self (identifier_head) identifier_head )parameters (block (expression_statement (assignment (identifier_frozen_head) identifier_frozen_head (call (identifier_frozenset) identifier_frozenset (argument_list (identifier_head) identifier_head )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_frozen_head) identifier_frozen_head (attribute (identifier_self) identifier_self (identifier__predecessors) identifier__predecessors )attribute )comparison_operator (block (return_statement (call (identifier_set) identifier_set (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_set) identifier_set (argument_list (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__predecessors) identifier__predecessors )attribute (identifier_frozen_head) identifier_frozen_head )subscript (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Given a head set of nodes, get a list of edges of which the node set is the head of each edge. :param head: set of nodes that correspond to the heads of some (possibly empty) set of edges. :returns: set -- hyperedge_ids of the hyperedges that have head in the head.
(module (function_definition (function_name__remove_existing) function_name__remove_existing (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__keys) identifier__keys )attribute (block (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'%r: removing old key %r') string_'%r: removing old key %r' (identifier_self) identifier_self (identifier_key) identifier_key )argument_list )call )expression_statement (delete_statement (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_key) identifier_key )subscript )delete_statement )block )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__keys) identifier__keys )attribute (list )list )assignment )expression_statement )block )function_definition )module
When a change is detected, remove keys that existed in the old file.
(module (function_definition (function_name_read_stack_frame) function_name_read_stack_frame (parameters (identifier_self) identifier_self (identifier_structure) identifier_structure (default_parameter (identifier_offset) identifier_offset (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_aProcess) identifier_aProcess (call (attribute (identifier_self) identifier_self (identifier_get_process) identifier_get_process )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_stackData) identifier_stackData (call (attribute (identifier_aProcess) identifier_aProcess (identifier_read_structure) identifier_read_structure )attribute (argument_list (binary_operator (call (attribute (identifier_self) identifier_self (identifier_get_fp) identifier_get_fp )attribute (argument_list )argument_list )call (identifier_offset) identifier_offset )binary_operator (identifier_structure) identifier_structure )argument_list )call )assignment )expression_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list (list_comprehension (call (attribute (identifier_stackData) identifier_stackData (identifier___getattribute__) identifier___getattribute__ )attribute (argument_list (identifier_name) identifier_name )argument_list )call (for_in_clause (tuple_pattern (identifier_name) identifier_name (identifier_type) identifier_type )tuple_pattern (attribute (identifier_stackData) identifier_stackData (identifier__fields_) identifier__fields_ )attribute )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Reads the stack frame of the thread. @type structure: ctypes.Structure @param structure: Structure of the stack frame. @type offset: int @param offset: Offset from the frame pointer to begin reading. The frame pointer is the same returned by the L{get_fp} method. @rtype: tuple @return: Tuple of elements read from the stack frame. The type of each element matches the types in the stack frame structure.
(module (function_definition (function_name_save_callback) function_name_save_callback (parameters (identifier_sender) identifier_sender (identifier_instance) identifier_instance (identifier_created) identifier_created (identifier_update_fields) identifier_update_fields (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_validate_instance) identifier_validate_instance (argument_list (identifier_instance) identifier_instance )argument_list )call (block (expression_statement (assignment (identifier_status) identifier_status (conditional_expression (string_'add') string_'add' (comparison_operator (identifier_created) identifier_created (True) True )comparison_operator (string_'change') string_'change' )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_change) identifier_change (string_'') string_'' )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_status) identifier_status (string_'change') string_'change' )comparison_operator (comparison_operator (string_'al_chl') string_'al_chl' (call (attribute (attribute (identifier_instance) identifier_instance (identifier___dict__) identifier___dict__ )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_changelog) identifier_changelog (attribute (attribute (identifier_instance) identifier_instance (identifier_al_chl) identifier_al_chl )attribute (identifier_modification) identifier_modification )attribute )assignment )expression_statement (expression_statement (assignment (identifier_change) identifier_change (call (attribute (string_' to following changed: {}') string_' to following changed: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_changelog) identifier_changelog )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_processor) identifier_processor (argument_list (identifier_status) identifier_status (identifier_sender) identifier_sender (identifier_instance) identifier_instance (identifier_update_fields) identifier_update_fields (keyword_argument (identifier_addition) identifier_addition (identifier_change) identifier_change )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Save object & link logging entry
(module (function_definition (function_name_magnetic_lat) function_name_magnetic_lat (parameters (identifier_inc) identifier_inc )parameters (block (expression_statement (assignment (identifier_rad) identifier_rad (call (identifier_old_div) identifier_old_div (argument_list (attribute (identifier_np) identifier_np (identifier_pi) identifier_pi )attribute (float_180.) float_180. )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_paleo_lat) identifier_paleo_lat (call (identifier_old_div) identifier_old_div (argument_list (call (attribute (identifier_np) identifier_np (identifier_arctan) identifier_arctan )attribute (argument_list (binary_operator (float_0.5) float_0.5 (call (attribute (identifier_np) identifier_np (identifier_tan) identifier_tan )attribute (argument_list (binary_operator (identifier_inc) identifier_inc (identifier_rad) identifier_rad )binary_operator )argument_list )call )binary_operator )argument_list )call (identifier_rad) identifier_rad )argument_list )call )assignment )expression_statement (return_statement (identifier_paleo_lat) identifier_paleo_lat )return_statement )block )function_definition )module
returns magnetic latitude from inclination
(module (function_definition (function_name_as_list) function_name_as_list (parameters (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_response) identifier_response (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 )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_response) identifier_response (identifier_Response) identifier_Response )argument_list )call (block (return_statement (identifier_response) identifier_response )return_statement )block )if_statement (return_statement (call (identifier_as_json_list) identifier_as_json_list (argument_list (identifier_response) identifier_response (dictionary_splat (call (identifier__serializable_params) identifier__serializable_params (argument_list (attribute (identifier_request) identifier_request (identifier_args) identifier_args )attribute (keyword_argument (identifier_check_groupby) identifier_check_groupby (True) True )keyword_argument )argument_list )call )dictionary_splat )argument_list )call )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
A decorator used to return a JSON response of a list of model objects. It expects the decorated function to return a list of model instances. It then converts the instances to dicts and serializes them into a json response Examples: >>> @app.route('/api') ... @as_list ... def list_customers(): ... return Customer.all()
(module (function_definition (function_name_pseudosample) function_name_pseudosample (parameters (identifier_x) identifier_x )parameters (block (expression_statement (assignment (identifier_BXs) identifier_BXs (list )list )assignment )expression_statement (for_statement (identifier_k) identifier_k (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_x) identifier_x )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_ind) identifier_ind (call (attribute (identifier_random) identifier_random (identifier_randint) identifier_randint )attribute (argument_list (integer_0) integer_0 (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_x) identifier_x )argument_list )call (integer_1) integer_1 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_BXs) identifier_BXs (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_x) identifier_x (identifier_ind) identifier_ind )subscript )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_BXs) identifier_BXs )return_statement )block )function_definition )module
draw a bootstrap sample of x
(module (function_definition (function_name_repair_url) function_name_repair_url (parameters (identifier_url) identifier_url )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_url) identifier_url (identifier_strip) identifier_strip )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_r"^http") string_r"^http" (identifier_url) identifier_url )argument_list )call )not_operator (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (string_"http://") string_"http://" (identifier_url) identifier_url )binary_operator )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_"?") string_"?" (identifier_url) identifier_url )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_url) identifier_url (identifier__) identifier__ )pattern_list (call (attribute (identifier_url) identifier_url (identifier_split) identifier_split )attribute (argument_list (string_'?') string_'?' )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_url) identifier_url (identifier_endswith) identifier_endswith )attribute (argument_list (string_"/") string_"/" )argument_list )call )not_operator (block (return_statement (binary_operator (identifier_url) identifier_url (string_"/") string_"/" )binary_operator )return_statement )block (else_clause (block (return_statement (identifier_url) identifier_url )return_statement )block )else_clause )if_statement )block )function_definition )module
Fixes URL. @param url: url to repair. @param out: instance of StandardOutput as defined in this lib. @return: Newline characters are stripped from the URL string. If the url string parameter does not start with http, it prepends http:// If the url string parameter does not end with a slash, appends a slash. If the url contains a query string, it gets removed.
(module (function_definition (function_name_open) function_name_open (parameters (identifier_self) identifier_self (default_parameter (identifier_auto_commit) identifier_auto_commit (None) None )default_parameter (default_parameter (identifier_schema) identifier_schema (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_schema) identifier_schema (None) None )comparison_operator (block (expression_statement (assignment (identifier_schema) identifier_schema (attribute (identifier_self) identifier_self (identifier_schema) identifier_schema )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_ac) identifier_ac (conditional_expression (identifier_auto_commit) identifier_auto_commit (comparison_operator (identifier_auto_commit) identifier_auto_commit (None) None )comparison_operator (attribute (identifier_schema) identifier_schema (identifier_auto_commit) identifier_auto_commit )attribute )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_exe) identifier_exe (call (identifier_ExecutionContext) identifier_ExecutionContext (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (keyword_argument (identifier_schema) identifier_schema (identifier_schema) identifier_schema )keyword_argument (keyword_argument (identifier_auto_commit) identifier_auto_commit (identifier_ac) identifier_ac )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call )not_operator (comparison_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getsize) identifier_getsize )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (call (identifier_getLogger) identifier_getLogger (argument_list )argument_list )call (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (string_"DB does not exist at {}. Setup is required.") string_"DB does not exist at {}. Setup is required." (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_schema) identifier_schema (None) None )comparison_operator (attribute (identifier_schema) identifier_schema (identifier_setup_files) identifier_setup_files )attribute )boolean_operator (block (for_statement (identifier_file_path) identifier_file_path (attribute (identifier_schema) identifier_schema (identifier_setup_files) identifier_setup_files )attribute (block (expression_statement (call (attribute (call (identifier_getLogger) identifier_getLogger (argument_list )argument_list )call (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Executing script file: {}") string_"Executing script file: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_exe) identifier_exe (identifier_cur) identifier_cur )attribute (identifier_executescript) identifier_executescript )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_read_file) identifier_read_file )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement (if_statement (attribute (identifier_schema) identifier_schema (identifier_setup_scripts) identifier_setup_scripts )attribute (block (for_statement (identifier_script) identifier_script (attribute (identifier_schema) identifier_schema (identifier_setup_scripts) identifier_setup_scripts )attribute (block (expression_statement (call (attribute (attribute (identifier_exe) identifier_exe (identifier_cur) identifier_cur )attribute (identifier_executescript) identifier_executescript )attribute (argument_list (identifier_script) identifier_script )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )if_statement (return_statement (identifier_exe) identifier_exe )return_statement )block )function_definition )module
Create a context to execute queries
(module (function_definition (function_name_beforeSummaryReport) function_name_beforeSummaryReport (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_prof) identifier_prof )attribute (identifier_disable) identifier_disable )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_stats) identifier_stats (call (attribute (call (attribute (identifier_pstats) identifier_pstats (identifier_Stats) identifier_Stats )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_prof) identifier_prof )attribute (keyword_argument (identifier_stream) identifier_stream (attribute (identifier_event) identifier_event (identifier_stream) identifier_stream )attribute )keyword_argument )argument_list )call (identifier_sort_stats) identifier_sort_stats )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_sort) identifier_sort )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_event) identifier_event (identifier_stream) identifier_stream )attribute (identifier_writeln) identifier_writeln )attribute (argument_list (call (attribute (attribute (identifier_nose2) identifier_nose2 (identifier_util) identifier_util )attribute (identifier_ln) identifier_ln )attribute (argument_list (string_'Profiling results') string_'Profiling results' )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_stats) identifier_stats (identifier_print_stats) identifier_print_stats )attribute (argument_list )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_pfile) identifier_pfile )attribute (block (expression_statement (call (attribute (identifier_stats) identifier_stats (identifier_dump_stats) identifier_dump_stats )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_pfile) identifier_pfile )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_cachegrind) identifier_cachegrind )attribute (block (expression_statement (call (identifier_visualize) identifier_visualize (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_prof) identifier_prof )attribute (identifier_getstats) identifier_getstats )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Output profiling results
(module (function_definition (function_name_build_grouped_ownership_map) function_name_build_grouped_ownership_map (parameters (identifier_table) identifier_table (identifier_key_from_row) identifier_key_from_row (identifier_value_from_row) identifier_value_from_row (identifier_group_key) identifier_group_key )parameters (block (expression_statement (assignment (identifier_grouped_rows) identifier_grouped_rows (call (identifier_groupby) identifier_groupby (argument_list (identifier_group_key) identifier_group_key (call (attribute (call (attribute (call (attribute (identifier_sa) identifier_sa (identifier_select) identifier_select )attribute (argument_list (attribute (identifier_table) identifier_table (identifier_c) identifier_c )attribute )argument_list )call (identifier_execute) identifier_execute )attribute (argument_list )argument_list )call (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (dictionary_comprehension (pair (identifier_key) identifier_key (call (identifier__build_ownership_map_from_rows) identifier__build_ownership_map_from_rows (argument_list (identifier_rows) identifier_rows (identifier_key_from_row) identifier_key_from_row (identifier_value_from_row) identifier_value_from_row )argument_list )call )pair (for_in_clause (pattern_list (identifier_key) identifier_key (identifier_rows) identifier_rows )pattern_list (call (attribute (identifier_grouped_rows) identifier_grouped_rows (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block )function_definition )module
Builds a dict mapping group keys to maps of keys to to lists of OwnershipPeriods, from a db table.
(module (function_definition (function_name_add_aggregate) function_name_add_aggregate (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_data_fac) identifier_data_fac )parameters (block (decorated_definition (decorator (call (attribute (identifier_self) identifier_self (identifier_add_target) identifier_add_target )attribute (argument_list (identifier_name) identifier_name )argument_list )call )decorator (function_definition (function_name_wrap) function_name_wrap (parameters (identifier_outdir) identifier_outdir (identifier_c) identifier_c )parameters (block (return_statement (call (identifier_data_fac) identifier_data_fac (argument_list )argument_list )call )return_statement )block )function_definition )decorated_definition )block )function_definition )module
Add an aggregate target to this nest. Since nests added after the aggregate can access the construct returned by the factory function value, it can be mutated to provide additional values for use when the decorated function is called. To do something with the aggregates, you must :meth:`SConsWrap.pop` nest levels created between addition of the aggregate and then can add any normal targets you would like which take advantage of the targets added to the data structure. :param name: Name for the target in the nest :param data_fac: a nullary factory function which will be called immediately for each of the current control dictionaries and stored in each dictionary with the given name as in :meth:`SConsWrap.add_target`.
(module (function_definition (function_name__ps) function_name__ps (parameters (identifier_osdata) identifier_osdata )parameters (block (expression_statement (assignment (identifier_grains) identifier_grains (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_bsd_choices) identifier_bsd_choices (tuple (string_'FreeBSD') string_'FreeBSD' (string_'NetBSD') string_'NetBSD' (string_'OpenBSD') string_'OpenBSD' (string_'MacOS') string_'MacOS' )tuple )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_osdata) identifier_osdata (string_'os') string_'os' )subscript (identifier_bsd_choices) identifier_bsd_choices )comparison_operator (block (expression_statement (assignment (subscript (identifier_grains) identifier_grains (string_'ps') string_'ps' )subscript (string_'ps auxwww') string_'ps auxwww' )assignment )expression_statement )block (elif_clause (comparison_operator (subscript (identifier_osdata) identifier_osdata (string_'os_family') string_'os_family' )subscript (string_'Solaris') string_'Solaris' )comparison_operator (block (expression_statement (assignment (subscript (identifier_grains) identifier_grains (string_'ps') string_'ps' )subscript (string_'/usr/ucb/ps auxwww') string_'/usr/ucb/ps auxwww' )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (subscript (identifier_osdata) identifier_osdata (string_'os') string_'os' )subscript (string_'Windows') string_'Windows' )comparison_operator (block (expression_statement (assignment (subscript (identifier_grains) identifier_grains (string_'ps') string_'ps' )subscript (string_'tasklist.exe') string_'tasklist.exe' )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (call (attribute (identifier_osdata) identifier_osdata (identifier_get) identifier_get )attribute (argument_list (string_'virtual') string_'virtual' (string_'') string_'' )argument_list )call (string_'openvzhn') string_'openvzhn' )comparison_operator (block (expression_statement (assignment (subscript (identifier_grains) identifier_grains (string_'ps') string_'ps' )subscript (parenthesized_expression (concatenated_string (string_'ps -fH -p $(grep -l \"^envID:[[:space:]]*0\\$\" ') string_'ps -fH -p $(grep -l \"^envID:[[:space:]]*0\\$\" ' (string_'/proc/[0-9]*/status | sed -e \"s=/proc/\\([0-9]*\\)/.*=\\1=\") ') string_'/proc/[0-9]*/status | sed -e \"s=/proc/\\([0-9]*\\)/.*=\\1=\") ' (string_'| awk \'{ $7=\"\"; print }\'') string_'| awk \'{ $7=\"\"; print }\'' )concatenated_string )parenthesized_expression )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (subscript (identifier_osdata) identifier_osdata (string_'os_family') string_'os_family' )subscript (string_'AIX') string_'AIX' )comparison_operator (block (expression_statement (assignment (subscript (identifier_grains) identifier_grains (string_'ps') string_'ps' )subscript (string_'/usr/bin/ps auxww') string_'/usr/bin/ps auxww' )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (subscript (identifier_osdata) identifier_osdata (string_'os_family') string_'os_family' )subscript (string_'NILinuxRT') string_'NILinuxRT' )comparison_operator (block (expression_statement (assignment (subscript (identifier_grains) identifier_grains (string_'ps') string_'ps' )subscript (string_'ps -o user,pid,ppid,tty,time,comm') string_'ps -o user,pid,ppid,tty,time,comm' )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (subscript (identifier_grains) identifier_grains (string_'ps') string_'ps' )subscript (string_'ps -efHww') string_'ps -efHww' )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_grains) identifier_grains )return_statement )block )function_definition )module
Return the ps grain
(module (function_definition (function_name_get_join_parameters) function_name_get_join_parameters (parameters (identifier_join_kwargs) identifier_join_kwargs )parameters (block (expression_statement (assignment (identifier_by) identifier_by (call (attribute (identifier_join_kwargs) identifier_join_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'by') string_'by' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_suffixes) identifier_suffixes (call (attribute (identifier_join_kwargs) identifier_join_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'suffixes') string_'suffixes' (tuple (string_'_x') string_'_x' (string_'_y') string_'_y' )tuple )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_by) identifier_by (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_left_on) identifier_left_on (identifier_right_on) identifier_right_on )pattern_list (identifier_by) identifier_by )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_by) identifier_by (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (identifier_by) identifier_by (list_comprehension (conditional_expression (identifier_x) identifier_x (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_tuple) identifier_tuple )argument_list )call (tuple (identifier_x) identifier_x (identifier_x) identifier_x )tuple )conditional_expression (for_in_clause (identifier_x) identifier_x (identifier_by) identifier_by )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_left_on) identifier_left_on (identifier_right_on) identifier_right_on )pattern_list (generator_expression (call (identifier_list) identifier_list (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (call (identifier_zip) identifier_zip (argument_list (list_splat (identifier_by) identifier_by )list_splat )argument_list )call )for_in_clause )generator_expression )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (pattern_list (identifier_left_on) identifier_left_on (identifier_right_on) identifier_right_on )pattern_list (expression_list (identifier_by) identifier_by (identifier_by) identifier_by )expression_list )assignment )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_left_on) identifier_left_on (identifier_right_on) identifier_right_on (identifier_suffixes) identifier_suffixes )expression_list )return_statement )block )function_definition )module
Convenience function to determine the columns to join the right and left DataFrames on, as well as any suffixes for the columns.