sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_get_downbeat_steps) function_name_get_downbeat_steps (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_downbeat) identifier_downbeat )attribute (None) None )comparison_operator (block (return_statement (list )list )return_statement )block )if_statement (expression_statement (assignment (identifier_downbeat_steps) identifier_downbeat_steps (call (attribute (subscript (call (attribute (identifier_np) identifier_np (identifier_nonzero) identifier_nonzero )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_downbeat) identifier_downbeat )attribute )argument_list )call (integer_0) integer_0 )subscript (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_downbeat_steps) identifier_downbeat_steps )return_statement )block )function_definition )module
Return the indices of time steps that contain downbeats. Returns ------- downbeat_steps : list The indices of time steps that contain downbeats.
(module (function_definition (function_name_parse_blast) function_name_parse_blast (parameters (identifier_blast_string) identifier_blast_string )parameters (block (expression_statement (assignment (identifier_soup) identifier_soup (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (call (identifier_str) identifier_str (argument_list (identifier_blast_string) identifier_blast_string )argument_list )call (string_"html.parser") string_"html.parser" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_all_blasts) identifier_all_blasts (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_all_blast_ids) identifier_all_blast_ids (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pattern) identifier_pattern (string_'></a>....:') string_'></a>....:' )assignment )expression_statement (expression_statement (assignment (identifier_prog) identifier_prog (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_pattern) identifier_pattern )argument_list )call )assignment )expression_statement (for_statement (identifier_item) identifier_item (call (attribute (identifier_soup) identifier_soup (identifier_find_all) identifier_find_all )attribute (argument_list (string_'pre') string_'pre' )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_item) identifier_item (identifier_find_all) identifier_find_all )attribute (argument_list (string_'a') string_'a' )argument_list )call )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_all_blasts) identifier_all_blasts (identifier_append) identifier_append )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement (expression_statement (assignment (identifier_blast_id) identifier_blast_id (subscript (subscript (call (attribute (identifier_re) identifier_re (identifier_findall) identifier_findall )attribute (argument_list (identifier_pattern) identifier_pattern (call (identifier_str) identifier_str (argument_list (identifier_item) identifier_item )argument_list )call )argument_list )call (integer_0) integer_0 )subscript (slice (unary_operator (integer_5) integer_5 )unary_operator (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_all_blast_ids) identifier_all_blast_ids (identifier_append) identifier_append )attribute (argument_list (identifier_blast_id) identifier_blast_id )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_out) identifier_out (tuple (identifier_all_blast_ids) identifier_all_blast_ids (identifier_all_blasts) identifier_all_blasts )tuple )assignment )expression_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Clean up HTML BLAST results This function requires BeautifulSoup and the re module It goes throught the complicated output returned by the BLAST search and provides a list of matches, as well as the raw text file showing the alignments for each of the matches. This function works best with HTML formatted Inputs ------ get_blast() uses this function internally Parameters ---------- blast_string : str A complete webpage of standard BLAST results Returns ------- out : 2-tuple A tuple consisting of a list of PDB matches, and a list of their alignment text files (unformatted)
(module (function_definition (function_name_get_bundle_by_id) function_name_get_bundle_by_id (parameters (identifier_self) identifier_self (identifier_bundle_id) identifier_bundle_id )parameters (block (if_statement (comparison_operator (identifier_bundle_id) identifier_bundle_id (integer_0) integer_0 )comparison_operator (block (return_statement (identifier_self) identifier_self )return_statement )block )if_statement (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier___bundles_lock) identifier___bundles_lock )attribute )with_item )with_clause (block (if_statement (comparison_operator (identifier_bundle_id) identifier_bundle_id (attribute (identifier_self) identifier_self (identifier___bundles) identifier___bundles )attribute )comparison_operator (block (raise_statement (call (identifier_BundleException) identifier_BundleException (argument_list (call (attribute (string_"Invalid bundle ID {0}") string_"Invalid bundle ID {0}" (identifier_format) identifier_format )attribute (argument_list (identifier_bundle_id) identifier_bundle_id )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier___bundles) identifier___bundles )attribute (identifier_bundle_id) identifier_bundle_id )subscript )return_statement )block )with_statement )block )function_definition )module
Retrieves the bundle with the given ID :param bundle_id: ID of an installed bundle :return: The requested bundle :raise BundleException: The ID is invalid
(module (function_definition (function_name_resetToPreviousLoc) function_name_resetToPreviousLoc (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_rect) identifier_rect )attribute (identifier_left) identifier_left )attribute (attribute (identifier_self) identifier_self (identifier_startDraggingX) identifier_startDraggingX )attribute )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_rect) identifier_rect )attribute (identifier_top) identifier_top )attribute (attribute (identifier_self) identifier_self (identifier_startDraggingY) identifier_startDraggingY )attribute )assignment )expression_statement )block )function_definition )module
Resets the loc of the dragger to place where dragging started. This could be used in a test situation if the dragger was dragged to an incorrect location.
(module (function_definition (function_name_check_imts) function_name_check_imts (parameters (identifier_self) identifier_self (identifier_imts) identifier_imts )parameters (block (for_statement (identifier_trt) identifier_trt (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute (block (for_statement (identifier_gsim) identifier_gsim (subscript (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute (identifier_trt) identifier_trt )subscript (block (for_statement (identifier_attr) identifier_attr (call (identifier_dir) identifier_dir (argument_list (identifier_gsim) identifier_gsim )argument_list )call (block (expression_statement (assignment (identifier_coeffs) identifier_coeffs (call (identifier_getattr) identifier_getattr (argument_list (identifier_gsim) identifier_gsim (identifier_attr) identifier_attr )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_coeffs) identifier_coeffs (identifier_CoeffsTable) identifier_CoeffsTable )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (for_statement (identifier_imt) identifier_imt (identifier_imts) identifier_imts (block (if_statement (call (attribute (identifier_imt) identifier_imt (identifier_startswith) identifier_startswith )attribute (argument_list (string_'SA') string_'SA' )argument_list )call (block (try_statement (block (expression_statement (subscript (identifier_coeffs) identifier_coeffs (call (identifier_from_string) identifier_from_string (argument_list (identifier_imt) identifier_imt )argument_list )call )subscript )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_'%s is out of the period range defined ') string_'%s is out of the period range defined ' (string_'for %s') string_'for %s' )concatenated_string (tuple (identifier_imt) identifier_imt (identifier_gsim) identifier_gsim )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement )block )for_statement )block )for_statement )block )for_statement )block )for_statement )block )function_definition )module
Make sure the IMTs are recognized by all GSIMs in the logic tree
(module (function_definition (function_name_the_one) function_name_the_one (parameters (identifier_cls) identifier_cls )parameters (block (if_statement (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_THE_ONE) identifier_THE_ONE )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier_THE_ONE) identifier_THE_ONE )attribute (call (identifier_cls) identifier_cls (argument_list (attribute (identifier_settings) identifier_settings (identifier_HELP_TOKENS_INI_FILE) identifier_HELP_TOKENS_INI_FILE )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_cls) identifier_cls (identifier_THE_ONE) identifier_THE_ONE )attribute )return_statement )block )function_definition )module
Get the single global HelpUrlExpert object.
(module (function_definition (function_name__gregorian_to_ssweek) function_name__gregorian_to_ssweek (parameters (identifier_date_value) identifier_date_value )parameters (block (expression_statement (string_"Sundaystarting-week year, week and day for the given Gregorian calendar date") string_"Sundaystarting-week year, week and day for the given Gregorian calendar date" )expression_statement (expression_statement (assignment (identifier_yearStart) identifier_yearStart (call (identifier__ssweek_year_start) identifier__ssweek_year_start (argument_list (attribute (identifier_date_value) identifier_date_value (identifier_year) identifier_year )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_weekNum) identifier_weekNum (binary_operator (binary_operator (parenthesized_expression (attribute (parenthesized_expression (binary_operator (identifier_date_value) identifier_date_value (identifier_yearStart) identifier_yearStart )binary_operator )parenthesized_expression (identifier_days) identifier_days )attribute )parenthesized_expression (integer_7) integer_7 )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_dayOfWeek) identifier_dayOfWeek (binary_operator (call (attribute (identifier_date_value) identifier_date_value (identifier_weekday) identifier_weekday )attribute (argument_list )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement (return_statement (tuple (attribute (identifier_date_value) identifier_date_value (identifier_year) identifier_year )attribute (identifier_weekNum) identifier_weekNum (identifier_dayOfWeek) identifier_dayOfWeek )tuple )return_statement )block )function_definition )module
Sundaystarting-week year, week and day for the given Gregorian calendar date
(module (function_definition (function_name_post_authenticate) function_name_post_authenticate (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (attribute (identifier_goldman) identifier_goldman (identifier_sess) identifier_sess )attribute (identifier_login) identifier_login )attribute (identifier_self) identifier_self )assignment )expression_statement (expression_statement (assignment (identifier_now) identifier_now (call (attribute (identifier_dt) identifier_dt (identifier_now) identifier_now )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_login_date) identifier_login_date )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_login_date) identifier_login_date )attribute (identifier_now) identifier_now )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_sec_since_updated) identifier_sec_since_updated (attribute (parenthesized_expression (binary_operator (identifier_now) identifier_now (attribute (identifier_self) identifier_self (identifier_login_date) identifier_login_date )attribute )binary_operator )parenthesized_expression (identifier_seconds) identifier_seconds )attribute )assignment )expression_statement (expression_statement (assignment (identifier_min_since_updated) identifier_min_since_updated (binary_operator (identifier_sec_since_updated) identifier_sec_since_updated (integer_60) integer_60 )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_min_since_updated) identifier_min_since_updated (integer_15) integer_15 )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_login_date) identifier_login_date )attribute (identifier_now) identifier_now )assignment )expression_statement )block )if_statement )block )else_clause )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_dirty) identifier_dirty )attribute (block (expression_statement (assignment (identifier_store) identifier_store (attribute (attribute (identifier_goldman) identifier_goldman (identifier_sess) identifier_sess )attribute (identifier_store) identifier_store )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_store) identifier_store (identifier_update) identifier_update )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Update the login_date timestamp Initialize the thread local sess.login property with the authenticated login model. The login_date update will be debounced so writes don't occur on every hit of the the API. If the login_date was modified within 15 minutes then don't update it.
(module (function_definition (function_name_format_style) function_name_format_style (parameters (typed_parameter (identifier_number) identifier_number (type (identifier_int) identifier_int )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (if_statement (comparison_operator (call (identifier_str) identifier_str (argument_list (identifier_number) identifier_number )argument_list )call (identifier__stylenums) identifier__stylenums )comparison_operator (block (raise_statement (call (identifier_InvalidStyle) identifier_InvalidStyle (argument_list (identifier_number) identifier_number )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_codeformat) identifier_codeformat (argument_list (identifier_number) identifier_number )argument_list )call )return_statement )block )function_definition )module
Return an escape code for a style, by number. This handles invalid style numbers.
(module (function_definition (function_name_generate_output_path) function_name_generate_output_path (parameters (identifier_args) identifier_args (identifier_project_path) identifier_project_path )parameters (block (expression_statement (assignment (identifier_milisec) identifier_milisec (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_microsecond) identifier_microsecond )attribute )assignment )expression_statement (expression_statement (assignment (identifier_dirname) identifier_dirname (call (attribute (string_'results_{}_{}') string_'results_{}_{}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_time) identifier_time (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y.%m.%d_%H.%M.%S') string_'%Y.%m.%d_%H.%M.%S' (call (attribute (identifier_time) identifier_time (identifier_localtime) identifier_localtime )attribute (argument_list )argument_list )call )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_milisec) identifier_milisec )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_project_path) identifier_project_path (string_'results') string_'results' (identifier_dirname) identifier_dirname )argument_list )call )return_statement )block )function_definition )module
Generate default output directory
(module (function_definition (function_name_ec_construct_private) function_name_ec_construct_private (parameters (identifier_num) identifier_num )parameters (block (expression_statement (assignment (identifier_pub_ecpn) identifier_pub_ecpn (call (attribute (identifier_ec) identifier_ec (identifier_EllipticCurvePublicNumbers) identifier_EllipticCurvePublicNumbers )attribute (argument_list (subscript (identifier_num) identifier_num (string_'x') string_'x' )subscript (subscript (identifier_num) identifier_num (string_'y') string_'y' )subscript (call (subscript (identifier_NIST2SEC) identifier_NIST2SEC (call (identifier_as_unicode) identifier_as_unicode (argument_list (subscript (identifier_num) identifier_num (string_'crv') string_'crv' )subscript )argument_list )call )subscript (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_priv_ecpn) identifier_priv_ecpn (call (attribute (identifier_ec) identifier_ec (identifier_EllipticCurvePrivateNumbers) identifier_EllipticCurvePrivateNumbers )attribute (argument_list (subscript (identifier_num) identifier_num (string_'d') string_'d' )subscript (identifier_pub_ecpn) identifier_pub_ecpn )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_priv_ecpn) identifier_priv_ecpn (identifier_private_key) identifier_private_key )attribute (argument_list (call (identifier_default_backend) identifier_default_backend (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Given a set of values on public and private attributes build a elliptic curve private key instance. :param num: A dictionary with public and private attributes and their values :return: A cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey instance.
(module (function_definition (function_name__pickle_batch) function_name__pickle_batch (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (identifier_pickle) identifier_pickle (identifier_dumps) identifier_dumps )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_batch) identifier_batch )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_header) identifier_header (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_"!L") string_"!L" (call (identifier_len) identifier_len (argument_list (identifier_payload) identifier_payload )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (binary_operator (identifier_header) identifier_header (identifier_payload) identifier_payload )binary_operator )assignment )expression_statement (return_statement (identifier_message) identifier_message )return_statement )block )function_definition )module
Pickle the metrics into a form that can be understood by the graphite pickle connector.
(module (function_definition (function_name_on_message) function_name_on_message (parameters (identifier_self) identifier_self (identifier_handler) identifier_handler (identifier_msg) identifier_msg )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_remote_debugging) identifier_remote_debugging )attribute (block (for_statement (identifier_h) identifier_h (attribute (identifier_self) identifier_self (identifier_handlers) identifier_handlers )attribute (block (if_statement (comparison_operator (identifier_h) identifier_h (identifier_handler) identifier_handler )comparison_operator (block (expression_statement (call (attribute (identifier_h) identifier_h (identifier_write_message) identifier_write_message )attribute (argument_list (identifier_msg) identifier_msg (True) True )argument_list )call )expression_statement )block )if_statement )block )for_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_msg) identifier_msg )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
In remote debugging mode this simply acts as a forwarding proxy for the two clients.
(module (function_definition (function_name_update_many) function_name_update_many (parameters (identifier_cls) identifier_cls (identifier_filter) identifier_filter (identifier_update) identifier_update (default_parameter (identifier_upsert) identifier_upsert (False) False )default_parameter )parameters (block (return_statement (attribute (call (attribute (attribute (identifier_cls) identifier_cls (identifier_collection) identifier_collection )attribute (identifier_update_many) identifier_update_many )attribute (argument_list (identifier_filter) identifier_filter (identifier_update) identifier_update (identifier_upsert) identifier_upsert )argument_list )call (identifier_raw_result) identifier_raw_result )attribute )return_statement )block )function_definition )module
Updates all documents that pass the filter with the update value Will upsert a new document if upsert=True and no document is filtered
(module (function_definition (function_name__register) function_name__register (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_registered) identifier_registered )attribute (block (return_statement )return_statement )block )if_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__registration_attempts) identifier__registration_attempts )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_throttle) identifier_throttle )attribute (False) False )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_password) identifier_password )attribute (block (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_rawmsg) identifier_rawmsg )attribute (argument_list (string_'PASS') string_'PASS' (attribute (identifier_self) identifier_self (identifier_password) identifier_password )attribute )argument_list )call )await )expression_statement )block )if_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_set_nickname) identifier_set_nickname )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__attempt_nicknames) identifier__attempt_nicknames )attribute (identifier_pop) identifier_pop )attribute (argument_list (integer_0) integer_0 )argument_list )call )argument_list )call )await )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_rawmsg) identifier_rawmsg )attribute (argument_list (string_'USER') string_'USER' (attribute (identifier_self) identifier_self (identifier_username) identifier_username )attribute (string_'0') string_'0' (string_'*') string_'*' (attribute (identifier_self) identifier_self (identifier_realname) identifier_realname )attribute )argument_list )call )await )expression_statement )block )function_definition )module
Perform IRC connection registration.
(module (function_definition (function_name_DropConnection) function_name_DropConnection (parameters (identifier_self) identifier_self (identifier_connection) identifier_connection )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_connection) identifier_connection (identifier_cursor) identifier_cursor )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (attribute (identifier_MySQLdb) identifier_MySQLdb (identifier_Error) identifier_Error )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_connection) identifier_connection (identifier_dbh) identifier_dbh )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (attribute (identifier_MySQLdb) identifier_MySQLdb (identifier_Error) identifier_Error )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Attempt to cleanly drop the connection.
(module (function_definition (function_name_check_conditions) function_name_check_conditions (parameters (identifier_f) identifier_f (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )parameters (block (expression_statement (assignment (identifier_member_function) identifier_member_function (call (identifier_is_member_function) identifier_is_member_function (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_check_preconditions) identifier_check_preconditions (argument_list (identifier_f) identifier_f (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement (expression_statement (assignment (identifier_base_classes) identifier_base_classes (list )list )assignment )expression_statement (if_statement (identifier_member_function) identifier_member_function (block (expression_statement (assignment (identifier_base_classes) identifier_base_classes (subscript (call (attribute (identifier_inspect) identifier_inspect (identifier_getmro) identifier_getmro )attribute (argument_list (call (identifier_type) identifier_type (argument_list (subscript (identifier_args) identifier_args (integer_0) integer_0 )subscript )argument_list )call )argument_list )call (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement (for_statement (identifier_clz) identifier_clz (identifier_base_classes) identifier_base_classes (block (expression_statement (assignment (identifier_super_fn) identifier_super_fn (call (identifier_getattr) identifier_getattr (argument_list (identifier_clz) identifier_clz (attribute (identifier_f) identifier_f (identifier_func_name) identifier_func_name )attribute (None) None )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_check_preconditions) identifier_check_preconditions (argument_list (identifier_super_fn) identifier_super_fn (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement )block )for_statement )block )if_statement (expression_statement (assignment (identifier_return_value) identifier_return_value (call (identifier_f) identifier_f (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_check_postconditions) identifier_check_postconditions (argument_list (identifier_f) identifier_f (identifier_return_value) identifier_return_value )argument_list )call )expression_statement (if_statement (identifier_member_function) identifier_member_function (block (for_statement (identifier_clz) identifier_clz (identifier_base_classes) identifier_base_classes (block (expression_statement (assignment (identifier_super_fn) identifier_super_fn (call (identifier_getattr) identifier_getattr (argument_list (identifier_clz) identifier_clz (attribute (identifier_f) identifier_f (identifier_func_name) identifier_func_name )attribute (None) None )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_check_postconditions) identifier_check_postconditions (argument_list (identifier_super_fn) identifier_super_fn (identifier_return_value) identifier_return_value )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_return_value) identifier_return_value )return_statement )block )function_definition )module
This is what runs all of the conditions attached to a method, along with the conditions on the superclasses.
(module (function_definition (function_name_shutdown) function_name_shutdown (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (attribute (identifier_self) identifier_self (identifier_lifecycle) identifier_lifecycle )attribute (identifier_is_live) identifier_is_live )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_lifecycle) identifier_lifecycle )attribute (identifier_fire_lifecycle_event) identifier_fire_lifecycle_event )attribute (argument_list (identifier_LIFECYCLE_STATE_SHUTTING_DOWN) identifier_LIFECYCLE_STATE_SHUTTING_DOWN )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_near_cache_manager) identifier_near_cache_manager )attribute (identifier_destroy_all_near_caches) identifier_destroy_all_near_caches )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_statistics) identifier_statistics )attribute (identifier_shutdown) identifier_shutdown )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_partition_service) identifier_partition_service )attribute (identifier_shutdown) identifier_shutdown )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_heartbeat) identifier_heartbeat )attribute (identifier_shutdown) identifier_shutdown )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_cluster) identifier_cluster )attribute (identifier_shutdown) identifier_shutdown )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_reactor) identifier_reactor )attribute (identifier_shutdown) identifier_shutdown )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_lifecycle) identifier_lifecycle )attribute (identifier_fire_lifecycle_event) identifier_fire_lifecycle_event )attribute (argument_list (identifier_LIFECYCLE_STATE_SHUTDOWN) identifier_LIFECYCLE_STATE_SHUTDOWN )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (string_"Client shutdown.") string_"Client shutdown." (keyword_argument (identifier_extra) identifier_extra (attribute (identifier_self) identifier_self (identifier__logger_extras) identifier__logger_extras )attribute )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Shuts down this HazelcastClient.
(module (function_definition (function_name_size) function_name_size (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute (block (return_statement (binary_operator (call (identifier_sum) identifier_sum (argument_list (generator_expression (call (attribute (identifier_c) identifier_c (identifier_size) identifier_size )attribute (argument_list )argument_list )call (for_in_clause (identifier_c) identifier_c (call (attribute (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )argument_list )call (integer_1) integer_1 )binary_operator )return_statement )block (else_clause (block (return_statement (integer_1) integer_1 )return_statement )block )else_clause )if_statement )block )function_definition )module
Size is number of nodes under the trie, including the current node
(module (function_definition (function_name_rewrite_references_json) function_name_rewrite_references_json (parameters (identifier_json_content) identifier_json_content (identifier_rewrite_json) identifier_rewrite_json )parameters (block (for_statement (identifier_ref) identifier_ref (identifier_json_content) identifier_json_content (block (if_statement (boolean_operator (call (attribute (identifier_ref) identifier_ref (identifier_get) identifier_get )attribute (argument_list (string_"id") string_"id" )argument_list )call (comparison_operator (call (attribute (identifier_ref) identifier_ref (identifier_get) identifier_get )attribute (argument_list (string_"id") string_"id" )argument_list )call (identifier_rewrite_json) identifier_rewrite_json )comparison_operator )boolean_operator (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (call (attribute (identifier_rewrite_json) identifier_rewrite_json (identifier_get) identifier_get )attribute (argument_list (call (attribute (identifier_ref) identifier_ref (identifier_get) identifier_get )attribute (argument_list (string_"id") string_"id" )argument_list )call )argument_list )call )argument_list )call (block (expression_statement (assignment (subscript (identifier_ref) identifier_ref (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement )block )if_statement )block )for_statement (return_statement (identifier_json_content) identifier_json_content )return_statement )block )function_definition )module
general purpose references json rewriting by matching the id value
(module (function_definition (function_name_correct_rytov_output) function_name_correct_rytov_output (parameters (identifier_radius) identifier_radius (identifier_sphere_index) identifier_sphere_index (identifier_medium_index) identifier_medium_index (identifier_radius_sampling) identifier_radius_sampling )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_params) identifier_params (call (identifier_get_params) identifier_get_params (argument_list (identifier_radius_sampling) identifier_radius_sampling )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (binary_operator (binary_operator (identifier_sphere_index) identifier_sphere_index (identifier_medium_index) identifier_medium_index )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_radius_sc) identifier_radius_sc (binary_operator (identifier_radius) identifier_radius (parenthesized_expression (binary_operator (binary_operator (binary_operator (subscript (identifier_params) identifier_params (string_"ra") string_"ra" )subscript (binary_operator (identifier_x) identifier_x (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (subscript (identifier_params) identifier_params (string_"rb") string_"rb" )subscript (identifier_x) identifier_x )binary_operator )binary_operator (subscript (identifier_params) identifier_params (string_"rc") string_"rc" )subscript )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_sphere_index_sc) identifier_sphere_index_sc (binary_operator (identifier_sphere_index) identifier_sphere_index (binary_operator (identifier_medium_index) identifier_medium_index (parenthesized_expression (binary_operator (binary_operator (subscript (identifier_params) identifier_params (string_"na") string_"na" )subscript (binary_operator (identifier_x) identifier_x (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (subscript (identifier_params) identifier_params (string_"nb") string_"nb" )subscript (identifier_x) identifier_x )binary_operator )binary_operator )parenthesized_expression )binary_operator )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_radius_sc) identifier_radius_sc (identifier_sphere_index_sc) identifier_sphere_index_sc )expression_list )return_statement )block )function_definition )module
r"""Error-correction of refractive index and radius for Rytov This method corrects the fitting results for `radius` :math:`r_\text{Ryt}` and `sphere_index` :math:`n_\text{Ryt}` obtained using :func:`qpsphere.models.rytov` using the approach described in :cite:`Mueller2018` (eqns. 3,4, and 5). .. math:: n_\text{Ryt-SC} &= n_\text{Ryt} + n_\text{med} \cdot \left( a_n x^2 + b_n x + c_n \right) r_\text{Ryt-SC} &= r_\text{Ryt} \cdot \left( a_r x^2 +b_r x + c_r \right) &\text{with} x = \frac{n_\text{Ryt}}{n_\text{med}} - 1 The correction factors are given in :data:`qpsphere.models.mod_rytov_sc.RSC_PARAMS`. Parameters ---------- radius: float Fitted radius of the sphere :math:`r_\text{Ryt}` [m] sphere_index: float Fitted refractive index of the sphere :math:`n_\text{Ryt}` medium_index: float Refractive index of the surrounding medium :math:`n_\text{med}` radius_sampling: int Number of pixels used to sample the sphere radius when computing the Rytov field. Returns ------- radius_sc: float Systematically corrected radius of the sphere :math:`r_\text{Ryt-SC}` [m] sphere_index_sc: float Systematically corrected refractive index of the sphere :math:`n_\text{Ryt-SC}` See Also -------- correct_rytov_sc_input: the inverse of this method
(module (function_definition (function_name_complete_worker) function_name_complete_worker (parameters (identifier_self) identifier_self (identifier_text) identifier_text (identifier_line) identifier_line (identifier_begidx) identifier_begidx (identifier_endidx) identifier_endidx )parameters (block (return_statement (list_comprehension (identifier_i) identifier_i (for_in_clause (identifier_i) identifier_i (attribute (identifier_PsiturkNetworkShell) identifier_PsiturkNetworkShell (identifier_worker_commands) identifier_worker_commands )attribute )for_in_clause (if_clause (line_continuation_\) line_continuation_\ (call (attribute (identifier_i) identifier_i (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_text) identifier_text )argument_list )call )if_clause )list_comprehension )return_statement )block )function_definition )module
Tab-complete worker command.
(module (function_definition (function_name_can_add_post) function_name_can_add_post (parameters (identifier_self) identifier_self (identifier_topic) identifier_topic (identifier_user) identifier_user )parameters (block (expression_statement (assignment (identifier_can_add_post) identifier_can_add_post (call (attribute (identifier_self) identifier_self (identifier__perform_basic_permission_check) identifier__perform_basic_permission_check )attribute (argument_list (attribute (identifier_topic) identifier_topic (identifier_forum) identifier_forum )attribute (identifier_user) identifier_user (string_'can_reply_to_topics') string_'can_reply_to_topics' )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_can_add_post) identifier_can_add_post (parenthesized_expression (boolean_operator (not_operator (attribute (identifier_topic) identifier_topic (identifier_is_locked) identifier_is_locked )attribute )not_operator (call (attribute (identifier_self) identifier_self (identifier__perform_basic_permission_check) identifier__perform_basic_permission_check )attribute (argument_list (attribute (identifier_topic) identifier_topic (identifier_forum) identifier_forum )attribute (identifier_user) identifier_user (string_'can_reply_to_locked_topics') string_'can_reply_to_locked_topics' )argument_list )call )boolean_operator )parenthesized_expression )augmented_assignment )expression_statement (return_statement (identifier_can_add_post) identifier_can_add_post )return_statement )block )function_definition )module
Given a topic, checks whether the user can append posts to it.
(module (function_definition (function_name_CMS) function_name_CMS (parameters (identifier_data) identifier_data (default_parameter (identifier_format) identifier_format (string_"PEM") string_"PEM" )default_parameter )parameters (block (expression_statement (assignment (identifier_bio) identifier_bio (call (identifier_Membio) identifier_Membio (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_format) identifier_format (string_"PEM") string_"PEM" )comparison_operator (block (expression_statement (assignment (identifier_ptr) identifier_ptr (call (attribute (identifier_libcrypto) identifier_libcrypto (identifier_PEM_read_bio_CMS) identifier_PEM_read_bio_CMS )attribute (argument_list (attribute (identifier_bio) identifier_bio (identifier_bio) identifier_bio )attribute (None) None (None) None (None) None )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_ptr) identifier_ptr (call (attribute (identifier_libcrypto) identifier_libcrypto (identifier_d2i_CMS_bio) identifier_d2i_CMS_bio )attribute (argument_list (attribute (identifier_bio) identifier_bio (identifier_bio) identifier_bio )attribute (None) None )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_ptr) identifier_ptr (None) None )comparison_operator (block (raise_statement (call (identifier_CMSError) identifier_CMSError (argument_list (string_"Error parsing CMS data") string_"Error parsing CMS data" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_typeoid) identifier_typeoid (call (identifier_Oid) identifier_Oid (argument_list (call (attribute (identifier_libcrypto) identifier_libcrypto (identifier_OBJ_obj2nid) identifier_OBJ_obj2nid )attribute (argument_list (call (attribute (identifier_libcrypto) identifier_libcrypto (identifier_CMS_get0_type) identifier_CMS_get0_type )attribute (argument_list (identifier_ptr) identifier_ptr )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_typeoid) identifier_typeoid (identifier_shortname) identifier_shortname )attribute (argument_list )argument_list )call (string_"pkcs7-signedData") string_"pkcs7-signedData" )comparison_operator (block (return_statement (call (identifier_SignedData) identifier_SignedData (argument_list (identifier_ptr) identifier_ptr )argument_list )call )return_statement )block (elif_clause (comparison_operator (call (attribute (identifier_typeoid) identifier_typeoid (identifier_shortname) identifier_shortname )attribute (argument_list )argument_list )call (string_"pkcs7-envelopedData") string_"pkcs7-envelopedData" )comparison_operator (block (return_statement (call (identifier_EnvelopedData) identifier_EnvelopedData (argument_list (identifier_ptr) identifier_ptr )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (call (attribute (identifier_typeoid) identifier_typeoid (identifier_shortname) identifier_shortname )attribute (argument_list )argument_list )call (string_"pkcs7-encryptedData") string_"pkcs7-encryptedData" )comparison_operator (block (return_statement (call (identifier_EncryptedData) identifier_EncryptedData (argument_list (identifier_ptr) identifier_ptr )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (binary_operator (string_"cannot handle ") string_"cannot handle " (call (attribute (identifier_typeoid) identifier_typeoid (identifier_shortname) identifier_shortname )attribute (argument_list )argument_list )call )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Factory function to create CMS objects from received messages. Parses CMS data and returns either SignedData or EnvelopedData object. format argument can be either "PEM" or "DER". It determines object type from the contents of received CMS structure.
(module (function_definition (function_name_get_index_url) function_name_get_index_url (parameters (identifier_self) identifier_self (default_parameter (identifier_resource) identifier_resource (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_default_kwargs) identifier_default_kwargs (conditional_expression (call (attribute (identifier_self) identifier_self (identifier_default_kwargs_for_urls) identifier_default_kwargs_for_urls )attribute (argument_list )argument_list )call (line_continuation_\) line_continuation_\ (comparison_operator (identifier_resource) identifier_resource (call (attribute (identifier_self) identifier_self (identifier_get_resource_name) identifier_get_resource_name )attribute (argument_list )argument_list )call )comparison_operator (dictionary )dictionary )conditional_expression )assignment )expression_statement (expression_statement (call (attribute (identifier_default_kwargs) identifier_default_kwargs (identifier_update) identifier_update )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_full_url) identifier_get_full_url )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_app) identifier_app )attribute (identifier_reverse) identifier_reverse )attribute (argument_list (call (attribute (string_'{}_index') string_'{}_index' (identifier_format) identifier_format )attribute (argument_list (boolean_operator (identifier_resource) identifier_resource (call (attribute (identifier_self) identifier_self (identifier_get_resource_name) identifier_get_resource_name )attribute (argument_list )argument_list )call )boolean_operator )argument_list )call (dictionary_splat (identifier_default_kwargs) identifier_default_kwargs )dictionary_splat )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Builds the url of the resource's index. :param resource: name of the resource or None :param kwargs: additional keyword arguments to build the url :return: url of the resource's index
(module (function_definition (function_name__exit) function_name__exit (parameters (identifier_self) identifier_self (identifier_status_code) identifier_status_code )parameters (block (expression_statement (assignment (identifier_exit_func) identifier_exit_func (conditional_expression (attribute (identifier_os) identifier_os (identifier__exit) identifier__exit )attribute (comparison_operator (call (attribute (identifier_threading) identifier_threading (identifier_active_count) identifier_active_count )attribute (argument_list )argument_list )call (integer_1) integer_1 )comparison_operator (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute )conditional_expression )assignment )expression_statement (expression_statement (call (identifier_exit_func) identifier_exit_func (argument_list (identifier_status_code) identifier_status_code )argument_list )call )expression_statement )block )function_definition )module
Properly kill Python process including zombie threads.
(module (function_definition (function_name_member_profile_view) function_name_member_profile_view (parameters (identifier_request) identifier_request (identifier_targetUsername) identifier_targetUsername )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_targetUsername) identifier_targetUsername (attribute (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute (identifier_username) identifier_username )attribute )comparison_operator (comparison_operator (identifier_targetUsername) identifier_targetUsername (identifier_ANONYMOUS_USERNAME) identifier_ANONYMOUS_USERNAME )comparison_operator )boolean_operator (block (return_statement (call (identifier_HttpResponseRedirect) identifier_HttpResponseRedirect (argument_list (call (identifier_reverse) identifier_reverse (argument_list (string_'my_profile') string_'my_profile' )argument_list )call )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_page_name) identifier_page_name (call (attribute (string_"{0}'s Profile") string_"{0}'s Profile" (identifier_format) identifier_format )attribute (argument_list (identifier_targetUsername) identifier_targetUsername )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_targetUser) identifier_targetUser (call (identifier_get_object_or_404) identifier_get_object_or_404 (argument_list (identifier_User) identifier_User (keyword_argument (identifier_username) identifier_username (identifier_targetUsername) identifier_targetUsername )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_targetProfile) identifier_targetProfile (call (identifier_get_object_or_404) identifier_get_object_or_404 (argument_list (identifier_UserProfile) identifier_UserProfile (keyword_argument (identifier_user) identifier_user (identifier_targetUser) identifier_targetUser )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_number_of_threads) identifier_number_of_threads (call (attribute (call (attribute (attribute (identifier_Thread) identifier_Thread (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_owner) identifier_owner (identifier_targetProfile) identifier_targetProfile )keyword_argument )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_number_of_messages) identifier_number_of_messages (call (attribute (call (attribute (attribute (identifier_Message) identifier_Message (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_owner) identifier_owner (identifier_targetProfile) identifier_targetProfile )keyword_argument )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_number_of_requests) identifier_number_of_requests (call (attribute (call (attribute (attribute (identifier_Request) identifier_Request (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_owner) identifier_owner (identifier_targetProfile) identifier_targetProfile )keyword_argument )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rooms) identifier_rooms (call (attribute (attribute (identifier_Room) identifier_Room (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_current_residents) identifier_current_residents (identifier_targetProfile) identifier_targetProfile )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_prev_rooms) identifier_prev_rooms (call (attribute (attribute (identifier_PreviousResident) identifier_PreviousResident (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_resident) identifier_resident (identifier_targetProfile) identifier_targetProfile )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_render_to_response) identifier_render_to_response (argument_list (string_'member_profile.html') string_'member_profile.html' (dictionary (pair (string_'page_name') string_'page_name' (identifier_page_name) identifier_page_name )pair (pair (string_'targetUser') string_'targetUser' (identifier_targetUser) identifier_targetUser )pair (pair (string_'targetProfile') string_'targetProfile' (identifier_targetProfile) identifier_targetProfile )pair (pair (string_'number_of_threads') string_'number_of_threads' (identifier_number_of_threads) identifier_number_of_threads )pair (pair (string_'number_of_messages') string_'number_of_messages' (identifier_number_of_messages) identifier_number_of_messages )pair (pair (string_'number_of_requests') string_'number_of_requests' (identifier_number_of_requests) identifier_number_of_requests )pair (pair (string_"rooms") string_"rooms" (identifier_rooms) identifier_rooms )pair (pair (string_"prev_rooms") string_"prev_rooms" (identifier_prev_rooms) identifier_prev_rooms )pair )dictionary (keyword_argument (identifier_context_instance) identifier_context_instance (call (identifier_RequestContext) identifier_RequestContext (argument_list (identifier_request) identifier_request )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
View a member's Profile.
(module (function_definition (function_name_activate_next) function_name_activate_next (parameters (identifier_self) identifier_self (default_parameter (identifier__previous) identifier__previous (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_self) identifier_self (identifier_get_current_value) identifier_get_current_value )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_options) identifier_options (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_index) identifier_index (call (attribute (identifier_options) identifier_options (identifier_index) identifier_index )attribute (argument_list (identifier_current) identifier_current )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (identifier_index) identifier_index (integer_0) integer_0 )assignment )expression_statement )block )except_clause )try_statement (if_statement (identifier__previous) identifier__previous (block (expression_statement (augmented_assignment (identifier_index) identifier_index (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_index) identifier_index (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_next_option) identifier_next_option (subscript (identifier_options) identifier_options (binary_operator (identifier_index) identifier_index (call (identifier_len) identifier_len (argument_list (identifier_options) identifier_options )argument_list )call )binary_operator )subscript )assignment )expression_statement (expression_statement (call (subscript (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute (identifier_next_option) identifier_next_option )subscript (argument_list )argument_list )call )expression_statement )block )function_definition )module
Activate next value.
(module (function_definition (function_name_getfile2) function_name_getfile2 (parameters (identifier_url) identifier_url (default_parameter (identifier_auth) identifier_auth (None) None )default_parameter (default_parameter (identifier_outdir) identifier_outdir (None) None )default_parameter )parameters (block (import_statement (dotted_name (identifier_requests) identifier_requests )dotted_name )import_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Retrieving: %s") string_"Retrieving: %s" (identifier_url) identifier_url )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_fn) identifier_fn (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_url) identifier_url )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_outdir) identifier_outdir (None) None )comparison_operator (block (expression_statement (assignment (identifier_fn) identifier_fn (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_outdir) identifier_outdir (identifier_fn) identifier_fn )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_auth) identifier_auth (None) None )comparison_operator (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_stream) identifier_stream (True) True )keyword_argument (keyword_argument (identifier_auth) identifier_auth (identifier_auth) identifier_auth )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_stream) identifier_stream (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_chunk_size) identifier_chunk_size (integer_1000000) integer_1000000 )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_fn) identifier_fn (string_'wb') string_'wb' )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_chunk) identifier_chunk (call (attribute (identifier_r) identifier_r (identifier_iter_content) identifier_iter_content )attribute (argument_list (identifier_chunk_size) identifier_chunk_size )argument_list )call (block (expression_statement (call (attribute (identifier_fd) identifier_fd (identifier_write) identifier_write )attribute (argument_list (identifier_chunk) identifier_chunk )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Function to fetch files using requests Works with https authentication
(module (function_definition (function_name_GetCacheValueByObject) function_name_GetCacheValueByObject (parameters (identifier_self) identifier_self (identifier_vfs_object) identifier_vfs_object )parameters (block (for_statement (pattern_list (identifier_identifier) identifier_identifier (identifier_cache_value) identifier_cache_value )pattern_list (call (identifier_iter) identifier_iter (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__values) identifier__values )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call (block (if_statement (not_operator (identifier_cache_value) identifier_cache_value )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_'Missing cache value.') string_'Missing cache value.' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_cache_value) identifier_cache_value (identifier_vfs_object) identifier_vfs_object )attribute (identifier_vfs_object) identifier_vfs_object )comparison_operator (block (return_statement (expression_list (identifier_identifier) identifier_identifier (identifier_cache_value) identifier_cache_value )expression_list )return_statement )block )if_statement )block )for_statement (return_statement (expression_list (None) None (None) None )expression_list )return_statement )block )function_definition )module
Retrieves the cache value for the cached object. Args: vfs_object (object): VFS object that was cached. Returns: tuple[str, ObjectsCacheValue]: identifier and cache value object or (None, None) if not cached. Raises: RuntimeError: if the cache value is missing.
(module (function_definition (function_name_session_demo_danger_callback) function_name_session_demo_danger_callback (parameters (identifier_da_children) identifier_da_children (default_parameter (identifier_session_state) identifier_session_state (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (string_'Update output based just on state') string_'Update output based just on state' )expression_statement (if_statement (not_operator (identifier_session_state) identifier_session_state )not_operator (block (return_statement (string_"Session state not yet available") string_"Session state not yet available" )return_statement )block )if_statement (return_statement (binary_operator (binary_operator (binary_operator (string_"Session state contains: ") string_"Session state contains: " (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_session_state) identifier_session_state (identifier_get) identifier_get )attribute (argument_list (string_'bootstrap_demo_state') string_'bootstrap_demo_state' (string_"NOTHING") string_"NOTHING" )argument_list )call )argument_list )call )binary_operator (string_" and the page render count is ") string_" and the page render count is " )binary_operator (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_session_state) identifier_session_state (identifier_get) identifier_get )attribute (argument_list (string_"ind_use") string_"ind_use" (string_"NOT SET") string_"NOT SET" )argument_list )call )argument_list )call )binary_operator )return_statement )block )function_definition )module
Update output based just on state
(module (function_definition (function_name_import_participant_element) function_name_import_participant_element (parameters (identifier_diagram_graph) identifier_diagram_graph (identifier_participants_dictionary) identifier_participants_dictionary (identifier_participant_element) identifier_participant_element )parameters (block (expression_statement (assignment (identifier_participant_id) identifier_participant_id (call (attribute (identifier_participant_element) identifier_participant_element (identifier_getAttribute) identifier_getAttribute )attribute (argument_list (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_id) identifier_id )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_participant_element) identifier_participant_element (identifier_getAttribute) identifier_getAttribute )attribute (argument_list (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_process_ref) identifier_process_ref (call (attribute (identifier_participant_element) identifier_participant_element (identifier_getAttribute) identifier_getAttribute )attribute (argument_list (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_process_ref) identifier_process_ref )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_participant_element) identifier_participant_element (identifier_getAttribute) identifier_getAttribute )attribute (argument_list (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_process_ref) identifier_process_ref )attribute )argument_list )call (string_'') string_'' )comparison_operator (block (expression_statement (call (attribute (identifier_diagram_graph) identifier_diagram_graph (identifier_add_node) identifier_add_node )attribute (argument_list (identifier_participant_id) identifier_participant_id )argument_list )call )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_diagram_graph) identifier_diagram_graph (identifier_node) identifier_node )attribute (identifier_participant_id) identifier_participant_id )subscript (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_type) identifier_type )attribute )subscript (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_participant) identifier_participant )attribute )assignment )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_diagram_graph) identifier_diagram_graph (identifier_node) identifier_node )attribute (identifier_participant_id) identifier_participant_id )subscript (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_process) identifier_process )attribute )subscript (identifier_participant_id) identifier_participant_id )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_participants_dictionary) identifier_participants_dictionary (identifier_participant_id) identifier_participant_id )subscript (dictionary (pair (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_name) identifier_name )attribute (identifier_name) identifier_name )pair (pair (attribute (attribute (identifier_consts) identifier_consts (identifier_Consts) identifier_Consts )attribute (identifier_process_ref) identifier_process_ref )attribute (identifier_process_ref) identifier_process_ref )pair )dictionary )assignment )expression_statement )block )function_definition )module
Adds 'participant' element to the collaboration dictionary. :param diagram_graph: NetworkX graph representing a BPMN process diagram, :param participants_dictionary: dictionary with participant element attributes. Key is participant ID, value is a dictionary of participant attributes, :param participant_element: object representing a BPMN XML 'participant' element.
(module (function_definition (function_name__build_meta) function_name__build_meta (parameters (typed_parameter (identifier_text) identifier_text (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_title) identifier_title (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_DocstringMeta) identifier_DocstringMeta )type (block (expression_statement (assignment (identifier_meta) identifier_meta (subscript (identifier__sections) identifier__sections (identifier_title) identifier_title )subscript )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_meta) identifier_meta (string_"returns") string_"returns" )comparison_operator (comparison_operator (string_":") string_":" (subscript (call (attribute (identifier_text) identifier_text (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )comparison_operator )boolean_operator (block (return_statement (call (identifier_DocstringMeta) identifier_DocstringMeta (argument_list (list (identifier_meta) identifier_meta )list (keyword_argument (identifier_description) identifier_description (identifier_text) identifier_text )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_before) identifier_before (identifier_desc) identifier_desc )pattern_list (call (attribute (identifier_text) identifier_text (identifier_split) identifier_split )attribute (argument_list (string_":") string_":" (integer_1) integer_1 )argument_list )call )assignment )expression_statement (if_statement (identifier_desc) identifier_desc (block (expression_statement (assignment (identifier_desc) identifier_desc (conditional_expression (subscript (identifier_desc) identifier_desc (slice (integer_1) integer_1 (colon) colon )slice )subscript (comparison_operator (subscript (identifier_desc) identifier_desc (integer_0) integer_0 )subscript (string_" ") string_" " )comparison_operator (identifier_desc) identifier_desc )conditional_expression )assignment )expression_statement (if_statement (comparison_operator (string_"\n") string_"\n" (identifier_desc) identifier_desc )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_first_line) identifier_first_line (identifier_rest) identifier_rest )pattern_list (call (attribute (identifier_desc) identifier_desc (identifier_split) identifier_split )attribute (argument_list (string_"\n") string_"\n" (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_desc) identifier_desc (binary_operator (binary_operator (identifier_first_line) identifier_first_line (string_"\n") string_"\n" )binary_operator (call (attribute (identifier_inspect) identifier_inspect (identifier_cleandoc) identifier_cleandoc )attribute (argument_list (identifier_rest) identifier_rest )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_desc) identifier_desc (call (attribute (identifier_desc) identifier_desc (identifier_strip) identifier_strip )attribute (argument_list (string_"\n") string_"\n" )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_r"(\S+) \((\S+)\)$") string_r"(\S+) \((\S+)\)$" (identifier_before) identifier_before )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_meta) identifier_meta (string_"param") string_"param" )comparison_operator (identifier_m) identifier_m )boolean_operator (block (expression_statement (assignment (pattern_list (identifier_arg_name) identifier_arg_name (identifier_type_name) identifier_type_name )pattern_list (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 (integer_2) integer_2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (list (identifier_meta) identifier_meta (identifier_type_name) identifier_type_name (identifier_arg_name) identifier_arg_name )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_args) identifier_args (list (identifier_meta) identifier_meta (identifier_before) identifier_before )list )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_DocstringMeta) identifier_DocstringMeta (argument_list (identifier_args) identifier_args (keyword_argument (identifier_description) identifier_description (identifier_desc) identifier_desc )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build docstring element. :param text: docstring element text :param title: title of section containing element :return:
(module (function_definition (function_name__set_italian_leading_zeros_for_phone_number) function_name__set_italian_leading_zeros_for_phone_number (parameters (identifier_national_number) identifier_national_number (identifier_numobj) identifier_numobj )parameters (block (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_national_number) identifier_national_number )argument_list )call (integer_1) integer_1 )comparison_operator (comparison_operator (subscript (identifier_national_number) identifier_national_number (integer_0) integer_0 )subscript (identifier_U_ZERO) identifier_U_ZERO )comparison_operator )boolean_operator (block (expression_statement (assignment (attribute (identifier_numobj) identifier_numobj (identifier_italian_leading_zero) identifier_italian_leading_zero )attribute (True) True )assignment )expression_statement (expression_statement (assignment (identifier_number_of_leading_zeros) identifier_number_of_leading_zeros (integer_1) integer_1 )assignment )expression_statement (while_statement (parenthesized_expression (boolean_operator (comparison_operator (identifier_number_of_leading_zeros) identifier_number_of_leading_zeros (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_national_number) identifier_national_number )argument_list )call (integer_1) integer_1 )binary_operator )comparison_operator (comparison_operator (subscript (identifier_national_number) identifier_national_number (identifier_number_of_leading_zeros) identifier_number_of_leading_zeros )subscript (identifier_U_ZERO) identifier_U_ZERO )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (augmented_assignment (identifier_number_of_leading_zeros) identifier_number_of_leading_zeros (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (if_statement (comparison_operator (identifier_number_of_leading_zeros) identifier_number_of_leading_zeros (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (attribute (identifier_numobj) identifier_numobj (identifier_number_of_leading_zeros) identifier_number_of_leading_zeros )attribute (identifier_number_of_leading_zeros) identifier_number_of_leading_zeros )assignment )expression_statement )block )if_statement )block )if_statement )block )function_definition )module
A helper function to set the values related to leading zeros in a PhoneNumber.
(module (function_definition (function_name_normalize_version) function_name_normalize_version (parameters (identifier_version) identifier_version )parameters (block (if_statement (comparison_operator (identifier_version) identifier_version (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_error) identifier_error (False) False )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_version) identifier_version (call (identifier_int) identifier_int (argument_list (identifier_version) identifier_version )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_error) identifier_error (comparison_operator (identifier_version) identifier_version (integer_1) integer_1 )comparison_operator )assignment )expression_statement )block (except_clause (tuple (identifier_ValueError) identifier_ValueError (identifier_TypeError) identifier_TypeError )tuple (block (try_statement (block (expression_statement (assignment (identifier_version) identifier_version (subscript (attribute (identifier_consts) identifier_consts (identifier_MICRO_VERSION_MAPPING) identifier_MICRO_VERSION_MAPPING )attribute (call (attribute (identifier_version) identifier_version (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )subscript )assignment )expression_statement )block (except_clause (tuple (identifier_KeyError) identifier_KeyError (identifier_AttributeError) identifier_AttributeError )tuple (block (expression_statement (assignment (identifier_error) identifier_error (True) True )assignment )expression_statement )block )except_clause )try_statement )block )except_clause )try_statement (if_statement (boolean_operator (identifier_error) identifier_error (boolean_operator (not_operator (comparison_operator (integer_0) integer_0 (identifier_version) identifier_version (integer_41) integer_41 )comparison_operator )not_operator (comparison_operator (identifier_version) identifier_version (attribute (identifier_consts) identifier_consts (identifier_MICRO_VERSIONS) identifier_MICRO_VERSIONS )attribute )comparison_operator )boolean_operator )boolean_operator (block (raise_statement (call (identifier_VersionError) identifier_VersionError (argument_list (call (attribute (concatenated_string (string_'Unsupported version "{0}". ') string_'Unsupported version "{0}". ' (string_'Supported: {1} and 1 .. 40') string_'Supported: {1} and 1 .. 40' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_version) identifier_version (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_consts) identifier_consts (identifier_MICRO_VERSION_MAPPING) identifier_MICRO_VERSION_MAPPING )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_version) identifier_version )return_statement )block )function_definition )module
\ Canonicalizes the provided `version`. If the `version` is ``None``, this function returns ``None``. Otherwise this function checks if `version` is an integer or a Micro QR Code version. In case the string represents a Micro QR Code version, an uppercased string identifier is returned. If the `version` does not represent a valid version identifier (aside of ``None``, a VersionError is raised. :param version: An integer, a string or ``None``. :raises: VersionError: In case the version is not ``None`` and does not represent a valid (Micro) QR Code version. :rtype: int, str or ``None``
(module (function_definition (function_name_get_protein_data_pgrouped) function_name_get_protein_data_pgrouped (parameters (identifier_proteindata) identifier_proteindata (identifier_p_acc) identifier_p_acc (identifier_headerfields) identifier_headerfields )parameters (block (expression_statement (assignment (identifier_report) identifier_report (call (identifier_get_protein_data_base) identifier_get_protein_data_base (argument_list (identifier_proteindata) identifier_proteindata (identifier_p_acc) identifier_p_acc (identifier_headerfields) identifier_headerfields )argument_list )call )assignment )expression_statement (return_statement (call (identifier_get_cov_protnumbers) identifier_get_cov_protnumbers (argument_list (identifier_proteindata) identifier_proteindata (identifier_p_acc) identifier_p_acc (identifier_report) identifier_report )argument_list )call )return_statement )block )function_definition )module
Parses protein data for a certain protein into tsv output dictionary
(module (function_definition (function_name_mutex) function_name_mutex (parameters )parameters (block (expression_statement (assignment (identifier_mutex_num) identifier_mutex_num (list (integer_50) integer_50 (integer_50) integer_50 (integer_50) integer_50 (integer_500) integer_500 (integer_500) integer_500 (integer_500) integer_500 (integer_1000) integer_1000 (integer_1000) integer_1000 (integer_1000) integer_1000 )list )assignment )expression_statement (expression_statement (assignment (identifier_locks) identifier_locks (list (integer_10000) integer_10000 (integer_25000) integer_25000 (integer_50000) integer_50000 (integer_10000) integer_10000 (integer_25000) integer_25000 (integer_50000) integer_50000 (integer_10000) integer_10000 (integer_25000) integer_25000 (integer_50000) integer_50000 )list )assignment )expression_statement (expression_statement (assignment (identifier_mutex_locks) identifier_mutex_locks (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_mutex_locks) identifier_mutex_locks (identifier_extend) identifier_extend )attribute (argument_list (identifier_locks) identifier_locks )argument_list )call )expression_statement (expression_statement (assignment (identifier_mutex_loops) identifier_mutex_loops (list (integer_2500) integer_2500 (integer_5000) integer_5000 (integer_10000) integer_10000 (integer_10000) integer_10000 (integer_2500) integer_2500 (integer_5000) integer_5000 (integer_5000) integer_5000 (integer_10000) integer_10000 (integer_2500) integer_2500 )list )assignment )expression_statement (expression_statement (assignment (identifier_test_command) identifier_test_command (string_'sysbench --num-threads=250 --test=mutex ') string_'sysbench --num-threads=250 --test=mutex ' )assignment )expression_statement (expression_statement (augmented_assignment (identifier_test_command) identifier_test_command (string_'--mutex-num={0} --mutex-locks={1} --mutex-loops={2} run ') string_'--mutex-num={0} --mutex-locks={1} --mutex-loops={2} run ' )augmented_assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (None) None )assignment )expression_statement (expression_statement (assignment (identifier_ret_val) identifier_ret_val (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_num) identifier_num (identifier_locks) identifier_locks (identifier_loops) identifier_loops )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_mutex_num) identifier_mutex_num (identifier_mutex_locks) identifier_mutex_locks (identifier_mutex_loops) identifier_mutex_loops )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (string_'Mutex: {0} Locks: {1} Loops: {2}') string_'Mutex: {0} Locks: {1} Loops: {2}' (identifier_format) identifier_format )attribute (argument_list (identifier_num) identifier_num (identifier_locks) identifier_locks (identifier_loops) identifier_loops )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_run_command) identifier_run_command (call (attribute (identifier_test_command) identifier_test_command (identifier_format) identifier_format )attribute (argument_list (identifier_num) identifier_num (identifier_locks) identifier_locks (identifier_loops) identifier_loops )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (identifier_run_command) identifier_run_command )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret_val) identifier_ret_val (identifier_key) identifier_key )subscript (call (identifier__parser) identifier__parser (argument_list (identifier_result) identifier_result )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_ret_val) identifier_ret_val )return_statement )block )function_definition )module
Tests the implementation of mutex CLI Examples: .. code-block:: bash salt '*' sysbench.mutex
(module (function_definition (function_name_full_name) function_name_full_name (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_prefix) identifier_prefix )attribute (None) None )comparison_operator (block (return_statement (call (attribute (string_'.') string_'.' (identifier_join) identifier_join )attribute (argument_list (list (attribute (identifier_self) identifier_self (identifier_prefix) identifier_prefix )attribute (attribute (identifier_self) identifier_self (identifier_member) identifier_member )attribute )list )argument_list )call )return_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_member) identifier_member )attribute )return_statement )block )function_definition )module
Return full name of member
(module (function_definition (function_name__hide_loading_page) function_name__hide_loading_page (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_infowidget) identifier_infowidget )attribute (identifier_hide) identifier_hide )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_shellwidget) identifier_shellwidget )attribute (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_info_page) identifier_info_page )attribute (attribute (identifier_self) identifier_self (identifier_blank_page) identifier_blank_page )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_info_page) identifier_set_info_page )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_shellwidget) identifier_shellwidget )attribute (identifier_sig_prompt_ready) identifier_sig_prompt_ready )attribute (identifier_disconnect) identifier_disconnect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__hide_loading_page) identifier__hide_loading_page )attribute )argument_list )call )expression_statement )block )function_definition )module
Hide animation shown while the kernel is loading.
(module (function_definition (function_name_chunks) function_name_chunks (parameters (identifier_iterable) identifier_iterable (identifier_size) identifier_size )parameters (block (expression_statement (assignment (identifier_it) identifier_it (call (identifier_iter) identifier_iter (argument_list (identifier_iterable) identifier_iterable )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_item) identifier_item (call (identifier_list) identifier_list (argument_list (call (identifier_islice) identifier_islice (argument_list (identifier_it) identifier_it (identifier_size) identifier_size )argument_list )call )argument_list )call )assignment )expression_statement (while_statement (identifier_item) identifier_item (block (expression_statement (yield (identifier_item) identifier_item )yield )expression_statement (expression_statement (assignment (identifier_item) identifier_item (call (identifier_list) identifier_list (argument_list (call (identifier_islice) identifier_islice (argument_list (identifier_it) identifier_it (identifier_size) identifier_size )argument_list )call )argument_list )call )assignment )expression_statement )block )while_statement )block )function_definition )module
Splits a very large list into evenly sized chunks. Returns an iterator of lists that are no more than the size passed in.
(module (function_definition (function_name_uninit_ui) function_name_uninit_ui (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_lay) identifier_lay )attribute (identifier_removeWidget) identifier_removeWidget )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_tool_pb) identifier_tool_pb )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_tooltip) identifier_tooltip )attribute (identifier_deleteLater) identifier_deleteLater )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_tool_pb) identifier_tool_pb )attribute (identifier_deleteLater) identifier_deleteLater )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Delete the tooltip :returns: None :rtype: None :raises: None
(module (function_definition (function_name__get_subject_alternative_names) function_name__get_subject_alternative_names (parameters (identifier_self) identifier_self (identifier_ext) identifier_ext )parameters (block (expression_statement (assignment (identifier_values) identifier_values (list )list )assignment )expression_statement (for_statement (identifier_san) identifier_san (attribute (identifier_ext) identifier_ext (identifier_value) identifier_value )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_san) identifier_san (identifier_value) identifier_value )attribute (identifier_string) identifier_string )argument_list )call (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_san) identifier_san (identifier_value) identifier_value )attribute )argument_list )call )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_san) identifier_san (identifier_value) identifier_value )attribute (attribute (identifier_x509) identifier_x509 (identifier_Name) identifier_Name )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_extend) identifier_extend )attribute (generator_expression (call (attribute (identifier_self) identifier_self (identifier__name_attribute_to_string) identifier__name_attribute_to_string )attribute (argument_list (identifier_rdn) identifier_rdn )argument_list )call (for_in_clause (identifier_rdn) identifier_rdn (attribute (attribute (identifier_san) identifier_san (identifier_value) identifier_value )attribute (identifier_rdns) identifier_rdns )attribute )for_in_clause )generator_expression )call )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (identifier_values) identifier_values )return_statement )block )function_definition )module
Return a list of Subject Alternative Name values for the given x509 extension object.
(module (function_definition (function_name__findbytes) function_name__findbytes (parameters (identifier_self) identifier_self (identifier_bytes_) identifier_bytes_ (identifier_start) identifier_start (identifier_end) identifier_end (identifier_bytealigned) identifier_bytealigned )parameters (block (assert_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__datastore) identifier__datastore )attribute (identifier_offset) identifier_offset )attribute (integer_0) integer_0 )comparison_operator )assert_statement (assert_statement (comparison_operator (identifier_bytealigned) identifier_bytealigned (True) True )comparison_operator )assert_statement (expression_statement (assignment (identifier_bytepos) identifier_bytepos (binary_operator (parenthesized_expression (binary_operator (identifier_start) identifier_start (integer_7) integer_7 )binary_operator )parenthesized_expression (integer_8) integer_8 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_found) identifier_found (False) False )assignment )expression_statement (expression_statement (assignment (identifier_p) identifier_p (identifier_bytepos) identifier_bytepos )assignment )expression_statement (expression_statement (assignment (identifier_finalpos) identifier_finalpos (binary_operator (identifier_end) identifier_end (integer_8) integer_8 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_increment) identifier_increment (call (identifier_max) identifier_max (argument_list (integer_1024) integer_1024 (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_bytes_) identifier_bytes_ )argument_list )call (integer_10) integer_10 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_buffersize) identifier_buffersize (binary_operator (identifier_increment) identifier_increment (call (identifier_len) identifier_len (argument_list (identifier_bytes_) identifier_bytes_ )argument_list )call )binary_operator )assignment )expression_statement (while_statement (comparison_operator (identifier_p) identifier_p (identifier_finalpos) identifier_finalpos )comparison_operator (block (expression_statement (assignment (identifier_buf) identifier_buf (call (identifier_bytearray) identifier_bytearray (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__datastore) identifier__datastore )attribute (identifier_getbyteslice) identifier_getbyteslice )attribute (argument_list (identifier_p) identifier_p (call (identifier_min) identifier_min (argument_list (binary_operator (identifier_p) identifier_p (identifier_buffersize) identifier_buffersize )binary_operator (identifier_finalpos) identifier_finalpos )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_buf) identifier_buf (identifier_find) identifier_find )attribute (argument_list (identifier_bytes_) identifier_bytes_ )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_pos) identifier_pos (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (identifier_found) identifier_found (True) True )assignment )expression_statement (expression_statement (augmented_assignment (identifier_p) identifier_p (identifier_pos) identifier_pos )augmented_assignment )expression_statement (break_statement )break_statement )block )if_statement (expression_statement (augmented_assignment (identifier_p) identifier_p (identifier_increment) identifier_increment )augmented_assignment )expression_statement )block )while_statement (if_statement (not_operator (identifier_found) identifier_found )not_operator (block (return_statement (tuple )tuple )return_statement )block )if_statement (return_statement (tuple (binary_operator (identifier_p) identifier_p (integer_8) integer_8 )binary_operator )tuple )return_statement )block )function_definition )module
Quicker version of find when everything's whole byte and byte aligned.
(module (function_definition (function_name__array_io) function_name__array_io (parameters (identifier_self) identifier_self (identifier_action) identifier_action (identifier_array) identifier_array (identifier_frames) identifier_frames )parameters (block (if_statement (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_array) identifier_array (identifier_ndim) identifier_ndim )attribute (tuple (integer_1) integer_1 (integer_2) integer_2 )tuple )comparison_operator (boolean_operator (comparison_operator (attribute (identifier_array) identifier_array (identifier_ndim) identifier_ndim )attribute (integer_1) integer_1 )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_channels) identifier_channels )attribute (integer_1) integer_1 )comparison_operator )boolean_operator )boolean_operator (boolean_operator (comparison_operator (attribute (identifier_array) identifier_array (identifier_ndim) identifier_ndim )attribute (integer_2) integer_2 )comparison_operator (comparison_operator (subscript (attribute (identifier_array) identifier_array (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript (attribute (identifier_self) identifier_self (identifier_channels) identifier_channels )attribute )comparison_operator )boolean_operator )boolean_operator )parenthesized_expression (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Invalid shape: {0!r}") string_"Invalid shape: {0!r}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_array) identifier_array (identifier_shape) identifier_shape )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (attribute (identifier_array) identifier_array (identifier_flags) identifier_flags )attribute (identifier_c_contiguous) identifier_c_contiguous )attribute )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Data must be C-contiguous") string_"Data must be C-contiguous" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_ctype) identifier_ctype (call (attribute (identifier_self) identifier_self (identifier__check_dtype) identifier__check_dtype )attribute (argument_list (attribute (attribute (identifier_array) identifier_array (identifier_dtype) identifier_dtype )attribute (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (attribute (attribute (identifier_array) identifier_array (identifier_dtype) identifier_dtype )attribute (identifier_itemsize) identifier_itemsize )attribute (call (attribute (identifier__ffi) identifier__ffi (identifier_sizeof) identifier_sizeof )attribute (argument_list (identifier_ctype) identifier_ctype )argument_list )call )comparison_operator )assert_statement (expression_statement (assignment (identifier_cdata) identifier_cdata (call (attribute (identifier__ffi) identifier__ffi (identifier_cast) identifier_cast )attribute (argument_list (binary_operator (identifier_ctype) identifier_ctype (string_'*') string_'*' )binary_operator (subscript (subscript (attribute (identifier_array) identifier_array (identifier___array_interface__) identifier___array_interface__ )attribute (string_'data') string_'data' )subscript (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__cdata_io) identifier__cdata_io )attribute (argument_list (identifier_action) identifier_action (identifier_cdata) identifier_cdata (identifier_ctype) identifier_ctype (identifier_frames) identifier_frames )argument_list )call )return_statement )block )function_definition )module
Check array and call low-level IO function.
(module (function_definition (function_name_give_satellite_json) function_name_give_satellite_json (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_daemon_properties) identifier_daemon_properties (list (string_'type') string_'type' (string_'name') string_'name' (string_'uri') string_'uri' (string_'spare') string_'spare' (string_'configuration_sent') string_'configuration_sent' (string_'realm_name') string_'realm_name' (string_'manage_sub_realms') string_'manage_sub_realms' (string_'active') string_'active' (string_'reachable') string_'reachable' (string_'alive') string_'alive' (string_'passive') string_'passive' (string_'last_check') string_'last_check' (string_'polling_interval') string_'polling_interval' (string_'max_check_attempts') string_'max_check_attempts' )list )assignment )expression_statement (expression_statement (assignment (tuple_pattern (identifier_livestate) identifier_livestate (identifier_livestate_output) identifier_livestate_output )tuple_pattern (call (attribute (identifier_self) identifier_self (identifier_get_livestate) identifier_get_livestate )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (dictionary (pair (string_"livestate") string_"livestate" (identifier_livestate) identifier_livestate )pair (pair (string_"livestate_output") string_"livestate_output" (identifier_livestate_output) identifier_livestate_output )pair )dictionary )assignment )expression_statement (for_statement (identifier_sat_prop) identifier_sat_prop (identifier_daemon_properties) identifier_daemon_properties (block (expression_statement (assignment (subscript (identifier_res) identifier_res (identifier_sat_prop) identifier_sat_prop )subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_sat_prop) identifier_sat_prop (string_'not_yet_defined') string_'not_yet_defined' )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Get the json information for a satellite. This to provide information that will be exposed by a daemon on its HTTP interface. :return: dictionary of information common to all the links :rtype: dict
(module (function_definition (function_name__set_expressions) function_name__set_expressions (parameters (identifier_self) identifier_self (identifier_expressions) identifier_expressions )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_expressions) identifier_expressions )attribute (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_item) identifier_item )pattern_list (call (attribute (identifier_expressions) identifier_expressions (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_expressions) identifier_expressions )attribute (identifier_key) identifier_key )subscript (dictionary (pair (string_'function') string_'function' (identifier_item) identifier_item )pair )dictionary )assignment )expression_statement )block )for_statement )block )function_definition )module
Extract expressions and variables from the user provided expressions.
(module (function_definition (function_name_query) function_name_query (parameters (identifier_cls) identifier_cls (identifier_database) identifier_database (identifier_map_fun) identifier_map_fun (identifier_reduce_fun) identifier_reduce_fun (default_parameter (identifier_language) identifier_language (string_'javascript') string_'javascript' )default_parameter (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_database) identifier_database (identifier_query) identifier_query )attribute (argument_list (identifier_map_fun) identifier_map_fun (keyword_argument (identifier_reduce_fun) identifier_reduce_fun (identifier_reduce_fun) identifier_reduce_fun )keyword_argument (keyword_argument (identifier_language) identifier_language (identifier_language) identifier_language )keyword_argument (keyword_argument (identifier_wrapper) identifier_wrapper (attribute (identifier_cls) identifier_cls (identifier__wrap_row) identifier__wrap_row )attribute )keyword_argument (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Execute a CouchDB temporary view and map the result values back to objects of this mapping. Note that by default, any properties of the document that are not included in the values of the view will be treated as if they were missing from the document. If you want to load the full document for every row, set the ``include_docs`` option to ``True``.
(module (function_definition (function_name_container_config_delete) function_name_container_config_delete (parameters (identifier_name) identifier_name (identifier_config_key) identifier_config_key (default_parameter (identifier_remote_addr) identifier_remote_addr (None) None )default_parameter (default_parameter (identifier_cert) identifier_cert (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_verify_cert) identifier_verify_cert (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_container) identifier_container (call (identifier_container_get) identifier_container_get (argument_list (identifier_name) identifier_name (identifier_remote_addr) identifier_remote_addr (identifier_cert) identifier_cert (identifier_key) identifier_key (identifier_verify_cert) identifier_verify_cert (keyword_argument (identifier__raw) identifier__raw (True) True )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier__delete_property_dict_item) identifier__delete_property_dict_item (argument_list (identifier_container) identifier_container (string_'config') string_'config' (identifier_config_key) identifier_config_key )argument_list )call )return_statement )block )function_definition )module
Delete a container config value name : Name of the container config_key : The config key to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock cert : PEM Formatted SSL Certificate. Examples: ~/.config/lxc/client.crt key : PEM Formatted SSL Key. Examples: ~/.config/lxc/client.key verify_cert : True Wherever to verify the cert, this is by default True but in the most cases you want to set it off as LXD normaly uses self-signed certificates.
(module (function_definition (function_name_items) function_name_items (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier_transaction) identifier_transaction )attribute (string_'items') string_'items' )subscript (string_'item') string_'item' )subscript )argument_list )call (identifier_list) identifier_list )comparison_operator (block (return_statement (subscript (subscript (attribute (identifier_self) identifier_self (identifier_transaction) identifier_transaction )attribute (string_'items') string_'items' )subscript (string_'item') string_'item' )subscript )return_statement )block (else_clause (block (return_statement (list (subscript (subscript (attribute (identifier_self) identifier_self (identifier_transaction) identifier_transaction )attribute (string_'items') string_'items' )subscript (string_'item') string_'item' )subscript )list )return_statement )block )else_clause )if_statement )block )function_definition )module
Lista dos items do pagamento
(module (function_definition (function_name_entity_categories) function_name_entity_categories (parameters (identifier_self) identifier_self (identifier_entity_id) identifier_entity_id )parameters (block (expression_statement (assignment (identifier_attributes) identifier_attributes (call (attribute (identifier_self) identifier_self (identifier_entity_attributes) identifier_entity_attributes )attribute (argument_list (identifier_entity_id) identifier_entity_id )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_attributes) identifier_attributes (identifier_get) identifier_get )attribute (argument_list (identifier_ENTITY_CATEGORY) identifier_ENTITY_CATEGORY (list )list )argument_list )call )return_statement )block )function_definition )module
Get a list of entity categories for an entity id. :param entity_id: Entity id :return: Entity categories :type entity_id: string :rtype: [string]
(module (function_definition (function_name_log_to_api) function_name_log_to_api (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_entries) identifier_entries )attribute (block (try_statement (block (expression_statement (assignment (identifier_headers) identifier_headers (dictionary (pair (string_'Content-Type') string_'Content-Type' (string_'application/json') string_'application/json' )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_post) identifier_post )attribute (argument_list (string_'/v2/logs/app') string_'/v2/logs/app' (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_json) identifier_json (attribute (identifier_self) identifier_self (identifier_entries) identifier_entries )attribute )keyword_argument )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )function_definition )module
Best effort API logger. Send logs to the ThreatConnect API and do nothing if the attempt fails.
(module (function_definition (function_name_outfile_maker) function_name_outfile_maker (parameters (identifier_inname) identifier_inname (default_parameter (identifier_outext) identifier_outext (string_'.out') string_'.out' )default_parameter (default_parameter (identifier_outname) identifier_outname (string_'') string_'' )default_parameter (default_parameter (identifier_outdir) identifier_outdir (string_'') string_'' )default_parameter (default_parameter (identifier_append_to_name) identifier_append_to_name (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_orig_dir) identifier_orig_dir (identifier_orig_name) identifier_orig_name (identifier_orig_ext) identifier_orig_ext )pattern_list (call (identifier_split_folder_and_path) identifier_split_folder_and_path (argument_list (identifier_inname) identifier_inname )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_outname) identifier_outname )not_operator (block (expression_statement (assignment (identifier_outname) identifier_outname (identifier_orig_name) identifier_orig_name )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_outdir) identifier_outdir )not_operator (block (expression_statement (assignment (identifier_outdir) identifier_outdir (identifier_orig_dir) identifier_orig_dir )assignment )expression_statement )block )if_statement (if_statement (identifier_append_to_name) identifier_append_to_name (block (expression_statement (augmented_assignment (identifier_outname) identifier_outname (identifier_append_to_name) identifier_append_to_name )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_final_outfile) identifier_final_outfile (call (attribute (identifier_op) identifier_op (identifier_join) identifier_join )attribute (argument_list (identifier_outdir) identifier_outdir (call (attribute (string_'{}{}') string_'{}{}' (identifier_format) identifier_format )attribute (argument_list (identifier_outname) identifier_outname (identifier_outext) identifier_outext )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_final_outfile) identifier_final_outfile )return_statement )block )function_definition )module
Create a default name for an output file based on the inname name, unless a output name is specified. Args: inname: Path to input file outext: Optional specified extension for output file (with the "."). Default is ".out". outfile: Optional specified name of output file. outdir: Optional path to output directory. Returns: str: Path to final output destination. Examples: >>> outfile_maker(inname='P00001.fasta') 'P00001.out' >>> outfile_maker(inname='P00001') 'P00001.out' >>> outfile_maker(inname='P00001.fasta', append_to_name='_new') 'P00001_new.out' >>> outfile_maker(inname='P00001.fasta', outext='.mao') 'P00001.mao' >>> outfile_maker(inname='P00001.fasta', outext='.mao', append_to_name='_new') 'P00001_new.mao' >>> outfile_maker(inname='P00001.fasta', outext='.new', outname='P00001_aligned') 'P00001_aligned.new' >>> outfile_maker(inname='P00001.fasta', outname='P00001_aligned') 'P00001_aligned.out' >>> outfile_maker(inname='P00001.fasta', outname='P00001_aligned', append_to_name='_new') 'P00001_aligned_new.out' >>> outfile_maker(inname='P00001.fasta', outname='P00001_aligned', outdir='/my/dir/') '/my/dir/P00001_aligned.out' >>> outfile_maker(inname='/test/other/dir/P00001.fasta', append_to_name='_new') '/test/other/dir/P00001_new.out' >>> outfile_maker(inname='/test/other/dir/P00001.fasta', outname='P00001_aligned') '/test/other/dir/P00001_aligned.out' >>> outfile_maker(inname='/test/other/dir/P00001.fasta', outname='P00001_aligned', outdir='/my/dir/') '/my/dir/P00001_aligned.out'
(module (function_definition (function_name_generate_sample_sls_module) function_name_generate_sample_sls_module (parameters (identifier_env_root) identifier_env_root (default_parameter (identifier_module_dir) identifier_module_dir (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_module_dir) identifier_module_dir (None) None )comparison_operator (block (expression_statement (assignment (identifier_module_dir) identifier_module_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_env_root) identifier_env_root (string_'sampleapp.sls') string_'sampleapp.sls' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_generate_sample_module) identifier_generate_sample_module (argument_list (identifier_module_dir) identifier_module_dir )argument_list )call )expression_statement (for_statement (identifier_i) identifier_i (list (string_'config-dev-us-east-1.json') string_'config-dev-us-east-1.json' (string_'handler.py') string_'handler.py' (string_'package.json') string_'package.json' (string_'serverless.yml') string_'serverless.yml' )list (block (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_copyfile) identifier_copyfile )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_ROOT) identifier_ROOT (string_'templates') string_'templates' (string_'serverless') string_'serverless' (identifier_i) identifier_i )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_module_dir) identifier_module_dir (identifier_i) identifier_i )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_info) identifier_info )attribute (argument_list (string_"Sample Serverless module created at %s") string_"Sample Serverless module created at %s" (identifier_module_dir) identifier_module_dir )argument_list )call )expression_statement )block )function_definition )module
Generate skeleton Serverless sample module.
(module (function_definition (function_name_format_expose) function_name_format_expose (parameters (identifier_expose) identifier_expose )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_expose) identifier_expose (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (return_statement (expression_list (identifier_expose) identifier_expose )expression_list )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_expose) identifier_expose (attribute (identifier_collections) identifier_collections (identifier_Iterable) identifier_Iterable )attribute )argument_list )call (block (return_statement (call (identifier_map) identifier_map (argument_list (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (identifier_expose) identifier_expose )argument_list )call )return_statement )block )elif_clause )if_statement (return_statement (expression_list (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_expose) identifier_expose )argument_list )call )expression_list )return_statement )block )function_definition )module
Converts a port number or multiple port numbers, as used in the Dockerfile ``EXPOSE`` command, to a tuple. :param: Port numbers, can be as integer, string, or a list/tuple of those. :type expose: int | unicode | str | list | tuple :return: A tuple, to be separated by spaces before inserting in a Dockerfile. :rtype: tuple
(module (function_definition (function_name_decisionviz) function_name_decisionviz (parameters (identifier_model) identifier_model (identifier_X) identifier_X (identifier_y) identifier_y (default_parameter (identifier_colors) identifier_colors (None) None )default_parameter (default_parameter (identifier_classes) identifier_classes (None) None )default_parameter (default_parameter (identifier_features) identifier_features (None) None )default_parameter (default_parameter (identifier_show_scatter) identifier_show_scatter (True) True )default_parameter (default_parameter (identifier_step_size) identifier_step_size (float_0.0025) float_0.0025 )default_parameter (default_parameter (identifier_markers) identifier_markers (None) None )default_parameter (default_parameter (identifier_pcolormesh_alpha) identifier_pcolormesh_alpha (float_0.8) float_0.8 )default_parameter (default_parameter (identifier_scatter_alpha) identifier_scatter_alpha (float_1.0) float_1.0 )default_parameter (default_parameter (identifier_title) identifier_title (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_visualizer) identifier_visualizer (call (identifier_DecisionBoundariesVisualizer) identifier_DecisionBoundariesVisualizer (argument_list (identifier_model) identifier_model (identifier_X) identifier_X (identifier_y) identifier_y (keyword_argument (identifier_colors) identifier_colors (identifier_colors) identifier_colors )keyword_argument (keyword_argument (identifier_classes) identifier_classes (identifier_classes) identifier_classes )keyword_argument (keyword_argument (identifier_features) identifier_features (identifier_features) identifier_features )keyword_argument (keyword_argument (identifier_show_scatter) identifier_show_scatter (identifier_show_scatter) identifier_show_scatter )keyword_argument (keyword_argument (identifier_step_size) identifier_step_size (identifier_step_size) identifier_step_size )keyword_argument (keyword_argument (identifier_markers) identifier_markers (identifier_markers) identifier_markers )keyword_argument (keyword_argument (identifier_pcolormesh_alpha) identifier_pcolormesh_alpha (identifier_pcolormesh_alpha) identifier_pcolormesh_alpha )keyword_argument (keyword_argument (identifier_scatter_alpha) identifier_scatter_alpha (identifier_scatter_alpha) identifier_scatter_alpha )keyword_argument (keyword_argument (identifier_title) identifier_title (identifier_title) identifier_title )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_visualizer) identifier_visualizer (identifier_fit_draw_poof) identifier_fit_draw_poof )attribute (argument_list (identifier_X) identifier_X (identifier_y) identifier_y (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (return_statement (attribute (identifier_visualizer) identifier_visualizer (identifier_ax) identifier_ax )attribute )return_statement )block )function_definition )module
DecisionBoundariesVisualizer is a bivariate data visualization algorithm that plots the decision boundaries of each class. This helper function is a quick wrapper to utilize the DecisionBoundariesVisualizers for one-off analysis. Parameters ---------- model : the Scikit-Learn estimator, required Should be an instance of a classifier, else the __init__ will return an error. x : matrix, required The feature name that corresponds to a column name or index postion in the matrix that will be plotted against the x-axis y : array, required The feature name that corresponds to a column name or index postion in the matrix that will be plotted against the y-axis classes : a list of class names for the legend, default: None If classes is None and a y value is passed to fit then the classes are selected from the target vector. features : list of strings, default: None The names of the features or columns show_scatter : boolean, default: True If boolean is True, then a scatter plot with points will be drawn on top of the decision boundary graph step_size : float percentage, default: 0.0025 Determines the step size for creating the numpy meshgrid that will later become the foundation of the decision boundary graph. The default value of 0.0025 means that the step size for constructing the meshgrid will be 0.25%% of differenes of the max and min of x and y for each feature. markers : iterable of strings, default: ,od*vh+ Matplotlib style markers for points on the scatter plot points pcolormesh_alpha : float, default: 0.8 Sets the alpha transparency for the meshgrid of model boundaries scatter_alpha : float, default: 1.0 Sets the alpha transparency for the scatter plot points title : string, default: stringified feature_one and feature_two Sets the title of the visualization kwargs : keyword arguments passed to the super class. Returns ------- ax : matplotlib axes Returns the axes that the decision boundaries graph were drawn on.
(module (function_definition (function_name__parse_patterns) function_name__parse_patterns (parameters (identifier_self) identifier_self (identifier_pattern) identifier_pattern )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_pattern) identifier_pattern )attribute (list )list )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_npatterns) identifier_npatterns )attribute (None) None )assignment )expression_statement (expression_statement (assignment (identifier_npattern) identifier_npattern (list )list )assignment )expression_statement (for_statement (identifier_p) identifier_p (identifier_pattern) identifier_pattern (block (if_statement (call (attribute (identifier__wcparse) identifier__wcparse (identifier_is_negative) identifier_is_negative )attribute (argument_list (identifier_p) identifier_p (attribute (identifier_self) identifier_self (identifier_flags) identifier_flags )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_npattern) identifier_npattern (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_p) identifier_p (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_pattern) identifier_pattern )attribute (identifier_extend) identifier_extend )attribute (argument_list (list_comprehension (call (attribute (call (attribute (identifier__wcparse) identifier__wcparse (identifier_WcPathSplit) identifier_WcPathSplit )attribute (argument_list (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_flags) identifier_flags )attribute )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call (for_in_clause (identifier_x) identifier_x (call (attribute (identifier__wcparse) identifier__wcparse (identifier_expand_braces) identifier_expand_braces )attribute (argument_list (identifier_p) identifier_p (attribute (identifier_self) identifier_self (identifier_flags) identifier_flags )attribute )argument_list )call )for_in_clause )list_comprehension )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (if_statement (identifier_npattern) identifier_npattern (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_npatterns) identifier_npatterns )attribute (call (attribute (identifier__wcparse) identifier__wcparse (identifier_compile) identifier_compile )attribute (argument_list (identifier_npattern) identifier_npattern (binary_operator (attribute (identifier_self) identifier_self (identifier_flags) identifier_flags )attribute (parenthesized_expression (binary_operator (attribute (identifier__wcparse) identifier__wcparse (identifier_NEGATE) identifier_NEGATE )attribute (attribute (identifier__wcparse) identifier__wcparse (identifier_REALPATH) identifier_REALPATH )attribute )binary_operator )parenthesized_expression )binary_operator )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier_pattern) identifier_pattern )attribute )not_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_npatterns) identifier_npatterns )attribute (None) None )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_pattern) identifier_pattern )attribute (identifier_append) identifier_append )attribute (argument_list (call (attribute (call (attribute (identifier__wcparse) identifier__wcparse (identifier_WcPathSplit) identifier_WcPathSplit )attribute (argument_list (parenthesized_expression (conditional_expression (string_b'**') string_b'**' (attribute (identifier_self) identifier_self (identifier_is_bytes) identifier_is_bytes )attribute (string_'**') string_'**' )conditional_expression )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_flags) identifier_flags )attribute )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Parse patterns.
(module (function_definition (function_name_to_inches) function_name_to_inches (parameters (identifier_value) identifier_value (identifier_units) identifier_units )parameters (block (expression_statement (assignment (identifier_lookup) identifier_lookup (dictionary (pair (string_'in') string_'in' (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (identifier_x) identifier_x )lambda )pair (pair (string_'cm') string_'cm' (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (binary_operator (identifier_x) identifier_x (float_2.54) float_2.54 )binary_operator )lambda )pair (pair (string_'mm') string_'mm' (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (binary_operator (identifier_x) identifier_x (parenthesized_expression (binary_operator (float_2.54) float_2.54 (integer_10) integer_10 )binary_operator )parenthesized_expression )binary_operator )lambda )pair )dictionary )assignment )expression_statement (try_statement (block (return_statement (call (subscript (identifier_lookup) identifier_lookup (identifier_units) identifier_units )subscript (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_PlotnineError) identifier_PlotnineError (argument_list (call (attribute (string_"Unknown units '{}'") string_"Unknown units '{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_units) identifier_units )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Convert value to inches Parameters ---------- value : float Value to be converted units : str Units of value. Must be one of `['in', 'cm', 'mm']`.
(module (function_definition (function_name_fetch_entities) function_name_fetch_entities (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_query) identifier_query (call (identifier_text) identifier_text (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_perform_query) identifier_perform_query )attribute (argument_list (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_entities) identifier_entities (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_domains) identifier_domains (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (list_pattern (identifier_entity) identifier_entity )list_pattern (identifier_response) identifier_response (block (expression_statement (assignment (identifier_domain) identifier_domain (subscript (call (attribute (identifier_entity) identifier_entity (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_domains) identifier_domains (identifier_add) identifier_add )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (identifier_entities) identifier_entities (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_domain) identifier_domain (list )list )argument_list )call (identifier_append) identifier_append )attribute (argument_list (identifier_entity) identifier_entity )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__domains) identifier__domains )attribute (call (identifier_list) identifier_list (argument_list (identifier_domains) identifier_domains )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__entities) identifier__entities )attribute (identifier_entities) identifier_entities )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"There are {} entities with data") string_"There are {} entities with data" (identifier_format) identifier_format )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_entities) identifier_entities )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Fetch entities for which we have data.
(module (function_definition (function_name_createDocument_) function_name_createDocument_ (parameters (identifier_self) identifier_self (default_parameter (identifier_initDict) identifier_initDict (None) None )default_parameter )parameters (block (expression_statement (string_"create and returns a completely empty document or one populated with initDict") string_"create and returns a completely empty document or one populated with initDict" )expression_statement (if_statement (comparison_operator (identifier_initDict) identifier_initDict (None) None )comparison_operator (block (expression_statement (assignment (identifier_initV) identifier_initV (dictionary )dictionary )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_initV) identifier_initV (identifier_initDict) identifier_initDict )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_documentClass) identifier_documentClass )attribute (argument_list (identifier_self) identifier_self (identifier_initV) identifier_initV )argument_list )call )return_statement )block )function_definition )module
create and returns a completely empty document or one populated with initDict
(module (function_definition (function_name_recursive_iterator) function_name_recursive_iterator (parameters (identifier_func) identifier_func )parameters (block (expression_statement (assignment (identifier_tee_store) identifier_tee_store (dictionary )dictionary )assignment )expression_statement (decorated_definition (decorator (call (attribute (attribute (identifier__coconut) identifier__coconut (identifier_functools) identifier_functools )attribute (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_recursive_iterator_func) function_name_recursive_iterator_func (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_hashable_args_kwargs) identifier_hashable_args_kwargs (call (attribute (attribute (identifier__coconut) identifier__coconut (identifier_pickle) identifier_pickle )attribute (identifier_dumps) identifier_dumps )attribute (argument_list (tuple (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )tuple (attribute (attribute (identifier__coconut) identifier__coconut (identifier_pickle) identifier_pickle )attribute (identifier_HIGHEST_PROTOCOL) identifier_HIGHEST_PROTOCOL )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_to_tee) identifier_to_tee (subscript (identifier_tee_store) identifier_tee_store (identifier_hashable_args_kwargs) identifier_hashable_args_kwargs )subscript )assignment )expression_statement )block (except_clause (attribute (identifier__coconut) identifier__coconut (identifier_KeyError) identifier_KeyError )attribute (block (expression_statement (assignment (identifier_to_tee) identifier_to_tee (call (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (pattern_list (subscript (identifier_tee_store) identifier_tee_store (identifier_hashable_args_kwargs) identifier_hashable_args_kwargs )subscript (identifier_to_return) identifier_to_return )pattern_list (call (identifier__coconut_tee) identifier__coconut_tee (argument_list (identifier_to_tee) identifier_to_tee )argument_list )call )assignment )expression_statement (return_statement (identifier_to_return) identifier_to_return )return_statement )block )function_definition )decorated_definition (return_statement (identifier_recursive_iterator_func) identifier_recursive_iterator_func )return_statement )block )function_definition )module
Decorates a function by optimizing it for iterator recursion. Requires function arguments to be pickleable.
(module (function_definition (function_name_diff_medians) function_name_diff_medians (parameters (identifier_array_one) identifier_array_one (identifier_array_two) identifier_array_two )parameters (block (expression_statement (assignment (identifier_array_one) identifier_array_one (call (identifier_check_array) identifier_check_array (argument_list (identifier_array_one) identifier_array_one )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_array_two) identifier_array_two (call (identifier_check_array) identifier_check_array (argument_list (identifier_array_two) identifier_array_two )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_diff_medians) identifier_diff_medians (binary_operator (call (attribute (attribute (identifier_np) identifier_np (identifier_ma) identifier_ma )attribute (identifier_median) identifier_median )attribute (argument_list (identifier_array_one) identifier_array_one )argument_list )call (call (attribute (attribute (identifier_np) identifier_np (identifier_ma) identifier_ma )attribute (identifier_median) identifier_median )attribute (argument_list (identifier_array_two) identifier_array_two )argument_list )call )binary_operator )assignment )expression_statement (return_statement (identifier_diff_medians) identifier_diff_medians )return_statement )block )function_definition )module
Computes the difference in medians between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable Two arrays of values, possibly of different length. Returns ------- diff_medians : float scalar measuring the difference in medians, ignoring NaNs/non-finite values. Raises ------ ValueError If one or more of the arrays are empty.
(module (function_definition (function_name_unperturbed_hamiltonian) function_name_unperturbed_hamiltonian (parameters (identifier_states) identifier_states )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_Ne) identifier_Ne (call (identifier_len) identifier_len (argument_list (identifier_states) identifier_states )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_H0) identifier_H0 (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (tuple (identifier_Ne) identifier_Ne (identifier_Ne) identifier_Ne )tuple (identifier_complex) identifier_complex )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_Ne) identifier_Ne )argument_list )call (block (expression_statement (assignment (subscript (identifier_H0) identifier_H0 (identifier_i) identifier_i (identifier_i) identifier_i )subscript (binary_operator (identifier_hbar) identifier_hbar (attribute (subscript (identifier_states) identifier_states (identifier_i) identifier_i )subscript (identifier_omega) identifier_omega )attribute )binary_operator )assignment )expression_statement )block )for_statement (return_statement (identifier_H0) identifier_H0 )return_statement )block )function_definition )module
r"""Return the unperturbed atomic hamiltonian for given states. We calcualte the atomic hamiltonian in the basis of the ground states of \ rubidium 87 (in GHz). >>> g = State("Rb", 87, 5, 0, 1/Integer(2)) >>> magnetic_states = make_list_of_states([g], "magnetic") >>> print(np.diag(unperturbed_hamiltonian(magnetic_states))/hbar/2/pi*1e-9) [-4.2717+0.j -4.2717+0.j -4.2717+0.j 2.563 +0.j 2.563 +0.j 2.563 +0.j 2.563 +0.j 2.563 +0.j]
(module (function_definition (function_name__run_select) function_name__run_select (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__connection) identifier__connection )attribute (identifier_select) identifier_select )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_to_sql) identifier_to_sql )attribute (argument_list )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_get_bindings) identifier_get_bindings )attribute (argument_list )argument_list )call (not_operator (attribute (identifier_self) identifier_self (identifier__use_write_connection) identifier__use_write_connection )attribute )not_operator )argument_list )call )return_statement )block )function_definition )module
Run the query as a "select" statement against the connection. :return: The result :rtype: list
(module (function_definition (function_name_check_status_logfile) function_name_check_status_logfile (parameters (identifier_self) identifier_self (identifier_checker_func) identifier_checker_func )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (call (identifier_checker_func) identifier_checker_func (argument_list (attribute (identifier_self) identifier_self (identifier_logfile) identifier_logfile )attribute )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute )return_statement )block )function_definition )module
Check on the status of this particular job using the logfile
(module (function_definition (function_name__del_flow_entry) function_name__del_flow_entry (parameters (identifier_self) identifier_self (identifier_datapath) identifier_datapath (identifier_in_port) identifier_in_port (identifier_dst) identifier_dst (default_parameter (identifier_src) identifier_src (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_del_flow) identifier_del_flow (call (attribute (attribute (identifier_self) identifier_self (identifier__del_flow_func) identifier__del_flow_func )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (attribute (identifier_datapath) identifier_datapath (identifier_ofproto) identifier_ofproto )attribute (identifier_OFP_VERSION) identifier_OFP_VERSION )attribute )argument_list )call )assignment )expression_statement (assert_statement (identifier_del_flow) identifier_del_flow )assert_statement (expression_statement (call (identifier_del_flow) identifier_del_flow (argument_list (identifier_datapath) identifier_datapath (identifier_in_port) identifier_in_port (identifier_dst) identifier_dst (identifier_src) identifier_src )argument_list )call )expression_statement )block )function_definition )module
remove a flow entry.
(module (function_definition (function_name_interpolate_string) function_name_interpolate_string (parameters (identifier_self) identifier_self (identifier_testString) identifier_testString (identifier_section) identifier_section )parameters (block (expression_statement (assignment (identifier_reObj) identifier_reObj (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r"\$\{.*?\}") string_r"\$\{.*?\}" (identifier_testString) identifier_testString )argument_list )call )assignment )expression_statement (while_statement (identifier_reObj) identifier_reObj (block (expression_statement (assignment (identifier_repString) identifier_repString (subscript (call (attribute (parenthesized_expression (identifier_reObj) identifier_reObj )parenthesized_expression (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call (slice (integer_2) integer_2 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_splitString) identifier_splitString (call (attribute (identifier_repString) identifier_repString (identifier_split) identifier_split )attribute (argument_list (string_'|') string_'|' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_splitString) identifier_splitString )argument_list )call (integer_1) integer_1 )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_testString) identifier_testString (call (attribute (identifier_testString) identifier_testString (identifier_replace) identifier_replace )attribute (argument_list (binary_operator (binary_operator (string_'${') string_'${' (identifier_repString) identifier_repString )binary_operator (string_'}') string_'}' )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_section) identifier_section (subscript (identifier_splitString) identifier_splitString (integer_0) integer_0 )subscript )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_ConfigParser) identifier_ConfigParser (identifier_NoOptionError) identifier_NoOptionError )attribute (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Substitution failed") string_"Substitution failed" )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_splitString) identifier_splitString )argument_list )call (integer_2) integer_2 )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_testString) identifier_testString (call (attribute (identifier_testString) identifier_testString (identifier_replace) identifier_replace )attribute (argument_list (binary_operator (binary_operator (string_'${') string_'${' (identifier_repString) identifier_repString )binary_operator (string_'}') string_'}' )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (subscript (identifier_splitString) identifier_splitString (integer_0) integer_0 )subscript (subscript (identifier_splitString) identifier_splitString (integer_1) integer_1 )subscript )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_ConfigParser) identifier_ConfigParser (identifier_NoOptionError) identifier_NoOptionError )attribute (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Substitution failed") string_"Substitution failed" )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (identifier_reObj) identifier_reObj (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r"\$\{.*?\}") string_r"\$\{.*?\}" (identifier_testString) identifier_testString )argument_list )call )assignment )expression_statement )block )while_statement (return_statement (identifier_testString) identifier_testString )return_statement )block )function_definition )module
Take a string and replace all example of ExtendedInterpolation formatting within the string with the exact value. For values like ${example} this is replaced with the value that corresponds to the option called example ***in the same section*** For values like ${common|example} this is replaced with the value that corresponds to the option example in the section [common]. Note that in the python3 config parser this is ${common:example} but python2.7 interprets the : the same as a = and this breaks things Nested interpolation is not supported here. Parameters ---------- testString : String The string to parse and interpolate section : String The current section of the ConfigParser object Returns ---------- testString : String Interpolated string
(module (function_definition (function_name_validate_uuid) function_name_validate_uuid (parameters (identifier_value) identifier_value )parameters (block (if_statement (boolean_operator (identifier_value) identifier_value (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_UUID) identifier_UUID )argument_list )call )not_operator )boolean_operator (block (try_statement (block (return_statement (call (identifier_UUID) identifier_UUID (argument_list (call (identifier_str) identifier_str (argument_list (identifier_value) identifier_value )argument_list )call (keyword_argument (identifier_version) identifier_version (integer_4) integer_4 )keyword_argument )argument_list )call )return_statement )block (except_clause (tuple (identifier_AttributeError) identifier_AttributeError (identifier_ValueError) identifier_ValueError )tuple (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (string_'not a valid UUID') string_'not a valid UUID' )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
UUID 128-bit validator
(module (function_definition (function_name_publish_pdb_state) function_name_publish_pdb_state (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier__pdb_obj) identifier__pdb_obj )attribute (attribute (identifier_self) identifier_self (identifier__do_publish_pdb_state) identifier__do_publish_pdb_state )attribute )boolean_operator (block (expression_statement (assignment (identifier_state) identifier_state (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_namespace_view) identifier_namespace_view (call (attribute (identifier_self) identifier_self (identifier_get_namespace_view) identifier_get_namespace_view )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_var_properties) identifier_var_properties (call (attribute (identifier_self) identifier_self (identifier_get_var_properties) identifier_get_var_properties )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_step) identifier_step (attribute (identifier_self) identifier_self (identifier__pdb_step) identifier__pdb_step )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_spyder_msg) identifier_send_spyder_msg )attribute (argument_list (string_'pdb_state') string_'pdb_state' (keyword_argument (identifier_content) identifier_content (dictionary (pair (string_'pdb_state') string_'pdb_state' (identifier_state) identifier_state )pair )dictionary )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__do_publish_pdb_state) identifier__do_publish_pdb_state )attribute (True) True )assignment )expression_statement )block )function_definition )module
Publish Variable Explorer state and Pdb step through send_spyder_msg.
(module (function_definition (function_name__set_repo) function_name__set_repo (parameters (identifier_self) identifier_self (identifier_url) identifier_url )parameters (block (if_statement (call (attribute (identifier_url) identifier_url (identifier_startswith) identifier_startswith )attribute (argument_list (string_'http') string_'http' )argument_list )call (block (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_repo) identifier_repo )attribute (call (identifier_Proxy) identifier_Proxy (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ProxyError) identifier_ProxyError (identifier_e) identifier_e (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (binary_operator (string_'Error setting repo: %s') string_'Error setting repo: %s' (identifier_url) identifier_url )binary_operator )argument_list )call )expression_statement (raise_statement (call (identifier_GritError) identifier_GritError (argument_list (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause )try_statement )block (else_clause (block (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_repo) identifier_repo )attribute (call (identifier_Local) identifier_Local (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement )block (except_clause (identifier_NotGitRepository) identifier_NotGitRepository (block (raise_statement (call (identifier_GritError) identifier_GritError (argument_list (binary_operator (string_'Invalid url: %s') string_'Invalid url: %s' (identifier_url) identifier_url )binary_operator )argument_list )call )raise_statement )block )except_clause (except_clause (identifier_Exception) identifier_Exception (identifier_e) identifier_e (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (binary_operator (string_'Error setting repo: %s') string_'Error setting repo: %s' (identifier_url) identifier_url )binary_operator )argument_list )call )expression_statement (raise_statement (call (identifier_GritError) identifier_GritError (argument_list (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause )try_statement )block )else_clause )if_statement )block )function_definition )module
sets the underlying repo object
(module (function_definition (function_name_mouse_release_event) function_name_mouse_release_event (parameters (identifier_self) identifier_self (identifier_x) identifier_x (identifier_y) identifier_y (identifier_button) identifier_button )parameters (block (if_statement (comparison_operator (identifier_button) identifier_button (integer_1) integer_1 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Left mouse button released @") string_"Left mouse button released @" (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_button) identifier_button (integer_2) integer_2 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Right mouse button released @") string_"Right mouse button released @" (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Reports left and right mouse button releases + position
(module (function_definition (function_name_create_transcript_file) function_name_create_transcript_file (parameters (identifier_video_id) identifier_video_id (identifier_language_code) identifier_language_code (identifier_file_format) identifier_file_format (identifier_resource_fs) identifier_resource_fs (identifier_static_dir) identifier_static_dir )parameters (block (expression_statement (assignment (identifier_transcript_filename) identifier_transcript_filename (call (attribute (string_'{video_id}-{language_code}.srt') string_'{video_id}-{language_code}.srt' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_video_id) identifier_video_id (identifier_video_id) identifier_video_id )keyword_argument (keyword_argument (identifier_language_code) identifier_language_code (identifier_language_code) identifier_language_code )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_transcript_data) identifier_transcript_data (call (identifier_get_video_transcript_data) identifier_get_video_transcript_data (argument_list (identifier_video_id) identifier_video_id (identifier_language_code) identifier_language_code )argument_list )call )assignment )expression_statement (if_statement (identifier_transcript_data) identifier_transcript_data (block (expression_statement (assignment (identifier_transcript_content) identifier_transcript_content (call (attribute (identifier_Transcript) identifier_Transcript (identifier_convert) identifier_convert )attribute (argument_list (subscript (identifier_transcript_data) identifier_transcript_data (string_'content') string_'content' )subscript (keyword_argument (identifier_input_format) identifier_input_format (identifier_file_format) identifier_file_format )keyword_argument (keyword_argument (identifier_output_format) identifier_output_format (attribute (identifier_Transcript) identifier_Transcript (identifier_SRT) identifier_SRT )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_create_file_in_fs) identifier_create_file_in_fs (argument_list (identifier_transcript_content) identifier_transcript_content (identifier_transcript_filename) identifier_transcript_filename (identifier_resource_fs) identifier_resource_fs (identifier_static_dir) identifier_static_dir )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_transcript_filename) identifier_transcript_filename )return_statement )block )function_definition )module
Writes transcript file to file system. Arguments: video_id (str): Video id of the video transcript file is attached. language_code (str): Language code of the transcript. file_format (str): File format of the transcript file. static_dir (str): The Directory to store transcript file. resource_fs (SubFS): The file system to store transcripts.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_source_) identifier_source_ (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_connect) identifier_connect )attribute (argument_list )argument_list )call )await )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_source_) identifier_source_ (attribute (identifier_peewee) identifier_peewee (identifier_Query) identifier_Query )attribute )argument_list )call (block (expression_statement (assignment (identifier_query) identifier_query (identifier_source_) identifier_source_ )assignment )expression_statement (expression_statement (assignment (identifier_model) identifier_model (attribute (identifier_query) identifier_query (identifier_model) identifier_model )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_source_) identifier_source_ (identifier_select) identifier_select )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_model) identifier_model (identifier_source_) identifier_source_ )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_conditions) identifier_conditions (binary_operator (call (identifier_list) identifier_list (argument_list (identifier_args) identifier_args )argument_list )call (list_comprehension (parenthesized_expression (comparison_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_model) identifier_model (identifier_k) identifier_k )argument_list )call (identifier_v) identifier_v )comparison_operator )parenthesized_expression (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )binary_operator )assignment )expression_statement (if_statement (identifier_conditions) identifier_conditions (block (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_query) identifier_query (identifier_where) identifier_where )attribute (argument_list (list_splat (identifier_conditions) identifier_conditions )list_splat )argument_list )call )assignment )expression_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (await (call (attribute (identifier_self) identifier_self (identifier_execute) identifier_execute )attribute (argument_list (identifier_query) identifier_query )argument_list )call )await )assignment )expression_statement (return_statement (subscript (call (identifier_list) identifier_list (argument_list (identifier_result) identifier_result )argument_list )call (integer_0) integer_0 )subscript )return_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (raise_statement (attribute (identifier_model) identifier_model (identifier_DoesNotExist) identifier_DoesNotExist )attribute )raise_statement )block )except_clause )try_statement )block )function_definition )module
Get the model instance. :param source_: model or base query for lookup Example:: async def my_async_func(): obj1 = await objects.get(MyModel, id=1) obj2 = await objects.get(MyModel, MyModel.id==1) obj3 = await objects.get(MyModel.select().where(MyModel.id==1)) All will return `MyModel` instance with `id = 1`
(module (function_definition (function_name_to_dataframe) function_name_to_dataframe (parameters (identifier_self) identifier_self (default_parameter (identifier_extra_edges_columns) identifier_extra_edges_columns (list )list )default_parameter )parameters (block (return_statement (call (attribute (identifier_df_util) identifier_df_util (identifier_to_dataframe) identifier_to_dataframe )attribute (argument_list (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___url) identifier___url )attribute )argument_list )call (identifier_json) identifier_json )attribute (argument_list )argument_list )call (keyword_argument (identifier_edges_attr_cols) identifier_edges_attr_cols (identifier_extra_edges_columns) identifier_extra_edges_columns )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return this network in pandas DataFrame. :return: Network as DataFrame. This is equivalent to SIF.
(module (function_definition (function_name__clauses) function_name__clauses (parameters (identifier_lexer) identifier_lexer (identifier_varname) identifier_varname (identifier_nvars) identifier_nvars )parameters (block (expression_statement (assignment (identifier_tok) identifier_tok (call (identifier_next) identifier_next (argument_list (identifier_lexer) identifier_lexer )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_toktype) identifier_toktype (call (identifier_type) identifier_type (argument_list (identifier_tok) identifier_tok )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_toktype) identifier_toktype (identifier_OP_not) identifier_OP_not )comparison_operator (comparison_operator (identifier_toktype) identifier_toktype (identifier_IntegerToken) identifier_IntegerToken )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_lexer) identifier_lexer (identifier_unpop_token) identifier_unpop_token )attribute (argument_list (identifier_tok) identifier_tok )argument_list )call )expression_statement (expression_statement (assignment (identifier_first) identifier_first (call (identifier__clause) identifier__clause (argument_list (identifier_lexer) identifier_lexer (identifier_varname) identifier_varname (identifier_nvars) identifier_nvars )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rest) identifier_rest (call (identifier__clauses) identifier__clauses (argument_list (identifier_lexer) identifier_lexer (identifier_varname) identifier_varname (identifier_nvars) identifier_nvars )argument_list )call )assignment )expression_statement (return_statement (binary_operator (tuple (identifier_first) identifier_first )tuple (identifier_rest) identifier_rest )binary_operator )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_lexer) identifier_lexer (identifier_unpop_token) identifier_unpop_token )attribute (argument_list (identifier_tok) identifier_tok )argument_list )call )expression_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Return a tuple of DIMACS CNF clauses.
(module (function_definition (function_name_get_nts) function_name_get_nts (parameters (identifier_self) identifier_self (default_parameter (identifier_goids) identifier_goids (None) None )default_parameter (default_parameter (identifier_sortby) identifier_sortby (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_nts) identifier_nts (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_goids) identifier_goids (None) None )comparison_operator (block (expression_statement (assignment (identifier_goids) identifier_goids (attribute (identifier_self) identifier_self (identifier_go_sources) identifier_go_sources )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (call (identifier_chk_goids) identifier_chk_goids (argument_list (identifier_goids) identifier_goids (string_"GoSubDag::get_nts") string_"GoSubDag::get_nts" )argument_list )call )expression_statement )block )else_clause )if_statement (if_statement (identifier_goids) identifier_goids (block (expression_statement (assignment (identifier_ntobj) identifier_ntobj (call (attribute (identifier_cx) identifier_cx (identifier_namedtuple) identifier_namedtuple )attribute (argument_list (string_"NtGo") string_"NtGo" (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_prt_attr) identifier_prt_attr )attribute (string_'flds') string_'flds' )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_go2nt) identifier_go2nt (call (attribute (identifier_self) identifier_self (identifier_get_go2nt) identifier_get_go2nt )attribute (argument_list (identifier_goids) identifier_goids )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_goid) identifier_goid (identifier_ntgo) identifier_ntgo )pattern_list (call (attribute (identifier_self) identifier_self (identifier__get_sorted_go2nt) identifier__get_sorted_go2nt )attribute (argument_list (identifier_go2nt) identifier_go2nt (identifier_sortby) identifier_sortby )argument_list )call (block (assert_statement (comparison_operator (identifier_ntgo) identifier_ntgo (None) None )comparison_operator (call (attribute (string_"{GO} NOT IN go2nt") string_"{GO} NOT IN go2nt" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_GO) identifier_GO (identifier_goid) identifier_goid )keyword_argument )argument_list )call )assert_statement (if_statement (comparison_operator (identifier_goid) identifier_goid (attribute (identifier_ntgo) identifier_ntgo (identifier_GO) identifier_GO )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_nts) identifier_nts (identifier_append) identifier_append )attribute (argument_list (identifier_ntgo) identifier_ntgo )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_fld2vals) identifier_fld2vals (call (attribute (identifier_ntgo) identifier_ntgo (identifier__asdict) identifier__asdict )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_fld2vals) identifier_fld2vals (string_'GO') string_'GO' )subscript (identifier_goid) identifier_goid )assignment )expression_statement (expression_statement (call (attribute (identifier_nts) identifier_nts (identifier_append) identifier_append )attribute (argument_list (call (identifier_ntobj) identifier_ntobj (argument_list (dictionary_splat (identifier_fld2vals) identifier_fld2vals )dictionary_splat )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )if_statement (return_statement (identifier_nts) identifier_nts )return_statement )block )function_definition )module
Given GO IDs, get a list of namedtuples.
(module (function_definition (function_name_prevPlot) function_name_prevPlot (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_stacker) identifier_stacker )attribute (identifier_currentIndex) identifier_currentIndex )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_stacker) identifier_stacker )attribute (identifier_setCurrentIndex) identifier_setCurrentIndex )attribute (argument_list (binary_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_stacker) identifier_stacker )attribute (identifier_currentIndex) identifier_currentIndex )attribute (argument_list )argument_list )call (integer_1) integer_1 )binary_operator )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Moves the displayed plot to the previous one
(module (function_definition (function_name_to_timedelta) function_name_to_timedelta (parameters (identifier_value) identifier_value (default_parameter (identifier_strict) identifier_strict (True) True )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_int) identifier_int )argument_list )call (block (return_statement (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_seconds) identifier_seconds (identifier_value) identifier_value )keyword_argument )argument_list )call )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_timedelta) identifier_timedelta )argument_list )call (block (return_statement (identifier_value) identifier_value )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_hours) identifier_hours (identifier_minutes) identifier_minutes (identifier_seconds) identifier_seconds )pattern_list (call (identifier__parse) identifier__parse (argument_list (identifier_value) identifier_value (identifier_strict) identifier_strict )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (call (identifier_check_tuple) identifier_check_tuple (argument_list (identifier_value) identifier_value (identifier_strict) identifier_strict )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_hours) identifier_hours (identifier_minutes) identifier_minutes (identifier_seconds) identifier_seconds )pattern_list (identifier_value) identifier_value )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'Value %s (type %s) not supported') string_'Value %s (type %s) not supported' (tuple (identifier_value) identifier_value (attribute (call (identifier_type) identifier_type (argument_list (identifier_value) identifier_value )argument_list )call (identifier___name__) identifier___name__ )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_hours) identifier_hours (identifier_hours) identifier_hours )keyword_argument (keyword_argument (identifier_minutes) identifier_minutes (identifier_minutes) identifier_minutes )keyword_argument (keyword_argument (identifier_seconds) identifier_seconds (identifier_seconds) identifier_seconds )keyword_argument )argument_list )call )return_statement )block )function_definition )module
converts duration string to timedelta strict=True (by default) raises StrictnessError if either hours, minutes or seconds in duration string exceed allowed values
(module (function_definition (function_name_calibration_stimulus) function_name_calibration_stimulus (parameters (identifier_self) identifier_self (identifier_mode) identifier_mode )parameters (block (if_statement (comparison_operator (identifier_mode) identifier_mode (string_'tone') string_'tone' )comparison_operator (block (return_statement (attribute (attribute (identifier_self) identifier_self (identifier_tone_calibrator) identifier_tone_calibrator )attribute (identifier_stimulus) identifier_stimulus )attribute )return_statement )block (elif_clause (comparison_operator (identifier_mode) identifier_mode (string_'noise') string_'noise' )comparison_operator (block (return_statement (attribute (attribute (identifier_self) identifier_self (identifier_bs_calibrator) identifier_bs_calibrator )attribute (identifier_stimulus) identifier_stimulus )attribute )return_statement )block )elif_clause )if_statement )block )function_definition )module
Gets the stimulus model for calibration :param mode: Type of stimulus to get: tone or noise :type mode: str :returns: :class:`StimulusModel<sparkle.stim.stimulus_model.StimulusModel>`
(module (function_definition (function_name_get_file_hash) function_name_get_file_hash (parameters (identifier_fpath) identifier_fpath (default_parameter (identifier_blocksize) identifier_blocksize (integer_65536) integer_65536 )default_parameter (default_parameter (identifier_hasher) identifier_hasher (None) None )default_parameter (default_parameter (identifier_stride) identifier_stride (integer_1) integer_1 )default_parameter (default_parameter (identifier_hexdigest) identifier_hexdigest (False) False )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (comparison_operator (identifier_hasher) identifier_hasher (None) None )comparison_operator (block (expression_statement (assignment (identifier_hasher) identifier_hasher (call (attribute (identifier_hashlib) identifier_hashlib (identifier_sha1) identifier_sha1 )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_fpath) identifier_fpath (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_file_) identifier_file_ )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier_file_) identifier_file_ (identifier_read) identifier_read )attribute (argument_list (identifier_blocksize) identifier_blocksize )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_buf) identifier_buf )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_hasher) identifier_hasher (identifier_update) identifier_update )attribute (argument_list (identifier_buf) identifier_buf )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_stride) identifier_stride (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_file_) identifier_file_ (identifier_seek) identifier_seek )attribute (argument_list (binary_operator (identifier_blocksize) identifier_blocksize (parenthesized_expression (binary_operator (identifier_stride) identifier_stride (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator (integer_1) integer_1 )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier_file_) identifier_file_ (identifier_read) identifier_read )attribute (argument_list (identifier_blocksize) identifier_blocksize )argument_list )call )assignment )expression_statement )block )while_statement (if_statement (identifier_hexdigest) identifier_hexdigest (block (return_statement (call (attribute (identifier_hasher) identifier_hasher (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_hasher) identifier_hasher (identifier_digest) identifier_digest )attribute (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block )with_statement )block )function_definition )module
r""" For better hashes use hasher=hashlib.sha256, and keep stride=1 Args: fpath (str): file path string blocksize (int): 2 ** 16. Affects speed of reading file hasher (None): defaults to sha1 for fast (but insecure) hashing stride (int): strides > 1 skip data to hash, useful for faster hashing, but less accurate, also makes hash dependant on blocksize. References: http://stackoverflow.com/questions/3431825/generating-a-md5-checksum-of-a-file http://stackoverflow.com/questions/5001893/when-should-i-use-sha-1-and-when-should-i-use-sha-2 CommandLine: python -m utool.util_hash --test-get_file_hash python -m utool.util_hash --test-get_file_hash:0 python -m utool.util_hash --test-get_file_hash:1 Example: >>> # DISABLE_DOCTEST >>> from utool.util_hash import * # NOQA >>> fpath = ut.grab_test_imgpath('patsy.jpg') >>> #blocksize = 65536 # 2 ** 16 >>> blocksize = 2 ** 16 >>> hasher = None >>> stride = 1 >>> hashbytes_20 = get_file_hash(fpath, blocksize, hasher, stride) >>> result = repr(hashbytes_20) >>> print(result) '7\x07B\x0eX<sRu\xa2\x90P\xda\xb2\x84?\x81?\xa9\xd9' '\x13\x9b\xf6\x0f\xa3QQ \xd7"$\xe9m\x05\x9e\x81\xf6\xf2v\xe4' '\x16\x00\x80Xx\x8c-H\xcdP\xf6\x02\x9frl\xbf\x99VQ\xb5' Example: >>> # DISABLE_DOCTEST >>> from utool.util_hash import * # NOQA >>> #fpath = ut.grab_file_url('http://en.wikipedia.org/wiki/List_of_comets_by_type') >>> fpath = ut.unixjoin(ut.ensure_app_resource_dir('utool'), 'tmp.txt') >>> ut.write_to(fpath, ut.lorium_ipsum()) >>> blocksize = 2 ** 3 >>> hasher = None >>> stride = 2 >>> hashbytes_20 = get_file_hash(fpath, blocksize, hasher, stride) >>> result = repr(hashbytes_20) >>> print(result) '5KP\xcf>R\xf6\xffO:L\xac\x9c\xd3V+\x0e\xf6\xe1n' Ignore: file_ = open(fpath, 'rb')
(module (function_definition (function_name__http_get) function_name__http_get (parameters (identifier_self) identifier_self (identifier_url) identifier_url (identifier_query) identifier_query )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_authorization_as_header) identifier_authorization_as_header )attribute )not_operator (block (expression_statement (call (attribute (identifier_query) identifier_query (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'access_token') string_'access_token' (attribute (identifier_self) identifier_self (identifier_access_token) identifier_access_token )attribute )pair )dictionary )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_response) identifier_response (None) None )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__normalize_query) identifier__normalize_query )attribute (argument_list (identifier_query) identifier_query )argument_list )call )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (dictionary (pair (string_'params') string_'params' (identifier_query) identifier_query )pair (pair (string_'headers') string_'headers' (call (attribute (identifier_self) identifier_self (identifier__request_headers) identifier__request_headers )attribute (argument_list )argument_list )call )pair )dictionary )assignment )expression_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier__has_proxy) identifier__has_proxy )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'proxies') string_'proxies' )subscript (call (attribute (identifier_self) identifier_self (identifier__proxy_parameters) identifier__proxy_parameters )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (argument_list (identifier_url) identifier_url )argument_list )call (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (integer_429) integer_429 )comparison_operator (block (raise_statement (call (identifier_RateLimitExceededError) identifier_RateLimitExceededError (argument_list (identifier_response) identifier_response )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Performs the HTTP GET Request.
(module (function_definition (function_name_eval_nonagg_call) function_name_eval_nonagg_call (parameters (identifier_self) identifier_self (identifier_exp) identifier_exp )parameters (block (expression_statement (string_"helper for eval_callx; evaluator for CallX that consume a single value") string_"helper for eval_callx; evaluator for CallX that consume a single value" )expression_statement (expression_statement (assignment (identifier_args) identifier_args (call (attribute (identifier_self) identifier_self (identifier_eval) identifier_eval )attribute (argument_list (attribute (identifier_exp) identifier_exp (identifier_args) identifier_args )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_exp) identifier_exp (identifier_f) identifier_f )attribute (string_'coalesce') string_'coalesce' )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_a) identifier_a (identifier_b) identifier_b )pattern_list (identifier_args) identifier_args )assignment )expression_statement (return_statement (conditional_expression (identifier_b) identifier_b (comparison_operator (identifier_a) identifier_a (None) None )comparison_operator (identifier_a) identifier_a )conditional_expression )return_statement )block (elif_clause (comparison_operator (attribute (identifier_exp) identifier_exp (identifier_f) identifier_f )attribute (string_'unnest') string_'unnest' )comparison_operator (block (return_statement (subscript (call (attribute (identifier_self) identifier_self (identifier_eval) identifier_eval )attribute (argument_list (attribute (identifier_exp) identifier_exp (identifier_args) identifier_args )attribute )argument_list )call (integer_0) integer_0 )subscript )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_exp) identifier_exp (identifier_f) identifier_f )attribute (tuple (string_'to_tsquery') string_'to_tsquery' (string_'to_tsvector') string_'to_tsvector' )tuple )comparison_operator (block (return_statement (call (identifier_set) identifier_set (argument_list (call (attribute (call (attribute (identifier_self) identifier_self (identifier_eval) identifier_eval )attribute (argument_list (subscript (attribute (attribute (identifier_exp) identifier_exp (identifier_args) identifier_args )attribute (identifier_children) identifier_children )attribute (integer_0) integer_0 )subscript )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (string_'unk_function') string_'unk_function' (attribute (identifier_exp) identifier_exp (identifier_f) identifier_f )attribute )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
helper for eval_callx; evaluator for CallX that consume a single value
(module (function_definition (function_name_search) function_name_search (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ApiObjectGroupPermissionGeneral) identifier_ApiObjectGroupPermissionGeneral (identifier_self) identifier_self )argument_list )call (identifier_get) identifier_get )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_prepare_url) identifier_prepare_url )attribute (argument_list (string_'api/v3/object-group-perm-general/') string_'api/v3/object-group-perm-general/' (identifier_kwargs) identifier_kwargs )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Method to search object group permissions general based on extends search. :param search: Dict containing QuerySets to find object group permissions general. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override default fields. :param kind: Determine if result will be detailed ('detail') or basic ('basic'). :return: Dict containing object group permissions general
(module (function_definition (function_name_parse) function_name_parse (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_extent) identifier_extent (identifier_desc_tag) identifier_desc_tag )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__initialized) identifier__initialized )attribute (block (raise_statement (call (attribute (identifier_pycdlibexception) identifier_pycdlibexception (identifier_PyCdlibInternalError) identifier_PyCdlibInternalError )attribute (argument_list (string_'UDF Unallocated Space Descriptor already initialized') string_'UDF Unallocated Space Descriptor already initialized' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (tuple_pattern (identifier_tag_unused) identifier_tag_unused (attribute (identifier_self) identifier_self (identifier_vol_desc_seqnum) identifier_vol_desc_seqnum )attribute (identifier_num_alloc_descriptors) identifier_num_alloc_descriptors (identifier_end_unused) identifier_end_unused )tuple_pattern (call (attribute (identifier_struct) identifier_struct (identifier_unpack_from) identifier_unpack_from )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_FMT) identifier_FMT )attribute (identifier_data) identifier_data (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_desc_tag) identifier_desc_tag )attribute (identifier_desc_tag) identifier_desc_tag )assignment )expression_statement (if_statement (comparison_operator (identifier_num_alloc_descriptors) identifier_num_alloc_descriptors (integer_0) integer_0 )comparison_operator (block (raise_statement (call (attribute (identifier_pycdlibexception) identifier_pycdlibexception (identifier_PyCdlibInvalidISO) identifier_PyCdlibInvalidISO )attribute (argument_list (string_'UDF Unallocated Space Descriptor allocated descriptors is not 0') string_'UDF Unallocated Space Descriptor allocated descriptors is not 0' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_orig_extent_loc) identifier_orig_extent_loc )attribute (identifier_extent) identifier_extent )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__initialized) identifier__initialized )attribute (True) True )assignment )expression_statement )block )function_definition )module
Parse the passed in data into a UDF Unallocated Space Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDFTag object that represents the Descriptor Tag. Returns: Nothing.
(module (function_definition (function_name_namedTempFileReader) function_name_namedTempFileReader (parameters (identifier_self) identifier_self )parameters (type (identifier_NamedTempFileReader) identifier_NamedTempFileReader )type (block (expression_statement (assignment (identifier_directory) identifier_directory (call (attribute (identifier_self) identifier_self (identifier__directory) identifier__directory )attribute (argument_list )argument_list )call )assignment )expression_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_directory) identifier_directory (identifier_Directory) identifier_Directory )argument_list )call (parenthesized_expression (binary_operator (string_"Expected Directory, receieved %s") string_"Expected Directory, receieved %s" (identifier_directory) identifier_directory )binary_operator )parenthesized_expression )assert_statement (return_statement (call (identifier_NamedTempFileReader) identifier_NamedTempFileReader (argument_list (identifier_directory) identifier_directory (identifier_self) identifier_self )argument_list )call )return_statement )block )function_definition )module
Named Temporary File Reader This provides an object compatible with NamedTemporaryFile, used for reading this files contents. This will still delete after the object falls out of scope. This solves the problem on windows where a NamedTemporaryFile can not be read while it's being written to
(module (function_definition (function_name_ismethoddescriptor) function_name_ismethoddescriptor (parameters (identifier_object) identifier_object )parameters (block (return_statement (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_object) identifier_object (string_"__get__") string_"__get__" )argument_list )call (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_object) identifier_object (string_"__set__") string_"__set__" )argument_list )call )not_operator )boolean_operator (not_operator (call (identifier_ismethod) identifier_ismethod (argument_list (identifier_object) identifier_object )argument_list )call )not_operator )boolean_operator (not_operator (call (identifier_isfunction) identifier_isfunction (argument_list (identifier_object) identifier_object )argument_list )call )not_operator )boolean_operator (not_operator (call (identifier_isclass) identifier_isclass (argument_list (identifier_object) identifier_object )argument_list )call )not_operator )boolean_operator )parenthesized_expression )return_statement )block )function_definition )module
Return true if the object is a method descriptor. But not if ismethod() or isclass() or isfunction() are true. This is new in Python 2.2, and, for example, is true of int.__add__. An object passing this test has a __get__ attribute but not a __set__ attribute, but beyond that the set of attributes varies. __name__ is usually sensible, and __doc__ often is. Methods implemented via descriptors that also pass one of the other tests return false from the ismethoddescriptor() test, simply because the other tests promise more -- you can, e.g., count on having the im_func attribute (etc) when an object passes ismethod().
(module (function_definition (function_name_provider) function_name_provider (parameters (default_parameter (identifier_func) identifier_func (None) None )default_parameter (keyword_separator )keyword_separator (default_parameter (identifier_singleton) identifier_singleton (False) False )default_parameter (default_parameter (identifier_injector) identifier_injector (None) None )default_parameter )parameters (block (function_definition (function_name_decorator) function_name_decorator (parameters (identifier_func) identifier_func )parameters (block (expression_statement (assignment (identifier_wrapped) identifier_wrapped (call (identifier__wrap_provider_func) identifier__wrap_provider_func (argument_list (identifier_func) identifier_func (dictionary (pair (string_'singleton') string_'singleton' (identifier_singleton) identifier_singleton )pair )dictionary )argument_list )call )assignment )expression_statement (if_statement (identifier_injector) identifier_injector (block (expression_statement (call (attribute (identifier_injector) identifier_injector (identifier_register_provider) identifier_register_provider )attribute (argument_list (identifier_wrapped) identifier_wrapped )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_wrapped) identifier_wrapped )return_statement )block )function_definition (if_statement (identifier_func) identifier_func (block (return_statement (call (identifier_decorator) identifier_decorator (argument_list (identifier_func) identifier_func )argument_list )call )return_statement )block )if_statement (return_statement (identifier_decorator) identifier_decorator )return_statement )block )function_definition )module
Decorator to mark a function as a provider. Args: singleton (bool): The returned value should be a singleton or shared instance. If False (the default) the provider function will be invoked again for every time it's needed for injection. injector (Injector): If provided, the function is immediately registered as a provider with the injector instance. Example: @diay.provider(singleton=True) def myfunc() -> MyClass: return MyClass(args)
(module (function_definition (function_name_construct_chunk) function_name_construct_chunk (parameters (identifier_cls) identifier_cls (identifier_chunk_type) identifier_chunk_type (identifier_payload) identifier_payload (default_parameter (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_payload) identifier_payload (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (identifier_payload) identifier_payload (identifier_encode) identifier_encode )attribute (argument_list (identifier_encoding) identifier_encoding )argument_list )call )assignment )expression_statement )block (elif_clause (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_payload) identifier_payload (identifier_bytes) identifier_bytes )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_'cannot encode type: {}') string_'cannot encode type: {}' (identifier_format) identifier_format )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_payload) identifier_payload )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_header) identifier_header (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (attribute (identifier_cls) identifier_cls (identifier_HEADER_FMT) identifier_HEADER_FMT )attribute (call (identifier_len) identifier_len (argument_list (identifier_payload) identifier_payload )argument_list )call (identifier_chunk_type) identifier_chunk_type )argument_list )call )assignment )expression_statement (return_statement (binary_operator (identifier_header) identifier_header (identifier_payload) identifier_payload )binary_operator )return_statement )block )function_definition )module
Construct and return a single chunk.
(module (function_definition (function_name_resend_transaction_frames) function_name_resend_transaction_frames (parameters (identifier_self) identifier_self (identifier_connection) identifier_connection (identifier_transaction) identifier_transaction )parameters (block (for_statement (identifier_frame) identifier_frame (subscript (subscript (attribute (identifier_self) identifier_self (identifier__transaction_frames) identifier__transaction_frames )attribute (identifier_connection) identifier_connection )subscript (identifier_transaction) identifier_transaction )subscript (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (identifier_frame) identifier_frame )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Resend the messages that were ACK'd in specified transaction. This is called by the engine when there is an abort command. @param connection: The client connection that aborted the transaction. @type connection: L{coilmq.server.StompConnection} @param transaction: The transaction id (which was aborted). @type transaction: C{str}
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_cgroup) identifier_cgroup (attribute (identifier_self) identifier_self (identifier_paths) identifier_paths )attribute (block (expression_statement (call (identifier_remove_cgroup) identifier_remove_cgroup (argument_list (identifier_cgroup) identifier_cgroup )argument_list )call )expression_statement )block )for_statement (delete_statement (attribute (identifier_self) identifier_self (identifier_paths) identifier_paths )attribute )delete_statement (delete_statement (attribute (identifier_self) identifier_self (identifier_per_subsystem) identifier_per_subsystem )attribute )delete_statement )block )function_definition )module
Remove all cgroups this instance represents from the system. This instance is afterwards not usable anymore!
(module (function_definition (function_name_rename) function_name_rename (parameters (identifier_self) identifier_self (identifier_new_lid) identifier_new_lid )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"rename(new_lid=\"%s\") [lid=%s]") string_"rename(new_lid=\"%s\") [lid=%s]" (identifier_new_lid) identifier_new_lid (attribute (identifier_self) identifier_self (identifier___lid) identifier___lid )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_evt) identifier_evt (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier__request_entity_rename) identifier__request_entity_rename )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___lid) identifier___lid )attribute (identifier_new_lid) identifier_new_lid )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier__wait_and_except_if_failed) identifier__wait_and_except_if_failed )attribute (argument_list (identifier_evt) identifier_evt )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___lid) identifier___lid )attribute (identifier_new_lid) identifier_new_lid )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier__notify_thing_lid_change) identifier__notify_thing_lid_change )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___lid) identifier___lid )attribute (identifier_new_lid) identifier_new_lid )argument_list )call )expression_statement )block )function_definition )module
Rename the Thing. `ADVANCED USERS ONLY` This can be confusing. You are changing the local id of a Thing to `new_lid`. If you create another Thing using the "old_lid", the system will oblige, but it will be a completely _new_ Thing. Raises [IOTException](./Exceptions.m.html#IoticAgent.IOT.Exceptions.IOTException) containing the error if the infrastructure detects a problem Raises [LinkException](../Core/AmqpLink.m.html#IoticAgent.Core.AmqpLink.LinkException) if there is a communications problem between you and the infrastructure `new_lid` (required) (string) the new local identifier of your Thing
(module (function_definition (function_name__FormatIPToken) function_name__FormatIPToken (parameters (identifier_self) identifier_self (identifier_token_data) identifier_token_data )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (attribute (string_'{0:02x}') string_'{0:02x}' (identifier_format) identifier_format )attribute (argument_list (identifier_byte) identifier_byte )argument_list )call (for_in_clause (identifier_byte) identifier_byte (attribute (identifier_token_data) identifier_token_data (identifier_data) identifier_data )attribute )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'IPv4_Header') string_'IPv4_Header' (identifier_data) identifier_data )pair )dictionary )return_statement )block )function_definition )module
Formats an IPv4 packet header token as a dictionary of values. Args: token_data (bsm_token_data_ip): AUT_IP token data. Returns: dict[str, str]: token values.
(module (function_definition (function_name_probe_git) function_name_probe_git (parameters )parameters (block (try_statement (block (expression_statement (assignment (identifier_repo) identifier_repo (call (attribute (identifier_git) identifier_git (identifier_Repo) identifier_Repo )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_git) identifier_git (identifier_InvalidGitRepositoryError) identifier_InvalidGitRepositoryError )attribute (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_"We highly recommend keeping your model in a git repository.") string_"We highly recommend keeping your model in a git repository." (string_" It allows you to track changes and to easily collaborate with") string_" It allows you to track changes and to easily collaborate with" (string_" others via online platforms such as https://github.com.\n") string_" others via online platforms such as https://github.com.\n" )concatenated_string )argument_list )call )expression_statement (return_statement )return_statement )block )except_clause )try_statement (if_statement (call (attribute (identifier_repo) identifier_repo (identifier_is_dirty) identifier_is_dirty )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_critical) identifier_critical )attribute (argument_list (concatenated_string (string_"Please git commit or git stash all changes before running") string_"Please git commit or git stash all changes before running" (string_" the memote suite.") string_" the memote suite." )concatenated_string )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_repo) identifier_repo )return_statement )block )function_definition )module
Return a git repository instance if it exists.
(module (function_definition (function_name_metrics) function_name_metrics (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_masterThrp) identifier_masterThrp (identifier_backupThrp) identifier_backupThrp )pattern_list (call (attribute (identifier_self) identifier_self (identifier_getThroughputs) identifier_getThroughputs )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_instances) identifier_instances )attribute (identifier_masterId) identifier_masterId )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_self) identifier_self (identifier_instance_throughput_ratio) identifier_instance_throughput_ratio )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_instances) identifier_instances )attribute (identifier_masterId) identifier_masterId )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_m) identifier_m (list (tuple (call (attribute (string_"{} Monitor metrics:") string_"{} Monitor metrics:" (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self )argument_list )call (None) None )tuple (tuple (string_"Delta") string_"Delta" (attribute (identifier_self) identifier_self (identifier_Delta) identifier_Delta )attribute )tuple (tuple (string_"Lambda") string_"Lambda" (attribute (identifier_self) identifier_self (identifier_Lambda) identifier_Lambda )attribute )tuple (tuple (string_"Omega") string_"Omega" (attribute (identifier_self) identifier_self (identifier_Omega) identifier_Omega )attribute )tuple (tuple (string_"instances started") string_"instances started" (attribute (attribute (identifier_self) identifier_self (identifier_instances) identifier_instances )attribute (identifier_started) identifier_started )attribute )tuple (tuple (string_"ordered request counts") string_"ordered request counts" (dictionary_comprehension (pair (identifier_i) identifier_i (subscript (identifier_r) identifier_r (integer_0) integer_0 )subscript )pair (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_r) identifier_r )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_numOrderedRequests) identifier_numOrderedRequests )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )tuple (tuple (string_"ordered request durations") string_"ordered request durations" (dictionary_comprehension (pair (identifier_i) identifier_i (subscript (identifier_r) identifier_r (integer_1) integer_1 )subscript )pair (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_r) identifier_r )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_numOrderedRequests) identifier_numOrderedRequests )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )tuple (tuple (string_"master request latencies") string_"master request latencies" (attribute (identifier_self) identifier_self (identifier_masterReqLatencies) identifier_masterReqLatencies )attribute )tuple (tuple (string_"client avg request latencies") string_"client avg request latencies" (dictionary_comprehension (pair (identifier_i) identifier_i (call (attribute (identifier_self) identifier_self (identifier_getLatency) identifier_getLatency )attribute (argument_list (identifier_i) identifier_i )argument_list )call )pair (for_in_clause (identifier_i) identifier_i (attribute (attribute (identifier_self) identifier_self (identifier_instances) identifier_instances )attribute (identifier_ids) identifier_ids )attribute )for_in_clause )dictionary_comprehension )tuple (tuple (string_"throughput") string_"throughput" (dictionary_comprehension (pair (identifier_i) identifier_i (call (attribute (identifier_self) identifier_self (identifier_getThroughput) identifier_getThroughput )attribute (argument_list (identifier_i) identifier_i )argument_list )call )pair (for_in_clause (identifier_i) identifier_i (attribute (attribute (identifier_self) identifier_self (identifier_instances) identifier_instances )attribute (identifier_ids) identifier_ids )attribute )for_in_clause )dictionary_comprehension )tuple (tuple (string_"master throughput") string_"master throughput" (identifier_masterThrp) identifier_masterThrp )tuple (tuple (string_"total requests") string_"total requests" (attribute (identifier_self) identifier_self (identifier_totalRequests) identifier_totalRequests )attribute )tuple (tuple (string_"avg backup throughput") string_"avg backup throughput" (identifier_backupThrp) identifier_backupThrp )tuple (tuple (string_"master throughput ratio") string_"master throughput ratio" (identifier_r) identifier_r )tuple )list )assignment )expression_statement (return_statement (identifier_m) identifier_m )return_statement )block )function_definition )module
Calculate and return the metrics.
(module (function_definition (function_name_get_home) function_name_get_home (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (string_'HOME_POSITION') string_'HOME_POSITION' (attribute (attribute (identifier_self) identifier_self (identifier_master) identifier_master )attribute (identifier_messages) identifier_messages )attribute )comparison_operator (block (expression_statement (assignment (identifier_h) identifier_h (subscript (attribute (attribute (identifier_self) identifier_self (identifier_master) identifier_master )attribute (identifier_messages) identifier_messages )attribute (string_'HOME_POSITION') string_'HOME_POSITION' )subscript )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_mavutil) identifier_mavutil (identifier_mavlink) identifier_mavlink )attribute (identifier_MAVLink_mission_item_message) identifier_MAVLink_mission_item_message )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_target_system) identifier_target_system )attribute (attribute (identifier_self) identifier_self (identifier_target_component) identifier_target_component )attribute (integer_0) integer_0 (integer_0) integer_0 (attribute (attribute (identifier_mavutil) identifier_mavutil (identifier_mavlink) identifier_mavlink )attribute (identifier_MAV_CMD_NAV_WAYPOINT) identifier_MAV_CMD_NAV_WAYPOINT )attribute (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (binary_operator (attribute (identifier_h) identifier_h (identifier_latitude) identifier_latitude )attribute (float_1.0e-7) float_1.0e-7 )binary_operator (binary_operator (attribute (identifier_h) identifier_h (identifier_longitude) identifier_longitude )attribute (float_1.0e-7) float_1.0e-7 )binary_operator (binary_operator (attribute (identifier_h) identifier_h (identifier_altitude) identifier_altitude )attribute (float_1.0e-3) float_1.0e-3 )binary_operator )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_wploader) identifier_wploader )attribute (identifier_count) identifier_count )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_wploader) identifier_wploader )attribute (identifier_wp) identifier_wp )attribute (argument_list (integer_0) integer_0 )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
get home location
(module (function_definition (function_name_filter_geometry) function_name_filter_geometry (parameters (identifier_queryset) identifier_queryset (dictionary_splat_pattern (identifier_filters) identifier_filters )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_fieldname) identifier_fieldname (attribute (call (identifier_geo_field) identifier_geo_field (argument_list (identifier_queryset) identifier_queryset )argument_list )call (identifier_name) identifier_name )attribute )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (dictionary_comprehension (pair (binary_operator (string_'%s__%s') string_'%s__%s' (tuple (identifier_fieldname) identifier_fieldname (identifier_k) identifier_k )tuple )binary_operator (identifier_v) identifier_v )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_filters) identifier_filters (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement (return_statement (call (attribute (identifier_queryset) identifier_queryset (identifier_filter) identifier_filter )attribute (argument_list (dictionary_splat (identifier_query) identifier_query )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Helper function for spatial lookups filters. Provide spatial lookup types as keywords without underscores instead of the usual "geometryfield__lookuptype" format.
(module (function_definition (function_name_logout) function_name_logout (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier__read_uaa_cache) identifier__read_uaa_cache )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_uri) identifier_uri )attribute (identifier_data) identifier_data )comparison_operator (block (for_statement (identifier_client) identifier_client (subscript (identifier_data) identifier_data (attribute (identifier_self) identifier_self (identifier_uri) identifier_uri )attribute )subscript (block (if_statement (comparison_operator (subscript (identifier_client) identifier_client (string_'id') string_'id' )subscript (subscript (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (string_'id') string_'id' )subscript )comparison_operator (block (expression_statement (call (attribute (subscript (identifier_data) identifier_data (attribute (identifier_self) identifier_self (identifier_uri) identifier_uri )attribute )subscript (identifier_remove) identifier_remove )attribute (argument_list (identifier_client) identifier_client )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (attribute (identifier_self) identifier_self (identifier__cache_path) identifier__cache_path )attribute (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_output) identifier_output )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_output) identifier_output (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_data) identifier_data (keyword_argument (identifier_sort_keys) identifier_sort_keys (True) True )keyword_argument (keyword_argument (identifier_indent) identifier_indent (integer_4) integer_4 )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Log currently authenticated user out, invalidating any existing tokens.
(module (function_definition (function_name_default) function_name_default (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier___default) identifier___default )attribute (tuple (identifier_str) identifier_str (identifier_unicode) identifier_unicode )tuple )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_valueFromString) identifier_valueFromString )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___default) identifier___default )attribute )argument_list )call )return_statement )block (else_clause (block (return_statement (attribute (identifier_self) identifier_self (identifier___default) identifier___default )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the default value for this column to return when generating new instances. :return <variant>
(module (function_definition (function_name_post_worker_init) function_name_post_worker_init (parameters (identifier_worker) identifier_worker )parameters (block (expression_statement (assignment (identifier_quit_command) identifier_quit_command (conditional_expression (string_'CTRL-BREAK') string_'CTRL-BREAK' (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_platform) identifier_platform )attribute (string_'win32') string_'win32' )comparison_operator (string_'CONTROL-C') string_'CONTROL-C' )conditional_expression )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (call (attribute (concatenated_string (string_"Django version {djangover}, Gunicorn version {gunicornver}, ") string_"Django version {djangover}, Gunicorn version {gunicornver}, " (string_"using settings {settings!r}\n") string_"using settings {settings!r}\n" (string_"Starting development server at {urls}\n") string_"Starting development server at {urls}\n" (string_"Quit the server with {quit_command}.\n") string_"Quit the server with {quit_command}.\n" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_djangover) identifier_djangover (call (attribute (identifier_django) identifier_django (identifier_get_version) identifier_get_version )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_gunicornver) identifier_gunicornver (attribute (identifier_gunicorn) identifier_gunicorn (identifier___version__) identifier___version__ )attribute )keyword_argument (keyword_argument (identifier_settings) identifier_settings (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'DJANGO_SETTINGS_MODULE') string_'DJANGO_SETTINGS_MODULE' )argument_list )call )keyword_argument (keyword_argument (identifier_urls) identifier_urls (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (generator_expression (call (attribute (string_'http://{0}/') string_'http://{0}/' (identifier_format) identifier_format )attribute (argument_list (identifier_b) identifier_b )argument_list )call (for_in_clause (identifier_b) identifier_b (attribute (attribute (identifier_worker) identifier_worker (identifier_cfg) identifier_cfg )attribute (identifier_bind) identifier_bind )attribute )for_in_clause )generator_expression )call )keyword_argument (keyword_argument (identifier_quit_command) identifier_quit_command (identifier_quit_command) identifier_quit_command )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Hook into Gunicorn to display message after launching. This mimics the behaviour of Django's stock runserver command.
(module (function_definition (function_name_dag) function_name_dag (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_Dict) identifier_Dict )type (type (identifier_Dict) identifier_Dict )type )type_parameter )generic_type )type (block (import_from_statement (dotted_name (identifier_pipelines) identifier_pipelines )dotted_name (dotted_name (identifier_dags) identifier_dags )dotted_name )import_from_statement (expression_statement (assignment (identifier_operations) identifier_operations (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_operations) identifier_operations )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call (identifier_prefetch_related) identifier_prefetch_related )attribute (argument_list (string_'downstream_operations') string_'downstream_operations' )argument_list )call )assignment )expression_statement (function_definition (function_name_get_downstream) function_name_get_downstream (parameters (identifier_op) identifier_op )parameters (block (return_statement (call (attribute (attribute (identifier_op) identifier_op (identifier_downstream_operations) identifier_downstream_operations )attribute (identifier_values_list) identifier_values_list )attribute (argument_list (string_'id') string_'id' (keyword_argument (identifier_flat) identifier_flat (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition (return_statement (call (attribute (identifier_dags) identifier_dags (identifier_get_dag) identifier_get_dag )attribute (argument_list (identifier_operations) identifier_operations (identifier_get_downstream) identifier_get_downstream )argument_list )call )return_statement )block )function_definition )module
Construct the DAG of this pipeline based on the its operations and their downstream.
(module (function_definition (function_name_get_supervisor) function_name_get_supervisor (parameters (typed_parameter (identifier_func) identifier_func (type (attribute (identifier_types) identifier_types (identifier_AnyFunction) identifier_AnyFunction )attribute )type )typed_parameter )parameters (type (attribute (identifier_types) identifier_types (identifier_Supervisor) identifier_Supervisor )attribute )type (block (if_statement (not_operator (call (identifier_callable) identifier_callable (argument_list (identifier_func) identifier_func )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"func is not callable") string_"func is not callable" )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (identifier_asyncio) identifier_asyncio (identifier_iscoroutinefunction) identifier_iscoroutinefunction )attribute (argument_list (identifier_func) identifier_func )argument_list )call (block (expression_statement (assignment (identifier_supervisor) identifier_supervisor (identifier__async_supervisor) identifier__async_supervisor )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_supervisor) identifier_supervisor (identifier__sync_supervisor) identifier__sync_supervisor )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute (argument_list (identifier_supervisor) identifier_supervisor (identifier_func) identifier_func )argument_list )call )return_statement )block )function_definition )module
Get the appropriate supervisor to use and pre-apply the function. Args: func: A function.