sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_data_filler_customer) function_name_data_filler_customer (parameters (identifier_self) identifier_self (identifier_number_of_rows) identifier_number_of_rows (identifier_cursor) identifier_cursor (identifier_conn) identifier_conn )parameters (block (expression_statement (assignment (identifier_customer_data) identifier_customer_data (list )list )assignment )expression_statement (try_statement (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (identifier_number_of_rows) identifier_number_of_rows )argument_list )call (block (expression_statement (call (attribute (identifier_customer_data) identifier_customer_data (identifier_append) identifier_append )attribute (argument_list (tuple (call (identifier_rnd_id_generator) identifier_rnd_id_generator (argument_list (identifier_self) identifier_self )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_first_name) identifier_first_name )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_last_name) identifier_last_name )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_address) identifier_address )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_country) identifier_country )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_city) identifier_city )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_date) identifier_date )attribute (argument_list (keyword_argument (identifier_pattern) identifier_pattern (string_"%d-%m-%Y") string_"%d-%m-%Y" )keyword_argument )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_date) identifier_date )attribute (argument_list (keyword_argument (identifier_pattern) identifier_pattern (string_"%d-%m-%Y") string_"%d-%m-%Y" )keyword_argument )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_safe_email) identifier_safe_email )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_phone_number) identifier_phone_number )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_faker) identifier_faker )attribute (identifier_locale) identifier_locale )attribute (argument_list )argument_list )call )tuple )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_customer_payload) identifier_customer_payload (parenthesized_expression (concatenated_string (string_"INSERT INTO customer ") string_"INSERT INTO customer " (string_"(id, name, lastname, address, country, city, registry_date, birthdate, email, ") string_"(id, name, lastname, address, country, city, registry_date, birthdate, email, " (string_"phone_number, locale)") string_"phone_number, locale)" (string_"VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)") string_"VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)" )concatenated_string )parenthesized_expression )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_executemany) identifier_executemany )attribute (argument_list (identifier_customer_payload) identifier_customer_payload (identifier_customer_data) identifier_customer_data )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_'detailed_registration Commits are successful after write job!') string_'detailed_registration Commits are successful after write job!' (keyword_argument (identifier_extra) identifier_extra (identifier_extra_information) identifier_extra_information )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (identifier_e) identifier_e (keyword_argument (identifier_extra) identifier_extra (identifier_extra_information) identifier_extra_information )keyword_argument )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
creates and fills the table with customer
(module (function_definition (function_name_get_notifications) function_name_get_notifications (parameters (identifier_self) identifier_self (default_parameter (identifier_start) identifier_start (None) None )default_parameter (default_parameter (identifier_stop) identifier_stop (None) None )default_parameter (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_filter_kwargs) identifier_filter_kwargs (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_start) identifier_start (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_filter_kwargs) identifier_filter_kwargs (binary_operator (string_'%s__gte') string_'%s__gte' (attribute (identifier_self) identifier_self (identifier_notification_id_name) identifier_notification_id_name )attribute )binary_operator )subscript (binary_operator (identifier_start) identifier_start (integer_1) integer_1 )binary_operator )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_stop) identifier_stop (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_filter_kwargs) identifier_filter_kwargs (binary_operator (string_'%s__lt') string_'%s__lt' (attribute (identifier_self) identifier_self (identifier_notification_id_name) identifier_notification_id_name )attribute )binary_operator )subscript (binary_operator (identifier_stop) identifier_stop (integer_1) integer_1 )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_objects) identifier_objects (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_record_class) identifier_record_class )attribute (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (dictionary_splat (identifier_filter_kwargs) identifier_filter_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_self) identifier_self (identifier_record_class) identifier_record_class )attribute (string_'application_name') string_'application_name' )argument_list )call (block (expression_statement (assignment (identifier_objects) identifier_objects (call (attribute (identifier_objects) identifier_objects (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_application_name) identifier_application_name (attribute (identifier_self) identifier_self (identifier_application_name) identifier_application_name )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_self) identifier_self (identifier_record_class) identifier_record_class )attribute (string_'pipeline_id') string_'pipeline_id' )argument_list )call (block (expression_statement (assignment (identifier_objects) identifier_objects (call (attribute (identifier_objects) identifier_objects (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_pipeline_id) identifier_pipeline_id (attribute (identifier_self) identifier_self (identifier_pipeline_id) identifier_pipeline_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_objects) identifier_objects (call (attribute (identifier_objects) identifier_objects (identifier_order_by) identifier_order_by )attribute (argument_list (binary_operator (string_'%s') string_'%s' (attribute (identifier_self) identifier_self (identifier_notification_id_name) identifier_notification_id_name )attribute )binary_operator )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_objects) identifier_objects (identifier_all) identifier_all )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Returns all records in the table.
(module (function_definition (function_name_fingerprint_relaxation) function_name_fingerprint_relaxation (parameters (identifier_T) identifier_T (identifier_p0) identifier_p0 (identifier_obs) identifier_obs (default_parameter (identifier_tau) identifier_tau (integer_1) integer_1 )default_parameter (default_parameter (identifier_k) identifier_k (None) None )default_parameter (default_parameter (identifier_ncv) identifier_ncv (None) None )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_T) identifier_T (call (attribute (identifier__types) identifier__types (identifier_ensure_ndarray_or_sparse) identifier_ensure_ndarray_or_sparse )attribute (argument_list (identifier_T) identifier_T (keyword_argument (identifier_ndim) identifier_ndim (integer_2) integer_2 )keyword_argument (keyword_argument (identifier_uniform) identifier_uniform (True) True )keyword_argument (keyword_argument (identifier_kind) identifier_kind (string_'numeric') string_'numeric' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_n) identifier_n (subscript (attribute (identifier_T) identifier_T (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (not_operator (call (identifier_is_reversible) identifier_is_reversible (argument_list (identifier_T) identifier_T )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Fingerprint calculation is not supported for nonreversible transition matrices. ') string_'Fingerprint calculation is not supported for nonreversible transition matrices. ' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_p0) identifier_p0 (call (attribute (identifier__types) identifier__types (identifier_ensure_ndarray) identifier_ensure_ndarray )attribute (argument_list (identifier_p0) identifier_p0 (keyword_argument (identifier_ndim) identifier_ndim (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_size) identifier_size (identifier_n) identifier_n )keyword_argument (keyword_argument (identifier_kind) identifier_kind (string_'numeric') string_'numeric' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_obs) identifier_obs (call (attribute (identifier__types) identifier__types (identifier_ensure_ndarray) identifier_ensure_ndarray )attribute (argument_list (identifier_obs) identifier_obs (keyword_argument (identifier_ndim) identifier_ndim (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_size) identifier_size (identifier_n) identifier_n )keyword_argument (keyword_argument (identifier_kind) identifier_kind (string_'numeric') string_'numeric' )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (identifier__issparse) identifier__issparse (argument_list (identifier_T) identifier_T )argument_list )call (block (return_statement (call (attribute (attribute (identifier_sparse) identifier_sparse (identifier_fingerprints) identifier_fingerprints )attribute (identifier_fingerprint_relaxation) identifier_fingerprint_relaxation )attribute (argument_list (identifier_T) identifier_T (identifier_p0) identifier_p0 (identifier_obs) identifier_obs (keyword_argument (identifier_tau) identifier_tau (identifier_tau) identifier_tau )keyword_argument (keyword_argument (identifier_k) identifier_k (identifier_k) identifier_k )keyword_argument (keyword_argument (identifier_ncv) identifier_ncv (identifier_ncv) identifier_ncv )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (attribute (identifier_dense) identifier_dense (identifier_fingerprints) identifier_fingerprints )attribute (identifier_fingerprint_relaxation) identifier_fingerprint_relaxation )attribute (argument_list (identifier_T) identifier_T (identifier_p0) identifier_p0 (identifier_obs) identifier_obs (keyword_argument (identifier_tau) identifier_tau (identifier_tau) identifier_tau )keyword_argument (keyword_argument (identifier_k) identifier_k (identifier_k) identifier_k )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
r"""Dynamical fingerprint for relaxation experiment. The dynamical fingerprint is given by the implied time-scale spectrum together with the corresponding amplitudes. Parameters ---------- T : (M, M) ndarray or scipy.sparse matrix Transition matrix obs1 : (M,) ndarray Observable, represented as vector on state space obs2 : (M,) ndarray (optional) Second observable, for cross-correlations k : int (optional) Number of time-scales and amplitudes to compute tau : int (optional) Lag time of given transition matrix, for correct time-scales ncv : int (optional) The number of Lanczos vectors generated, `ncv` must be greater than k; it is recommended that ncv > 2*k Returns ------- timescales : (N,) ndarray Time-scales of the transition matrix amplitudes : (N,) ndarray Amplitudes for the relaxation experiment See also -------- relaxation, fingerprint_correlation References ---------- .. [1] Noe, F, S Doose, I Daidone, M Loellmann, M Sauer, J D Chodera and J Smith. 2010. Dynamical fingerprints for probing individual relaxation processes in biomolecular dynamics with simulations and kinetic experiments. PNAS 108 (12): 4822-4827. Notes ----- Fingerprints are a combination of time-scale and amplitude spectrum for a equilibrium correlation or a non-equilibrium relaxation experiment. **Relaxation** A relaxation experiment looks at the time dependent expectation value of an observable for a system out of equilibrium .. math:: \mathbb{E}_{w_{0}}[a(x, t)]=\sum_x w_0(x) a(x, t)=\sum_x w_0(x) \sum_y p^t(x, y) a(y). The fingerprint amplitudes :math:`\gamma_i` are given by .. math:: \gamma_i=\langle w_0, r_i\rangle \langle l_i, a \rangle. And the fingerprint time scales :math:`t_i` are given by .. math:: t_i=-\frac{\tau}{\log \lvert \lambda_i \rvert}. Examples -------- >>> import numpy as np >>> from msmtools.analysis import fingerprint_relaxation >>> T = np.array([[0.9, 0.1, 0.0], [0.5, 0.0, 0.5], [0.0, 0.1, 0.9]]) >>> p0 = np.array([1.0, 0.0, 0.0]) >>> a = np.array([1.0, 0.0, 0.0]) >>> ts, amp = fingerprint_relaxation(T, p0, a) >>> ts array([ inf, 9.49122158, 0.43429448]) >>> amp array([ 0.45454545, 0.5 , 0.04545455])
(module (function_definition (function_name_get_block_from_consensus) function_name_get_block_from_consensus (parameters (identifier_self) identifier_self (identifier_consensus_hash) identifier_consensus_hash )parameters (block (expression_statement (assignment (identifier_query) identifier_query (string_'SELECT block_id FROM snapshots WHERE consensus_hash = ?;') string_'SELECT block_id FROM snapshots WHERE consensus_hash = ?;' )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (tuple (identifier_consensus_hash) identifier_consensus_hash )tuple )assignment )expression_statement (expression_statement (assignment (identifier_con) identifier_con (call (attribute (identifier_self) identifier_self (identifier_db_open) identifier_db_open )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_impl) identifier_impl )attribute (attribute (identifier_self) identifier_self (identifier_working_dir) identifier_working_dir )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rows) identifier_rows (call (attribute (identifier_self) identifier_self (identifier_db_query_execute) identifier_db_query_execute )attribute (argument_list (identifier_con) identifier_con (identifier_query) identifier_query (identifier_args) identifier_args (keyword_argument (identifier_verbose) identifier_verbose (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (None) None )assignment )expression_statement (for_statement (identifier_r) identifier_r (identifier_rows) identifier_rows (block (expression_statement (assignment (identifier_res) identifier_res (subscript (identifier_r) identifier_r (string_'block_id') string_'block_id' )subscript )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_con) identifier_con (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Get the block number with the given consensus hash. Return None if there is no such block.
(module (function_definition (function_name_send_mass_template_mail) function_name_send_mass_template_mail (parameters (identifier_subject_template) identifier_subject_template (identifier_body_template) identifier_body_template (identifier_recipients) identifier_recipients (default_parameter (identifier_context) identifier_context (None) None )default_parameter )parameters (block (if_statement (identifier_context) identifier_context (block (expression_statement (assignment (pattern_list (identifier_subject) identifier_subject (identifier_body) identifier_body )pattern_list (call (identifier_render_mail_template) identifier_render_mail_template (argument_list (identifier_subject_template) identifier_subject_template (identifier_body_template) identifier_body_template (identifier_context) identifier_context )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_subject) identifier_subject (identifier_body) identifier_body )pattern_list (expression_list (identifier_subject_template) identifier_subject_template (identifier_body_template) identifier_body_template )expression_list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_message_tuples) identifier_message_tuples (list_comprehension (tuple (identifier_subject) identifier_subject (identifier_body) identifier_body (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (string_'DEFAULT_FROM_EMAIL') string_'DEFAULT_FROM_EMAIL' )argument_list )call (list (identifier_r) identifier_r )list )tuple (for_in_clause (identifier_r) identifier_r (identifier_recipients) identifier_recipients )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (identifier_send_mass_mail) identifier_send_mass_mail (argument_list (identifier_message_tuples) identifier_message_tuples )argument_list )call )expression_statement )block )function_definition )module
Renders an email subject and body using the given templates and context, then sends it to the given recipients list. The emails are send one-by-one.
(module (function_definition (function_name_bookmark_list) function_name_bookmark_list (parameters )parameters (block (expression_statement (assignment (identifier_client) identifier_client (call (identifier_get_client) identifier_get_client (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bookmark_iterator) identifier_bookmark_iterator (call (attribute (identifier_client) identifier_client (identifier_bookmark_list) identifier_bookmark_list )attribute (argument_list )argument_list )call )assignment )expression_statement (function_definition (function_name_get_ep_name) function_name_get_ep_name (parameters (identifier_item) identifier_item )parameters (block (expression_statement (assignment (identifier_ep_id) identifier_ep_id (subscript (identifier_item) identifier_item (string_"endpoint_id") string_"endpoint_id" )subscript )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_ep_doc) identifier_ep_doc (call (attribute (identifier_client) identifier_client (identifier_get_endpoint) identifier_get_endpoint )attribute (argument_list (identifier_ep_id) identifier_ep_id )argument_list )call )assignment )expression_statement (return_statement (call (identifier_display_name_or_cname) identifier_display_name_or_cname (argument_list (identifier_ep_doc) identifier_ep_doc )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_TransferAPIError) identifier_TransferAPIError (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_err) identifier_err (identifier_code) identifier_code )attribute (string_"EndpointDeleted") string_"EndpointDeleted" )comparison_operator (block (return_statement (string_"[DELETED ENDPOINT]") string_"[DELETED ENDPOINT]" )return_statement )block (else_clause (block (raise_statement (identifier_err) identifier_err )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition (expression_statement (call (identifier_formatted_print) identifier_formatted_print (argument_list (identifier_bookmark_iterator) identifier_bookmark_iterator (keyword_argument (identifier_fields) identifier_fields (list (tuple (string_"Name") string_"Name" (string_"name") string_"name" )tuple (tuple (string_"Bookmark ID") string_"Bookmark ID" (string_"id") string_"id" )tuple (tuple (string_"Endpoint ID") string_"Endpoint ID" (string_"endpoint_id") string_"endpoint_id" )tuple (tuple (string_"Endpoint Name") string_"Endpoint Name" (identifier_get_ep_name) identifier_get_ep_name )tuple (tuple (string_"Path") string_"Path" (string_"path") string_"path" )tuple )list )keyword_argument (keyword_argument (identifier_response_key) identifier_response_key (string_"DATA") string_"DATA" )keyword_argument (keyword_argument (identifier_json_converter) identifier_json_converter (identifier_iterable_response_to_dict) identifier_iterable_response_to_dict )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Executor for `globus bookmark list`
(module (function_definition (function_name__load_audio_file) function_name__load_audio_file (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__step_begin) identifier__step_begin )attribute (argument_list (string_u"load audio file") string_u"load audio file" )argument_list )call )expression_statement (expression_statement (assignment (identifier_audio_file) identifier_audio_file (call (identifier_AudioFile) identifier_AudioFile (argument_list (keyword_argument (identifier_file_path) identifier_file_path (attribute (attribute (identifier_self) identifier_self (identifier_task) identifier_task )attribute (identifier_audio_file_path_absolute) identifier_audio_file_path_absolute )attribute )keyword_argument (keyword_argument (identifier_file_format) identifier_file_format (None) None )keyword_argument (keyword_argument (identifier_rconf) identifier_rconf (attribute (identifier_self) identifier_self (identifier_rconf) identifier_rconf )attribute )keyword_argument (keyword_argument (identifier_logger) identifier_logger (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_audio_file) identifier_audio_file (identifier_read_samples_from_file) identifier_read_samples_from_file )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__step_end) identifier__step_end )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_audio_file) identifier_audio_file )return_statement )block )function_definition )module
Load audio in memory. :rtype: :class:`~aeneas.audiofile.AudioFile`
(module (function_definition (function_name_save_method) function_name_save_method (parameters (identifier_elements) identifier_elements (identifier_module_path) identifier_module_path )parameters (block (for_statement (pattern_list (identifier_elem) identifier_elem (identifier_signature) identifier_signature )pattern_list (call (attribute (identifier_elements) identifier_elements (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_signature) identifier_signature (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (call (identifier_save_method) identifier_save_method (argument_list (identifier_signature) identifier_signature (binary_operator (identifier_module_path) identifier_module_path (tuple (identifier_elem) identifier_elem )tuple )binary_operator )argument_list )call )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_signature) identifier_signature (identifier_Class) identifier_Class )argument_list )call (block (expression_statement (call (identifier_save_method) identifier_save_method (argument_list (attribute (identifier_signature) identifier_signature (identifier_fields) identifier_fields )attribute (binary_operator (identifier_module_path) identifier_module_path (tuple (identifier_elem) identifier_elem )tuple )binary_operator )argument_list )call )expression_statement )block )elif_clause (elif_clause (call (attribute (identifier_signature) identifier_signature (identifier_ismethod) identifier_ismethod )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (comparison_operator (identifier_elem) identifier_elem (identifier_methods) identifier_methods )comparison_operator (comparison_operator (subscript (identifier_module_path) identifier_module_path (integer_0) integer_0 )subscript (string_'__dispatch__') string_'__dispatch__' )comparison_operator )boolean_operator (block (assert_statement (comparison_operator (identifier_elem) identifier_elem (subscript (identifier_MODULES) identifier_MODULES (string_'__dispatch__') string_'__dispatch__' )subscript )comparison_operator )assert_statement (expression_statement (assignment (identifier_path) identifier_path (tuple (string_'__dispatch__') string_'__dispatch__' )tuple )assignment )expression_statement (expression_statement (assignment (subscript (identifier_methods) identifier_methods (identifier_elem) identifier_elem )subscript (tuple (identifier_path) identifier_path (subscript (subscript (identifier_MODULES) identifier_MODULES (string_'__dispatch__') string_'__dispatch__' )subscript (identifier_elem) identifier_elem )subscript )tuple )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_methods) identifier_methods (identifier_elem) identifier_elem )subscript (tuple (identifier_module_path) identifier_module_path (identifier_signature) identifier_signature )tuple )assignment )expression_statement )block )else_clause )if_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition )module
Recursively save methods with module name and signature.
(module (function_definition (function_name_link) function_name_link (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_linked) identifier_linked )attribute (block (return_statement (identifier_self) identifier_self )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_linked) identifier_linked )attribute (True) True )assignment )expression_statement (expression_statement (assignment (identifier_included_modules) identifier_included_modules (list )list )assignment )expression_statement (for_statement (identifier_include) identifier_include (call (attribute (attribute (identifier_self) identifier_self (identifier_includes) identifier_includes )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_included_modules) identifier_included_modules (identifier_append) identifier_append )attribute (argument_list (attribute (call (attribute (identifier_include) identifier_include (identifier_link) identifier_link )attribute (argument_list )argument_list )call (identifier_surface) identifier_surface )attribute )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_scope) identifier_scope )attribute (identifier_add_surface) identifier_add_surface )attribute (argument_list (string_'__includes__') string_'__includes__' (call (identifier_tuple) identifier_tuple (argument_list (identifier_included_modules) identifier_included_modules )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_scope) identifier_scope )attribute (identifier_add_surface) identifier_add_surface )attribute (argument_list (string_'__thrift_source__') string_'__thrift_source__' (attribute (identifier_self) identifier_self (identifier_thrift_source) identifier_thrift_source )attribute )argument_list )call )expression_statement (for_statement (identifier_linker) identifier_linker (identifier_LINKERS) identifier_LINKERS (block (expression_statement (call (attribute (call (identifier_linker) identifier_linker (argument_list (attribute (identifier_self) identifier_self (identifier_scope) identifier_scope )attribute )argument_list )call (identifier_link) identifier_link )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_scope) identifier_scope )attribute (identifier_add_surface) identifier_add_surface )attribute (argument_list (string_'loads') string_'loads' (call (identifier_Deserializer) identifier_Deserializer (argument_list (attribute (identifier_self) identifier_self (identifier_protocol) identifier_protocol )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_scope) identifier_scope )attribute (identifier_add_surface) identifier_add_surface )attribute (argument_list (string_'dumps') string_'dumps' (call (identifier_Serializer) identifier_Serializer (argument_list (attribute (identifier_self) identifier_self (identifier_protocol) identifier_protocol )attribute )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Link all the types in this module and all included modules.
(module (function_definition (function_name__get) function_name__get (parameters (identifier_self) identifier_self (identifier_word1) identifier_word1 (identifier_word2) identifier_word2 )parameters (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (attribute (identifier_self) identifier_self (identifier__WSEP) identifier__WSEP )attribute (identifier_join) identifier_join )attribute (argument_list (list (call (attribute (identifier_self) identifier_self (identifier__sanitize) identifier__sanitize )attribute (argument_list (identifier_word1) identifier_word1 )argument_list )call (call (attribute (identifier_self) identifier_self (identifier__sanitize) identifier__sanitize )attribute (argument_list (identifier_word2) identifier_word2 )argument_list )call )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_key) identifier_key (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__db) identifier__db )attribute )comparison_operator (block (return_statement )return_statement )block )if_statement (return_statement (subscript (call (identifier_sample) identifier_sample (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__db) identifier__db )attribute (identifier_key) identifier_key )subscript (integer_1) integer_1 )argument_list )call (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Return a possible next word after ``word1`` and ``word2``, or ``None`` if there's no possibility.
(module (function_definition (function_name_hue) function_name_hue (parameters (identifier_self) identifier_self (identifier_hue) identifier_hue )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_hue) identifier_hue (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_hue) identifier_hue (integer_1) integer_1 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"Hue must be a percentage ") string_"Hue must be a percentage " (string_"represented as decimal 0-1.0") string_"represented as decimal 0-1.0" )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__hue) identifier__hue )attribute (identifier_hue) identifier_hue )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (attribute (identifier_self) identifier_self (identifier_command_set) identifier_command_set )attribute (identifier_hue) identifier_hue )attribute (argument_list (identifier_hue) identifier_hue )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )expression_statement )block )function_definition )module
Set the group hue. :param hue: Hue in decimal percent (0.0-1.0).
(module (function_definition (function_name_text) function_name_text (parameters (identifier_self) identifier_self (identifier_path) identifier_path (default_parameter (identifier_compression) identifier_compression (None) None )default_parameter (default_parameter (identifier_lineSep) identifier_lineSep (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_opts) identifier__set_opts )attribute (argument_list (keyword_argument (identifier_compression) identifier_compression (identifier_compression) identifier_compression )keyword_argument (keyword_argument (identifier_lineSep) identifier_lineSep (identifier_lineSep) identifier_lineSep )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__jwrite) identifier__jwrite )attribute (identifier_text) identifier_text )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement )block )function_definition )module
Saves the content of the DataFrame in a text file at the specified path. The text files will be encoded as UTF-8. :param path: the path in any Hadoop supported file system :param compression: compression codec to use when saving to file. This can be one of the known case-insensitive shorten names (none, bzip2, gzip, lz4, snappy and deflate). :param lineSep: defines the line separator that should be used for writing. If None is set, it uses the default value, ``\\n``. The DataFrame must have only one column that is of string type. Each row becomes a new line in the output file.
(module (function_definition (function_name_render_context_with_title) function_name_render_context_with_title (parameters (identifier_self) identifier_self (identifier_context) identifier_context )parameters (block (if_statement (comparison_operator (string_"page_title") string_"page_title" (identifier_context) identifier_context )comparison_operator (block (expression_statement (assignment (identifier_con) identifier_con (call (attribute (identifier_template) identifier_template (identifier_Context) identifier_Context )attribute (argument_list (identifier_context) identifier_context )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_temp) identifier_temp (call (attribute (identifier_template) identifier_template (identifier_Template) identifier_Template )attribute (argument_list (call (attribute (identifier_encoding) identifier_encoding (identifier_force_text) identifier_force_text )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_page_title) identifier_page_title )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_context) identifier_context (string_"page_title") string_"page_title" )subscript (call (attribute (identifier_temp) identifier_temp (identifier_render) identifier_render )attribute (argument_list (identifier_con) identifier_con )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_context) identifier_context )return_statement )block )function_definition )module
Render a page title and insert it into the context. This function takes in a context dict and uses it to render the page_title variable. It then appends this title to the context using the 'page_title' key. If there is already a page_title key defined in context received then this function will do nothing.
(module (function_definition (function_name__generate_badge) function_name__generate_badge (parameters (identifier_self) identifier_self (identifier_subject) identifier_subject (identifier_status) identifier_status )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (concatenated_string (string_'https://img.shields.io/badge/%s-%s-brightgreen.svg') string_'https://img.shields.io/badge/%s-%s-brightgreen.svg' (string_'?style=flat&maxAge=3600') string_'?style=flat&maxAge=3600' )concatenated_string (tuple (identifier_subject) identifier_subject (identifier_status) identifier_status )tuple )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Getting badge for %s => %s (%s)") string_"Getting badge for %s => %s (%s)" (identifier_subject) identifier_subject (identifier_status) identifier_status (identifier_url) identifier_url )argument_list )call )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_res) identifier_res (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"Error: got status %s for shields.io badge: %s") string_"Error: got status %s for shields.io badge: %s" (attribute (identifier_res) identifier_res (identifier_status_code) identifier_status_code )attribute (attribute (identifier_res) identifier_res (identifier_text) identifier_text )attribute )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Got %d character response from shields.io') string_'Got %d character response from shields.io' (call (identifier_len) identifier_len (argument_list (attribute (identifier_res) identifier_res (identifier_text) identifier_text )attribute )argument_list )call )argument_list )call )expression_statement (return_statement (attribute (identifier_res) identifier_res (identifier_text) identifier_text )attribute )return_statement )block )function_definition )module
Generate SVG for one badge via shields.io. :param subject: subject; left-hand side of badge :type subject: str :param status: status; right-hand side of badge :type status: str :return: badge SVG :rtype: str
(module (function_definition (function_name_handshake) function_name_handshake (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__socket) identifier__socket )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__socket) identifier__socket )attribute (call (attribute (identifier_self) identifier_self (identifier__connect) identifier__connect )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_call) identifier_call )attribute (argument_list (string_'handshake') string_'handshake' (dictionary (pair (string_"Version") string_"Version" (integer_1) integer_1 )pair )dictionary (keyword_argument (identifier_expect_body) identifier_expect_body (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Sets up the connection with the Serf agent and does the initial handshake.
(module (function_definition (function_name_get_repository_owner_and_name) function_name_get_repository_owner_and_name (parameters )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_str) identifier_str )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (call (identifier_check_repo) identifier_check_repo (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_url) identifier_url (attribute (call (attribute (identifier_repo) identifier_repo (identifier_remote) identifier_remote )attribute (argument_list (string_'origin') string_'origin' )argument_list )call (identifier_url) identifier_url )attribute )assignment )expression_statement (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r'([^/:]+)/([^/]+).git$') string_r'([^/:]+)/([^/]+).git$' (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_parts) identifier_parts )not_operator (block (raise_statement (identifier_HvcsRepoParseError) identifier_HvcsRepoParseError )raise_statement )block )if_statement (expression_statement (call (identifier_debug) identifier_debug (argument_list (string_'get_repository_owner_and_name') string_'get_repository_owner_and_name' (identifier_parts) identifier_parts )argument_list )call )expression_statement (return_statement (expression_list (call (attribute (identifier_parts) identifier_parts (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call (call (attribute (identifier_parts) identifier_parts (identifier_group) identifier_group )attribute (argument_list (integer_2) integer_2 )argument_list )call )expression_list )return_statement )block )function_definition )module
Checks the origin remote to get the owner and name of the remote repository. :return: A tuple of the owner and name.
(module (function_definition (function_name_assert_is_instance) function_name_assert_is_instance (parameters (identifier_obj) identifier_obj (identifier_cls) identifier_cls (default_parameter (identifier_msg_fmt) identifier_msg_fmt (string_"{msg}") string_"{msg}" )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_cls) identifier_cls )argument_list )call )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (string_"{!r} is an instance of {!r}, expected {!r}") string_"{!r} is an instance of {!r}, expected {!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_obj) identifier_obj (attribute (identifier_obj) identifier_obj (identifier___class__) identifier___class__ )attribute (identifier_cls) identifier_cls )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_types) identifier_types (conditional_expression (identifier_cls) identifier_cls (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_cls) identifier_cls (identifier_tuple) identifier_tuple )argument_list )call (tuple (identifier_cls) identifier_cls )tuple )conditional_expression )assignment )expression_statement (expression_statement (call (identifier_fail) identifier_fail (argument_list (call (attribute (identifier_msg_fmt) identifier_msg_fmt (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_msg) identifier_msg (identifier_msg) identifier_msg )keyword_argument (keyword_argument (identifier_obj) identifier_obj (identifier_obj) identifier_obj )keyword_argument (keyword_argument (identifier_types) identifier_types (identifier_types) identifier_types )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Fail if an object is not an instance of a class or tuple of classes. >>> assert_is_instance(5, int) >>> assert_is_instance('foo', (str, bytes)) >>> assert_is_instance(5, str) Traceback (most recent call last): ... AssertionError: 5 is an instance of <class 'int'>, expected <class 'str'> The following msg_fmt arguments are supported: * msg - the default error message * obj - object to test * types - tuple of types tested against
(module (function_definition (function_name_add_service_port) function_name_add_service_port (parameters (identifier_service) identifier_service (identifier_port) identifier_port )parameters (block (if_statement (comparison_operator (identifier_service) identifier_service (call (identifier_get_services) identifier_get_services (argument_list (keyword_argument (identifier_permanent) identifier_permanent (True) True )keyword_argument )argument_list )call )comparison_operator (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (string_'The service does not exist.') string_'The service does not exist.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (string_'--permanent --service={0} --add-port={1}') string_'--permanent --service={0} --add-port={1}' (identifier_format) identifier_format )attribute (argument_list (identifier_service) identifier_service (identifier_port) identifier_port )argument_list )call )assignment )expression_statement (return_statement (call (identifier___firewall_cmd) identifier___firewall_cmd (argument_list (identifier_cmd) identifier_cmd )argument_list )call )return_statement )block )function_definition )module
Add a new port to the specified service. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' firewalld.add_service_port zone 80
(module (function_definition (function_name__remember_avatarness) function_name__remember_avatarness (parameters (identifier_self) identifier_self (identifier_character) identifier_character (identifier_graph) identifier_graph (identifier_node) identifier_node (default_parameter (identifier_is_avatar) identifier_is_avatar (True) True )default_parameter (default_parameter (identifier_branch) identifier_branch (None) None )default_parameter (default_parameter (identifier_turn) identifier_turn (None) None )default_parameter (default_parameter (identifier_tick) identifier_tick (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_branch) identifier_branch (boolean_operator (identifier_branch) identifier_branch (attribute (identifier_self) identifier_self (identifier_branch) identifier_branch )attribute )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_turn) identifier_turn (boolean_operator (identifier_turn) identifier_turn (attribute (identifier_self) identifier_self (identifier_turn) identifier_turn )attribute )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_tick) identifier_tick (boolean_operator (identifier_tick) identifier_tick (attribute (identifier_self) identifier_self (identifier_tick) identifier_tick )attribute )boolean_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__avatarness_cache) identifier__avatarness_cache )attribute (identifier_store) identifier_store )attribute (argument_list (identifier_character) identifier_character (identifier_graph) identifier_graph (identifier_node) identifier_node (identifier_branch) identifier_branch (identifier_turn) identifier_turn (identifier_tick) identifier_tick (identifier_is_avatar) identifier_is_avatar )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier_avatar_set) identifier_avatar_set )attribute (argument_list (identifier_character) identifier_character (identifier_graph) identifier_graph (identifier_node) identifier_node (identifier_branch) identifier_branch (identifier_turn) identifier_turn (identifier_tick) identifier_tick (identifier_is_avatar) identifier_is_avatar )argument_list )call )expression_statement )block )function_definition )module
Use this to record a change in avatarness. Should be called whenever a node that wasn't an avatar of a character now is, and whenever a node that was an avatar of a character now isn't. ``character`` is the one using the node as an avatar, ``graph`` is the character the node is in.
(module (function_definition (function_name__check) function_name__check (parameters (identifier_self) identifier_self (identifier_file) identifier_file )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_file) identifier_file )argument_list )call )not_operator (block (raise_statement (call (identifier_Error) identifier_Error (argument_list (call (attribute (string_"file \"{}\" not found") string_"file \"{}\" not found" (identifier_format) identifier_format )attribute (argument_list (identifier_file) identifier_file )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_extension) identifier_extension )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_file) identifier_file )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_check) identifier_check (subscript (attribute (identifier_self) identifier_self (identifier_extension_map) identifier_extension_map )attribute (subscript (identifier_extension) identifier_extension (slice (integer_1) integer_1 (colon) colon )slice )subscript )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_magic_type) identifier_magic_type (call (attribute (identifier_magic) identifier_magic (identifier_from_file) identifier_from_file )attribute (argument_list (identifier_file) identifier_file )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_cls) identifier_cls )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_magic_map) identifier_magic_map )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_name) identifier_name (identifier_magic_type) identifier_magic_type )comparison_operator (block (expression_statement (assignment (identifier_check) identifier_check (identifier_cls) identifier_cls )assignment )expression_statement (break_statement )break_statement )block )if_statement )block (else_clause (block (raise_statement (call (identifier_Error) identifier_Error (argument_list (call (attribute (string_"unknown file type \"{}\", skipping...") string_"unknown file type \"{}\", skipping..." (identifier_format) identifier_format )attribute (argument_list (identifier_file) identifier_file )argument_list )call )argument_list )call )raise_statement )block )else_clause )for_statement )block )except_clause )try_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_file) identifier_file )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_code) identifier_code (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (generator_expression (call (attribute (identifier_line) identifier_line (identifier_rstrip) identifier_rstrip )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (identifier_f) identifier_f )for_in_clause )generator_expression )call )assignment )expression_statement )block )with_statement )block (except_clause (identifier_UnicodeDecodeError) identifier_UnicodeDecodeError (block (raise_statement (call (identifier_Error) identifier_Error (argument_list (string_"file does not seem to contain text, skipping...") string_"file does not seem to contain text, skipping..." )argument_list )call )raise_statement )block )except_clause )try_statement (try_statement (block (if_statement (comparison_operator (subscript (identifier_code) identifier_code (unary_operator (integer_1) integer_1 )unary_operator )subscript (string_'\n') string_'\n' )comparison_operator (block (expression_statement (augmented_assignment (identifier_code) identifier_code (string_'\n') string_'\n' )augmented_assignment )expression_statement )block )if_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (call (identifier_check) identifier_check (argument_list (identifier_code) identifier_code )argument_list )call )return_statement )block )function_definition )module
Run apropriate check based on `file`'s extension and return it, otherwise raise an Error
(module (function_definition (function_name_resource_to_url) function_name_resource_to_url (parameters (identifier_resource) identifier_resource (default_parameter (identifier_request) identifier_request (None) None )default_parameter (default_parameter (identifier_quote) identifier_quote (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_request) identifier_request (None) None )comparison_operator (block (expression_statement (assignment (identifier_request) identifier_request (call (identifier_get_current_request) identifier_get_current_request (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_reg) identifier_reg (call (identifier_get_current_registry) identifier_get_current_registry (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cnv) identifier_cnv (call (attribute (identifier_reg) identifier_reg (identifier_getAdapter) identifier_getAdapter )attribute (argument_list (identifier_request) identifier_request (identifier_IResourceUrlConverter) identifier_IResourceUrlConverter )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_cnv) identifier_cnv (identifier_resource_to_url) identifier_resource_to_url )attribute (argument_list (identifier_resource) identifier_resource (keyword_argument (identifier_quote) identifier_quote (identifier_quote) identifier_quote )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Converts the given resource to a URL. :param request: Request object (required for the host name part of the URL). If this is not given, the current request is used. :param bool quote: If set, the URL returned will be quoted.
(module (function_definition (function_name_compute_gas_limit_bounds) function_name_compute_gas_limit_bounds (parameters (typed_parameter (identifier_parent) identifier_parent (type (identifier_BlockHeader) identifier_BlockHeader )type )typed_parameter )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_int) identifier_int )type (type (identifier_int) identifier_int )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_boundary_range) identifier_boundary_range (binary_operator (attribute (identifier_parent) identifier_parent (identifier_gas_limit) identifier_gas_limit )attribute (identifier_GAS_LIMIT_ADJUSTMENT_FACTOR) identifier_GAS_LIMIT_ADJUSTMENT_FACTOR )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_upper_bound) identifier_upper_bound (binary_operator (attribute (identifier_parent) identifier_parent (identifier_gas_limit) identifier_gas_limit )attribute (identifier_boundary_range) identifier_boundary_range )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_lower_bound) identifier_lower_bound (call (identifier_max) identifier_max (argument_list (identifier_GAS_LIMIT_MINIMUM) identifier_GAS_LIMIT_MINIMUM (binary_operator (attribute (identifier_parent) identifier_parent (identifier_gas_limit) identifier_gas_limit )attribute (identifier_boundary_range) identifier_boundary_range )binary_operator )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_lower_bound) identifier_lower_bound (identifier_upper_bound) identifier_upper_bound )expression_list )return_statement )block )function_definition )module
Compute the boundaries for the block gas limit based on the parent block.
(module (function_definition (function_name__search_indicators_page_generator) function_name__search_indicators_page_generator (parameters (identifier_self) identifier_self (default_parameter (identifier_search_term) identifier_search_term (None) None )default_parameter (default_parameter (identifier_enclave_ids) identifier_enclave_ids (None) None )default_parameter (default_parameter (identifier_from_time) identifier_from_time (None) None )default_parameter (default_parameter (identifier_to_time) identifier_to_time (None) None )default_parameter (default_parameter (identifier_indicator_types) identifier_indicator_types (None) None )default_parameter (default_parameter (identifier_tags) identifier_tags (None) None )default_parameter (default_parameter (identifier_excluded_tags) identifier_excluded_tags (None) None )default_parameter (default_parameter (identifier_start_page) identifier_start_page (integer_0) integer_0 )default_parameter (default_parameter (identifier_page_size) identifier_page_size (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_get_page) identifier_get_page (call (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_search_indicators_page) identifier_search_indicators_page )attribute (identifier_search_term) identifier_search_term (identifier_enclave_ids) identifier_enclave_ids (identifier_from_time) identifier_from_time (identifier_to_time) identifier_to_time (identifier_indicator_types) identifier_indicator_types (identifier_tags) identifier_tags (identifier_excluded_tags) identifier_excluded_tags )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_Page) identifier_Page (identifier_get_page_generator) identifier_get_page_generator )attribute (argument_list (identifier_get_page) identifier_get_page (identifier_start_page) identifier_start_page (identifier_page_size) identifier_page_size )argument_list )call )return_statement )block )function_definition )module
Creates a generator from the |search_indicators_page| method that returns each successive page. :param str search_term: The term to search for. If empty, no search term will be applied. Otherwise, must be at least 3 characters. :param list(str) enclave_ids: list of enclave ids used to restrict indicators to specific enclaves (optional - by default indicators from all of user's enclaves are returned) :param int from_time: start of time window in milliseconds since epoch (optional) :param int to_time: end of time window in milliseconds since epoch (optional) :param list(str) indicator_types: a list of indicator types to filter by (optional) :param list(str) tags: Name (or list of names) of tag(s) to filter indicators by. Only indicators containing ALL of these tags will be returned. (optional) :param list(str) excluded_tags: Indicators containing ANY of these tags will be excluded from the results. :param int start_page: The page to start on. :param page_size: The size of each page. :return: The generator.
(module (function_definition (function_name_has_foreign_key) function_name_has_foreign_key (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier__normalize_identifier) identifier__normalize_identifier )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__fk_constraints) identifier__fk_constraints )attribute )comparison_operator )return_statement )block )function_definition )module
Returns whether this table has a foreign key constraint with the given name. :param name: The constraint name :type name: str :rtype: bool
(module (function_definition (function_name_cart_to_polar) function_name_cart_to_polar (parameters (identifier_arr_c) identifier_arr_c )parameters (block (if_statement (comparison_operator (subscript (attribute (identifier_arr_c) identifier_arr_c (identifier_shape) identifier_shape )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_arr_p) identifier_arr_p (call (attribute (identifier_arr_c) identifier_arr_c (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (subscript (attribute (identifier_arr_c) identifier_arr_c (identifier_shape) identifier_shape )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (integer_2) integer_2 )comparison_operator (block (expression_statement (assignment (identifier_arr_p) identifier_arr_p (call (attribute (identifier_np) identifier_np (identifier_empty_like) identifier_empty_like )attribute (argument_list (identifier_arr_c) identifier_arr_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_arr_p) identifier_arr_p (ellipsis_...) ellipsis_... (integer_0) integer_0 )subscript (call (identifier_vector_mag) identifier_vector_mag (argument_list (identifier_arr_c) identifier_arr_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_arr_p) identifier_arr_p (ellipsis_...) ellipsis_... (integer_1) integer_1 )subscript (call (attribute (identifier_np) identifier_np (identifier_arctan2) identifier_arctan2 )attribute (argument_list (subscript (identifier_arr_c) identifier_arr_c (ellipsis_...) ellipsis_... (integer_1) integer_1 )subscript (subscript (identifier_arr_c) identifier_arr_c (ellipsis_...) ellipsis_... (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (subscript (attribute (identifier_arr_c) identifier_arr_c (identifier_shape) identifier_shape )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (integer_3) integer_3 )comparison_operator (block (expression_statement (assignment (identifier_arr_p) identifier_arr_p (call (attribute (identifier_np) identifier_np (identifier_empty_like) identifier_empty_like )attribute (argument_list (identifier_arr_c) identifier_arr_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_arr_p) identifier_arr_p (ellipsis_...) ellipsis_... (integer_0) integer_0 )subscript (call (identifier_vector_mag) identifier_vector_mag (argument_list (identifier_arr_c) identifier_arr_c )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_arr_p) identifier_arr_p (ellipsis_...) ellipsis_... (integer_1) integer_1 )subscript (call (attribute (identifier_np) identifier_np (identifier_arccos) identifier_arccos )attribute (argument_list (binary_operator (subscript (identifier_arr_c) identifier_arr_c (ellipsis_...) ellipsis_... (integer_2) integer_2 )subscript (subscript (identifier_arr_p) identifier_arr_p (ellipsis_...) ellipsis_... (integer_0) integer_0 )subscript )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_arr_p) identifier_arr_p (ellipsis_...) ellipsis_... (integer_2) integer_2 )subscript (call (attribute (identifier_np) identifier_np (identifier_arctan2) identifier_arctan2 )attribute (argument_list (subscript (identifier_arr_c) identifier_arr_c (ellipsis_...) ellipsis_... (integer_1) integer_1 )subscript (subscript (identifier_arr_c) identifier_arr_c (ellipsis_...) ellipsis_... (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'Invalid vector for polar representation') string_'Invalid vector for polar representation' )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (identifier_arr_p) identifier_arr_p )return_statement )block )function_definition )module
Return cartesian vectors in their polar representation. Parameters ---------- arr_c: array, shape (a1, a2, ..., d) Cartesian vectors, with last axis indexing the dimension. Returns ------- arr_p: array, shape of arr_c Polar vectors, using (radius, inclination, azimuth) convention.
(module (function_definition (function_name_mock_decorator_with_params) function_name_mock_decorator_with_params (parameters (list_splat_pattern (identifier_oargs) identifier_oargs )list_splat_pattern (dictionary_splat_pattern (identifier_okwargs) identifier_okwargs )dictionary_splat_pattern )parameters (block (function_definition (function_name_inner) function_name_inner (parameters (identifier_fn) identifier_fn (list_splat_pattern (identifier_iargs) identifier_iargs )list_splat_pattern (dictionary_splat_pattern (identifier_ikwargs) identifier_ikwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_fn) identifier_fn (string_'__call__') string_'__call__' )argument_list )call (block (return_statement (identifier_fn) identifier_fn )return_statement )block )if_statement (return_statement (call (identifier_Mock) identifier_Mock (argument_list )argument_list )call )return_statement )block )function_definition (return_statement (identifier_inner) identifier_inner )return_statement )block )function_definition )module
Optionally mock a decorator that takes parameters E.g.: @blah(stuff=True) def things(): pass
(module (function_definition (function_name_first_return) function_name_first_return (parameters )parameters (block (expression_statement (assignment (identifier_walk) identifier_walk (binary_operator (binary_operator (binary_operator (call (identifier_randwalk) identifier_randwalk (argument_list )argument_list )call (call (identifier_drop) identifier_drop (argument_list (integer_1) integer_1 )argument_list )call )binary_operator (call (identifier_takewhile) identifier_takewhile (argument_list (lambda (lambda_parameters (identifier_v) identifier_v )lambda_parameters (comparison_operator (identifier_v) identifier_v (identifier_Origin) identifier_Origin )comparison_operator )lambda )argument_list )call )binary_operator (identifier_list) identifier_list )binary_operator )assignment )expression_statement (return_statement (call (identifier_len) identifier_len (argument_list (identifier_walk) identifier_walk )argument_list )call )return_statement )block )function_definition )module
Generate a random walk and return its length upto the moment that the walker first returns to the origin. It is mathematically provable that the walker will eventually return, meaning that the function call will halt, although it may take a *very* long time and your computer may run out of memory! Thus, try this interactively only.
(module (function_definition (function_name_clean) function_name_clean (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_cleaners) identifier_cleaners )attribute (block (expression_statement (yield (call (attribute (identifier_asyncio) identifier_asyncio (identifier_wait) identifier_wait )attribute (argument_list (list_comprehension (call (identifier_x) identifier_x (argument_list )argument_list )call (for_in_clause (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_cleaners) identifier_cleaners )attribute )for_in_clause )list_comprehension (keyword_argument (identifier_loop) identifier_loop (attribute (identifier_self) identifier_self (identifier_loop) identifier_loop )attribute )keyword_argument )argument_list )call )yield )expression_statement )block )if_statement )block )function_definition )module
Run all of the cleaners added by the user.
(module (function_definition (function_name___set_token_expired) function_name___set_token_expired (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__token_expired) identifier__token_expired )attribute (binary_operator (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_now) identifier_now )attribute (argument_list )argument_list )call (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_seconds) identifier_seconds (identifier_value) identifier_value )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (return_statement )return_statement )block )function_definition )module
Internal helper for oauth code
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_values) identifier_values (identifier_of) identifier_of )attribute (argument_list (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (string_'GET') string_'GET' (attribute (identifier_self) identifier_self (identifier__uri) identifier__uri )attribute (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_AvailablePhoneNumberCountryInstance) identifier_AvailablePhoneNumberCountryInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_account_sid) identifier_account_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'account_sid') string_'account_sid' )subscript )keyword_argument (keyword_argument (identifier_country_code) identifier_country_code (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'country_code') string_'country_code' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Fetch a AvailablePhoneNumberCountryInstance :returns: Fetched AvailablePhoneNumberCountryInstance :rtype: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryInstance
(module (function_definition (function_name_NotEqualTo) function_name_NotEqualTo (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__awql) identifier__awql )attribute (call (attribute (identifier_self) identifier_self (identifier__CreateSingleValueCondition) identifier__CreateSingleValueCondition )attribute (argument_list (identifier_value) identifier_value (string_'!=') string_'!=' )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 "not equal to". Args: value: The value to be used in the WHERE condition. Returns: The query builder that this WHERE builder links to.
(module (function_definition (function_name_merge) function_name_merge (parameters (default_parameter (identifier_directory) identifier_directory (None) None )default_parameter (default_parameter (identifier_revisions) identifier_revisions (string_'') string_'' )default_parameter (default_parameter (identifier_message) identifier_message (None) None )default_parameter (default_parameter (identifier_branch_label) identifier_branch_label (None) None )default_parameter (default_parameter (identifier_rev_id) identifier_rev_id (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_alembic_version) identifier_alembic_version (tuple (integer_0) integer_0 (integer_7) integer_7 (integer_0) integer_0 )tuple )comparison_operator (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (attribute (subscript (attribute (identifier_current_app) identifier_current_app (identifier_extensions) identifier_extensions )attribute (string_'migrate') string_'migrate' )subscript (identifier_migrate) identifier_migrate )attribute (identifier_get_config) identifier_get_config )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_command) identifier_command (identifier_merge) identifier_merge )attribute (argument_list (identifier_config) identifier_config (identifier_revisions) identifier_revisions (keyword_argument (identifier_message) identifier_message (identifier_message) identifier_message )keyword_argument (keyword_argument (identifier_branch_label) identifier_branch_label (identifier_branch_label) identifier_branch_label )keyword_argument (keyword_argument (identifier_rev_id) identifier_rev_id (identifier_rev_id) identifier_rev_id )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_'Alembic 0.7.0 or greater is required') string_'Alembic 0.7.0 or greater is required' )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Merge two revisions together. Creates a new migration file
(module (function_definition (function_name_handle_os_exceptions) function_name_handle_os_exceptions (parameters )parameters (block (try_statement (block (expression_statement (yield )yield )expression_statement )block (except_clause (identifier_ObjectException) identifier_ObjectException (block (expression_statement (assignment (pattern_list (identifier_exc_type) identifier_exc_type (identifier_exc_value) identifier_exc_value (identifier__) identifier__ )pattern_list (call (identifier_exc_info) identifier_exc_info (argument_list )argument_list )call )assignment )expression_statement (raise_statement (call (call (attribute (identifier__OS_EXCEPTIONS) identifier__OS_EXCEPTIONS (identifier_get) identifier_get )attribute (argument_list (identifier_exc_type) identifier_exc_type (identifier_OSError) identifier_OSError )argument_list )call (argument_list (identifier_exc_value) identifier_exc_value )argument_list )call )raise_statement )block )except_clause (except_clause (tuple (identifier_OSError) identifier_OSError (identifier_same_file_error) identifier_same_file_error (identifier_UnsupportedOperation) identifier_UnsupportedOperation )tuple (block (raise_statement )raise_statement )block )except_clause (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (assignment (pattern_list (identifier_exc_type) identifier_exc_type (identifier_exc_value) identifier_exc_value (identifier__) identifier__ )pattern_list (call (identifier_exc_info) identifier_exc_info (argument_list )argument_list )call )assignment )expression_statement (raise_statement (call (identifier_OSError) identifier_OSError (argument_list (binary_operator (string_'%s%s') string_'%s%s' (tuple (identifier_exc_type) identifier_exc_type (conditional_expression (parenthesized_expression (binary_operator (string_', %s') string_', %s' (identifier_exc_value) identifier_exc_value )binary_operator )parenthesized_expression (identifier_exc_value) identifier_exc_value (string_'') string_'' )conditional_expression )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Handles pycosio exceptions and raise standard OS exceptions.
(module (function_definition (function_name_deep_del) function_name_deep_del (parameters (identifier_data) identifier_data (identifier_fn) identifier_fn )parameters (block (expression_statement (assignment (identifier_result) identifier_result (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_data) identifier_data (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (if_statement (not_operator (call (identifier_fn) identifier_fn (argument_list (identifier_v) identifier_v )argument_list )call )not_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_v) identifier_v (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_k) identifier_k )subscript (call (identifier_deep_del) identifier_deep_del (argument_list (identifier_v) identifier_v (identifier_fn) identifier_fn )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_k) identifier_k )subscript (identifier_v) identifier_v )assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Create dict copy with removed items. Recursively remove items where fn(value) is True. Returns: dict: New dict with matching items removed.
(module (function_definition (function_name_get_search_scores) function_name_get_search_scores (parameters (identifier_query) identifier_query (identifier_choices) identifier_choices (default_parameter (identifier_ignore_case) identifier_ignore_case (True) True )default_parameter (default_parameter (identifier_template) identifier_template (string_'{}') string_'{}' )default_parameter (default_parameter (identifier_valid_only) identifier_valid_only (False) False )default_parameter (default_parameter (identifier_sort) identifier_sort (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_query) identifier_query (identifier_replace) identifier_replace )attribute (argument_list (string_' ') string_' ' (string_'') string_'' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pattern) identifier_pattern (call (identifier_get_search_regex) identifier_get_search_regex (argument_list (identifier_query) identifier_query (identifier_ignore_case) identifier_ignore_case )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier_choice) identifier_choice (identifier_choices) identifier_choices (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (identifier_pattern) identifier_pattern (identifier_choice) identifier_choice )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_query) identifier_query (identifier_r) identifier_r )boolean_operator (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_get_search_score) identifier_get_search_score (argument_list (identifier_query) identifier_query (identifier_choice) identifier_choice (keyword_argument (identifier_ignore_case) identifier_ignore_case (identifier_ignore_case) identifier_ignore_case )keyword_argument (keyword_argument (identifier_apply_regex) identifier_apply_regex (False) False )keyword_argument (keyword_argument (identifier_template) identifier_template (identifier_template) identifier_template )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (if_statement (identifier_query) identifier_query (block (expression_statement (assignment (identifier_result) identifier_result (tuple (identifier_choice) identifier_choice (identifier_choice) identifier_choice (identifier_NOT_FOUND_SCORE) identifier_NOT_FOUND_SCORE )tuple )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_result) identifier_result (tuple (identifier_choice) identifier_choice (identifier_choice) identifier_choice (identifier_NO_SCORE) identifier_NO_SCORE )tuple )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement (if_statement (identifier_valid_only) identifier_valid_only (block (if_statement (comparison_operator (subscript (identifier_result) identifier_result (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_NOT_FOUND_SCORE) identifier_NOT_FOUND_SCORE )comparison_operator (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (identifier_result) identifier_result )argument_list )call )expression_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (identifier_result) identifier_result )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (if_statement (identifier_sort) identifier_sort (block (expression_statement (assignment (identifier_results) identifier_results (call (identifier_sorted) identifier_sorted (argument_list (identifier_results) identifier_results (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_row) identifier_row )lambda_parameters (subscript (identifier_row) identifier_row (unary_operator (integer_1) integer_1 )unary_operator )subscript )lambda )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Search for query inside choices and return a list of tuples. Returns a list of tuples of text with the enriched text (if a template is provided) and a score for the match. Lower scores imply a better match. Parameters ---------- query : str String with letters to search in each choice (in order of appearance). choices : list of str List of sentences/words in which to search for the 'query' letters. ignore_case : bool, optional Optional value perform a case insensitive search (True by default). template : str, optional Optional template string to surround letters found in choices. This is useful when using a rich text editor ('{}' by default). Examples: '<b>{}</b>', '<code>{}</code>', '<i>{}</i>' Returns ------- results : list of tuples List of tuples where the first item is the text (enriched if a template was used) and a search score. Lower scores means better match.
(module (function_definition (function_name_prepare_inputseries) function_name_prepare_inputseries (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_ramflag) identifier_ramflag (type (identifier_bool) identifier_bool )type (True) True )typed_default_parameter )parameters (type (None) None )type (block (for_statement (identifier_element) identifier_element (call (attribute (identifier_printtools) identifier_printtools (identifier_progressbar) identifier_progressbar )attribute (argument_list (identifier_self) identifier_self )argument_list )call (block (expression_statement (call (attribute (identifier_element) identifier_element (identifier_prepare_inputseries) identifier_prepare_inputseries )attribute (argument_list (identifier_ramflag) identifier_ramflag )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Call method |Element.prepare_inputseries| of all handled |Element| objects.
(module (function_definition (function_name_data_in_label) function_name_data_in_label (parameters (identifier_intvl_in) identifier_intvl_in (identifier_dtype_in_time) identifier_dtype_in_time (default_parameter (identifier_dtype_in_vert) identifier_dtype_in_vert (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_intvl_lbl) identifier_intvl_lbl (identifier_intvl_in) identifier_intvl_in )assignment )expression_statement (expression_statement (assignment (identifier_time_lbl) identifier_time_lbl (identifier_dtype_in_time) identifier_dtype_in_time )assignment )expression_statement (expression_statement (assignment (identifier_lbl) identifier_lbl (call (attribute (call (attribute (string_'_') string_'_' (identifier_join) identifier_join )attribute (argument_list (list (string_'from') string_'from' (identifier_intvl_lbl) identifier_intvl_lbl (identifier_time_lbl) identifier_time_lbl )list )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_'__') string_'__' (string_'_') string_'_' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_vert_lbl) identifier_vert_lbl (conditional_expression (identifier_dtype_in_vert) identifier_dtype_in_vert (identifier_dtype_in_vert) identifier_dtype_in_vert (False) False )conditional_expression )assignment )expression_statement (if_statement (identifier_vert_lbl) identifier_vert_lbl (block (expression_statement (assignment (identifier_lbl) identifier_lbl (call (attribute (call (attribute (string_'_') string_'_' (identifier_join) identifier_join )attribute (argument_list (list (identifier_lbl) identifier_lbl (identifier_vert_lbl) identifier_vert_lbl )list )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_'__') string_'__' (string_'_') string_'_' )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_lbl) identifier_lbl )return_statement )block )function_definition )module
Create string label specifying the input data of a calculation.
(module (function_definition (function_name_crypto_secretstream_xchacha20poly1305_init_push) function_name_crypto_secretstream_xchacha20poly1305_init_push (parameters (identifier_state) identifier_state (identifier_key) identifier_key )parameters (block (expression_statement (call (identifier_ensure) identifier_ensure (argument_list (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_state) identifier_state (identifier_crypto_secretstream_xchacha20poly1305_state) identifier_crypto_secretstream_xchacha20poly1305_state )argument_list )call (string_'State must be a crypto_secretstream_xchacha20poly1305_state object') string_'State must be a crypto_secretstream_xchacha20poly1305_state object' (keyword_argument (identifier_raising) identifier_raising (attribute (identifier_exc) identifier_exc (identifier_TypeError) identifier_TypeError )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_ensure) identifier_ensure (argument_list (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_key) identifier_key (identifier_bytes) identifier_bytes )argument_list )call (string_'Key must be a bytes sequence') string_'Key must be a bytes sequence' (keyword_argument (identifier_raising) identifier_raising (attribute (identifier_exc) identifier_exc (identifier_TypeError) identifier_TypeError )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_ensure) identifier_ensure (argument_list (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call (identifier_crypto_secretstream_xchacha20poly1305_KEYBYTES) identifier_crypto_secretstream_xchacha20poly1305_KEYBYTES )comparison_operator (string_'Invalid key length') string_'Invalid key length' (keyword_argument (identifier_raising) identifier_raising (attribute (identifier_exc) identifier_exc (identifier_ValueError) identifier_ValueError )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_headerbuf) identifier_headerbuf (call (attribute (identifier_ffi) identifier_ffi (identifier_new) identifier_new )attribute (argument_list (string_"unsigned char []") string_"unsigned char []" (identifier_crypto_secretstream_xchacha20poly1305_HEADERBYTES) identifier_crypto_secretstream_xchacha20poly1305_HEADERBYTES )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rc) identifier_rc (call (attribute (identifier_lib) identifier_lib (identifier_crypto_secretstream_xchacha20poly1305_init_push) identifier_crypto_secretstream_xchacha20poly1305_init_push )attribute (argument_list (attribute (identifier_state) identifier_state (identifier_statebuf) identifier_statebuf )attribute (identifier_headerbuf) identifier_headerbuf (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_ensure) identifier_ensure (argument_list (comparison_operator (identifier_rc) identifier_rc (integer_0) integer_0 )comparison_operator (string_'Unexpected failure') string_'Unexpected failure' (keyword_argument (identifier_raising) identifier_raising (attribute (identifier_exc) identifier_exc (identifier_RuntimeError) identifier_RuntimeError )attribute )keyword_argument )argument_list )call )expression_statement (return_statement (subscript (call (attribute (identifier_ffi) identifier_ffi (identifier_buffer) identifier_buffer )attribute (argument_list (identifier_headerbuf) identifier_headerbuf )argument_list )call (slice (colon) colon )slice )subscript )return_statement )block )function_definition )module
Initialize a crypto_secretstream_xchacha20poly1305 encryption buffer. :param state: a secretstream state object :type state: crypto_secretstream_xchacha20poly1305_state :param key: must be :data:`.crypto_secretstream_xchacha20poly1305_KEYBYTES` long :type key: bytes :return: header :rtype: bytes
(module (function_definition (function_name_get_forwarding_information_base) function_name_get_forwarding_information_base (parameters (identifier_self) identifier_self (default_parameter (identifier_filter) identifier_filter (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (string_"{}{}") string_"{}{}" (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (string_"uri") string_"uri" )subscript (attribute (identifier_self) identifier_self (identifier_FORWARDING_INFORMATION_PATH) identifier_FORWARDING_INFORMATION_PATH )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__helper) identifier__helper )attribute (identifier_get_collection) identifier_get_collection )attribute (argument_list (identifier_uri) identifier_uri (keyword_argument (identifier_filter) identifier_filter (identifier_filter) identifier_filter )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets the forwarding information base data for a logical interconnect. A maximum of 100 entries is returned. Optional filtering criteria might be specified. Args: filter (list or str): Filtering criteria may be specified using supported attributes: interconnectUri, macAddress, internalVlan, externalVlan, and supported relation = (Equals). macAddress is 12 hexadecimal digits with a colon between each pair of digits (upper case or lower case). The default is no filter; all resources are returned. Returns: list: A set of interconnect MAC address entries.
(module (function_definition (function_name_is_installable_dir) function_name_is_installable_dir (parameters (identifier_path) identifier_path )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_path) identifier_path )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_setup_py) identifier_setup_py (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (string_"setup.py") string_"setup.py" )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_setup_py) identifier_setup_py )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Return True if `path` is a directory containing a setup.py file.
(module (function_definition (function_name_fixed_indexer) function_name_fixed_indexer (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_isfixed) identifier_isfixed (call (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_pst) identifier_pst )attribute (identifier_parameter_data) identifier_parameter_data )attribute (identifier_partrans) identifier_partrans )attribute (line_continuation_\) line_continuation_\ (identifier_apply) identifier_apply )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (comparison_operator (identifier_x) identifier_x (list (string_"fixed") string_"fixed" (string_"tied") string_"tied" )list )comparison_operator )lambda )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_isfixed) identifier_isfixed (identifier_values) identifier_values )attribute )return_statement )block )function_definition )module
indexer for fixed status Returns ------- fixed_indexer : pandas.Series
(module (function_definition (function_name_scan) function_name_scan (parameters (identifier_cls) identifier_cls (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (try_statement (block (for_statement (identifier__p) identifier__p (call (identifier_listdir) identifier_listdir (argument_list (identifier_path) identifier_path )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (call (identifier_Template) identifier_Template (argument_list (identifier__p) identifier__p (call (attribute (identifier_op) identifier_op (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (identifier__p) identifier__p )argument_list )call )argument_list )call )argument_list )call )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (continue_statement )continue_statement )block )except_clause )try_statement )block )for_statement )block (except_clause (identifier_OSError) identifier_OSError (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Scan directory for templates.
(module (function_definition (function_name__generate_sequences_for_texts) function_name__generate_sequences_for_texts (parameters (identifier_self) identifier_self (identifier_l1) identifier_l1 (identifier_t1) identifier_t1 (identifier_l2) identifier_l2 (identifier_t2) identifier_t2 (identifier_ngrams) identifier_ngrams )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__reverse_substitutes) identifier__reverse_substitutes )attribute (call (identifier_dict) identifier_dict (generator_expression (tuple (identifier_v) identifier_v (identifier_k) identifier_k )tuple (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__substitutes) identifier__substitutes )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_sequences) identifier_sequences (list )list )assignment )expression_statement (expression_statement (assignment (identifier_covered_spans) identifier_covered_spans (list (list )list (list )list )list )assignment )expression_statement (for_statement (identifier_ngram) identifier_ngram (identifier_ngrams) identifier_ngrams (block (expression_statement (call (attribute (identifier_sequences) identifier_sequences (identifier_extend) identifier_extend )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__generate_sequences_for_ngram) identifier__generate_sequences_for_ngram )attribute (argument_list (identifier_t1) identifier_t1 (identifier_t2) identifier_t2 (identifier_ngram) identifier_ngram (identifier_covered_spans) identifier_covered_spans )argument_list )call )argument_list )call )expression_statement )block )for_statement (if_statement (identifier_sequences) identifier_sequences (block (expression_statement (call (attribute (identifier_sequences) identifier_sequences (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (attribute (identifier_x) identifier_x (identifier_start_index) identifier_start_index )attribute )lambda )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_context) identifier_context (dictionary (pair (string_'l1') string_'l1' (identifier_l1) identifier_l1 )pair (pair (string_'l2') string_'l2' (identifier_l2) identifier_l2 )pair (pair (string_'sequences') string_'sequences' (identifier_sequences) identifier_sequences )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_report_name) identifier_report_name (call (attribute (string_'{}-{}.html') string_'{}-{}.html' (identifier_format) identifier_format )attribute (argument_list (identifier_l1) identifier_l1 (identifier_l2) identifier_l2 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__output_dir) identifier__output_dir )attribute (keyword_argument (identifier_exist_ok) identifier_exist_ok (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__write) identifier__write )attribute (argument_list (identifier_context) identifier_context (attribute (identifier_self) identifier_self (identifier__output_dir) identifier__output_dir )attribute (identifier_report_name) identifier_report_name )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Generates and outputs aligned sequences for the texts `t1` and `t2` from `ngrams`. :param l1: label of first witness :type l1: `str` :param t1: text content of first witness :type t1: `str` :param l2: label of second witness :type l2: `str` :param t2: text content of second witness :type t2: `str` :param ngrams: n-grams to base sequences on :type ngrams: `list` of `str`
(module (function_definition (function_name_kill_processes) function_name_kill_processes (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_critical) identifier_critical )attribute (argument_list (string_'Max shutdown exceeded, forcibly exiting') string_'Max shutdown exceeded, forcibly exiting' )argument_list )call )expression_statement (expression_statement (assignment (identifier_processes) identifier_processes (call (attribute (identifier_self) identifier_self (identifier_active_processes) identifier_active_processes )attribute (argument_list (False) False )argument_list )call )assignment )expression_statement (while_statement (identifier_processes) identifier_processes (block (for_statement (identifier_proc) identifier_proc (call (attribute (identifier_self) identifier_self (identifier_active_processes) identifier_active_processes )attribute (argument_list (False) False )argument_list )call (block (if_statement (comparison_operator (call (identifier_int) identifier_int (argument_list (attribute (identifier_proc) identifier_proc (identifier_pid) identifier_pid )attribute )argument_list )call (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_warning) identifier_warning )attribute (argument_list (string_'Killing %s (%s)') string_'Killing %s (%s)' (attribute (identifier_proc) identifier_proc (identifier_name) identifier_name )attribute (attribute (identifier_proc) identifier_proc (identifier_pid) identifier_pid )attribute )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_kill) identifier_kill )attribute (argument_list (call (identifier_int) identifier_int (argument_list (attribute (identifier_proc) identifier_proc (identifier_pid) identifier_pid )attribute )argument_list )call (attribute (identifier_signal) identifier_signal (identifier_SIGKILL) identifier_SIGKILL )attribute )argument_list )call )expression_statement )block (except_clause (identifier_OSError) identifier_OSError (block (pass_statement )pass_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_warning) identifier_warning )attribute (argument_list (string_'Cowardly refusing kill self (%s, %s)') string_'Cowardly refusing kill self (%s, %s)' (attribute (identifier_proc) identifier_proc (identifier_pid) identifier_pid )attribute (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (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 (expression_statement (assignment (identifier_processes) identifier_processes (call (attribute (identifier_self) identifier_self (identifier_active_processes) identifier_active_processes )attribute (argument_list (False) False )argument_list )call )assignment )expression_statement )block )while_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_info) identifier_info )attribute (argument_list (string_'Killed all children') string_'Killed all children' )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_set_state) identifier_set_state )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_STATE_STOPPED) identifier_STATE_STOPPED )attribute )argument_list )call )return_statement )block )function_definition )module
Gets called on shutdown by the timer when too much time has gone by, calling the terminate method instead of nicely asking for the consumers to stop.
(module (function_definition (function_name_checkout_with_fetch) function_name_checkout_with_fetch (parameters (identifier_git_folder) identifier_git_folder (identifier_refspec) identifier_refspec (default_parameter (identifier_repository) identifier_repository (string_"origin") string_"origin" )default_parameter )parameters (block (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_info) identifier_info )attribute (argument_list (string_"Trying to fetch and checkout %s") string_"Trying to fetch and checkout %s" (identifier_refspec) identifier_refspec )argument_list )call )expression_statement (expression_statement (assignment (identifier_repo) identifier_repo (call (identifier_Repo) identifier_Repo (argument_list (call (identifier_str) identifier_str (argument_list (identifier_git_folder) identifier_git_folder )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_repo) identifier_repo (identifier_git) identifier_git )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (identifier_repository) identifier_repository (identifier_refspec) identifier_refspec )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_repo) identifier_repo (identifier_git) identifier_git )attribute (identifier_checkout) identifier_checkout )attribute (argument_list (string_"FETCH_HEAD") string_"FETCH_HEAD" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_info) identifier_info )attribute (argument_list (string_"Fetch and checkout success for %s") string_"Fetch and checkout success for %s" (identifier_refspec) identifier_refspec )argument_list )call )expression_statement )block )function_definition )module
Fetch the refspec, and checkout FETCH_HEAD. Beware that you will ne in detached head mode.
(module (function_definition (function_name_xyz) function_name_xyz (parameters (identifier_self) identifier_self (identifier_arrnx3) identifier_arrnx3 )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute )not_operator (block (if_statement (not_operator (comparison_operator (subscript (attribute (identifier_arrnx3) identifier_arrnx3 (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (integer_1) integer_1 )comparison_operator )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'Trying to set position of {} with more than one') string_'Trying to set position of {} with more than one' (string_'coordinate: {}') string_'coordinate: {}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self (identifier_arrnx3) identifier_arrnx3 )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (call (attribute (identifier_np) identifier_np (identifier_squeeze) identifier_squeeze )attribute (argument_list (identifier_arrnx3) identifier_arrnx3 )argument_list )call )assignment )expression_statement )block (else_clause (block (for_statement (pattern_list (identifier_atom) identifier_atom (identifier_coords) identifier_coords )pattern_list (call (identifier_zip) identifier_zip (argument_list (call (attribute (identifier_self) identifier_self (identifier__particles) identifier__particles )attribute (argument_list (keyword_argument (identifier_include_ports) identifier_include_ports (False) False )keyword_argument )argument_list )call (identifier_arrnx3) identifier_arrnx3 )argument_list )call (block (expression_statement (assignment (attribute (identifier_atom) identifier_atom (identifier_pos) identifier_pos )attribute (identifier_coords) identifier_coords )assignment )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Set the positions of the particles in the Compound, excluding the Ports. This function does not set the position of the ports. Parameters ---------- arrnx3 : np.ndarray, shape=(n,3), dtype=float The new particle positions
(module (function_definition (function_name_get_formats) function_name_get_formats (parameters (default_parameter (identifier_function_types) identifier_function_types (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_function_types) identifier_function_types (None) None )comparison_operator (block (return_statement (dictionary_comprehension (pair (identifier_k) identifier_k (subscript (identifier_v) identifier_v (string_'display') string_'display' )subscript )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier__converter_map) identifier__converter_map (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block )if_statement (expression_statement (assignment (identifier_ftypes) identifier_ftypes (list_comprehension (call (attribute (identifier_x) identifier_x (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_function_types) identifier_function_types )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_ftypes) identifier_ftypes (call (identifier_set) identifier_set (argument_list (identifier_ftypes) identifier_ftypes )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_fmt) identifier_fmt (identifier_v) identifier_v )pattern_list (call (attribute (identifier__converter_map) identifier__converter_map (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (comparison_operator (subscript (identifier_v) identifier_v (string_'valid') string_'valid' )subscript (None) None )comparison_operator (comparison_operator (identifier_ftypes) identifier_ftypes (subscript (identifier_v) identifier_v (string_'valid') string_'valid' )subscript )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (identifier_fmt) identifier_fmt )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Returns the available formats mapped to display name. This is returned as an ordered dictionary, with the most common at the top, followed by the rest in alphabetical order If a list is specified for function_types, only those formats supporting the given function types will be returned.
(module (function_definition (function_name_extract_original_links) function_name_extract_original_links (parameters (identifier_base_url) identifier_base_url (identifier_bs4) identifier_bs4 )parameters (block (expression_statement (assignment (identifier_valid_url) identifier_valid_url (call (identifier_convert_invalid_url) identifier_convert_invalid_url (argument_list (identifier_base_url) identifier_base_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (identifier_urlparse) identifier_urlparse (argument_list (identifier_valid_url) identifier_valid_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_base_url) identifier_base_url (call (attribute (string_'{}://{}') string_'{}://{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_url) identifier_url (identifier_scheme) identifier_scheme )attribute (attribute (identifier_url) identifier_url (identifier_netloc) identifier_netloc )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_base_url_with_www) identifier_base_url_with_www (call (attribute (string_'{}://www.{}') string_'{}://www.{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_url) identifier_url (identifier_scheme) identifier_scheme )attribute (attribute (identifier_url) identifier_url (identifier_netloc) identifier_netloc )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_links) identifier_links (call (identifier_extract_links) identifier_extract_links (argument_list (identifier_bs4) identifier_bs4 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result_links) identifier_result_links (list_comprehension (identifier_anchor) identifier_anchor (for_in_clause (identifier_anchor) identifier_anchor (identifier_links) identifier_links )for_in_clause (if_clause (call (attribute (identifier_anchor) identifier_anchor (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_base_url) identifier_base_url )argument_list )call )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_result_links_www) identifier_result_links_www (list_comprehension (identifier_anchor) identifier_anchor (for_in_clause (identifier_anchor) identifier_anchor (identifier_links) identifier_links )for_in_clause (if_clause (call (attribute (identifier_anchor) identifier_anchor (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_base_url_with_www) identifier_base_url_with_www )argument_list )call )if_clause )list_comprehension )assignment )expression_statement (return_statement (call (identifier_list) identifier_list (argument_list (call (identifier_set) identifier_set (argument_list (binary_operator (identifier_result_links) identifier_result_links (identifier_result_links_www) identifier_result_links_www )binary_operator )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Extracting links that contains specific url from BeautifulSoup object :param base_url: `str` specific url that matched with the links :param bs4: `BeautifulSoup` :return: `list` List of links
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_self) identifier_self (identifier_priority) identifier_priority (identifier_observer) identifier_observer (identifier_callble) identifier_callble )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_self) identifier_self )argument_list )call (integer_1) integer_1 )binary_operator (unary_operator (integer_1) integer_1 )unary_operator (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_p) identifier_p (identifier_o) identifier_o (identifier_c) identifier_c )pattern_list (subscript (identifier_self) identifier_self (identifier_i) identifier_i )subscript )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (comparison_operator (identifier_priority) identifier_priority (identifier_p) identifier_p )comparison_operator (comparison_operator (identifier_observer) identifier_observer (identifier_o) identifier_o )comparison_operator )boolean_operator (comparison_operator (identifier_callble) identifier_callble (identifier_c) identifier_c )comparison_operator )boolean_operator (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__poc) identifier__poc )attribute (identifier_i) identifier_i )subscript )delete_statement )block )if_statement )block )for_statement )block )function_definition )module
Remove one observer, which had priority and callble.
(module (function_definition (function_name_GetAccounts) function_name_GetAccounts (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_selector) identifier_selector (dictionary (pair (string_'fields') string_'fields' (list (string_'CustomerId') string_'CustomerId' (string_'CanManageClients') string_'CanManageClients' )list )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_accounts) identifier_accounts (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_GetService) identifier_GetService )attribute (argument_list (string_'ManagedCustomerService') string_'ManagedCustomerService' )argument_list )call (identifier_get) identifier_get )attribute (argument_list (identifier_selector) identifier_selector )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_accounts) identifier_accounts (string_'entries') string_'entries' )subscript )return_statement )block )function_definition )module
Return the client accounts associated with the user's manager account. Returns: list List of ManagedCustomer data objects.
(module (function_definition (function_name_send_ether_over_wpa) function_name_send_ether_over_wpa (parameters (identifier_self) identifier_self (identifier_pkt) identifier_pkt (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_payload) identifier_payload (binary_operator (binary_operator (call (identifier_LLC) identifier_LLC (argument_list )argument_list )call (call (identifier_SNAP) identifier_SNAP (argument_list )argument_list )call )binary_operator (attribute (subscript (identifier_pkt) identifier_pkt (identifier_Ether) identifier_Ether )subscript (identifier_payload) identifier_payload )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_dest) identifier_dest (attribute (identifier_pkt) identifier_pkt (identifier_dst) identifier_dst )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_dest) identifier_dest (string_"ff:ff:ff:ff:ff:ff") string_"ff:ff:ff:ff:ff:ff" )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_wpa_to_group) identifier_send_wpa_to_group )attribute (argument_list (identifier_payload) identifier_payload (identifier_dest) identifier_dest )argument_list )call )expression_statement )block (else_clause (block (assert_statement (comparison_operator (identifier_dest) identifier_dest (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute )comparison_operator )assert_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_wpa_to_client) identifier_send_wpa_to_client )attribute (argument_list (identifier_payload) identifier_payload )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Send an Ethernet packet using the WPA channel Extra arguments will be ignored, and are just left for compatibility
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_pattern) identifier_pattern (identifier_start) identifier_start )parameters (block (expression_statement (string_"Recursively adds a linear pattern to the AC automaton") string_"Recursively adds a linear pattern to the AC automaton" )expression_statement (if_statement (not_operator (identifier_pattern) identifier_pattern )not_operator (block (return_statement (list (identifier_start) identifier_start )list )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_pattern) identifier_pattern (integer_0) integer_0 )subscript (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (assignment (identifier_match_nodes) identifier_match_nodes (list )list )assignment )expression_statement (for_statement (identifier_alternative) identifier_alternative (subscript (identifier_pattern) identifier_pattern (integer_0) integer_0 )subscript (block (expression_statement (assignment (identifier_end_nodes) identifier_end_nodes (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (identifier_alternative) identifier_alternative (keyword_argument (identifier_start) identifier_start (identifier_start) identifier_start )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_end) identifier_end (identifier_end_nodes) identifier_end_nodes (block (expression_statement (call (attribute (identifier_match_nodes) identifier_match_nodes (identifier_extend) identifier_extend )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (subscript (identifier_pattern) identifier_pattern (slice (integer_1) integer_1 (colon) colon )slice )subscript (identifier_end) identifier_end )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_match_nodes) identifier_match_nodes )return_statement )block (else_clause (block (if_statement (comparison_operator (subscript (identifier_pattern) identifier_pattern (integer_0) integer_0 )subscript (attribute (identifier_start) identifier_start (identifier_transition_table) identifier_transition_table )attribute )comparison_operator (block (expression_statement (assignment (identifier_next_node) identifier_next_node (call (identifier_BMNode) identifier_BMNode (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_start) identifier_start (identifier_transition_table) identifier_transition_table )attribute (subscript (identifier_pattern) identifier_pattern (integer_0) integer_0 )subscript )subscript (identifier_next_node) identifier_next_node )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_next_node) identifier_next_node (subscript (attribute (identifier_start) identifier_start (identifier_transition_table) identifier_transition_table )attribute (subscript (identifier_pattern) identifier_pattern (integer_0) integer_0 )subscript )subscript )assignment )expression_statement )block )else_clause )if_statement (if_statement (subscript (identifier_pattern) identifier_pattern (slice (integer_1) integer_1 (colon) colon )slice )subscript (block (expression_statement (assignment (identifier_end_nodes) identifier_end_nodes (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (subscript (identifier_pattern) identifier_pattern (slice (integer_1) integer_1 (colon) colon )slice )subscript (keyword_argument (identifier_start) identifier_start (identifier_next_node) identifier_next_node )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_end_nodes) identifier_end_nodes (list (identifier_next_node) identifier_next_node )list )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_end_nodes) identifier_end_nodes )return_statement )block )else_clause )if_statement )block )function_definition )module
Recursively adds a linear pattern to the AC automaton
(module (function_definition (function_name_identical) function_name_identical (parameters (identifier_self) identifier_self (identifier_o) identifier_o )parameters (block (return_statement (boolean_operator (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_bits) identifier_bits )attribute (attribute (identifier_o) identifier_o (identifier_bits) identifier_bits )attribute )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_stride) identifier_stride )attribute (attribute (identifier_o) identifier_o (identifier_stride) identifier_stride )attribute )comparison_operator )boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_lower_bound) identifier_lower_bound )attribute (attribute (identifier_o) identifier_o (identifier_lower_bound) identifier_lower_bound )attribute )comparison_operator )boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_upper_bound) identifier_upper_bound )attribute (attribute (identifier_o) identifier_o (identifier_upper_bound) identifier_upper_bound )attribute )comparison_operator )boolean_operator )return_statement )block )function_definition )module
Used to make exact comparisons between two StridedIntervals. Usually it is only used in test cases. :param o: The other StridedInterval to compare with. :return: True if they are exactly same, False otherwise.
(module (function_definition (function_name_connect_output) function_name_connect_output (parameters (identifier_self) identifier_self (identifier_node) identifier_node )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_outputs) identifier_outputs )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier_max_outputs) identifier_max_outputs )attribute )comparison_operator (block (raise_statement (call (identifier_TooManyOutputsError) identifier_TooManyOutputsError (argument_list (string_"Attempted to connect too many nodes to the output of a node") string_"Attempted to connect too many nodes to the output of a node" (keyword_argument (identifier_max_outputs) identifier_max_outputs (attribute (identifier_self) identifier_self (identifier_max_outputs) identifier_max_outputs )attribute )keyword_argument (keyword_argument (identifier_stream) identifier_stream (attribute (identifier_self) identifier_self (identifier_stream) identifier_stream )attribute )keyword_argument )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_outputs) identifier_outputs )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement )block )function_definition )module
Connect another node to our output. This downstream node will automatically be triggered when we update our output. Args: node (SGNode): The node that should receive our output
(module (function_definition (function_name_full_load) function_name_full_load (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_parse_data_directories) identifier_parse_data_directories )attribute (argument_list )argument_list )call )expression_statement (class_definition (identifier_RichHeader) identifier_RichHeader (argument_list (identifier_object) identifier_object )argument_list (block (pass_statement )pass_statement )block )class_definition (expression_statement (assignment (identifier_rich_header) identifier_rich_header (call (attribute (identifier_self) identifier_self (identifier_parse_rich_header) identifier_parse_rich_header )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_rich_header) identifier_rich_header (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_RICH_HEADER) identifier_RICH_HEADER )attribute (call (identifier_RichHeader) identifier_RichHeader (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_RICH_HEADER) identifier_RICH_HEADER )attribute (identifier_checksum) identifier_checksum )attribute (call (attribute (identifier_rich_header) identifier_rich_header (identifier_get) identifier_get )attribute (argument_list (string_'checksum') string_'checksum' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_RICH_HEADER) identifier_RICH_HEADER )attribute (identifier_values) identifier_values )attribute (call (attribute (identifier_rich_header) identifier_rich_header (identifier_get) identifier_get )attribute (argument_list (string_'values') string_'values' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_RICH_HEADER) identifier_RICH_HEADER )attribute (identifier_key) identifier_key )attribute (call (attribute (identifier_rich_header) identifier_rich_header (identifier_get) identifier_get )attribute (argument_list (string_'key') string_'key' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_RICH_HEADER) identifier_RICH_HEADER )attribute (identifier_raw_data) identifier_raw_data )attribute (call (attribute (identifier_rich_header) identifier_rich_header (identifier_get) identifier_get )attribute (argument_list (string_'raw_data') string_'raw_data' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_RICH_HEADER) identifier_RICH_HEADER )attribute (identifier_clear_data) identifier_clear_data )attribute (call (attribute (identifier_rich_header) identifier_rich_header (identifier_get) identifier_get )attribute (argument_list (string_'clear_data') string_'clear_data' (None) None )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_RICH_HEADER) identifier_RICH_HEADER )attribute (None) None )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Process the data directories. This method will load the data directories which might not have been loaded if the "fast_load" option was used.
(module (function_definition (function_name_is_scalar) function_name_is_scalar (parameters (typed_parameter (identifier_value) identifier_value (type (identifier_Any) identifier_Any )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (return_statement (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_value) identifier_value (string_'ndim') string_'ndim' (None) None )argument_list )call (integer_0) integer_0 )comparison_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (tuple (identifier_str) identifier_str (identifier_bytes) identifier_bytes )tuple )argument_list )call )boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (binary_operator (tuple (identifier_Iterable) identifier_Iterable )tuple (identifier_dask_array_type) identifier_dask_array_type )binary_operator )argument_list )call )not_operator )boolean_operator )parenthesized_expression )return_statement )block )function_definition )module
Whether to treat a value as a scalar. Any non-iterable, string, or 0-D array
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_element) identifier_element )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_element) identifier_element (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Hll elements can only be strings") string_"Hll elements can only be strings" )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__adds) identifier__adds )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_element) identifier_element )argument_list )call )expression_statement )block )function_definition )module
Adds an element to the HyperLogLog. Datatype cardinality will be updated when the object is saved. :param element: the element to add :type element: str
(module (function_definition (function_name_remove_zero_points) function_name_remove_zero_points (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_points_of_interest) identifier_points_of_interest (subscript (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (binary_operator (binary_operator (parenthesized_expression (comparison_operator (call (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_norm) identifier_norm )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_point_cloud) identifier_point_cloud )attribute (identifier_data) identifier_data )attribute (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call (float_0.0) float_0.0 )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (call (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_norm) identifier_norm )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_normal_cloud) identifier_normal_cloud )attribute (identifier_data) identifier_data )attribute (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call (float_0.0) float_0.0 )comparison_operator )parenthesized_expression )binary_operator (parenthesized_expression (call (attribute (identifier_np) identifier_np (identifier_isfinite) identifier_isfinite )attribute (argument_list (subscript (attribute (attribute (identifier_self) identifier_self (identifier_normal_cloud) identifier_normal_cloud )attribute (identifier_data) identifier_data )attribute (integer_0) integer_0 (slice (colon) colon )slice )subscript )argument_list )call )parenthesized_expression )binary_operator )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_point_cloud) identifier_point_cloud )attribute (identifier__data) identifier__data )attribute (subscript (attribute (attribute (identifier_self) identifier_self (identifier_point_cloud) identifier_point_cloud )attribute (identifier_data) identifier_data )attribute (slice (colon) colon )slice (identifier_points_of_interest) identifier_points_of_interest )subscript )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_normal_cloud) identifier_normal_cloud )attribute (identifier__data) identifier__data )attribute (subscript (attribute (attribute (identifier_self) identifier_self (identifier_normal_cloud) identifier_normal_cloud )attribute (identifier_data) identifier_data )attribute (slice (colon) colon )slice (identifier_points_of_interest) identifier_points_of_interest )subscript )assignment )expression_statement )block )function_definition )module
Remove all elements where the norms and points are zero. Note ---- This returns nothing and updates the NormalCloud in-place.
(module (function_definition (function_name_create) function_name_create (parameters (identifier_cls) identifier_cls (identifier_name) identifier_name (default_parameter (identifier_md5_password) identifier_md5_password (None) None )default_parameter (default_parameter (identifier_connect_retry) identifier_connect_retry (integer_120) integer_120 )default_parameter (default_parameter (identifier_session_hold_timer) identifier_session_hold_timer (integer_180) integer_180 )default_parameter (default_parameter (identifier_session_keep_alive) identifier_session_keep_alive (integer_60) integer_60 )default_parameter )parameters (block (expression_statement (assignment (identifier_json) identifier_json (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'connect') string_'connect' (identifier_connect_retry) identifier_connect_retry )pair (pair (string_'session_hold_timer') string_'session_hold_timer' (identifier_session_hold_timer) identifier_session_hold_timer )pair (pair (string_'session_keep_alive') string_'session_keep_alive' (identifier_session_keep_alive) identifier_session_keep_alive )pair )dictionary )assignment )expression_statement (if_statement (identifier_md5_password) identifier_md5_password (block (expression_statement (call (attribute (identifier_json) identifier_json (identifier_update) identifier_update )attribute (argument_list (keyword_argument (identifier_md5_password) identifier_md5_password (identifier_md5_password) identifier_md5_password )keyword_argument )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_ElementCreator) identifier_ElementCreator (argument_list (identifier_cls) identifier_cls (identifier_json) identifier_json )argument_list )call )return_statement )block )function_definition )module
Create a new BGP Connection Profile. :param str name: name of profile :param str md5_password: optional md5 password :param int connect_retry: The connect retry timer, in seconds :param int session_hold_timer: The session hold timer, in seconds :param int session_keep_alive: The session keep alive timer, in seconds :raises CreateElementFailed: failed creating profile :return: instance with meta :rtype: BGPConnectionProfile
(module (function_definition (function_name_events) function_name_events (parameters (identifier_cls) identifier_cls (identifier_filters) identifier_filters )parameters (block (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_filters) identifier_filters (identifier_pop) identifier_pop )attribute (argument_list (string_'current') string_'current' (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_current_params) identifier_current_params (list )list )assignment )expression_statement (if_statement (identifier_current) identifier_current (block (expression_statement (assignment (identifier_current_params) identifier_current_params (list (tuple (string_'current') string_'current' (string_'true') string_'true' )tuple )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_filter_url) identifier_filter_url (call (attribute (identifier_uparse) identifier_uparse (identifier_urlencode) identifier_urlencode )attribute (argument_list (binary_operator (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_filters) identifier_filters (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call (identifier_current_params) identifier_current_params )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_events) identifier_events (call (attribute (identifier_cls) identifier_cls (identifier_json_get) identifier_json_get )attribute (argument_list (binary_operator (string_'%s/events?%s') string_'%s/events?%s' (tuple (attribute (identifier_cls) identifier_cls (identifier_api_url) identifier_api_url )attribute (identifier_filter_url) identifier_filter_url )tuple )binary_operator (keyword_argument (identifier_empty_key) identifier_empty_key (True) True )keyword_argument (keyword_argument (identifier_send_key) identifier_send_key (False) False )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_events) identifier_events )return_statement )block )function_definition )module
Retrieve events details from status.gandi.net.
(module (function_definition (function_name_runTemplate) function_name_runTemplate (parameters (identifier_id) identifier_id (default_parameter (identifier_data) identifier_data (dictionary )dictionary )default_parameter )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_Qubole) identifier_Qubole (identifier_agent) identifier_agent )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_id) identifier_id )argument_list )call (string_"/run") string_"/run" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_conn) identifier_conn (identifier_post) identifier_post )attribute (argument_list (call (attribute (identifier_Template) identifier_Template (identifier_element_path) identifier_element_path )attribute (argument_list (identifier_path) identifier_path )argument_list )call (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmdType) identifier_cmdType (subscript (identifier_res) identifier_res (string_'command_type') string_'command_type' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_cmdId) identifier_cmdId (subscript (identifier_res) identifier_res (string_'id') string_'id' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_cmdClass) identifier_cmdClass (call (identifier_eval) identifier_eval (argument_list (identifier_cmdType) identifier_cmdType )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (identifier_cmdClass) identifier_cmdClass (identifier_find) identifier_find )attribute (argument_list (identifier_cmdId) identifier_cmdId )argument_list )call )assignment )expression_statement (while_statement (not_operator (call (attribute (identifier_Command) identifier_Command (identifier_is_done) identifier_is_done )attribute (argument_list (attribute (identifier_cmd) identifier_cmd (identifier_status) identifier_status )attribute )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (attribute (identifier_Qubole) identifier_Qubole (identifier_poll_interval) identifier_poll_interval )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (identifier_cmdClass) identifier_cmdClass (identifier_find) identifier_find )attribute (argument_list (attribute (identifier_cmd) identifier_cmd (identifier_id) identifier_id )attribute )argument_list )call )assignment )expression_statement )block )while_statement (return_statement (call (attribute (identifier_Template) identifier_Template (identifier_getResult) identifier_getResult )attribute (argument_list (identifier_cmdClass) identifier_cmdClass (identifier_cmd) identifier_cmd )argument_list )call )return_statement )block )function_definition )module
Run an existing Template and waits for the Result. Prints result to stdout. Args: `id`: ID of the template to run `data`: json data containing the input_vars Returns: An integer as status (0: success, 1: failure)
(module (function_definition (function_name__replace_property) function_name__replace_property (parameters (identifier_property_key) identifier_property_key (identifier_property_value) identifier_property_value (identifier_resource) identifier_resource (identifier_logical_id) identifier_logical_id )parameters (block (if_statement (boolean_operator (identifier_property_key) identifier_property_key (identifier_property_value) identifier_property_value )boolean_operator (block (expression_statement (assignment (subscript (call (attribute (identifier_resource) identifier_resource (identifier_get) identifier_get )attribute (argument_list (identifier_PROPERTIES_KEY) identifier_PROPERTIES_KEY (dictionary )dictionary )argument_list )call (identifier_property_key) identifier_property_key )subscript (identifier_property_value) identifier_property_value )assignment )expression_statement )block (elif_clause (boolean_operator (identifier_property_key) identifier_property_key (identifier_property_value) identifier_property_value )boolean_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (concatenated_string (string_"WARNING: Ignoring Metadata for Resource %s. Metadata contains only aws:asset:path or ") string_"WARNING: Ignoring Metadata for Resource %s. Metadata contains only aws:asset:path or " (string_"aws:assert:property but not both") string_"aws:assert:property but not both" )concatenated_string (identifier_logical_id) identifier_logical_id )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Replace a property with an asset on a given resource This method will mutate the template Parameters ---------- property str The property to replace on the resource property_value str The new value of the property resource dict Dictionary representing the Resource to change logical_id str LogicalId of the Resource
(module (function_definition (function_name_define_log_renderer) function_name_define_log_renderer (parameters (identifier_fmt) identifier_fmt (identifier_fpath) identifier_fpath (identifier_quiet) identifier_quiet )parameters (block (if_statement (identifier_fmt) identifier_fmt (block (return_statement (call (attribute (attribute (identifier_structlog) identifier_structlog (identifier_processors) identifier_processors )attribute (identifier_JSONRenderer) identifier_JSONRenderer )attribute (argument_list )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (identifier_fpath) identifier_fpath (None) None )comparison_operator (block (return_statement (call (attribute (attribute (identifier_structlog) identifier_structlog (identifier_processors) identifier_processors )attribute (identifier_JSONRenderer) identifier_JSONRenderer )attribute (argument_list )argument_list )call )return_statement )block )if_statement (if_statement (boolean_operator (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_isatty) identifier_isatty )attribute (argument_list )argument_list )call (not_operator (identifier_quiet) identifier_quiet )not_operator )boolean_operator (block (return_statement (call (attribute (attribute (identifier_structlog) identifier_structlog (identifier_dev) identifier_dev )attribute (identifier_ConsoleRenderer) identifier_ConsoleRenderer )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_structlog) identifier_structlog (identifier_processors) identifier_processors )attribute (identifier_JSONRenderer) identifier_JSONRenderer )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
the final log processor that structlog requires to render.
(module (function_definition (function_name_run_task) function_name_run_task (parameters (identifier_factory) identifier_factory (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_context) identifier_context (call (identifier_TaskContext) identifier_TaskContext (argument_list (identifier_factory) identifier_factory (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pstats_dir) identifier_pstats_dir (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"pstats_dir") string_"pstats_dir" (call (attribute (identifier_os) identifier_os (identifier_getenv) identifier_getenv )attribute (argument_list (identifier_PSTATS_DIR) identifier_PSTATS_DIR )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_pstats_dir) identifier_pstats_dir (block (import_statement (dotted_name (identifier_cProfile) identifier_cProfile )dotted_name )import_statement (import_statement (dotted_name (identifier_tempfile) identifier_tempfile )dotted_name )import_statement (import_statement (aliased_import (dotted_name (identifier_pydoop) identifier_pydoop (identifier_hdfs) identifier_hdfs )dotted_name (identifier_hdfs) identifier_hdfs )aliased_import )import_statement (expression_statement (call (attribute (identifier_hdfs) identifier_hdfs (identifier_mkdir) identifier_mkdir )attribute (argument_list (identifier_pstats_dir) identifier_pstats_dir )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_fd) identifier_fd (identifier_pstats_fn) identifier_pstats_fn )pattern_list (call (attribute (identifier_tempfile) identifier_tempfile (identifier_mkstemp) identifier_mkstemp )attribute (argument_list (keyword_argument (identifier_suffix) identifier_suffix (string_".pstats") string_".pstats" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_close) identifier_close )attribute (argument_list (identifier_fd) identifier_fd )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cProfile) identifier_cProfile (identifier_runctx) identifier_runctx )attribute (argument_list (string_"_run(context, **kwargs)") string_"_run(context, **kwargs)" (call (identifier_globals) identifier_globals (argument_list )argument_list )call (call (identifier_locals) identifier_locals (argument_list )argument_list )call (keyword_argument (identifier_filename) identifier_filename (identifier_pstats_fn) identifier_pstats_fn )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_pstats_fmt) identifier_pstats_fmt (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"pstats_fmt") string_"pstats_fmt" (call (attribute (identifier_os) identifier_os (identifier_getenv) identifier_getenv )attribute (argument_list (identifier_PSTATS_FMT) identifier_PSTATS_FMT (identifier_DEFAULT_PSTATS_FMT) identifier_DEFAULT_PSTATS_FMT )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (binary_operator (identifier_pstats_fmt) identifier_pstats_fmt (tuple (attribute (identifier_context) identifier_context (identifier_task_type) identifier_task_type )attribute (call (attribute (identifier_context) identifier_context (identifier_get_task_partition) identifier_get_task_partition )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_pstats_fn) identifier_pstats_fn )argument_list )call )tuple )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_hdfs) identifier_hdfs (identifier_put) identifier_put )attribute (argument_list (identifier_pstats_fn) identifier_pstats_fn (call (attribute (attribute (identifier_hdfs) identifier_hdfs (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_pstats_dir) identifier_pstats_dir (identifier_name) identifier_name )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier__run) identifier__run (argument_list (identifier_context) identifier_context (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
\ Run a MapReduce task. Available keyword arguments: * ``raw_keys`` (default: :obj:`False`): pass map input keys to context as byte strings (ignore any type information) * ``raw_values`` (default: :obj:`False`): pass map input values to context as byte strings (ignore any type information) * ``private_encoding`` (default: :obj:`True`): automatically serialize map output k/v and deserialize reduce input k/v (pickle) * ``auto_serialize`` (default: :obj:`True`): automatically serialize reduce output (map output in map-only jobs) k/v (call str/unicode then encode as utf-8) Advanced keyword arguments: * ``pstats_dir``: run the task with cProfile and store stats in this dir * ``pstats_fmt``: use this pattern for pstats filenames (experts only) The pstats dir and filename pattern can also be provided via ``pydoop submit`` arguments, with lower precedence in case of clashes.
(module (function_definition (function_name_run_strelka) function_name_run_strelka (parameters (identifier_job) identifier_job (identifier_tumor_bam) identifier_tumor_bam (identifier_normal_bam) identifier_normal_bam (identifier_univ_options) identifier_univ_options (identifier_strelka_options) identifier_strelka_options (default_parameter (identifier_split) identifier_split (True) True )default_parameter )parameters (block (if_statement (subscript (identifier_strelka_options) identifier_strelka_options (string_'chromosomes') string_'chromosomes' )subscript (block (expression_statement (assignment (identifier_chromosomes) identifier_chromosomes (subscript (identifier_strelka_options) identifier_strelka_options (string_'chromosomes') string_'chromosomes' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_chromosomes) identifier_chromosomes (call (identifier_sample_chromosomes) identifier_sample_chromosomes (argument_list (identifier_job) identifier_job (subscript (identifier_strelka_options) identifier_strelka_options (string_'genome_fai') string_'genome_fai' )subscript )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_num_cores) identifier_num_cores (call (identifier_min) identifier_min (argument_list (call (identifier_len) identifier_len (argument_list (identifier_chromosomes) identifier_chromosomes )argument_list )call (subscript (identifier_univ_options) identifier_univ_options (string_'max_cores') string_'max_cores' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_strelka) identifier_strelka (call (attribute (identifier_job) identifier_job (identifier_wrapJobFn) identifier_wrapJobFn )attribute (argument_list (identifier_run_strelka_full) identifier_run_strelka_full (identifier_tumor_bam) identifier_tumor_bam (identifier_normal_bam) identifier_normal_bam (identifier_univ_options) identifier_univ_options (identifier_strelka_options) identifier_strelka_options (keyword_argument (identifier_disk) identifier_disk (call (identifier_PromisedRequirement) identifier_PromisedRequirement (argument_list (identifier_strelka_disk) identifier_strelka_disk (subscript (identifier_tumor_bam) identifier_tumor_bam (string_'tumor_dna_fix_pg_sorted.bam') string_'tumor_dna_fix_pg_sorted.bam' )subscript (subscript (identifier_normal_bam) identifier_normal_bam (string_'normal_dna_fix_pg_sorted.bam') string_'normal_dna_fix_pg_sorted.bam' )subscript (subscript (identifier_strelka_options) identifier_strelka_options (string_'genome_fasta') string_'genome_fasta' )subscript )argument_list )call )keyword_argument (keyword_argument (identifier_memory) identifier_memory (string_'6G') string_'6G' )keyword_argument (keyword_argument (identifier_cores) identifier_cores (identifier_num_cores) identifier_num_cores )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_job) identifier_job (identifier_addChild) identifier_addChild )attribute (argument_list (identifier_strelka) identifier_strelka )argument_list )call )expression_statement (if_statement (identifier_split) identifier_split (block (expression_statement (assignment (identifier_unmerge_strelka) identifier_unmerge_strelka (call (attribute (call (attribute (identifier_job) identifier_job (identifier_wrapJobFn) identifier_wrapJobFn )attribute (argument_list (identifier_wrap_unmerge) identifier_wrap_unmerge (call (attribute (identifier_strelka) identifier_strelka (identifier_rv) identifier_rv )attribute (argument_list )argument_list )call (identifier_chromosomes) identifier_chromosomes (identifier_strelka_options) identifier_strelka_options (identifier_univ_options) identifier_univ_options )argument_list )call (identifier_encapsulate) identifier_encapsulate )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_strelka) identifier_strelka (identifier_addChild) identifier_addChild )attribute (argument_list (identifier_unmerge_strelka) identifier_unmerge_strelka )argument_list )call )expression_statement (return_statement (call (attribute (identifier_unmerge_strelka) identifier_unmerge_strelka (identifier_rv) identifier_rv )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_strelka) identifier_strelka (identifier_rv) identifier_rv )attribute (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Run the strelka subgraph on the DNA bams. Optionally split the results into per-chromosome vcfs. :param dict tumor_bam: Dict of bam and bai for tumor DNA-Seq :param dict normal_bam: Dict of bam and bai for normal DNA-Seq :param dict univ_options: Dict of universal options used by almost all tools :param dict strelka_options: Options specific to strelka :param bool split: Should the results be split into perchrom vcfs? :return: Either the fsID to the genome-level vcf or a dict of results from running strelka on every chromosome perchrom_strelka: |- 'chr1': | |-'snvs': fsID | +-'indels': fsID |- 'chr2': | |-'snvs': fsID | +-'indels': fsID |-... | +- 'chrM': |-'snvs': fsID +-'indels': fsID :rtype: toil.fileStore.FileID|dict
(module (function_definition (function_name__to_str) function_name__to_str (parameters (identifier_dumped_val) identifier_dumped_val (default_parameter (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )default_parameter (default_parameter (identifier_ordered) identifier_ordered (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier__dict) identifier__dict (conditional_expression (identifier_OrderedDict) identifier_OrderedDict (identifier_ordered) identifier_ordered (identifier_dict) identifier_dict )conditional_expression )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_dumped_val) identifier_dumped_val (identifier_dict) identifier_dict )argument_list )call (block (return_statement (call (identifier_OrderedDict) identifier_OrderedDict (generator_expression (tuple (identifier_k) identifier_k (call (identifier__to_str) identifier__to_str (argument_list (identifier_v) identifier_v (identifier_encoding) identifier_encoding )argument_list )call )tuple (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_dumped_val) identifier_dumped_val (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )call )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_dumped_val) identifier_dumped_val (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (block (return_statement (list_comprehension (call (identifier__to_str) identifier__to_str (argument_list (identifier_v) identifier_v (identifier_encoding) identifier_encoding )argument_list )call (for_in_clause (identifier_v) identifier_v (identifier_dumped_val) identifier_dumped_val )for_in_clause )list_comprehension )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_dumped_val) identifier_dumped_val (identifier_bytes) identifier_bytes )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_dumped_val) identifier_dumped_val (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (assignment (identifier_d) identifier_d (call (identifier_repr) identifier_repr (argument_list (identifier_dumped_val) identifier_dumped_val )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (return_statement (identifier_d) identifier_d )return_statement )block )elif_clause (else_clause (block (return_statement (identifier_dumped_val) identifier_dumped_val )return_statement )block )else_clause )if_statement )block )function_definition )module
Convert bytes in a dump value to str, allowing json encode
(module (function_definition (function_name__check_psutil) function_name__check_psutil (parameters (identifier_self) identifier_self (identifier_instance) identifier_instance )parameters (block (expression_statement (assignment (identifier_custom_tags) identifier_custom_tags (call (attribute (identifier_instance) identifier_instance (identifier_get) identifier_get )attribute (argument_list (string_'tags') string_'tags' (list )list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__collect_cx_state) identifier__collect_cx_state )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cx_state_psutil) identifier__cx_state_psutil )attribute (argument_list (keyword_argument (identifier_tags) identifier_tags (identifier_custom_tags) identifier_custom_tags )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cx_counters_psutil) identifier__cx_counters_psutil )attribute (argument_list (keyword_argument (identifier_tags) identifier_tags (identifier_custom_tags) identifier_custom_tags )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Gather metrics about connections states and interfaces counters using psutil facilities
(module (function_definition (function_name_set_primary_parameters) function_name_set_primary_parameters (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_given) identifier_given (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_required) identifier_required (call (identifier_sorted) identifier_sorted (argument_list (attribute (identifier_self) identifier_self (identifier__PRIMARY_PARAMETERS) identifier__PRIMARY_PARAMETERS )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_given) identifier_given (identifier_required) identifier_required )comparison_operator (block (for_statement (tuple_pattern (identifier_key) identifier_key (identifier_value) identifier_value )tuple_pattern (call (attribute (identifier_kwargs) identifier_kwargs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_'When passing primary parameter values as initialization ') string_'When passing primary parameter values as initialization ' (string_'arguments of the instantaneous unit hydrograph class `%s`, ') string_'arguments of the instantaneous unit hydrograph class `%s`, ' (string_'or when using method `set_primary_parameters, one has to ') string_'or when using method `set_primary_parameters, one has to ' (string_'to define all values at once via keyword arguments. ') string_'to define all values at once via keyword arguments. ' (string_'But instead of the primary parameter names `%s` the ') string_'But instead of the primary parameter names `%s` the ' (string_'following keywords were given: %s.') string_'following keywords were given: %s.' )concatenated_string (tuple (call (attribute (identifier_objecttools) identifier_objecttools (identifier_classname) identifier_classname )attribute (argument_list (identifier_self) identifier_self )argument_list )call (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_required) identifier_required )argument_list )call (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_given) identifier_given )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Set all primary parameters at once.
(module (function_definition (function_name_encode_chain_list) function_name_encode_chain_list (parameters (identifier_in_strings) identifier_in_strings )parameters (block (expression_statement (assignment (identifier_out_bytes) identifier_out_bytes (string_b"") string_b"" )assignment )expression_statement (for_statement (identifier_in_s) identifier_in_s (identifier_in_strings) identifier_in_strings (block (expression_statement (augmented_assignment (identifier_out_bytes) identifier_out_bytes (call (attribute (identifier_in_s) identifier_in_s (identifier_encode) identifier_encode )attribute (argument_list (string_'ascii') string_'ascii' )argument_list )call )augmented_assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (binary_operator (attribute (attribute (attribute (identifier_mmtf) identifier_mmtf (identifier_utils) identifier_utils )attribute (identifier_constants) identifier_constants )attribute (identifier_CHAIN_LEN) identifier_CHAIN_LEN )attribute (call (identifier_len) identifier_len (argument_list (identifier_in_s) identifier_in_s )argument_list )call )binary_operator )argument_list )call (block (expression_statement (augmented_assignment (identifier_out_bytes) identifier_out_bytes (call (attribute (attribute (attribute (attribute (identifier_mmtf) identifier_mmtf (identifier_utils) identifier_utils )attribute (identifier_constants) identifier_constants )attribute (identifier_NULL_BYTE) identifier_NULL_BYTE )attribute (identifier_encode) identifier_encode )attribute (argument_list (string_'ascii') string_'ascii' )argument_list )call )augmented_assignment )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_out_bytes) identifier_out_bytes )return_statement )block )function_definition )module
Convert a list of strings to a list of byte arrays. :param in_strings: the input strings :return the encoded list of byte arrays
(module (function_definition (function_name_function) function_name_function (parameters (identifier_self) identifier_self (default_parameter (identifier_addr) identifier_addr (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_create) identifier_create (False) False )default_parameter (default_parameter (identifier_syscall) identifier_syscall (False) False )default_parameter (default_parameter (identifier_plt) identifier_plt (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_addr) identifier_addr (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_f) identifier_f (call (attribute (attribute (identifier_self) identifier_self (identifier__function_map) identifier__function_map )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_addr) identifier_addr )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_plt) identifier_plt (None) None )comparison_operator (comparison_operator (attribute (identifier_f) identifier_f (identifier_is_plt) identifier_is_plt )attribute (identifier_plt) identifier_plt )comparison_operator )boolean_operator (block (return_statement (identifier_f) identifier_f )return_statement )block )if_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (if_statement (identifier_create) identifier_create (block (expression_statement (assignment (identifier_f) identifier_f (subscript (attribute (identifier_self) identifier_self (identifier__function_map) identifier__function_map )attribute (identifier_addr) identifier_addr )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_f) identifier_f (identifier_name) identifier_name )attribute (identifier_name) identifier_name )assignment )expression_statement )block )if_statement (if_statement (identifier_syscall) identifier_syscall (block (expression_statement (assignment (attribute (identifier_f) identifier_f (identifier_is_syscall) identifier_is_syscall )attribute (True) True )assignment )expression_statement )block )if_statement (return_statement (identifier_f) identifier_f )return_statement )block )if_statement )block )except_clause )try_statement )block (elif_clause (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (for_statement (identifier_func) identifier_func (call (attribute (attribute (identifier_self) identifier_self (identifier__function_map) identifier__function_map )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_func) identifier_func (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator (block (if_statement (boolean_operator (comparison_operator (identifier_plt) identifier_plt (None) None )comparison_operator (comparison_operator (attribute (identifier_func) identifier_func (identifier_is_plt) identifier_is_plt )attribute (identifier_plt) identifier_plt )comparison_operator )boolean_operator (block (return_statement (identifier_func) identifier_func )return_statement )block )if_statement )block )if_statement )block )for_statement )block )elif_clause )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Get a function object from the function manager. Pass either `addr` or `name` with the appropriate values. :param int addr: Address of the function. :param str name: Name of the function. :param bool create: Whether to create the function or not if the function does not exist. :param bool syscall: True to create the function as a syscall, False otherwise. :param bool or None plt: True to find the PLT stub, False to find a non-PLT stub, None to disable this restriction. :return: The Function instance, or None if the function is not found and create is False. :rtype: Function or None
(module (function_definition (function_name_process_global) function_name_process_global (parameters (identifier_name) identifier_name (default_parameter (identifier_val) identifier_val (None) None )default_parameter (default_parameter (identifier_setval) identifier_setval (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_current_process) identifier_current_process (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_p) identifier_p (string_'_pulsar_globals') string_'_pulsar_globals' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_p) identifier_p (identifier__pulsar_globals) identifier__pulsar_globals )attribute (dictionary (pair (string_'lock') string_'lock' (call (identifier_Lock) identifier_Lock (argument_list )argument_list )call )pair )dictionary )assignment )expression_statement )block )if_statement (if_statement (identifier_setval) identifier_setval (block (expression_statement (assignment (subscript (attribute (identifier_p) identifier_p (identifier__pulsar_globals) identifier__pulsar_globals )attribute (identifier_name) identifier_name )subscript (identifier_val) identifier_val )assignment )expression_statement )block (else_clause (block (return_statement (call (attribute (attribute (identifier_p) identifier_p (identifier__pulsar_globals) identifier__pulsar_globals )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Access and set global variables for the current process.
(module (function_definition (function_name_retire_asset_ddo) function_name_retire_asset_ddo (parameters (identifier_self) identifier_self (identifier_did) identifier_did )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_requests_session) identifier_requests_session )attribute (identifier_delete) identifier_delete )attribute (argument_list (string_f'{self.url}/{did}') string_f'{self.url}/{did}' (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier__headers) identifier__headers )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_f'Removed asset DID: {did} from metadata store') string_f'Removed asset DID: {did} from metadata store' )argument_list )call )expression_statement (return_statement (identifier_response) identifier_response )return_statement )block )if_statement (raise_statement (call (identifier_AquariusGenericError) identifier_AquariusGenericError (argument_list (string_f'Unable to remove DID: {response}') string_f'Unable to remove DID: {response}' )argument_list )call )raise_statement )block )function_definition )module
Retire asset ddo of Aquarius. :param did: Asset DID string :return: API response (depends on implementation)
(module (function_definition (function_name_check_server_running) function_name_check_server_running (parameters (identifier_pid) identifier_pid )parameters (block (if_statement (comparison_operator (identifier_pid) identifier_pid (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_kill) identifier_kill )attribute (argument_list (identifier_pid) identifier_pid (integer_0) integer_0 )argument_list )call )expression_statement (return_statement (True) True )return_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_oe) identifier_oe )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_oe) identifier_oe (identifier_errno) identifier_errno )attribute (attribute (identifier_errno) identifier_errno (identifier_ESRCH) identifier_ESRCH )attribute )comparison_operator (block (return_statement (False) False )return_statement )block (else_clause (block (raise_statement )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Determine if the given process is running
(module (function_definition (function_name_info) function_name_info (parameters (identifier_msg) identifier_msg (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_kw) identifier_kw )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (identifier_msg) identifier_msg (identifier_format) identifier_format )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_shell) identifier_shell (identifier_cprint) identifier_cprint )attribute (argument_list (call (attribute (string_'-- <32>{}<0>') string_'-- <32>{}<0>' (identifier_format) identifier_format )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Print sys message to stdout. System messages should inform about the flow of the script. This should be a major milestones during the build.
(module (function_definition (function_name__AppendRecord) function_name__AppendRecord (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_cur_record) identifier_cur_record (list )list )assignment )expression_statement (for_statement (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute (block (try_statement (block (expression_statement (call (attribute (identifier_value) identifier_value (identifier_OnSaveRecord) identifier_OnSaveRecord )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_SkipRecord) identifier_SkipRecord (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__ClearRecord) identifier__ClearRecord )attribute (argument_list )argument_list )call )expression_statement (return_statement )return_statement )block )except_clause (except_clause (identifier_SkipValue) identifier_SkipValue (block (continue_statement )continue_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_cur_record) identifier_cur_record (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_value) identifier_value (identifier_value) identifier_value )attribute )argument_list )call )expression_statement )block )for_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_cur_record) identifier_cur_record )argument_list )call (parenthesized_expression (binary_operator (call (attribute (identifier_cur_record) identifier_cur_record (identifier_count) identifier_count )attribute (argument_list (None) None )argument_list )call (call (attribute (identifier_cur_record) identifier_cur_record (identifier_count) identifier_count )attribute (argument_list (list )list )argument_list )call )binary_operator )parenthesized_expression )comparison_operator (block (return_statement )return_statement )block )if_statement (while_statement (comparison_operator (None) None (identifier_cur_record) identifier_cur_record )comparison_operator (block (expression_statement (assignment (subscript (identifier_cur_record) identifier_cur_record (call (attribute (identifier_cur_record) identifier_cur_record (identifier_index) identifier_index )attribute (argument_list (None) None )argument_list )call )subscript (string_'') string_'' )assignment )expression_statement )block )while_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__result) identifier__result )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_cur_record) identifier_cur_record )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__ClearRecord) identifier__ClearRecord )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Adds current record to result if well formed.
(module (function_definition (function_name_register_serialization_method) function_name_register_serialization_method (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_serialize_func) identifier_serialize_func )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__default_serialization_methods) identifier__default_serialization_methods )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Can't replace original %s serialization method") string_"Can't replace original %s serialization method" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__serialization_methods) identifier__serialization_methods )attribute (identifier_name) identifier_name )subscript (identifier_serialize_func) identifier_serialize_func )assignment )expression_statement )block )function_definition )module
Register a custom serialization method that can be used via schema configuration
(module (function_definition (function_name_loads) function_name_loads (parameters (identifier_string) identifier_string (default_parameter (identifier_filename) identifier_filename (None) None )default_parameter (default_parameter (identifier_includedir) identifier_includedir (string_'') string_'' )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_f) identifier_f (call (attribute (identifier_io) identifier_io (identifier_StringIO) identifier_StringIO )attribute (argument_list (identifier_string) identifier_string )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"libconf.loads() input string must by unicode") string_"libconf.loads() input string must by unicode" )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (call (identifier_load) identifier_load (argument_list (identifier_f) identifier_f (keyword_argument (identifier_filename) identifier_filename (identifier_filename) identifier_filename )keyword_argument (keyword_argument (identifier_includedir) identifier_includedir (identifier_includedir) identifier_includedir )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Load the contents of ``string`` to a Python object The returned object is a subclass of ``dict`` that exposes string keys as attributes as well. Example: >>> config = libconf.loads('window: { title: "libconfig example"; };') >>> config['window']['title'] 'libconfig example' >>> config.window.title 'libconfig example'
(module (function_definition (function_name_get_mmax) function_name_get_mmax (parameters (identifier_self) identifier_self (identifier_mfd_conf) identifier_mfd_conf (identifier_msr) identifier_msr (identifier_rake) identifier_rake (identifier_area) identifier_area )parameters (block (if_statement (subscript (identifier_mfd_conf) identifier_mfd_conf (string_'Maximum_Magnitude') string_'Maximum_Magnitude' )subscript (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_mmax) identifier_mmax )attribute (subscript (identifier_mfd_conf) identifier_mfd_conf (string_'Maximum_Magnitude') string_'Maximum_Magnitude' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_mmax) identifier_mmax )attribute (call (attribute (identifier_msr) identifier_msr (identifier_get_median_mag) identifier_get_median_mag )attribute (argument_list (identifier_area) identifier_area (identifier_rake) identifier_rake )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (parenthesized_expression (boolean_operator (comparison_operator (string_'Maximum_Magnitude_Uncertainty') string_'Maximum_Magnitude_Uncertainty' (identifier_mfd_conf) identifier_mfd_conf )comparison_operator (subscript (identifier_mfd_conf) identifier_mfd_conf (string_'Maximum_Magnitude_Uncertainty') string_'Maximum_Magnitude_Uncertainty' )subscript )boolean_operator )parenthesized_expression (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_mmax_sigma) identifier_mmax_sigma )attribute (subscript (identifier_mfd_conf) identifier_mfd_conf (string_'Maximum_Magnitude_Uncertainty') string_'Maximum_Magnitude_Uncertainty' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_mmax_sigma) identifier_mmax_sigma )attribute (call (attribute (identifier_msr) identifier_msr (identifier_get_std_dev_mag) identifier_get_std_dev_mag )attribute (argument_list (identifier_rake) identifier_rake )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Gets the mmax for the fault - reading directly from the config file or using the msr otherwise :param dict mfd_config: Configuration file (see setUp for paramters) :param msr: Instance of :class:`nhlib.scalerel` :param float rake: Rake of the fault (in range -180 to 180) :param float area: Area of the fault surface (km^2)
(module (function_definition (function_name_profile) function_name_profile (parameters (identifier_model_specification) identifier_model_specification (identifier_results_directory) identifier_results_directory (identifier_process) identifier_process )parameters (block (expression_statement (assignment (identifier_model_specification) identifier_model_specification (call (identifier_Path) identifier_Path (argument_list (identifier_model_specification) identifier_model_specification )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results_directory) identifier_results_directory (call (identifier_Path) identifier_Path (argument_list (identifier_results_directory) identifier_results_directory )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out_stats_file) identifier_out_stats_file (binary_operator (identifier_results_directory) identifier_results_directory (call (attribute (string_f'{model_specification.name}') string_f'{model_specification.name}' (identifier_replace) identifier_replace )attribute (argument_list (string_'yaml') string_'yaml' (string_'stats') string_'stats' )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_command) identifier_command (string_f'run_simulation("{model_specification}", "{results_directory}")') string_f'run_simulation("{model_specification}", "{results_directory}")' )assignment )expression_statement (expression_statement (call (attribute (identifier_cProfile) identifier_cProfile (identifier_runctx) identifier_runctx )attribute (argument_list (identifier_command) identifier_command (keyword_argument (identifier_globals) identifier_globals (call (identifier_globals) identifier_globals (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_locals) identifier_locals (call (identifier_locals) identifier_locals (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_filename) identifier_filename (identifier_out_stats_file) identifier_out_stats_file )keyword_argument )argument_list )call )expression_statement (if_statement (identifier_process) identifier_process (block (expression_statement (assignment (identifier_out_txt_file) identifier_out_txt_file (binary_operator (identifier_results_directory) identifier_results_directory (parenthesized_expression (binary_operator (attribute (identifier_out_stats_file) identifier_out_stats_file (identifier_name) identifier_name )attribute (string_'.txt') string_'.txt' )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_out_txt_file) identifier_out_txt_file (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_pstats) identifier_pstats (identifier_Stats) identifier_Stats )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_out_stats_file) identifier_out_stats_file )argument_list )call (keyword_argument (identifier_stream) identifier_stream (identifier_f) identifier_f )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_p) identifier_p (identifier_sort_stats) identifier_sort_stats )attribute (argument_list (string_'cumulative') string_'cumulative' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_p) identifier_p (identifier_print_stats) identifier_print_stats )attribute (argument_list )argument_list )call )expression_statement )block )with_statement )block )if_statement )block )function_definition )module
Run a simulation based on the provided MODEL_SPECIFICATION and profile the run.
(module (function_definition (function_name_count) function_name_count (parameters (identifier_self) identifier_self (identifier_q) identifier_q )parameters (block (expression_statement (assignment (identifier_q) identifier_q (binary_operator (string_"SELECT COUNT(*) %s") string_"SELECT COUNT(*) %s" (identifier_q) identifier_q )binary_operator )assignment )expression_statement (return_statement (call (identifier_int) identifier_int (argument_list (subscript (call (attribute (call (attribute (identifier_self) identifier_self (identifier_quick) identifier_quick )attribute (argument_list (identifier_q) identifier_q )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_"\n") string_"\n" )argument_list )call (integer_1) integer_1 )subscript )argument_list )call )return_statement )block )function_definition )module
Shorthand for counting the results of a specific query. ## Arguments * `q` (str): The query to count. This will be executed as: `"SELECT COUNT(*) %s" % q`. ## Returns * `count` (int): The resulting count.
(module (function_definition (function_name_as_fs) function_name_as_fs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_fs) identifier_fs (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_fs) identifier_fs (identifier_append) identifier_append )attribute (argument_list (string_"cpe:2.3:") string_"cpe:2.3:" )argument_list )call )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (attribute (identifier_CPEComponent) identifier_CPEComponent (identifier_ordered_comp_parts) identifier_ordered_comp_parts )attribute )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_ck) identifier_ck (subscript (attribute (identifier_CPEComponent) identifier_CPEComponent (identifier_ordered_comp_parts) identifier_ordered_comp_parts )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_lc) identifier_lc (call (attribute (identifier_self) identifier_self (identifier__get_attribute_components) identifier__get_attribute_components )attribute (argument_list (identifier_ck) identifier_ck )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_lc) identifier_lc )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_errmsg) identifier_errmsg (call (attribute (string_"Incompatible version {0} with formatted string") string_"Incompatible version {0} with formatted string" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_VERSION) identifier_VERSION )attribute )argument_list )call )assignment )expression_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (identifier_errmsg) identifier_errmsg )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_comp) identifier_comp (subscript (identifier_lc) identifier_lc (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_comp) identifier_comp (identifier_CPEComponentUndefined) identifier_CPEComponentUndefined )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_comp) identifier_comp (identifier_CPEComponentEmpty) identifier_CPEComponentEmpty )argument_list )call )boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_comp) identifier_comp (identifier_CPEComponentAnyValue) identifier_CPEComponentAnyValue )argument_list )call )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_v) identifier_v (attribute (identifier_CPEComponent2_3_FS) identifier_CPEComponent2_3_FS (identifier_VALUE_ANY) identifier_VALUE_ANY )attribute )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_comp) identifier_comp (identifier_CPEComponentNotApplicable) identifier_CPEComponentNotApplicable )argument_list )call (block (expression_statement (assignment (identifier_v) identifier_v (attribute (identifier_CPEComponent2_3_FS) identifier_CPEComponent2_3_FS (identifier_VALUE_NA) identifier_VALUE_NA )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_v) identifier_v (call (attribute (identifier_comp) identifier_comp (identifier_as_fs) identifier_as_fs )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_fs) identifier_fs (identifier_append) identifier_append )attribute (argument_list (identifier_v) identifier_v )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_fs) identifier_fs (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_CPEComponent2_3_FS) identifier_CPEComponent2_3_FS (identifier_SEPARATOR_COMP) identifier_SEPARATOR_COMP )attribute )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (identifier_CPE) identifier_CPE (identifier__trim) identifier__trim )attribute (argument_list (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (subscript (identifier_fs) identifier_fs (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Returns the CPE Name as formatted string of version 2.3. :returns: CPE Name as formatted string :rtype: string :exception: TypeError - incompatible version
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_id) identifier_id (default_parameter (identifier_service) identifier_service (string_'facebook') string_'facebook' )default_parameter (default_parameter (identifier_type) identifier_type (string_'analysis') string_'analysis' )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_get) identifier_get )attribute (argument_list (binary_operator (binary_operator (binary_operator (binary_operator (identifier_service) identifier_service (string_'/task/') string_'/task/' )binary_operator (identifier_type) identifier_type )binary_operator (string_'/') string_'/' )binary_operator (identifier_id) identifier_id )binary_operator )argument_list )call )return_statement )block )function_definition )module
Get a given Pylon task :param id: The ID of the task :type id: str :param service: The PYLON service (facebook) :type service: str :return: dict of REST API output with headers attached :rtype: :class:`~datasift.request.DictResponse` :raises: :class:`~datasift.exceptions.DataSiftApiException`, :class:`requests.exceptions.HTTPError`
(module (function_definition (function_name_ping) function_name_ping (parameters (identifier_self) identifier_self (default_parameter (identifier_timeout) identifier_timeout (integer_0) integer_0 )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (function_definition (function_name_rand_id) function_name_rand_id (parameters (default_parameter (identifier_size) identifier_size (integer_8) integer_8 )default_parameter (default_parameter (identifier_chars) identifier_chars (binary_operator (attribute (identifier_string) identifier_string (identifier_ascii_uppercase) identifier_ascii_uppercase )attribute (attribute (identifier_string) identifier_string (identifier_digits) identifier_digits )attribute )binary_operator )default_parameter )parameters (block (return_statement (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (generator_expression (call (attribute (identifier_random) identifier_random (identifier_choice) identifier_choice )attribute (argument_list (identifier_chars) identifier_chars )argument_list )call (for_in_clause (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (identifier_size) identifier_size )argument_list )call )for_in_clause )generator_expression )call )return_statement )block )function_definition (expression_statement (assignment (identifier_payload) identifier_payload (call (identifier_rand_id) identifier_rand_id (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ws) identifier_ws )attribute (identifier_ping) identifier_ping )attribute (argument_list (identifier_payload) identifier_payload )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_opcode) identifier_opcode (identifier_data) identifier_data )pattern_list (call (attribute (identifier_self) identifier_self (identifier_recv_raw) identifier_recv_raw )attribute (argument_list (identifier_timeout) identifier_timeout (list (attribute (attribute (identifier_websocket) identifier_websocket (identifier_ABNF) identifier_ABNF )attribute (identifier_OPCODE_PONG) identifier_OPCODE_PONG )attribute )list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_data) identifier_data (identifier_payload) identifier_payload )comparison_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (string_"Pinged server but did not receive correct pong") string_"Pinged server but did not receive correct pong" )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
THIS DOES NOT WORK, UWSGI DOES NOT RESPOND TO PINGS
(module (function_definition (function_name_GetRadioButtonSelect) function_name_GetRadioButtonSelect (parameters (identifier_selectList) identifier_selectList (default_parameter (identifier_title) identifier_title (string_"Select") string_"Select" )default_parameter (default_parameter (identifier_msg) identifier_msg (string_"") string_"" )default_parameter )parameters (block (expression_statement (assignment (identifier_root) identifier_root (call (attribute (identifier_tkinter) identifier_tkinter (identifier_Tk) identifier_Tk )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_root) identifier_root (identifier_title) identifier_title )attribute (argument_list (identifier_title) identifier_title )argument_list )call )expression_statement (expression_statement (assignment (identifier_val) identifier_val (call (attribute (identifier_tkinter) identifier_tkinter (identifier_IntVar) identifier_IntVar )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_val) identifier_val (identifier_set) identifier_set )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_msg) identifier_msg (string_"") string_"" )comparison_operator (block (expression_statement (call (attribute (call (attribute (identifier_tkinter) identifier_tkinter (identifier_Label) identifier_Label )attribute (argument_list (identifier_root) identifier_root (keyword_argument (identifier_text) identifier_text (identifier_msg) identifier_msg )keyword_argument )argument_list )call (identifier_pack) identifier_pack )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_index) identifier_index (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_selectList) identifier_selectList (block (expression_statement (call (attribute (call (attribute (identifier_tkinter) identifier_tkinter (identifier_Radiobutton) identifier_Radiobutton )attribute (argument_list (identifier_root) identifier_root (keyword_argument (identifier_text) identifier_text (identifier_item) identifier_item )keyword_argument (keyword_argument (identifier_variable) identifier_variable (identifier_val) identifier_val )keyword_argument (keyword_argument (identifier_value) identifier_value (identifier_index) identifier_index )keyword_argument )argument_list )call (identifier_pack) identifier_pack )attribute (argument_list (keyword_argument (identifier_anchor) identifier_anchor (attribute (identifier_tkinter) identifier_tkinter (identifier_W) identifier_W )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_index) identifier_index (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement (expression_statement (call (attribute (call (attribute (identifier_tkinter) identifier_tkinter (identifier_Button) identifier_Button )attribute (argument_list (identifier_root) identifier_root (keyword_argument (identifier_text) identifier_text (string_"OK") string_"OK" )keyword_argument (keyword_argument (identifier_fg) identifier_fg (string_"black") string_"black" )keyword_argument (keyword_argument (identifier_command) identifier_command (attribute (identifier_root) identifier_root (identifier_quit) identifier_quit )attribute )keyword_argument )argument_list )call (identifier_pack) identifier_pack )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_root) identifier_root (identifier_mainloop) identifier_mainloop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_root) identifier_root (identifier_destroy) identifier_destroy )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (subscript (identifier_selectList) identifier_selectList (call (attribute (identifier_val) identifier_val (identifier_get) identifier_get )attribute (argument_list )argument_list )call )subscript (string_" is selected") string_" is selected" )binary_operator )argument_list )call )expression_statement (return_statement (tuple (subscript (identifier_selectList) identifier_selectList (call (attribute (identifier_val) identifier_val (identifier_get) identifier_get )attribute (argument_list )argument_list )call )subscript (call (attribute (identifier_val) identifier_val (identifier_get) identifier_get )attribute (argument_list )argument_list )call )tuple )return_statement )block )function_definition )module
Create radio button window for option selection title: Window name mag: Label of the radio button return (seldctedItem, selectedindex)
(module (function_definition (function_name_create_rack) function_name_create_rack (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_Rack) identifier_Rack (argument_list (attribute (identifier_self) identifier_self (identifier_networkapi_url) identifier_networkapi_url )attribute (attribute (identifier_self) identifier_self (identifier_user) identifier_user )attribute (attribute (identifier_self) identifier_self (identifier_password) identifier_password )attribute (attribute (identifier_self) identifier_self (identifier_user_ldap) identifier_user_ldap )attribute )argument_list )call )return_statement )block )function_definition )module
Get an instance of rack services facade.
(module (function_definition (function_name_get_queryset) function_name_get_queryset (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_queryset) identifier_queryset )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_ImproperlyConfigured) identifier_ImproperlyConfigured (argument_list (binary_operator (string_"'%s' must define 'queryset'") string_"'%s' must define 'queryset'" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_queryset) identifier_queryset )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Check that the queryset is defined and call it.
(module (function_definition (function_name_compile_all) function_name_compile_all (parameters )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Compiling for PyQt4: style.qrc -> pyqt_style_rc.py") string_"Compiling for PyQt4: style.qrc -> pyqt_style_rc.py" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_system) identifier_system )attribute (argument_list (string_"pyrcc4 -py3 style.qrc -o pyqt_style_rc.py") string_"pyrcc4 -py3 style.qrc -o pyqt_style_rc.py" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Compiling for PyQt5: style.qrc -> pyqt5_style_rc.py") string_"Compiling for PyQt5: style.qrc -> pyqt5_style_rc.py" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_system) identifier_system )attribute (argument_list (string_"pyrcc5 style.qrc -o pyqt5_style_rc.py") string_"pyrcc5 style.qrc -o pyqt5_style_rc.py" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Compiling for PySide: style.qrc -> pyside_style_rc.py") string_"Compiling for PySide: style.qrc -> pyside_style_rc.py" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_system) identifier_system )attribute (argument_list (string_"pyside-rcc -py3 style.qrc -o pyside_style_rc.py") string_"pyside-rcc -py3 style.qrc -o pyside_style_rc.py" )argument_list )call )expression_statement )block )function_definition )module
Compile style.qrc using rcc, pyside-rcc and pyrcc4
(module (function_definition (function_name__time_from_iso8601_time_naive) function_name__time_from_iso8601_time_naive (parameters (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_value) identifier_value )argument_list )call (integer_8) integer_8 )comparison_operator (block (expression_statement (assignment (identifier_fmt) identifier_fmt (identifier__TIMEONLY_NO_FRACTION) identifier__TIMEONLY_NO_FRACTION )assignment )expression_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_value) identifier_value )argument_list )call (integer_15) integer_15 )comparison_operator (block (expression_statement (assignment (identifier_fmt) identifier_fmt (identifier__TIMEONLY_W_MICROS) identifier__TIMEONLY_W_MICROS )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Unknown time format: {}") string_"Unknown time format: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (call (attribute (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_value) identifier_value (identifier_fmt) identifier_fmt )argument_list )call (identifier_time) identifier_time )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Convert a zoneless ISO8601 time string to naive datetime time :type value: str :param value: The time string to convert :rtype: :class:`datetime.time` :returns: A datetime time object created from the string :raises ValueError: if the value does not match a known format.
(module (function_definition (function_name_from_request) function_name_from_request (parameters (identifier_cls) identifier_cls (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_request_headers) identifier_request_headers (call (identifier_HeaderDict) identifier_HeaderDict (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_other_headers) identifier_other_headers (list (string_'CONTENT_TYPE') string_'CONTENT_TYPE' (string_'CONTENT_LENGTH') string_'CONTENT_LENGTH' )list )assignment )expression_statement (for_statement (pattern_list (identifier_header) identifier_header (identifier_value) identifier_value )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (attribute (identifier_request) identifier_request (identifier_META) identifier_META )attribute )argument_list )call (block (expression_statement (assignment (identifier_is_header) identifier_is_header (boolean_operator (call (attribute (identifier_header) identifier_header (identifier_startswith) identifier_startswith )attribute (argument_list (string_'HTTP_') string_'HTTP_' )argument_list )call (comparison_operator (identifier_header) identifier_header (identifier_other_headers) identifier_other_headers )comparison_operator )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_normalized_header) identifier_normalized_header (call (attribute (identifier_cls) identifier_cls (identifier__normalize_django_header_name) identifier__normalize_django_header_name )attribute (argument_list (identifier_header) identifier_header )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_is_header) identifier_is_header (identifier_value) identifier_value )boolean_operator (block (expression_statement (assignment (subscript (identifier_request_headers) identifier_request_headers (identifier_normalized_header) identifier_normalized_header )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_request_headers) identifier_request_headers )return_statement )block )function_definition )module
Generate a HeaderDict based on django request object meta data.
(module (function_definition (function_name_generateCertificate) function_name_generateCertificate (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (identifier_key) identifier_key (call (identifier_generate_key) identifier_generate_key (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cert) identifier_cert (call (identifier_generate_certificate) identifier_generate_certificate (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_cert) identifier_cert (identifier_cert) identifier_cert )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create and return an X.509 certificate and corresponding private key. :rtype: RTCCertificate
(module (function_definition (function_name__CSI) function_name__CSI (parameters (identifier_self) identifier_self (identifier_cmd) identifier_cmd )parameters (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (string_'\x1b[') string_'\x1b[' )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )expression_statement )block )function_definition )module
Control sequence introducer
(module (function_definition (function_name_recurrence) function_name_recurrence (parameters (identifier_self) identifier_self (identifier_recurrence) identifier_recurrence )parameters (block (if_statement (not_operator (call (identifier_is_valid_recurrence) identifier_is_valid_recurrence (argument_list (identifier_recurrence) identifier_recurrence )argument_list )call )not_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_"'%s' is not a valid recurrence value") string_"'%s' is not a valid recurrence value" (identifier_recurrence) identifier_recurrence )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__recurrence) identifier__recurrence )attribute (identifier_recurrence) identifier_recurrence )assignment )expression_statement )block )function_definition )module
See `recurrence`.
(module (function_definition (function_name_safe_wraps) function_name_safe_wraps (parameters (identifier_wrapper) identifier_wrapper (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (while_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_wrapper) identifier_wrapper (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute )argument_list )call (block (expression_statement (assignment (identifier_wrapper) identifier_wrapper (attribute (identifier_wrapper) identifier_wrapper (identifier_func) identifier_func )attribute )assignment )expression_statement )block )while_statement (return_statement (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_wrapper) identifier_wrapper (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Safely wraps partial functions.
(module (function_definition (function_name_folderitems) function_name_folderitems (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_items) identifier_items (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_AnalysisRequestAnalysesView) identifier_AnalysisRequestAnalysesView (identifier_self) identifier_self )argument_list )call (identifier_folderitems) identifier_folderitems )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_categories) identifier_categories )attribute (identifier_sort) identifier_sort )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_items) identifier_items )return_statement )block )function_definition )module
XXX refactor if possible to non-classic mode
(module (function_definition (function_name_get_ip_address) function_name_get_ip_address (parameters )parameters (block (try_statement (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_socket) identifier_socket (identifier_socket) identifier_socket )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute (attribute (identifier_socket) identifier_socket (identifier_SOCK_DGRAM) identifier_SOCK_DGRAM )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_s) identifier_s (identifier_connect) identifier_connect )attribute (argument_list (tuple (string_"8.8.8.8") string_"8.8.8.8" (integer_80) integer_80 )tuple )argument_list )call )expression_statement (expression_statement (assignment (identifier_ip_address) identifier_ip_address (subscript (call (attribute (identifier_s) identifier_s (identifier_getsockname) identifier_getsockname )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (as_pattern (identifier_socket_error) identifier_socket_error (as_pattern_target (identifier_sockerr) identifier_sockerr )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_sockerr) identifier_sockerr (identifier_errno) identifier_errno )attribute (attribute (identifier_errno) identifier_errno (identifier_ENETUNREACH) identifier_ENETUNREACH )attribute )comparison_operator (block (raise_statement (identifier_sockerr) identifier_sockerr )raise_statement )block )if_statement (expression_statement (assignment (identifier_ip_address) identifier_ip_address (call (attribute (identifier_socket) identifier_socket (identifier_gethostbyname) identifier_gethostbyname )attribute (argument_list (call (attribute (identifier_socket) identifier_socket (identifier_getfqdn) identifier_getfqdn )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )except_clause (finally_clause (block (expression_statement (call (attribute (identifier_s) identifier_s (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement (return_statement (identifier_ip_address) identifier_ip_address )return_statement )block )function_definition )module
Simple utility to get host IP address.
(module (function_definition (function_name_validate_password) function_name_validate_password (parameters (identifier_entry) identifier_entry (identifier_username) identifier_username (identifier_check_function) identifier_check_function (default_parameter (identifier_password) identifier_password (None) None )default_parameter (default_parameter (identifier_retries) identifier_retries (integer_1) integer_1 )default_parameter (default_parameter (identifier_save_on_success) identifier_save_on_success (True) True )default_parameter (default_parameter (identifier_prompt) identifier_prompt (None) None )default_parameter (dictionary_splat_pattern (identifier_check_args) identifier_check_args )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_password) identifier_password (None) None )comparison_operator (block (expression_statement (assignment (identifier_password) identifier_password (call (identifier_get_password) identifier_get_password (argument_list (identifier_entry) identifier_entry (identifier_username) identifier_username (identifier_prompt) identifier_prompt )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier__) identifier__ (call (identifier_xrange) identifier_xrange (argument_list (binary_operator (identifier_retries) identifier_retries (integer_1) integer_1 )binary_operator )argument_list )call (block (if_statement (call (identifier_check_function) identifier_check_function (argument_list (identifier_username) identifier_username (identifier_password) identifier_password (dictionary_splat (identifier_check_args) identifier_check_args )dictionary_splat )argument_list )call (block (if_statement (identifier_save_on_success) identifier_save_on_success (block (expression_statement (call (identifier_save_password) identifier_save_password (argument_list (identifier_entry) identifier_entry (identifier_password) identifier_password (identifier_username) identifier_username )argument_list )call )expression_statement )block )if_statement (return_statement (True) True )return_statement )block )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_"Couldn't successfully authenticate your username & password..") string_"Couldn't successfully authenticate your username & password.." )argument_list )call )expression_statement (expression_statement (assignment (identifier_password) identifier_password (call (identifier_get_password) identifier_get_password (argument_list (identifier_entry) identifier_entry (identifier_username) identifier_username (identifier_prompt) identifier_prompt (keyword_argument (identifier_always_ask) identifier_always_ask (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Validate a password with a check function & retry if the password is incorrect. Useful for after a user has changed their password in LDAP, but their local keychain entry is then out of sync. :param str entry: The keychain entry to fetch a password from. :param str username: The username to authenticate :param func check_function: Check function to use. Should take (username, password, **check_args) :param str password: The password to validate. If `None`, the user will be prompted. :param int retries: Number of retries to prompt the user for. :param bool save_on_success: Save the password if the validation was successful. :param str prompt: Alternate prompt to use when asking for the user's password. :returns: `True` on successful authentication. `False` otherwise. :rtype: bool
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_self) identifier_self (identifier_post) identifier_post )attribute (argument_list (string_'start') string_'start' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_resp) identifier_resp (identifier_is_fail) identifier_is_fail )attribute (argument_list )argument_list )call (block (return_statement (None) None )return_statement )block )if_statement (if_statement (comparison_operator (string_'result') string_'result' (attribute (identifier_resp) identifier_resp (identifier_data) identifier_data )attribute )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (subscript (attribute (identifier_resp) identifier_resp (identifier_data) identifier_data )attribute (string_'result') string_'result' )subscript )assignment )expression_statement (return_statement (dictionary (pair (string_'user') string_'user' (subscript (identifier_result) identifier_result (string_'user') string_'user' )subscript )pair (pair (string_'ws_host') string_'ws_host' (subscript (identifier_result) identifier_result (string_'ws_host') string_'ws_host' )subscript )pair )dictionary )return_statement )block )function_definition )module
Gets the rtm ws_host and user information Returns: None if request failed, else a dict containing "user"(User) and "ws_host"
(module (function_definition (function_name__validate_alias_file_path) function_name__validate_alias_file_path (parameters (identifier_alias_file_path) identifier_alias_file_path )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_alias_file_path) identifier_alias_file_path )argument_list )call )not_operator (block (raise_statement (call (identifier_CLIError) identifier_CLIError (argument_list (identifier_ALIAS_FILE_NOT_FOUND_ERROR) identifier_ALIAS_FILE_NOT_FOUND_ERROR )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_alias_file_path) identifier_alias_file_path )argument_list )call (block (raise_statement (call (identifier_CLIError) identifier_CLIError (argument_list (call (attribute (identifier_ALIAS_FILE_DIR_ERROR) identifier_ALIAS_FILE_DIR_ERROR (identifier_format) identifier_format )attribute (argument_list (identifier_alias_file_path) identifier_alias_file_path )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Make sure the alias file path is neither non-existant nor a directory Args: The alias file path to import aliases from.
(module (function_definition (function_name_pytype_to_deps) function_name_pytype_to_deps (parameters (identifier_t) identifier_t )parameters (block (expression_statement (assignment (identifier_res) identifier_res (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_hpp_dep) identifier_hpp_dep (call (identifier_pytype_to_deps_hpp) identifier_pytype_to_deps_hpp (argument_list (identifier_t) identifier_t )argument_list )call (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier_add) identifier_add )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (string_'pythonic') string_'pythonic' (string_'types') string_'types' (identifier_hpp_dep) identifier_hpp_dep )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_res) identifier_res (identifier_add) identifier_add )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (string_'pythonic') string_'pythonic' (string_'include') string_'include' (string_'types') string_'types' (identifier_hpp_dep) identifier_hpp_dep )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
python -> pythonic type header full path.
(module (function_definition (function_name_build_input_table) function_name_build_input_table (parameters (identifier_cls) identifier_cls (default_parameter (identifier_name) identifier_name (string_'inputTableName') string_'inputTableName' )default_parameter (default_parameter (identifier_input_name) identifier_input_name (string_'input') string_'input' )default_parameter )parameters (block (expression_statement (assignment (identifier_obj) identifier_obj (call (identifier_cls) identifier_cls (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_obj) identifier_obj (identifier_exporter) identifier_exporter )attribute (string_'get_input_table_name') string_'get_input_table_name' )assignment )expression_statement (expression_statement (assignment (attribute (identifier_obj) identifier_obj (identifier_input_name) identifier_input_name )attribute (identifier_input_name) identifier_input_name )assignment )expression_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Build an input table parameter :param name: parameter name :type name: str :param input_name: bind input port name :param input_name: str :return: input description :rtype: ParamDef