sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_start_compress) function_name_start_compress (parameters (identifier_codec) identifier_codec (identifier_image) identifier_image (identifier_stream) identifier_stream )parameters (block (expression_statement (assignment (attribute (attribute (identifier_OPENJP2) identifier_OPENJP2 (identifier_opj_start_compress) identifier_opj_start_compress )attribute (identifier_argtypes) identifier_argtypes )attribute (list (identifier_CODEC_TYPE) identifier_CODEC_TYPE (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (identifier_ImageType) identifier_ImageType )argument_list )call (identifier_STREAM_TYPE_P) identifier_STREAM_TYPE_P )list )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_OPENJP2) identifier_OPENJP2 (identifier_opj_start_compress) identifier_opj_start_compress )attribute (identifier_restype) identifier_restype )attribute (identifier_check_error) identifier_check_error )assignment )expression_statement (expression_statement (call (attribute (identifier_OPENJP2) identifier_OPENJP2 (identifier_opj_start_compress) identifier_opj_start_compress )attribute (argument_list (identifier_codec) identifier_codec (identifier_image) identifier_image (identifier_stream) identifier_stream )argument_list )call )expression_statement )block )function_definition )module
Wraps openjp2 library function opj_start_compress. Start to compress the current image. Parameters ---------- codec : CODEC_TYPE Compressor handle. image : pointer to ImageType Input filled image. stream : STREAM_TYPE_P Input stream. Raises ------ RuntimeError If the OpenJPEG library routine opj_start_compress fails.
(module (function_definition (function_name_from_global_id) function_name_from_global_id (parameters (identifier_global_id) identifier_global_id )parameters (block (expression_statement (assignment (identifier_unbased_global_id) identifier_unbased_global_id (call (identifier_unbase64) identifier_unbase64 (argument_list (identifier_global_id) identifier_global_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier__type) identifier__type (identifier__id) identifier__id )pattern_list (call (attribute (identifier_unbased_global_id) identifier_unbased_global_id (identifier_split) identifier_split )attribute (argument_list (string_':') string_':' (integer_1) integer_1 )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier__type) identifier__type (identifier__id) identifier__id )expression_list )return_statement )block )function_definition )module
Takes the "global ID" created by toGlobalID, and retuns the type name and ID used to create it.
(module (function_definition (function_name_column_summary_data) function_name_column_summary_data (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_assembled_summary) identifier_assembled_summary (call (attribute (identifier_self) identifier_self (identifier__to_cluster_summary_assembled) identifier__to_cluster_summary_assembled )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_pct_id) identifier_pct_id (identifier_read_depth) identifier_read_depth )pattern_list (call (attribute (identifier_self) identifier_self (identifier__pc_id_and_read_depth_of_longest) identifier__pc_id_and_read_depth_of_longest )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_columns) identifier_columns (dictionary (pair (string_'assembled') string_'assembled' (call (attribute (identifier_self) identifier_self (identifier__to_cluster_summary_assembled) identifier__to_cluster_summary_assembled )attribute (argument_list )argument_list )call )pair (pair (string_'match') string_'match' (call (attribute (identifier_self) identifier_self (identifier__has_match) identifier__has_match )attribute (argument_list (identifier_assembled_summary) identifier_assembled_summary )argument_list )call )pair (pair (string_'ref_seq') string_'ref_seq' (attribute (identifier_self) identifier_self (identifier_ref_name) identifier_ref_name )attribute )pair (pair (string_'pct_id') string_'pct_id' (call (identifier_str) identifier_str (argument_list (identifier_pct_id) identifier_pct_id )argument_list )call )pair (pair (string_'ctg_cov') string_'ctg_cov' (call (identifier_str) identifier_str (argument_list (identifier_read_depth) identifier_read_depth )argument_list )call )pair (pair (string_'known_var') string_'known_var' (call (attribute (identifier_self) identifier_self (identifier__to_cluster_summary_has_known_nonsynonymous) identifier__to_cluster_summary_has_known_nonsynonymous )attribute (argument_list (identifier_assembled_summary) identifier_assembled_summary )argument_list )call )pair (pair (string_'novel_var') string_'novel_var' (call (attribute (identifier_self) identifier_self (identifier__to_cluster_summary_has_novel_nonsynonymous) identifier__to_cluster_summary_has_novel_nonsynonymous )attribute (argument_list (identifier_assembled_summary) identifier_assembled_summary )argument_list )call )pair )dictionary )assignment )expression_statement (return_statement (identifier_columns) identifier_columns )return_statement )block )function_definition )module
Returns a dictionary of column name -> value, for cluster-level results
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (for_statement (identifier_arg) identifier_arg (identifier_kwargs) identifier_kwargs (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (identifier_arg) identifier_arg )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_arg) identifier_arg (subscript (identifier_kwargs) identifier_kwargs (identifier_arg) identifier_arg )subscript )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_"Invalid RayParams parameter in") string_"Invalid RayParams parameter in" (string_" update: %s") string_" update: %s" )concatenated_string (identifier_arg) identifier_arg )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_usage) identifier__check_usage )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Update the settings according to the keyword arguments. Args: kwargs: The keyword arguments to set corresponding fields.
(module (function_definition (function_name_count_leases_by_owner) function_name_count_leases_by_owner (parameters (identifier_self) identifier_self (identifier_leases) identifier_leases )parameters (block (expression_statement (assignment (identifier_owners) identifier_owners (list_comprehension (attribute (identifier_l) identifier_l (identifier_owner) identifier_owner )attribute (for_in_clause (identifier_l) identifier_l (identifier_leases) identifier_leases )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (call (identifier_dict) identifier_dict (argument_list (call (identifier_Counter) identifier_Counter (argument_list (identifier_owners) identifier_owners )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Returns a dictionary of leases by current owner.
(module (function_definition (function_name_get_uri) function_name_get_uri (parameters (identifier_self) identifier_self (typed_parameter (identifier_ncname) identifier_ncname (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (identifier_cu) identifier_cu (identifier_expand_uri) identifier_expand_uri )attribute (argument_list (binary_operator (identifier_ncname) identifier_ncname (string_':') string_':' )binary_operator (attribute (identifier_self) identifier_self (identifier_curi_maps) identifier_curi_maps )attribute )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (identifier_uri) identifier_uri (boolean_operator (identifier_uri) identifier_uri (call (attribute (identifier_uri) identifier_uri (identifier_startswith) identifier_startswith )attribute (argument_list (string_'http') string_'http' )argument_list )call )boolean_operator (None) None )conditional_expression )return_statement )block )function_definition )module
Get the URI associated with ncname @param ncname:
(module (function_definition (function_name_guessFormat) function_name_guessFormat (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_c) identifier_c (list_comprehension (call (identifier_ord) identifier_ord (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_quals) identifier_quals )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_mi) identifier_mi (identifier_ma) identifier_ma )pattern_list (expression_list (call (identifier_min) identifier_min (argument_list (identifier_c) identifier_c )argument_list )call (call (identifier_max) identifier_max (argument_list (identifier_c) identifier_c )argument_list )call )expression_list )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_entry_format) identifier_entry_format (identifier_v) identifier_v )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_RANGES) identifier_RANGES )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_m1) identifier_m1 (identifier_m2) identifier_m2 )pattern_list (identifier_v) identifier_v )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_mi) identifier_mi (identifier_m1) identifier_m1 )comparison_operator (comparison_operator (identifier_ma) identifier_ma (identifier_m2) identifier_m2 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_r) identifier_r (identifier_append) identifier_append )attribute (argument_list (identifier_entry_format) identifier_entry_format )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_r) identifier_r )return_statement )block )function_definition )module
return quality score format - might return several if ambiguous.
(module (function_definition (function_name_set_features) function_name_set_features (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_scores) identifier_scores )attribute (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_t_or_d) identifier_t_or_d (identifier_feats) identifier_feats )pattern_list (call (identifier_zip) identifier_zip (argument_list (list (string_'target') string_'target' (string_'decoy') string_'decoy' )list (list (attribute (identifier_self) identifier_self (identifier_target) identifier_target )attribute (attribute (identifier_self) identifier_self (identifier_decoy) identifier_decoy )attribute )list )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_scores) identifier_scores )attribute (identifier_t_or_d) identifier_t_or_d )subscript (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_scores) identifier_scores )attribute (identifier_t_or_d) identifier_t_or_d )subscript (string_'scores') string_'scores' )subscript (call (attribute (identifier_self) identifier_self (identifier_score_get_fun) identifier_score_get_fun )attribute (argument_list (identifier_feats) identifier_feats (attribute (identifier_self) identifier_self (identifier_featuretype) identifier_featuretype )attribute (attribute (identifier_self) identifier_self (identifier_prepare_percolator_output) identifier_prepare_percolator_output )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_scores) identifier_scores )attribute (identifier_t_or_d) identifier_t_or_d )subscript (string_'fn') string_'fn' )subscript (call (attribute (string_'{}_qvality_input.txt') string_'{}_qvality_input.txt' (identifier_format) identifier_format )attribute (argument_list (identifier_t_or_d) identifier_t_or_d )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_writers) identifier_writers (identifier_write_qvality_input) identifier_write_qvality_input )attribute (argument_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier_scores) identifier_scores )attribute (identifier_t_or_d) identifier_t_or_d )subscript (string_'scores') string_'scores' )subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_scores) identifier_scores )attribute (identifier_t_or_d) identifier_t_or_d )subscript (string_'fn') string_'fn' )subscript )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Creates scorefiles for qvality's target and decoy distributions
(module (function_definition (function_name_gethash) function_name_gethash (parameters (identifier_compiled) identifier_compiled )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (identifier_compiled) identifier_compiled (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_lines) identifier_lines )argument_list )call (integer_3) integer_3 )comparison_operator (not_operator (call (attribute (subscript (identifier_lines) identifier_lines (integer_2) integer_2 )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_hash_prefix) identifier_hash_prefix )argument_list )call )not_operator )boolean_operator (block (return_statement (None) None )return_statement )block (else_clause (block (return_statement (subscript (subscript (identifier_lines) identifier_lines (integer_2) integer_2 )subscript (slice (call (identifier_len) identifier_len (argument_list (identifier_hash_prefix) identifier_hash_prefix )argument_list )call (colon) colon )slice )subscript )return_statement )block )else_clause )if_statement )block )function_definition )module
Retrieve a hash from a header.
(module (function_definition (function_name_delete_job) function_name_delete_job (parameters (identifier_job_id) identifier_job_id (identifier_deployment_name) identifier_deployment_name (default_parameter (identifier_token_manager) identifier_token_manager (None) None )default_parameter (default_parameter (identifier_app_url) identifier_app_url (attribute (identifier_defaults) identifier_defaults (identifier_APP_URL) identifier_APP_URL )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_headers) identifier_headers (call (attribute (identifier_token_manager) identifier_token_manager (identifier_get_access_token_headers) identifier_get_access_token_headers )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data_url) identifier_data_url (call (identifier_get_data_url_for_job) identifier_get_data_url_for_job (argument_list (identifier_job_id) identifier_job_id (identifier_deployment_name) identifier_deployment_name (keyword_argument (identifier_token_manager) identifier_token_manager (identifier_token_manager) identifier_token_manager )keyword_argument (keyword_argument (identifier_app_url) identifier_app_url (identifier_app_url) identifier_app_url )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (string_'%s/api/v1/jobs/%s') string_'%s/api/v1/jobs/%s' (tuple (identifier_data_url) identifier_data_url (identifier_job_id) identifier_job_id )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_delete) identifier_delete )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (raise_statement (call (identifier_JutException) identifier_JutException (argument_list (binary_operator (string_'Error %s: %s') string_'Error %s: %s' (tuple (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (attribute (identifier_response) identifier_response (identifier_text) identifier_text )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
delete a job with a specific job id
(module (function_definition (function_name_plugins) function_name_plugins (parameters )parameters (block (expression_statement (assignment (identifier_plugins) identifier_plugins (subscript (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (string_'PLUGINS') string_'PLUGINS' )subscript )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_description) identifier_description )pattern_list (call (attribute (attribute (identifier_entrypoints) identifier_entrypoints (identifier_ENTRYPOINTS) identifier_ENTRYPOINTS )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_echo) identifier_echo (argument_list (call (attribute (string_'{0} ({1})') string_'{0} ({1})' (identifier_format) identifier_format )attribute (argument_list (call (identifier_white) identifier_white (argument_list (identifier_description) identifier_description )argument_list )call (identifier_name) identifier_name )argument_list )call )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (string_'udata.themes') string_'udata.themes' )comparison_operator (block (expression_statement (assignment (identifier_actives) identifier_actives (list (subscript (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (string_'THEME') string_'THEME' )subscript )list )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_name) identifier_name (string_'udata.avatars') string_'udata.avatars' )comparison_operator (block (expression_statement (assignment (identifier_actives) identifier_actives (list (call (identifier_avatar_config) identifier_avatar_config (argument_list (string_'provider') string_'provider' )argument_list )call )list )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_actives) identifier_actives (identifier_plugins) identifier_plugins )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_ep) identifier_ep (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_entrypoints) identifier_entrypoints (identifier_iter_all) identifier_iter_all )attribute (argument_list (identifier_name) identifier_name )argument_list )call (keyword_argument (identifier_key) identifier_key (identifier_by_name) identifier_by_name )keyword_argument )argument_list )call (block (expression_statement (call (identifier_echo) identifier_echo (argument_list (call (attribute (string_'> {0}: {1}') string_'> {0}: {1}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_ep) identifier_ep (identifier_name) identifier_name )attribute (call (identifier_is_active) identifier_is_active (argument_list (identifier_ep) identifier_ep (identifier_actives) identifier_actives )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Display some details about the local plugins
(module (function_definition (function_name__check_asset_node_def) function_name__check_asset_node_def (parameters (identifier_node_def) identifier_node_def )parameters (block (if_statement (comparison_operator (attribute (identifier_node_def) identifier_node_def (identifier_op) identifier_op )attribute (string_"Const") string_"Const" )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Asset node must be of type constant.") string_"Asset node must be of type constant." )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (attribute (identifier_tf) identifier_tf (identifier_as_dtype) identifier_as_dtype )attribute (argument_list (attribute (subscript (attribute (identifier_node_def) identifier_node_def (identifier_attr) identifier_attr )attribute (string_"dtype") string_"dtype" )subscript (identifier_type) identifier_type )attribute )argument_list )call (attribute (identifier_tf) identifier_tf (identifier_string) identifier_string )attribute )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Asset node must be of dtype string.") string_"Asset node must be of dtype string." )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (attribute (subscript (attribute (identifier_node_def) identifier_node_def (identifier_attr) identifier_attr )attribute (string_"value") string_"value" )subscript (identifier_tensor) identifier_tensor )attribute (identifier_string_val) identifier_string_val )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Asset node must be a scalar.") string_"Asset node must be a scalar." )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Raises TypeError if `node_def` does not match the expectations.
(module (function_definition (function_name_get_task_trackers) function_name_get_task_trackers (parameters (default_parameter (identifier_properties) identifier_properties (None) None )default_parameter (default_parameter (identifier_hadoop_conf_dir) identifier_hadoop_conf_dir (None) None )default_parameter (default_parameter (identifier_offline) identifier_offline (False) False )default_parameter )parameters (block (if_statement (identifier_offline) identifier_offline (block (if_statement (not_operator (identifier_hadoop_conf_dir) identifier_hadoop_conf_dir )not_operator (block (expression_statement (assignment (identifier_hadoop_conf_dir) identifier_hadoop_conf_dir (call (attribute (identifier_pydoop) identifier_pydoop (identifier_hadoop_conf) identifier_hadoop_conf )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_slaves) identifier_slaves (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_hadoop_conf_dir) identifier_hadoop_conf_dir (string_"slaves") string_"slaves" )argument_list )call )assignment )expression_statement )block )if_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_slaves) identifier_slaves )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_task_trackers) identifier_task_trackers (list_comprehension (tuple (call (attribute (identifier_l) identifier_l (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (integer_0) integer_0 )tuple (for_in_clause (identifier_l) identifier_l (identifier_f) identifier_f )for_in_clause )list_comprehension )assignment )expression_statement )block )with_statement )block (except_clause (identifier_IOError) identifier_IOError (block (expression_statement (assignment (identifier_task_trackers) identifier_task_trackers (list )list )assignment )expression_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (assignment (identifier_stdout) identifier_stdout (call (identifier_run_class) identifier_run_class (argument_list (string_"org.apache.hadoop.mapred.JobClient") string_"org.apache.hadoop.mapred.JobClient" (list (string_"-list-active-trackers") string_"-list-active-trackers" )list (keyword_argument (identifier_properties) identifier_properties (identifier_properties) identifier_properties )keyword_argument (keyword_argument (identifier_hadoop_conf_dir) identifier_hadoop_conf_dir (identifier_hadoop_conf_dir) identifier_hadoop_conf_dir )keyword_argument (keyword_argument (identifier_keep_streams) identifier_keep_streams (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_task_trackers) identifier_task_trackers (list )list )assignment )expression_statement (for_statement (identifier_line) identifier_line (call (attribute (identifier_stdout) identifier_stdout (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call (block (if_statement (not_operator (identifier_line) identifier_line )not_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_line) identifier_line (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_":") string_":" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_task_trackers) identifier_task_trackers (identifier_append) identifier_append )attribute (argument_list (tuple (subscript (call (attribute (subscript (identifier_line) identifier_line (integer_0) integer_0 )subscript (identifier_split) identifier_split )attribute (argument_list (string_"_") string_"_" )argument_list )call (integer_1) integer_1 )subscript (call (identifier_int) identifier_int (argument_list (subscript (identifier_line) identifier_line (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call )tuple )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_statement (return_statement (identifier_task_trackers) identifier_task_trackers )return_statement )block )function_definition )module
Get the list of task trackers in the Hadoop cluster. Each element in the returned list is in the ``(host, port)`` format. All arguments are passed to :func:`run_class`. If ``offline`` is :obj:`True`, try getting the list of task trackers from the ``slaves`` file in Hadoop's configuration directory (no attempt is made to contact the Hadoop daemons). In this case, ports are set to 0.
(module (function_definition (function_name_StringIO) function_name_StringIO (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_raw) identifier_raw (call (attribute (identifier_sync_io) identifier_sync_io (identifier_StringIO) identifier_StringIO )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (identifier_AsyncStringIOWrapper) identifier_AsyncStringIOWrapper (argument_list (identifier_raw) identifier_raw )argument_list )call )return_statement )block )function_definition )module
StringIO constructor shim for the async wrapper.
(module (function_definition (function_name_setFixedHeight) function_name_setFixedHeight (parameters (identifier_self) identifier_self (identifier_height) identifier_height )parameters (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_XViewPanelBar) identifier_XViewPanelBar (identifier_self) identifier_self )argument_list )call (identifier_setFixedHeight) identifier_setFixedHeight )attribute (argument_list (identifier_height) identifier_height )argument_list )call )expression_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_layout) identifier_layout )attribute (argument_list )argument_list )call (block (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (call (attribute (call (attribute (identifier_self) identifier_self (identifier_layout) identifier_layout )attribute (argument_list )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )argument_list )call (block (try_statement (block (expression_statement (call (attribute (call (attribute (call (attribute (call (attribute (identifier_self) identifier_self (identifier_layout) identifier_layout )attribute (argument_list )argument_list )call (identifier_itemAt) identifier_itemAt )attribute (argument_list (identifier_i) identifier_i )argument_list )call (identifier_widget) identifier_widget )attribute (argument_list )argument_list )call (identifier_setFixedHeight) identifier_setFixedHeight )attribute (argument_list (identifier_height) identifier_height )argument_list )call )expression_statement )block (except_clause (identifier_StandardError) identifier_StandardError (block (continue_statement )continue_statement )block )except_clause )try_statement )block )for_statement )block )if_statement )block )function_definition )module
Sets the fixed height for this bar to the inputed height. :param height | <int>
(module (function_definition (function_name_getTempCortex) function_name_getTempCortex (parameters (default_parameter (identifier_mods) identifier_mods (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_s_common) identifier_s_common (identifier_getTempDir) identifier_getTempDir )attribute (argument_list )argument_list )call (as_pattern_target (identifier_dirn) identifier_dirn )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (await (call (attribute (identifier_Cortex) identifier_Cortex (identifier_anit) identifier_anit )attribute (argument_list (identifier_dirn) identifier_dirn )argument_list )call )await (as_pattern_target (identifier_core) identifier_core )as_pattern_target )as_pattern )with_item )with_clause (block (if_statement (identifier_mods) identifier_mods (block (for_statement (identifier_mod) identifier_mod (identifier_mods) identifier_mods (block (expression_statement (await (call (attribute (identifier_core) identifier_core (identifier_loadCoreModule) identifier_loadCoreModule )attribute (argument_list (identifier_mod) identifier_mod )argument_list )call )await )expression_statement )block )for_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_core) identifier_core (identifier_getLocalProxy) identifier_getLocalProxy )attribute (argument_list )argument_list )call (as_pattern_target (identifier_prox) identifier_prox )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (yield (identifier_prox) identifier_prox )yield )expression_statement )block )with_statement )block )with_statement )block )with_statement )block )function_definition )module
Get a proxy to a cortex backed by a temporary directory. Args: mods (list): A list of modules which are loaded into the cortex. Notes: The cortex and temporary directory are town down on exit. This should only be called from synchronous code. Returns: Proxy to the cortex.
(module (function_definition (function_name__load_attributes) function_name__load_attributes (parameters (identifier_new_class) identifier_new_class )parameters (block (for_statement (pattern_list (identifier_field_name) identifier_field_name (identifier_field_obj) identifier_field_obj )pattern_list (call (attribute (attribute (attribute (identifier_new_class) identifier_new_class (identifier_meta_) identifier_meta_ )attribute (identifier_declared_fields) identifier_declared_fields )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (attribute (attribute (identifier_new_class) identifier_new_class (identifier_meta_) identifier_meta_ )attribute (identifier_attributes) identifier_attributes )attribute (call (attribute (identifier_field_obj) identifier_field_obj (identifier_get_attribute_name) identifier_get_attribute_name )attribute (argument_list )argument_list )call )subscript (identifier_field_obj) identifier_field_obj )assignment )expression_statement )block )for_statement )block )function_definition )module
Load list of attributes from declared fields
(module (function_definition (function_name__init_threading) function_name__init_threading (parameters (identifier_self) identifier_self (identifier_function) identifier_function (default_parameter (identifier_params) identifier_params (dictionary )dictionary )default_parameter (default_parameter (identifier_num_threads) identifier_num_threads (integer_10) integer_10 )default_parameter )parameters (block (expression_statement (assignment (identifier_q) identifier_q (call (identifier_Queue) identifier_Queue (argument_list (keyword_argument (identifier_maxsize) identifier_maxsize (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_num_threads) identifier_num_threads )argument_list )call (block (expression_statement (assignment (identifier_worker) identifier_worker (call (identifier_Thread) identifier_Thread (argument_list (keyword_argument (identifier_target) identifier_target (identifier_function) identifier_function )keyword_argument (keyword_argument (identifier_args) identifier_args (tuple (identifier_q) identifier_q (identifier_params) identifier_params )tuple )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_worker) identifier_worker (identifier_setDaemon) identifier_setDaemon )attribute (argument_list (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_worker) identifier_worker (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_q) identifier_q )return_statement )block )function_definition )module
Initialize queue and threads :param function: :param params: :param num_threads: :return:
(module (function_definition (function_name_get_configuration) function_name_get_configuration (parameters (identifier_form) identifier_form (identifier_out) identifier_out )parameters (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_configuration) identifier_configuration (identifier_Configuration) identifier_Configuration )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_config) identifier_config (string_"recursionlevel") string_"recursionlevel" )subscript (call (identifier_int) identifier_int (argument_list (call (identifier_formvalue) identifier_formvalue (argument_list (identifier_form) identifier_form (string_"level") string_"level" )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_config) identifier_config (string_"logger") string_"logger" )subscript (call (attribute (identifier_config) identifier_config (identifier_logger_new) identifier_logger_new )attribute (argument_list (string_'html') string_'html' (keyword_argument (identifier_fd) identifier_fd (identifier_out) identifier_out )keyword_argument (keyword_argument (identifier_encoding) identifier_encoding (identifier_HTML_ENCODING) identifier_HTML_ENCODING )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_config) identifier_config (string_"threads") string_"threads" )subscript (integer_2) integer_2 )assignment )expression_statement (if_statement (comparison_operator (string_"anchors") string_"anchors" (identifier_form) identifier_form )comparison_operator (block (expression_statement (call (attribute (subscript (identifier_config) identifier_config (string_"enabledplugins") string_"enabledplugins" )subscript (identifier_append) identifier_append )attribute (argument_list (string_"AnchorCheck") string_"AnchorCheck" )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (string_"errors") string_"errors" (identifier_form) identifier_form )comparison_operator (block (expression_statement (assignment (subscript (identifier_config) identifier_config (string_"verbose") string_"verbose" )subscript (True) True )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_pat) identifier_pat (binary_operator (string_"!^%s$") string_"!^%s$" (attribute (identifier_urlutil) identifier_urlutil (identifier_safe_url_pattern) identifier_safe_url_pattern )attribute )binary_operator )assignment )expression_statement (expression_statement (call (attribute (subscript (identifier_config) identifier_config (string_"externlinks") string_"externlinks" )subscript (identifier_append) identifier_append )attribute (argument_list (call (identifier_get_link_pat) identifier_get_link_pat (argument_list (identifier_pat) identifier_pat (keyword_argument (identifier_strict) identifier_strict (True) True )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_sanitize) identifier_sanitize )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_config) identifier_config )return_statement )block )function_definition )module
Initialize a CGI configuration.
(module (function_definition (function_name__filter_image) function_name__filter_image (parameters (identifier_self) identifier_self (identifier_url) identifier_url )parameters (block (expression_statement (string_"The param is the image URL, which is returned if it passes all the filters.") string_"The param is the image URL, which is returned if it passes all the filters." )expression_statement (return_statement (call (identifier_reduce) identifier_reduce (argument_list (lambda (lambda_parameters (identifier_f) identifier_f (identifier_g) identifier_g )lambda_parameters (boolean_operator (identifier_f) identifier_f (call (identifier_g) identifier_g (argument_list (identifier_f) identifier_f )argument_list )call )boolean_operator )lambda (list (call (call (attribute (identifier_filters) identifier_filters (identifier_AdblockURLFilter) identifier_AdblockURLFilter )attribute (argument_list )argument_list )call (argument_list (identifier_url) identifier_url )argument_list )call (call (attribute (identifier_filters) identifier_filters (identifier_NoImageFilter) identifier_NoImageFilter )attribute (argument_list )argument_list )call (call (attribute (identifier_filters) identifier_filters (identifier_SizeImageFilter) identifier_SizeImageFilter )attribute (argument_list )argument_list )call (call (attribute (identifier_filters) identifier_filters (identifier_MonoImageFilter) identifier_MonoImageFilter )attribute (argument_list )argument_list )call (call (attribute (identifier_filters) identifier_filters (identifier_FormatImageFilter) identifier_FormatImageFilter )attribute (argument_list )argument_list )call )list )argument_list )call )return_statement )block )function_definition )module
The param is the image URL, which is returned if it passes all the filters.
(module (function_definition (function_name_inject_trace_header) function_name_inject_trace_header (parameters (identifier_headers) identifier_headers (identifier_entity) identifier_entity )parameters (block (if_statement (not_operator (identifier_entity) identifier_entity )not_operator (block (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_entity) identifier_entity (string_'type') string_'type' )argument_list )call (comparison_operator (attribute (identifier_entity) identifier_entity (identifier_type) identifier_type )attribute (string_'subsegment') string_'subsegment' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_header) identifier_header (call (attribute (attribute (identifier_entity) identifier_entity (identifier_parent_segment) identifier_parent_segment )attribute (identifier_get_origin_trace_header) identifier_get_origin_trace_header )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_header) identifier_header (call (attribute (identifier_entity) identifier_entity (identifier_get_origin_trace_header) identifier_get_origin_trace_header )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_data) identifier_data (conditional_expression (attribute (identifier_header) identifier_header (identifier_data) identifier_data )attribute (identifier_header) identifier_header (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_to_insert) identifier_to_insert (call (identifier_TraceHeader) identifier_TraceHeader (argument_list (keyword_argument (identifier_root) identifier_root (attribute (identifier_entity) identifier_entity (identifier_trace_id) identifier_trace_id )attribute )keyword_argument (keyword_argument (identifier_parent) identifier_parent (attribute (identifier_entity) identifier_entity (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_sampled) identifier_sampled (attribute (identifier_entity) identifier_entity (identifier_sampled) identifier_sampled )attribute )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_to_insert) identifier_to_insert (identifier_to_header_str) identifier_to_header_str )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_headers) identifier_headers (attribute (identifier_http) identifier_http (identifier_XRAY_HEADER) identifier_XRAY_HEADER )attribute )subscript (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Extract trace id, entity id and sampling decision from the input entity and inject these information to headers. :param dict headers: http headers to inject :param Entity entity: trace entity that the trace header value generated from.
(module (function_definition (function_name_remove_draft_child) function_name_remove_draft_child (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_draft_child) identifier_draft_child )attribute (block (with_statement (with_clause (with_item (call (attribute (attribute (identifier_db) identifier_db (identifier_session) identifier_session )attribute (identifier_begin_nested) identifier_begin_nested )attribute (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_PIDNodeVersioning) identifier_PIDNodeVersioning (identifier_self) identifier_self )argument_list )call (identifier_remove_child) identifier_remove_child )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_draft_child) identifier_draft_child )attribute (keyword_argument (identifier_reorder) identifier_reorder (True) True )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )if_statement )block )function_definition )module
Remove the draft child from versioning.
(module (function_definition (function_name_link_head) function_name_link_head (parameters (identifier_self) identifier_self (identifier_node) identifier_node )parameters (block (assert_statement (not_operator (attribute (identifier_node) identifier_node (identifier_tail) identifier_tail )attribute )not_operator )assert_statement (expression_statement (assignment (identifier_old_head) identifier_old_head (attribute (identifier_self) identifier_self (identifier_head) identifier_head )attribute )assignment )expression_statement (if_statement (identifier_old_head) identifier_old_head (block (assert_statement (comparison_operator (attribute (identifier_old_head) identifier_old_head (identifier_tail) identifier_tail )attribute (identifier_self) identifier_self )comparison_operator )assert_statement (expression_statement (assignment (attribute (identifier_old_head) identifier_old_head (identifier_tail) identifier_tail )attribute (identifier_node) identifier_node )assignment )expression_statement (expression_statement (assignment (attribute (identifier_node) identifier_node (identifier_head) identifier_head )attribute (identifier_old_head) identifier_old_head )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_node) identifier_node (identifier_tail) identifier_tail )attribute (identifier_self) identifier_self )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_head) identifier_head )attribute (identifier_node) identifier_node )assignment )expression_statement )block )function_definition )module
Add a node to the head.
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_gevent) identifier_gevent (identifier_killall) identifier_killall )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__tasks) identifier__tasks )attribute (keyword_argument (identifier_block) identifier_block (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__tasks) identifier__tasks )attribute (list )list )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__ssh) identifier__ssh )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Terminate a bridge session
(module (function_definition (function_name_no_operation) function_name_no_operation (parameters (identifier_self) identifier_self (default_parameter (identifier_onerror) identifier_onerror (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_request) identifier_request (identifier_NoOperation) identifier_NoOperation )attribute (argument_list (keyword_argument (identifier_display) identifier_display (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute )keyword_argument (keyword_argument (identifier_onerror) identifier_onerror (identifier_onerror) identifier_onerror )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Do nothing but send a request to the server.
(module (function_definition (function_name_get_settings) function_name_get_settings (parameters (identifier_all) identifier_all (identifier_key) identifier_key )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_Database) identifier_Database (argument_list (string_"settings") string_"settings" )argument_list )call (as_pattern_target (identifier_s) identifier_s )as_pattern_target )as_pattern )with_item )with_clause (block (if_statement (identifier_all) identifier_all (block (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (identifier_zip) identifier_zip (argument_list (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_s) identifier_s (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_s) identifier_s (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{} = {}") string_"{} = {}" (identifier_format) identifier_format )attribute (argument_list (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )argument_list )call )expression_statement )block )for_statement )block (elif_clause (identifier_key) identifier_key (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{} = {}") string_"{} = {}" (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key (subscript (identifier_s) identifier_s (identifier_key) identifier_key )subscript )argument_list )call )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Don't know what you want? Try --all") string_"Don't know what you want? Try --all" )argument_list )call )expression_statement )block )else_clause )if_statement )block )with_statement )block )function_definition )module
View Hitman internal settings. Use 'all' for all keys
(module (function_definition (function_name_create_dn_in_filter) function_name_create_dn_in_filter (parameters (identifier_filter_class) identifier_filter_class (identifier_filter_value) identifier_filter_value (identifier_helper) identifier_helper )parameters (block (expression_statement (assignment (identifier_in_filter) identifier_in_filter (call (identifier_FilterFilter) identifier_FilterFilter (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_in_filter) identifier_in_filter (identifier_AddChild) identifier_AddChild )attribute (argument_list (call (identifier_create_dn_wcard_filter) identifier_create_dn_wcard_filter (argument_list (identifier_filter_class) identifier_filter_class (identifier_filter_value) identifier_filter_value )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_in_filter) identifier_in_filter )return_statement )block )function_definition )module
Creates filter object for given class name, and DN values.
(module (function_definition (function_name_control) function_name_control (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_HTMLElement) identifier_HTMLElement )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_id) identifier_id (call (attribute (identifier_self) identifier_self (identifier_getAttribute) identifier_getAttribute )attribute (argument_list (string_'for') string_'for' )argument_list )call )assignment )expression_statement (if_statement (identifier_id) identifier_id (block (if_statement (attribute (identifier_self) identifier_self (identifier_ownerDocument) identifier_ownerDocument )attribute (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ownerDocument) identifier_ownerDocument )attribute (identifier_getElementById) identifier_getElementById )attribute (argument_list (identifier_id) identifier_id )argument_list )call )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_id) identifier_id (identifier_str) identifier_str )argument_list )call (block (import_from_statement (dotted_name (identifier_wdom) identifier_wdom (identifier_document) identifier_document )dotted_name (dotted_name (identifier_getElementById) identifier_getElementById )dotted_name )import_from_statement (return_statement (call (identifier_getElementById) identifier_getElementById (argument_list (identifier_id) identifier_id )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'"for" attribute must be string') string_'"for" attribute must be string' )argument_list )call )raise_statement )block )else_clause )if_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Return related HTMLElement object.
(module (function_definition (function_name_MakeUniformPmf) function_name_MakeUniformPmf (parameters (identifier_low) identifier_low (identifier_high) identifier_high (identifier_n) identifier_n )parameters (block (expression_statement (assignment (identifier_pmf) identifier_pmf (call (identifier_Pmf) identifier_Pmf (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_x) identifier_x (call (attribute (identifier_numpy) identifier_numpy (identifier_linspace) identifier_linspace )attribute (argument_list (identifier_low) identifier_low (identifier_high) identifier_high (identifier_n) identifier_n )argument_list )call (block (expression_statement (call (attribute (identifier_pmf) identifier_pmf (identifier_Set) identifier_Set )attribute (argument_list (identifier_x) identifier_x (integer_1) integer_1 )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_pmf) identifier_pmf (identifier_Normalize) identifier_Normalize )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_pmf) identifier_pmf )return_statement )block )function_definition )module
Make a uniform Pmf. low: lowest value (inclusive) high: highest value (inclusize) n: number of values
(module (function_definition (function_name_colorspace) function_name_colorspace (parameters (identifier_im) identifier_im (default_parameter (identifier_bw) identifier_bw (False) False )default_parameter (default_parameter (identifier_replace_alpha) identifier_replace_alpha (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (attribute (identifier_im) identifier_im (identifier_mode) identifier_mode )attribute (string_'I') string_'I' )comparison_operator (block (expression_statement (assignment (identifier_im) identifier_im (call (attribute (identifier_im) identifier_im (identifier_point) identifier_point )attribute (argument_list (call (identifier_list) identifier_list (argument_list (call (identifier__points_table) identifier__points_table (argument_list )argument_list )call )argument_list )call (string_'L') string_'L' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_is_transparent) identifier_is_transparent (call (attribute (identifier_utils) identifier_utils (identifier_is_transparent) identifier_is_transparent )attribute (argument_list (identifier_im) identifier_im )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_is_grayscale) identifier_is_grayscale (comparison_operator (attribute (identifier_im) identifier_im (identifier_mode) identifier_mode )attribute (tuple (string_'L') string_'L' (string_'LA') string_'LA' )tuple )comparison_operator )assignment )expression_statement (expression_statement (assignment (identifier_new_mode) identifier_new_mode (attribute (identifier_im) identifier_im (identifier_mode) identifier_mode )attribute )assignment )expression_statement (if_statement (boolean_operator (identifier_is_grayscale) identifier_is_grayscale (identifier_bw) identifier_bw )boolean_operator (block (expression_statement (assignment (identifier_new_mode) identifier_new_mode (string_'L') string_'L' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_new_mode) identifier_new_mode (string_'RGB') string_'RGB' )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_is_transparent) identifier_is_transparent (block (if_statement (identifier_replace_alpha) identifier_replace_alpha (block (if_statement (comparison_operator (attribute (identifier_im) identifier_im (identifier_mode) identifier_mode )attribute (string_'RGBA') string_'RGBA' )comparison_operator (block (expression_statement (assignment (identifier_im) identifier_im (call (attribute (identifier_im) identifier_im (identifier_convert) identifier_convert )attribute (argument_list (string_'RGBA') string_'RGBA' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_base) identifier_base (call (attribute (identifier_Image) identifier_Image (identifier_new) identifier_new )attribute (argument_list (string_'RGBA') string_'RGBA' (attribute (identifier_im) identifier_im (identifier_size) identifier_size )attribute (identifier_replace_alpha) identifier_replace_alpha )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_base) identifier_base (identifier_paste) identifier_paste )attribute (argument_list (identifier_im) identifier_im (keyword_argument (identifier_mask) identifier_mask (identifier_im) identifier_im )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_im) identifier_im (identifier_base) identifier_base )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_new_mode) identifier_new_mode (binary_operator (identifier_new_mode) identifier_new_mode (string_'A') string_'A' )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_im) identifier_im (identifier_mode) identifier_mode )attribute (identifier_new_mode) identifier_new_mode )comparison_operator (block (expression_statement (assignment (identifier_im) identifier_im (call (attribute (identifier_im) identifier_im (identifier_convert) identifier_convert )attribute (argument_list (identifier_new_mode) identifier_new_mode )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_im) identifier_im )return_statement )block )function_definition )module
Convert images to the correct color space. A passive option (i.e. always processed) of this method is that all images (unless grayscale) are converted to RGB colorspace. This processor should be listed before :func:`scale_and_crop` so palette is changed before the image is resized. bw Make the thumbnail grayscale (not really just black & white). replace_alpha Replace any transparency layer with a solid color. For example, ``replace_alpha='#fff'`` would replace the transparency layer with white.
(module (function_definition (function_name_hexblock_byte) function_name_hexblock_byte (parameters (identifier_cls) identifier_cls (identifier_data) identifier_data (default_parameter (identifier_address) identifier_address (None) None )default_parameter (default_parameter (identifier_bits) identifier_bits (None) None )default_parameter (default_parameter (identifier_separator) identifier_separator (string_' ') string_' ' )default_parameter (default_parameter (identifier_width) identifier_width (integer_16) integer_16 )default_parameter )parameters (block (return_statement (call (attribute (identifier_cls) identifier_cls (identifier_hexblock_cb) identifier_hexblock_cb )attribute (argument_list (attribute (identifier_cls) identifier_cls (identifier_hexadecimal) identifier_hexadecimal )attribute (identifier_data) identifier_data (identifier_address) identifier_address (identifier_bits) identifier_bits (identifier_width) identifier_width (keyword_argument (identifier_cb_kwargs) identifier_cb_kwargs (dictionary (pair (string_'separator') string_'separator' (identifier_separator) identifier_separator )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Dump a block of hexadecimal BYTEs from binary data. @type data: str @param data: Binary data. @type address: str @param address: Memory address where the data was read from. @type bits: int @param bits: (Optional) Number of bits of the target architecture. The default is platform dependent. See: L{HexDump.address_size} @type separator: str @param separator: Separator between the hexadecimal representation of each BYTE. @type width: int @param width: (Optional) Maximum number of BYTEs to convert per text line. @rtype: str @return: Multiline output text.
(module (function_definition (function_name_get_dicts) function_name_get_dicts (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_reader) identifier_reader (call (attribute (identifier_csv) identifier_csv (identifier_DictReader) identifier_DictReader )attribute (argument_list (call (identifier_open) identifier_open (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (string_"r") string_"r" (keyword_argument (identifier_encoding) identifier_encoding (attribute (identifier_self) identifier_self (identifier_encoding) identifier_encoding )attribute )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_row) identifier_row (identifier_reader) identifier_reader (block (if_statement (identifier_row) identifier_row (block (expression_statement (yield (identifier_row) identifier_row )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Gets dicts in file :return: (generator of) of dicts with data from .csv file
(module (function_definition (function_name_xdifference) function_name_xdifference (parameters (identifier_self) identifier_self (identifier_to) identifier_to )parameters (block (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (expression_list (integer_0) integer_0 (integer_1) integer_1 )expression_list )assignment )expression_statement (assert_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_level) identifier_level )attribute (attribute (identifier_to) identifier_to (identifier_level) identifier_level )attribute )comparison_operator )assert_statement (expression_statement (assignment (identifier_self_tile) identifier_self_tile (call (identifier_list) identifier_list (argument_list (subscript (call (attribute (identifier_self) identifier_self (identifier_to_tile) identifier_to_tile )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_to_tile) identifier_to_tile (call (identifier_list) identifier_list (argument_list (subscript (call (attribute (identifier_to) identifier_to (identifier_to_tile) identifier_to_tile )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (subscript (identifier_self_tile) identifier_self_tile (identifier_x) identifier_x )subscript (subscript (identifier_to_tile) identifier_to_tile (identifier_x) identifier_x )subscript )comparison_operator (comparison_operator (subscript (identifier_self_tile) identifier_self_tile (identifier_y) identifier_y )subscript (subscript (identifier_self_tile) identifier_self_tile (identifier_y) identifier_y )subscript )comparison_operator )boolean_operator (block (expression_statement (assignment (pattern_list (identifier_ne_tile) identifier_ne_tile (identifier_sw_tile) identifier_sw_tile )pattern_list (expression_list (identifier_self_tile) identifier_self_tile (identifier_to_tile) identifier_to_tile )expression_list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_sw_tile) identifier_sw_tile (identifier_ne_tile) identifier_ne_tile )pattern_list (expression_list (identifier_self_tile) identifier_self_tile (identifier_to_tile) identifier_to_tile )expression_list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_cur) identifier_cur (subscript (identifier_ne_tile) identifier_ne_tile (slice (colon) colon )slice )subscript )assignment )expression_statement (while_statement (comparison_operator (subscript (identifier_cur) identifier_cur (identifier_x) identifier_x )subscript (subscript (identifier_sw_tile) identifier_sw_tile (identifier_x) identifier_x )subscript )comparison_operator (block (while_statement (comparison_operator (subscript (identifier_cur) identifier_cur (identifier_y) identifier_y )subscript (subscript (identifier_sw_tile) identifier_sw_tile (identifier_y) identifier_y )subscript )comparison_operator (block (expression_statement (yield (call (identifier_from_tile) identifier_from_tile (argument_list (call (identifier_tuple) identifier_tuple (argument_list (identifier_cur) identifier_cur )argument_list )call (attribute (identifier_self) identifier_self (identifier_level) identifier_level )attribute )argument_list )call )yield )expression_statement (expression_statement (augmented_assignment (subscript (identifier_cur) identifier_cur (identifier_y) identifier_y )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (expression_statement (augmented_assignment (subscript (identifier_cur) identifier_cur (identifier_x) identifier_x )subscript (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (subscript (identifier_cur) identifier_cur (identifier_y) identifier_y )subscript (subscript (identifier_ne_tile) identifier_ne_tile (identifier_y) identifier_y )subscript )assignment )expression_statement )block )while_statement )block )function_definition )module
Generator Gives the difference of quadkeys between self and to Generator in case done on a low level Only works with quadkeys of same level
(module (function_definition (function_name_strip_filter) function_name_strip_filter (parameters (identifier_value) identifier_value )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_basestring) identifier_basestring )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_bleach) identifier_bleach (identifier_clean) identifier_clean )attribute (argument_list (identifier_value) identifier_value (keyword_argument (identifier_tags) identifier_tags (identifier_ALLOWED_TAGS) identifier_ALLOWED_TAGS )keyword_argument (keyword_argument (identifier_attributes) identifier_attributes (identifier_ALLOWED_ATTRIBUTES) identifier_ALLOWED_ATTRIBUTES )keyword_argument (keyword_argument (identifier_styles) identifier_styles (identifier_ALLOWED_STYLES) identifier_ALLOWED_STYLES )keyword_argument (keyword_argument (identifier_strip) identifier_strip (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Strips HTML tags from strings according to SANITIZER_ALLOWED_TAGS, SANITIZER_ALLOWED_ATTRIBUTES and SANITIZER_ALLOWED_STYLES variables in settings. Example usage: {% load sanitizer %} {{ post.content|strip_html }}
(module (function_definition (function_name_random) function_name_random (parameters (identifier_game) identifier_game )parameters (block (expression_statement (assignment (attribute (identifier_game) identifier_game (identifier_valid_moves) identifier_valid_moves )attribute (call (identifier_tuple) identifier_tuple (argument_list (call (identifier_sorted) identifier_sorted (argument_list (attribute (identifier_game) identifier_game (identifier_valid_moves) identifier_valid_moves )attribute (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier__) identifier__ )lambda_parameters (call (attribute (identifier_rand) identifier_rand (identifier_random) identifier_random )attribute (argument_list )argument_list )call )lambda )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement )block )function_definition )module
Prefers moves randomly. :param Game game: game to play :return: None
(module (function_definition (function_name_wait_for_browser_close) function_name_wait_for_browser_close (parameters (identifier_b) identifier_b )parameters (block (if_statement (identifier_b) identifier_b (block (if_statement (not_operator (identifier___ACTIVE) identifier___ACTIVE )not_operator (block (expression_statement (call (identifier_wait_failover) identifier_wait_failover (argument_list (identifier_wait_for_browser_close) identifier_wait_for_browser_close )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (identifier_wait_for_frame) identifier_wait_for_frame (argument_list (call (attribute (call (attribute (identifier_b) identifier_b (identifier_GetBrowserImp) identifier_GetBrowserImp )attribute (argument_list )argument_list )call (identifier_GetMainFrame) identifier_GetMainFrame )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Can be used to wait until a TBrowser is closed
(module (function_definition (function_name_log_startup_info) function_name_log_startup_info (parameters )parameters (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_always) identifier_always )attribute (argument_list (string_"Starting mongo-connector version: %s") string_"Starting mongo-connector version: %s" (identifier___version__) identifier___version__ )argument_list )call )expression_statement (if_statement (comparison_operator (string_"dev") string_"dev" (identifier___version__) identifier___version__ )comparison_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_warning) identifier_warning )attribute (argument_list (string_"This is a development version (%s) of mongo-connector") string_"This is a development version (%s) of mongo-connector" (identifier___version__) identifier___version__ )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_always) identifier_always )attribute (argument_list (string_"Python version: %s") string_"Python version: %s" (attribute (identifier_sys) identifier_sys (identifier_version) identifier_version )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_always) identifier_always )attribute (argument_list (string_"Platform: %s") string_"Platform: %s" (call (attribute (identifier_platform) identifier_platform (identifier_platform) identifier_platform )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_pymongo) identifier_pymongo (string_"__version__") string_"__version__" )argument_list )call (block (expression_statement (assignment (identifier_pymongo_version) identifier_pymongo_version (attribute (identifier_pymongo) identifier_pymongo (identifier___version__) identifier___version__ )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_pymongo_version) identifier_pymongo_version (attribute (identifier_pymongo) identifier_pymongo (identifier_version) identifier_version )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_always) identifier_always )attribute (argument_list (string_"pymongo version: %s") string_"pymongo version: %s" (identifier_pymongo_version) identifier_pymongo_version )argument_list )call )expression_statement (if_statement (not_operator (call (attribute (identifier_pymongo) identifier_pymongo (identifier_has_c) identifier_has_c )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_"pymongo version %s was installed without the C extensions. ") string_"pymongo version %s was installed without the C extensions. " (string_'"InvalidBSON: Date value out of range" errors may occur if ') string_'"InvalidBSON: Date value out of range" errors may occur if ' (string_"there are documents with BSON Datetimes that represent times ") string_"there are documents with BSON Datetimes that represent times " (string_"outside of Python's datetime limit.") string_"outside of Python's datetime limit." )concatenated_string (attribute (identifier_pymongo) identifier_pymongo (identifier___version__) identifier___version__ )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Log info about the current environment.
(module (function_definition (function_name_format_terminal_row) function_name_format_terminal_row (parameters (identifier_headers) identifier_headers (identifier_example_row) identifier_example_row )parameters (block (function_definition (function_name_format_column) function_name_format_column (parameters (identifier_col) identifier_col )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_col) identifier_col (identifier_str) identifier_str )argument_list )call (block (return_statement (string_'{{:{w}.{w}}}') string_'{{:{w}.{w}}}' )return_statement )block )if_statement (return_statement (string_'{{:<{w}}}') string_'{{:<{w}}}' )return_statement )block )function_definition (expression_statement (assignment (identifier_widths) identifier_widths (list_comprehension (call (identifier_max) identifier_max (argument_list (call (identifier_len) identifier_len (argument_list (identifier_h) identifier_h )argument_list )call (call (identifier_len) identifier_len (argument_list (call (identifier_str) identifier_str (argument_list (identifier_d) identifier_d )argument_list )call )argument_list )call )argument_list )call (for_in_clause (pattern_list (identifier_h) identifier_h (identifier_d) identifier_d )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_headers) identifier_headers (identifier_example_row) identifier_example_row )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_original_last_width) identifier_original_last_width (subscript (identifier_widths) identifier_widths (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_isatty) identifier_isatty )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_widths) identifier_widths (unary_operator (integer_1) integer_1 )unary_operator )subscript (call (identifier_max) identifier_max (argument_list (call (identifier_len) identifier_len (argument_list (subscript (identifier_headers) identifier_headers (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call (binary_operator (binary_operator (call (attribute (identifier_tty) identifier_tty (identifier_width) identifier_width )attribute (argument_list )argument_list )call (call (identifier_sum) identifier_sum (generator_expression (binary_operator (identifier_w) identifier_w (integer_2) integer_2 )binary_operator (for_in_clause (identifier_w) identifier_w (subscript (identifier_widths) identifier_widths (slice (integer_0) integer_0 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )for_in_clause )generator_expression )call )binary_operator (integer_3) integer_3 )binary_operator )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_cols) identifier_cols (list_comprehension (call (attribute (call (identifier_format_column) identifier_format_column (argument_list (identifier_c) identifier_c )argument_list )call (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_w) identifier_w (identifier_w) identifier_w )keyword_argument )argument_list )call (for_in_clause (pattern_list (identifier_c) identifier_c (identifier_w) identifier_w )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_example_row) identifier_example_row (identifier_widths) identifier_widths )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_format_string) identifier_format_string (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_cols) identifier_cols )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_original_last_width) identifier_original_last_width (subscript (identifier_widths) identifier_widths (unary_operator (integer_1) integer_1 )unary_operator )subscript )comparison_operator (block (expression_statement (augmented_assignment (identifier_format_string) identifier_format_string (string_'...') string_'...' )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_format_string) identifier_format_string )return_statement )block )function_definition )module
Uses headers and a row of example data to generate a format string for printing a single row of data. Args: headers (tuple of strings): The headers for each column of data example_row (tuple): A representative tuple of strings or ints Returns string: A format string with a size for each column
(module (function_definition (function_name___content_type_matches) function_name___content_type_matches (parameters (identifier_self) identifier_self (identifier_content_type) identifier_content_type (identifier_available_content_types) identifier_available_content_types )parameters (block (if_statement (comparison_operator (identifier_content_type) identifier_content_type (None) None )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (identifier_content_type) identifier_content_type (identifier_available_content_types) identifier_available_content_types )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (for_statement (identifier_available_content_type) identifier_available_content_type (identifier_available_content_types) identifier_available_content_types (block (if_statement (comparison_operator (identifier_available_content_type) identifier_available_content_type (identifier_content_type) identifier_content_type )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Check if the given content type matches one of the available content types. Args: content_type (str): The given content type. available_content_types list(str): All the available content types. Returns: bool: True if a match was found, False otherwise.
(module (function_definition (function_name_get_root_repositories) function_name_get_root_repositories (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (None) None )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (identifier_get_root_catalogs) identifier_get_root_catalogs )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (call (identifier_RepositoryLookupSession) identifier_RepositoryLookupSession (argument_list (attribute (identifier_self) identifier_self (identifier__proxy) identifier__proxy )attribute (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )argument_list )call (identifier_get_repositories_by_ids) identifier_get_repositories_by_ids )attribute (argument_list (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_root_repository_ids) identifier_get_root_repository_ids )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Gets the root repositories in the repository hierarchy. A node with no parents is an orphan. While all repository ``Ids`` are known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root node or child of another node. return: (osid.repository.RepositoryList) - the root repositories raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method is must be implemented.*
(module (function_definition (function_name_derive) function_name_derive (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_new_version) identifier_new_version (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_tuple) identifier_tuple )type (type (identifier_list) identifier_list )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (string_"Model") string_"Model" )type (block (expression_statement (assignment (identifier_meta) identifier_meta (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute )assignment )expression_statement (expression_statement (assignment (identifier_first_time) identifier_first_time (comparison_operator (attribute (identifier_self) identifier_self (identifier__initial_version) identifier__initial_version )attribute (attribute (identifier_self) identifier_self (identifier_version) identifier_version )attribute )comparison_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_new_version) identifier_new_version (None) None )comparison_operator (block (expression_statement (assignment (identifier_new_version) identifier_new_version (subscript (identifier_meta) identifier_meta (string_"version") string_"version" )subscript )assignment )expression_statement (expression_statement (augmented_assignment (subscript (identifier_new_version) identifier_new_version (unary_operator (integer_1) integer_1 )unary_operator )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_new_version) identifier_new_version (tuple (identifier_tuple) identifier_tuple (identifier_list) identifier_list )tuple )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"new_version must be either a list or a tuple, got %s") string_"new_version must be either a list or a tuple, got %s" (call (identifier_type) identifier_type (argument_list (identifier_new_version) identifier_new_version )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_"version") string_"version" )subscript (call (identifier_list) identifier_list (argument_list (identifier_new_version) identifier_new_version )argument_list )call )assignment )expression_statement (if_statement (identifier_first_time) identifier_first_time (block (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_"parent") string_"parent" )subscript (subscript (identifier_meta) identifier_meta (string_"uuid") string_"uuid" )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_"uuid") string_"uuid" )subscript (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_uuid) identifier_uuid (identifier_uuid4) identifier_uuid4 )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Inherit the new model from the current one - used for versioning. \ This operation is in-place. :param new_version: The version of the new model. :return: The derived model - self.
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_host) identifier_host (identifier_port) identifier_port (identifier_username) identifier_username (identifier_password) identifier_password )parameters (block (expression_statement (assignment (identifier_session) identifier_session (call (attribute (identifier_ftplib) identifier_ftplib (identifier_FTP) identifier_FTP )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_connect) identifier_connect )attribute (argument_list (identifier_host) identifier_host (identifier_port) identifier_port )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_login) identifier_login )attribute (argument_list (identifier_username) identifier_username (identifier_password) identifier_password )argument_list )call )expression_statement (return_statement (identifier_session) identifier_session )return_statement )block )function_definition )module
Connect and login to an FTP server and return ftplib.FTP object.
(module (function_definition (function_name__get_chart_info) function_name__get_chart_info (parameters (identifier_df) identifier_df (identifier_vtype) identifier_vtype (identifier_cat) identifier_cat (identifier_prep) identifier_prep (identifier_callers) identifier_callers )parameters (block (expression_statement (assignment (identifier_maxval_raw) identifier_maxval_raw (call (identifier_max) identifier_max (argument_list (call (identifier_list) identifier_list (argument_list (subscript (identifier_df) identifier_df (string_"value.floor") string_"value.floor" )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_curdf) identifier_curdf (subscript (identifier_df) identifier_df (binary_operator (binary_operator (parenthesized_expression (comparison_operator (subscript (identifier_df) identifier_df (string_"variant.type") string_"variant.type" )subscript (identifier_vtype) identifier_vtype )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (subscript (identifier_df) identifier_df (string_"category") string_"category" )subscript (identifier_cat) identifier_cat )comparison_operator )parenthesized_expression )binary_operator (parenthesized_expression (comparison_operator (subscript (identifier_df) identifier_df (string_"bamprep") string_"bamprep" )subscript (identifier_prep) identifier_prep )comparison_operator )parenthesized_expression )binary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_vals) identifier_vals (list )list )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (list )list )assignment )expression_statement (for_statement (identifier_c) identifier_c (identifier_callers) identifier_callers (block (expression_statement (assignment (identifier_row) identifier_row (subscript (identifier_curdf) identifier_curdf (comparison_operator (subscript (identifier_df) identifier_df (string_"caller") string_"caller" )subscript (identifier_c) identifier_c )comparison_operator )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_row) identifier_row )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_vals) identifier_vals (identifier_append) identifier_append )attribute (argument_list (subscript (call (identifier_list) identifier_list (argument_list (subscript (identifier_row) identifier_row (string_"value.floor") string_"value.floor" )subscript )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_labels) identifier_labels (identifier_append) identifier_append )attribute (argument_list (subscript (call (identifier_list) identifier_list (argument_list (subscript (identifier_row) identifier_row (string_"value") string_"value" )subscript )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_vals) identifier_vals (identifier_append) identifier_append )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_labels) identifier_labels (identifier_append) identifier_append )attribute (argument_list (string_"") string_"" )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (expression_list (identifier_vals) identifier_vals (identifier_labels) identifier_labels (identifier_maxval_raw) identifier_maxval_raw )expression_list )return_statement )block )function_definition )module
Retrieve values for a specific variant type, category and prep method.
(module (function_definition (function_name_list_after) function_name_list_after (parameters (identifier_self) identifier_self (identifier_message_id) identifier_message_id (default_parameter (identifier_limit) identifier_limit (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_list) identifier_list )attribute (argument_list (keyword_argument (identifier_after_id) identifier_after_id (identifier_message_id) identifier_message_id )keyword_argument (keyword_argument (identifier_limit) identifier_limit (identifier_limit) identifier_limit )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a page of group messages created after a message. This is used to page forwards through messages. :param str message_id: the ID of a message :param int limit: maximum number of messages per page :return: group messages :rtype: :class:`~groupy.pagers.MessageList`
(module (function_definition (function_name__slice2rows) function_name__slice2rows (parameters (identifier_self) identifier_self (identifier_start) identifier_start (identifier_stop) identifier_stop (default_parameter (identifier_step) identifier_step (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_nrows) identifier_nrows (subscript (attribute (identifier_self) identifier_self (identifier__info) identifier__info )attribute (string_'nrows') string_'nrows' )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_start) identifier_start (None) None )comparison_operator (block (expression_statement (assignment (identifier_start) identifier_start (integer_0) integer_0 )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_stop) identifier_stop (None) None )comparison_operator (block (expression_statement (assignment (identifier_stop) identifier_stop (identifier_nrows) identifier_nrows )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_step) identifier_step (None) None )comparison_operator (block (expression_statement (assignment (identifier_step) identifier_step (integer_1) integer_1 )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_tstart) identifier_tstart (call (attribute (identifier_self) identifier_self (identifier__fix_range) identifier__fix_range )attribute (argument_list (identifier_start) identifier_start )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tstop) identifier_tstop (call (attribute (identifier_self) identifier_self (identifier__fix_range) identifier__fix_range )attribute (argument_list (identifier_stop) identifier_stop )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_tstart) identifier_tstart (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_tstop) identifier_tstop (identifier_nrows) identifier_nrows )comparison_operator )boolean_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (comparison_operator (identifier_stop) identifier_stop (identifier_start) identifier_start )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"start is greater than stop in slice") string_"start is greater than stop in slice" )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_numpy) identifier_numpy (identifier_arange) identifier_arange )attribute (argument_list (identifier_tstart) identifier_tstart (identifier_tstop) identifier_tstop (identifier_step) identifier_step (keyword_argument (identifier_dtype) identifier_dtype (string_'i8') string_'i8' )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Convert a slice to an explicit array of rows
(module (function_definition (function_name__read_repos) function_name__read_repos (parameters (identifier_conf_file) identifier_conf_file (identifier_repos) identifier_repos (identifier_filename) identifier_filename (identifier_regex) identifier_regex )parameters (block (for_statement (identifier_line) identifier_line (identifier_conf_file) identifier_conf_file (block (expression_statement (assignment (identifier_line) identifier_line (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_stringutils) identifier_stringutils )attribute (identifier_to_unicode) identifier_to_unicode )attribute (argument_list (identifier_line) identifier_line )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_regex) identifier_regex (identifier_search) identifier_search )attribute (argument_list (identifier_line) identifier_line )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_repo) identifier_repo (call (identifier__create_repo) identifier__create_repo (argument_list (identifier_line) identifier_line (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_repo) identifier_repo (string_'uri') string_'uri' )subscript (identifier_repos) identifier_repos )comparison_operator (block (expression_statement (assignment (subscript (identifier_repos) identifier_repos (subscript (identifier_repo) identifier_repo (string_'uri') string_'uri' )subscript )subscript (list (identifier_repo) identifier_repo )list )assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Read repos from configuration file
(module (function_definition (function_name__ToJsonName) function_name__ToJsonName (parameters (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_capitalize_next) identifier_capitalize_next (False) False )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (identifier_c) identifier_c (identifier_name) identifier_name (block (if_statement (comparison_operator (identifier_c) identifier_c (string_'_') string_'_' )comparison_operator (block (expression_statement (assignment (identifier_capitalize_next) identifier_capitalize_next (True) True )assignment )expression_statement )block (elif_clause (identifier_capitalize_next) identifier_capitalize_next (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_c) identifier_c (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_capitalize_next) identifier_capitalize_next (False) False )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (augmented_assignment (identifier_result) identifier_result (identifier_c) identifier_c )augmented_assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_result) identifier_result )argument_list )call )return_statement )block )function_definition )module
Converts name to Json name and returns it.
(module (function_definition (function_name_install_time) function_name_install_time (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_time1970) identifier_time1970 (attribute (identifier_self) identifier_self (identifier___mod_time1970) identifier___mod_time1970 )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (pattern_list (identifier_date_string) identifier_date_string (identifier_item_type) identifier_item_type )pattern_list (line_continuation_\) line_continuation_\ (call (attribute (identifier_win32api) identifier_win32api (identifier_RegQueryValueEx) identifier_RegQueryValueEx )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___reg_uninstall_handle) identifier___reg_uninstall_handle )attribute (string_'InstallDate') string_'InstallDate' )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (identifier_pywintypes) identifier_pywintypes (identifier_error) identifier_error )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_exc) identifier_exc (identifier_winerror) identifier_winerror )attribute (attribute (identifier_winerror) identifier_winerror (identifier_ERROR_FILE_NOT_FOUND) identifier_ERROR_FILE_NOT_FOUND )attribute )comparison_operator (block (return_statement (identifier_time1970) identifier_time1970 )return_statement )block (else_clause (block (raise_statement )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_item_type) identifier_item_type (attribute (identifier_win32con) identifier_win32con (identifier_REG_SZ) identifier_REG_SZ )attribute )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_date_object) identifier_date_object (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_date_string) identifier_date_string (string_"%Y%m%d") string_"%Y%m%d" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_time1970) identifier_time1970 (call (attribute (identifier_time) identifier_time (identifier_mktime) identifier_mktime )attribute (argument_list (call (attribute (identifier_date_object) identifier_date_object (identifier_timetuple) identifier_timetuple )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (return_statement (identifier_time1970) identifier_time1970 )return_statement )block )function_definition )module
Return the install time, or provide an estimate of install time. Installers or even self upgrading software must/should update the date held within InstallDate field when they change versions. Some installers do not set ``InstallDate`` at all so we use the last modified time on the registry key. Returns: int: Seconds since 1970 UTC.
(module (function_definition (function_name_query) function_name_query (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_b64_query) identifier_b64_query )attribute )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_s) identifier_s (call (identifier_QSerializer) identifier_QSerializer (argument_list (keyword_argument (identifier_base64) identifier_base64 (True) True )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_s) identifier_s (identifier_loads) identifier_loads )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_b64_query) identifier_b64_query )attribute )argument_list )call )return_statement )block )function_definition )module
De-serialize, decode and return an ORM query stored in b64_query.
(module (function_definition (function_name_commit) function_name_commit (parameters (identifier_self) identifier_self (default_parameter (identifier_session) identifier_session (None) None )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier___cleared) identifier___cleared )attribute (block (return_statement )return_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier__parent) identifier__parent )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__commit_parent) identifier__commit_parent )attribute (argument_list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__commit_repository) identifier__commit_repository )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__clear) identifier__clear )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Merge modified objects into parent transaction. Once commited a transaction object is not usable anymore :param:session: current sqlalchemy Session
(module (function_definition (function_name_configure) function_name_configure (parameters (identifier_self) identifier_self (identifier_transport) identifier_transport (identifier_auth) identifier_auth (identifier_address) identifier_address (identifier_port) identifier_port )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute (identifier_transport) identifier_transport )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_username) identifier_username )attribute (attribute (identifier_auth) identifier_auth (identifier_username) identifier_username )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_address) identifier_address )attribute (identifier_address) identifier_address )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_port) identifier_port )attribute (identifier_port) identifier_port )assignment )expression_statement )block )function_definition )module
Connect paramiko transport :type auth: :py:class`margaritashotgun.auth.AuthMethods` :param auth: authentication object :type address: str :param address: remote server ip or hostname :type port: int :param port: remote server port :type hostkey: :py:class:`paramiko.key.HostKey` :param hostkey: remote host ssh server key
(module (function_definition (function_name_get_workflow_actions) function_name_get_workflow_actions (parameters (identifier_obj) identifier_obj )parameters (block (function_definition (function_name_translate) function_name_translate (parameters (identifier_id) identifier_id )parameters (block (return_statement (call (identifier_t) identifier_t (argument_list (call (identifier_PMF) identifier_PMF (argument_list (binary_operator (identifier_id) identifier_id (string_"_transition_title") string_"_transition_title" )binary_operator )argument_list )call )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (identifier_transids) identifier_transids (call (identifier_getAllowedTransitions) identifier_getAllowedTransitions (argument_list (identifier_obj) identifier_obj )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_actions) identifier_actions (list_comprehension (dictionary (pair (string_'id') string_'id' (identifier_it) identifier_it )pair (pair (string_'title') string_'title' (call (identifier_translate) identifier_translate (argument_list (identifier_it) identifier_it )argument_list )call )pair )dictionary (for_in_clause (identifier_it) identifier_it (identifier_transids) identifier_transids )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_actions) identifier_actions )return_statement )block )function_definition )module
Compile a list of possible workflow transitions for this object
(module (function_definition (function_name_home) function_name_home (parameters (identifier_self) identifier_self )parameters (type (string_'InstrumentContext') string_'InstrumentContext' )type (block (function_definition (function_name_home_dummy) function_name_home_dummy (parameters (identifier_mount) identifier_mount )parameters (block (pass_statement )pass_statement )block )function_definition (expression_statement (call (attribute (identifier_cmds) identifier_cmds (identifier_do_publish) identifier_do_publish )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_broker) identifier_broker )attribute (attribute (identifier_cmds) identifier_cmds (identifier_home) identifier_home )attribute (identifier_home_dummy) identifier_home_dummy (string_'before') string_'before' (None) None (None) None (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__mount) identifier__mount )attribute (identifier_name) identifier_name )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__hw_manager) identifier__hw_manager )attribute (identifier_hardware) identifier_hardware )attribute (identifier_home_z) identifier_home_z )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__mount) identifier__mount )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__hw_manager) identifier__hw_manager )attribute (identifier_hardware) identifier_hardware )attribute (identifier_home_plunger) identifier_home_plunger )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__mount) identifier__mount )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cmds) identifier_cmds (identifier_do_publish) identifier_do_publish )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_broker) identifier_broker )attribute (attribute (identifier_cmds) identifier_cmds (identifier_home) identifier_home )attribute (identifier_home_dummy) identifier_home_dummy (string_'after') string_'after' (identifier_self) identifier_self (None) None (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__mount) identifier__mount )attribute (identifier_name) identifier_name )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Home the robot. :returns: This instance.
(module (function_definition (function_name_combine_inputs) function_name_combine_inputs (parameters (identifier_self) identifier_self (identifier_args) identifier_args (identifier_kw) identifier_kw (identifier_ignore_args) identifier_ignore_args )parameters (block (expression_statement (string_"Combines the args and kw in a unique way, such that ordering of kwargs does not lead to recompute") string_"Combines the args and kw in a unique way, such that ordering of kwargs does not lead to recompute" )expression_statement (expression_statement (assignment (identifier_inputs) identifier_inputs (binary_operator (identifier_args) identifier_args (call (identifier_tuple) identifier_tuple (generator_expression (subscript (identifier_c) identifier_c (integer_1) integer_1 )subscript (for_in_clause (identifier_c) identifier_c (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_kw) identifier_kw (identifier_items) identifier_items )attribute (argument_list )argument_list )call (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (subscript (identifier_x) identifier_x (integer_0) integer_0 )subscript )lambda )keyword_argument )argument_list )call )for_in_clause )generator_expression )call )binary_operator )assignment )expression_statement (return_statement (list_comprehension (identifier_a) identifier_a (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_a) identifier_a )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_inputs) identifier_inputs )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_i) identifier_i (identifier_ignore_args) identifier_ignore_args )comparison_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Combines the args and kw in a unique way, such that ordering of kwargs does not lead to recompute
(module (function_definition (function_name__ParseIdentifierMappingsTable) function_name__ParseIdentifierMappingsTable (parameters (identifier_self) identifier_self (identifier_parser_mediator) identifier_parser_mediator (identifier_esedb_table) identifier_esedb_table )parameters (block (expression_statement (assignment (identifier_identifier_mappings) identifier_identifier_mappings (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_esedb_record) identifier_esedb_record (attribute (identifier_esedb_table) identifier_esedb_table (identifier_records) identifier_records )attribute (block (if_statement (attribute (identifier_parser_mediator) identifier_parser_mediator (identifier_abort) identifier_abort )attribute (block (break_statement )break_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_identifier) identifier_identifier (identifier_mapped_value) identifier_mapped_value )pattern_list (call (attribute (identifier_self) identifier_self (identifier__ParseIdentifierMappingRecord) identifier__ParseIdentifierMappingRecord )attribute (argument_list (identifier_parser_mediator) identifier_parser_mediator (attribute (identifier_esedb_table) identifier_esedb_table (identifier_name) identifier_name )attribute (identifier_esedb_record) identifier_esedb_record )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_identifier) identifier_identifier (None) None )comparison_operator (comparison_operator (identifier_mapped_value) identifier_mapped_value (None) None )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (identifier_identifier) identifier_identifier (identifier_identifier_mappings) identifier_identifier_mappings )comparison_operator (block (expression_statement (call (attribute (identifier_parser_mediator) identifier_parser_mediator (identifier_ProduceExtractionWarning) identifier_ProduceExtractionWarning )attribute (argument_list (call (attribute (string_'identifier: {0:d} already exists in mappings.') string_'identifier: {0:d} already exists in mappings.' (identifier_format) identifier_format )attribute (argument_list (identifier_identifier) identifier_identifier )argument_list )call )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (subscript (identifier_identifier_mappings) identifier_identifier_mappings (identifier_identifier) identifier_identifier )subscript (identifier_mapped_value) identifier_mapped_value )assignment )expression_statement )block )for_statement (return_statement (identifier_identifier_mappings) identifier_identifier_mappings )return_statement )block )function_definition )module
Extracts identifier mappings from the SruDbIdMapTable table. Args: parser_mediator (ParserMediator): mediates interactions between parsers and other components, such as storage and dfvfs. esedb_table (pyesedb.table): table. Returns: dict[int, str]: mapping of numeric identifiers to their string representation.
(module (function_definition (function_name_enqueue_data) function_name_enqueue_data (parameters (identifier_self) identifier_self (identifier_event_type) identifier_event_type (identifier_data) identifier_data )parameters (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier_lock) identifier_lock )attribute )with_item )with_clause (block (expression_statement (assignment (identifier_listeners) identifier_listeners (call (attribute (attribute (identifier_self) identifier_self (identifier_listeners) identifier_listeners )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_listener) identifier_listener (identifier_listeners) identifier_listeners (block (expression_statement (call (attribute (identifier_listener) identifier_listener (identifier_enqueue) identifier_enqueue )attribute (argument_list (identifier_event_type) identifier_event_type (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_must_process) identifier_must_process )attribute (True) True )assignment )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Enqueue a data item for specific event type
(module (function_definition (function_name__collapse_to_cwl_record_single) function_name__collapse_to_cwl_record_single (parameters (identifier_data) identifier_data (identifier_want_attrs) identifier_want_attrs (identifier_input_files) identifier_input_files )parameters (block (expression_statement (assignment (identifier_out) identifier_out (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_want_attrs) identifier_want_attrs (block (expression_statement (assignment (identifier_key_parts) identifier_key_parts (call (attribute (identifier_key) identifier_key (identifier_split) identifier_split )attribute (argument_list (string_"__") string_"__" )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_out) identifier_out (identifier_key) identifier_key )subscript (call (identifier__to_cwl) identifier__to_cwl (argument_list (call (attribute (identifier_tz) identifier_tz (identifier_get_in) identifier_get_in )attribute (argument_list (identifier_key_parts) identifier_key_parts (identifier_data) identifier_data )argument_list )call (identifier_input_files) identifier_input_files )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Convert a single sample into a CWL record.
(module (function_definition (function_name_set_string) function_name_set_string (parameters (identifier_self) identifier_self (identifier_option) identifier_option (identifier_value) identifier_value )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_str) identifier_str )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_"%s must be a string") string_"%s must be a string" (identifier_option) identifier_option )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_option) identifier_option )subscript (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Set a string option. Args: option (str): name of option. value (str): value of the option. Raises: TypeError: Value must be a string.
(module (function_definition (function_name_preprocess_topics) function_name_preprocess_topics (parameters (identifier_source_groupid) identifier_source_groupid (identifier_source_topics) identifier_source_topics (identifier_dest_groupid) identifier_dest_groupid (identifier_topics_dest_group) identifier_topics_dest_group )parameters (block (expression_statement (assignment (identifier_common_topics) identifier_common_topics (list_comprehension (identifier_topic) identifier_topic (for_in_clause (identifier_topic) identifier_topic (identifier_topics_dest_group) identifier_topics_dest_group )for_in_clause (if_clause (comparison_operator (identifier_topic) identifier_topic (identifier_source_topics) identifier_source_topics )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (if_statement (identifier_common_topics) identifier_common_topics (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (concatenated_string (string_"Error: Consumer Group ID: {groupid} is already ") string_"Error: Consumer Group ID: {groupid} is already " (string_"subscribed to following topics: {topic}.\nPlease delete this ") string_"subscribed to following topics: {topic}.\nPlease delete this " (string_"topics from new group before re-running the ") string_"topics from new group before re-running the " (string_"command.") string_"command." )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_groupid) identifier_groupid (identifier_dest_groupid) identifier_dest_groupid )keyword_argument (keyword_argument (identifier_topic) identifier_topic (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_common_topics) identifier_common_topics )argument_list )call )keyword_argument )argument_list )call (keyword_argument (identifier_file) identifier_file (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute )keyword_argument )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 (if_statement (identifier_topics_dest_group) identifier_topics_dest_group (block (expression_statement (assignment (identifier_in_str) identifier_in_str (parenthesized_expression (call (attribute (concatenated_string (string_"New Consumer Group: {dest_groupid} already ") string_"New Consumer Group: {dest_groupid} already " (string_"exists.\nTopics subscribed to by the consumer groups are listed ") string_"exists.\nTopics subscribed to by the consumer groups are listed " (string_"below:\n{source_groupid}: {source_group_topics}\n") string_"below:\n{source_groupid}: {source_group_topics}\n" (string_"{dest_groupid}: {dest_group_topics}\nDo you intend to copy into") string_"{dest_groupid}: {dest_group_topics}\nDo you intend to copy into" (string_"existing consumer destination-group? (y/n)") string_"existing consumer destination-group? (y/n)" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_source_groupid) identifier_source_groupid (identifier_source_groupid) identifier_source_groupid )keyword_argument (keyword_argument (identifier_source_group_topics) identifier_source_group_topics (identifier_source_topics) identifier_source_topics )keyword_argument (keyword_argument (identifier_dest_groupid) identifier_dest_groupid (identifier_dest_groupid) identifier_dest_groupid )keyword_argument (keyword_argument (identifier_dest_group_topics) identifier_dest_group_topics (identifier_topics_dest_group) identifier_topics_dest_group )keyword_argument )argument_list )call )parenthesized_expression )assignment )expression_statement (expression_statement (call (identifier_prompt_user_input) identifier_prompt_user_input (argument_list (identifier_in_str) identifier_in_str )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Pre-process the topics in source and destination group for duplicates.
(module (function_definition (function_name_import_file) function_name_import_file (parameters (identifier_self) identifier_self (identifier_filepath) identifier_filepath (identifier_filterindex) identifier_filterindex )parameters (block (expression_statement (call (identifier_post_command_event) identifier_post_command_event (argument_list (attribute (identifier_self) identifier_self (identifier_main_window) identifier_main_window )attribute (attribute (identifier_self) identifier_self (identifier_ContentChangedMsg) identifier_ContentChangedMsg )attribute )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_filterindex) identifier_filterindex (integer_0) integer_0 )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__import_csv) identifier__import_csv )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_filterindex) identifier_filterindex (integer_1) integer_1 )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__import_txt) identifier__import_txt )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )return_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_msg) identifier_msg (call (identifier__) identifier__ (argument_list (string_"Unknown import choice {choice}.") string_"Unknown import choice {choice}." )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (identifier_msg) identifier_msg (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_choice) identifier_choice (identifier_filterindex) identifier_filterindex )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_short_msg) identifier_short_msg (call (identifier__) identifier__ (argument_list (string_'Error reading CSV file') string_'Error reading CSV file' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_main_window) identifier_main_window )attribute (identifier_interfaces) identifier_interfaces )attribute (identifier_display_warning) identifier_display_warning )attribute (argument_list (identifier_msg) identifier_msg (identifier_short_msg) identifier_short_msg )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Imports external file Parameters ---------- filepath: String \tPath of import file filterindex: Integer \tIndex for type of file, 0: csv, 1: tab-delimited text file
(module (function_definition (function_name_init_default) function_name_init_default (parameters (identifier_self) identifier_self )parameters (block (import_statement (dotted_name (identifier_f311) identifier_f311 )dotted_name )import_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_default_filename) identifier_default_filename )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (call (attribute (string_"Class '{}' has no default filename") string_"Class '{}' has no default filename" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_fullpath) identifier_fullpath (call (attribute (identifier_f311) identifier_f311 (identifier_get_default_data_path) identifier_get_default_data_path )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_default_filename) identifier_default_filename )attribute (keyword_argument (identifier_class_) identifier_class_ (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_load) identifier_load )attribute (argument_list (identifier_fullpath) identifier_fullpath )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute (None) None )assignment )expression_statement )block )function_definition )module
Initializes object with its default values Tries to load self.default_filename from default data directory. For safety, filename is reset to None so that it doesn't point to the original file.
(module (function_definition (function_name_get_sequence_rules_by_genus_type) function_name_get_sequence_rules_by_genus_type (parameters (identifier_self) identifier_self (identifier_sequence_rule_genus_type) identifier_sequence_rule_genus_type )parameters (block (expression_statement (assignment (identifier_collection) identifier_collection (call (identifier_JSONClientValidated) identifier_JSONClientValidated (argument_list (string_'assessment_authoring') string_'assessment_authoring' (keyword_argument (identifier_collection) identifier_collection (string_'SequenceRule') string_'SequenceRule' )keyword_argument (keyword_argument (identifier_runtime) identifier_runtime (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (call (attribute (identifier_collection) identifier_collection (identifier_find) identifier_find )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (dictionary (pair (string_'genusTypeId') string_'genusTypeId' (call (identifier_str) identifier_str (argument_list (identifier_sequence_rule_genus_type) identifier_sequence_rule_genus_type )argument_list )call )pair )dictionary (dictionary_splat (call (attribute (identifier_self) identifier_self (identifier__view_filter) identifier__view_filter )attribute (argument_list )argument_list )call )dictionary_splat )argument_list )call )argument_list )call (identifier_sort) identifier_sort )attribute (argument_list (string_'_id') string_'_id' (identifier_DESCENDING) identifier_DESCENDING )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_objects) identifier_objects (identifier_SequenceRuleList) identifier_SequenceRuleList )attribute (argument_list (identifier_result) identifier_result (keyword_argument (identifier_runtime) identifier_runtime (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )keyword_argument (keyword_argument (identifier_proxy) identifier_proxy (attribute (identifier_self) identifier_self (identifier__proxy) identifier__proxy )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets a ``SequenceRuleList`` corresponding to the given sequence rule genus ``Type`` which does not include sequence rule of genus types derived from the specified ``Type``. arg: sequence_rule_genus_type (osid.type.Type): a sequence rule genus type return: (osid.assessment.authoring.SequenceRuleList) - the returned ``SequenceRule`` list raise: NullArgument - ``sequence_rule_genus_type`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_descendants) function_name_descendants (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_i) identifier_i (attribute (attribute (identifier_self) identifier_self (identifier_current_item) identifier_current_item )attribute (identifier_items) identifier_items )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_move_to) identifier_move_to )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_i) identifier_i (identifier_type) identifier_type )attribute (identifier_TYPE_COLLECTION) identifier_TYPE_COLLECTION )comparison_operator (block (for_statement (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute (block (expression_statement (yield (identifier_c) identifier_c )yield )expression_statement )block )for_statement )block (else_clause (block (expression_statement (yield (identifier_i) identifier_i )yield )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_move_up) identifier_move_up )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Recursively return every dataset below current item.
(module (function_definition (function_name_check_type_of_nest_spec_keys_and_values) function_name_check_type_of_nest_spec_keys_and_values (parameters (identifier_nest_spec) identifier_nest_spec )parameters (block (try_statement (block (assert_statement (call (identifier_all) identifier_all (argument_list (list_comprehension (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_k) identifier_k (identifier_str) identifier_str )argument_list )call (for_in_clause (identifier_k) identifier_k (identifier_nest_spec) identifier_nest_spec )for_in_clause )list_comprehension )argument_list )call )assert_statement (assert_statement (call (identifier_all) identifier_all (argument_list (list_comprehension (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_nest_spec) identifier_nest_spec (identifier_k) identifier_k )subscript (identifier_list) identifier_list )argument_list )call (for_in_clause (identifier_k) identifier_k (identifier_nest_spec) identifier_nest_spec )for_in_clause )list_comprehension )argument_list )call )assert_statement )block (except_clause (identifier_AssertionError) identifier_AssertionError (block (expression_statement (assignment (identifier_msg) identifier_msg (string_"All nest_spec keys/values must be strings/lists.") string_"All nest_spec keys/values must be strings/lists." )assignment )expression_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (None) None )return_statement )block )function_definition )module
Ensures that the keys and values of `nest_spec` are strings and lists. Raises a helpful ValueError if they are. Parameters ---------- nest_spec : OrderedDict, or None, optional. Keys are strings that define the name of the nests. Values are lists of alternative ids, denoting which alternatives belong to which nests. Each alternative id must only be associated with a single nest! Default == None. Returns ------- None.
(module (function_definition (function_name__update_nonce_explicit) function_name__update_nonce_explicit (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_ne) identifier_ne (binary_operator (attribute (identifier_self) identifier_self (identifier_nonce_explicit) identifier_nonce_explicit )attribute (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_nonce_explicit) identifier_nonce_explicit )attribute (binary_operator (identifier_ne) identifier_ne (binary_operator (integer_2) integer_2 (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier_nonce_explicit_len) identifier_nonce_explicit_len )attribute (integer_8) integer_8 )binary_operator )parenthesized_expression )binary_operator )binary_operator )assignment )expression_statement )block )function_definition )module
Increment the explicit nonce while avoiding any overflow.
(module (function_definition (function_name_prepare_destruction) function_name_prepare_destruction (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__tool) identifier__tool )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__painter) identifier__painter )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_relieve_model) identifier_relieve_model )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__selection) identifier__selection )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__selection) identifier__selection )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__Observer__PROP_TO_METHS) identifier__Observer__PROP_TO_METHS )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__Observer__METH_TO_PROPS) identifier__Observer__METH_TO_PROPS )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__Observer__PAT_TO_METHS) identifier__Observer__PAT_TO_METHS )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__Observer__METH_TO_PAT) identifier__Observer__METH_TO_PAT )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__Observer__PAT_METH_TO_KWARGS) identifier__Observer__PAT_METH_TO_KWARGS )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Get rid of circular references
(module (function_definition (function_name__expand_to_beam_size) function_name__expand_to_beam_size (parameters (identifier_tensor) identifier_tensor (identifier_beam_size) identifier_beam_size )parameters (block (expression_statement (assignment (identifier_tensor) identifier_tensor (call (attribute (identifier_tf) identifier_tf (identifier_expand_dims) identifier_expand_dims )attribute (argument_list (identifier_tensor) identifier_tensor (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tile_dims) identifier_tile_dims (binary_operator (list (integer_1) integer_1 )list (attribute (attribute (identifier_tensor) identifier_tensor (identifier_shape) identifier_shape )attribute (identifier_ndims) identifier_ndims )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_tile_dims) identifier_tile_dims (integer_1) integer_1 )subscript (identifier_beam_size) identifier_beam_size )assignment )expression_statement (return_statement (call (attribute (identifier_tf) identifier_tf (identifier_tile) identifier_tile )attribute (argument_list (identifier_tensor) identifier_tensor (identifier_tile_dims) identifier_tile_dims )argument_list )call )return_statement )block )function_definition )module
Tiles a given tensor by beam_size. Args: tensor: tensor to tile [batch_size, ...] beam_size: How much to tile the tensor by. Returns: Tiled tensor [batch_size, beam_size, ...]
(module (function_definition (function_name_AddShowToTVLibrary) function_name_AddShowToTVLibrary (parameters (identifier_self) identifier_self (identifier_showName) identifier_showName )parameters (block (expression_statement (call (attribute (attribute (identifier_goodlogging) identifier_goodlogging (identifier_Log) identifier_Log )attribute (identifier_Info) identifier_Info )attribute (argument_list (string_"DB") string_"DB" (call (attribute (string_"Adding {0} to TV library") string_"Adding {0} to TV library" (identifier_format) identifier_format )attribute (argument_list (identifier_showName) identifier_showName )argument_list )call (keyword_argument (identifier_verbosity) identifier_verbosity (attribute (identifier_self) identifier_self (identifier_logVerbosity) identifier_logVerbosity )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_currentShowValues) identifier_currentShowValues (call (attribute (identifier_self) identifier_self (identifier_SearchTVLibrary) identifier_SearchTVLibrary )attribute (argument_list (keyword_argument (identifier_showName) identifier_showName (identifier_showName) identifier_showName )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_currentShowValues) identifier_currentShowValues (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__ActionDatabase) identifier__ActionDatabase )attribute (argument_list (string_"INSERT INTO TVLibrary (ShowName) VALUES (?)") string_"INSERT INTO TVLibrary (ShowName) VALUES (?)" (tuple (identifier_showName) identifier_showName )tuple )argument_list )call )expression_statement (expression_statement (assignment (identifier_showID) identifier_showID (subscript (subscript (call (attribute (identifier_self) identifier_self (identifier__ActionDatabase) identifier__ActionDatabase )attribute (argument_list (string_"SELECT (ShowID) FROM TVLibrary WHERE ShowName=?") string_"SELECT (ShowID) FROM TVLibrary WHERE ShowName=?" (tuple (identifier_showName) identifier_showName )tuple )argument_list )call (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (identifier_showID) identifier_showID )return_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_goodlogging) identifier_goodlogging (identifier_Log) identifier_Log )attribute (identifier_Fatal) identifier_Fatal )attribute (argument_list (string_"DB") string_"DB" (call (attribute (string_"An entry for {0} already exists in the TV library") string_"An entry for {0} already exists in the TV library" (identifier_format) identifier_format )attribute (argument_list (identifier_showName) identifier_showName )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Add show to TVLibrary table. If the show already exists in the table a fatal error is raised. Parameters ---------- showName : string Show name to add to TV library table. Returns ---------- int Unique show id generated for show when it is added to the table. Used across the database to reference this show.
(module (function_definition (function_name_is_step_visible) function_name_is_step_visible (parameters (identifier_self) identifier_self (identifier_step) identifier_step )parameters (block (return_statement (boolean_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_idempotent_dict) identifier_idempotent_dict )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_step) identifier_step (True) True )argument_list )call (line_continuation_\) line_continuation_\ (comparison_operator (identifier_step) identifier_step (attribute (attribute (identifier_self) identifier_self (identifier_storage) identifier_storage )attribute (identifier_validated_step_data) identifier_validated_step_data )attribute )comparison_operator )boolean_operator )return_statement )block )function_definition )module
Returns whether the given `step` should be included in the wizard; it is included if either the form is idempotent or not filled in before.
(module (function_definition (function_name_split_cmdline) function_name_split_cmdline (parameters (identifier_cmdline) identifier_cmdline )parameters (block (expression_statement (assignment (pattern_list (identifier_path) identifier_path (identifier_cmd) identifier_cmd )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (subscript (identifier_cmdline) identifier_cmdline (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_arguments) identifier_arguments (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (subscript (identifier_cmdline) identifier_cmdline (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_path) identifier_path (identifier_cmd) identifier_cmd (identifier_arguments) identifier_arguments )expression_list )return_statement )block )function_definition )module
Return path, cmd and arguments for a process cmdline.
(module (function_definition (function_name__get_field_mapping) function_name__get_field_mapping (parameters (identifier_self) identifier_self (identifier_schema) identifier_schema )parameters (block (if_statement (comparison_operator (string_'mapping') string_'mapping' (identifier_schema) identifier_schema )comparison_operator (block (return_statement (subscript (identifier_schema) identifier_schema (string_'mapping') string_'mapping' )subscript )return_statement )block (elif_clause (boolean_operator (comparison_operator (subscript (identifier_schema) identifier_schema (string_'type') string_'type' )subscript (string_'dict') string_'dict' )comparison_operator (comparison_operator (string_'schema') string_'schema' (identifier_schema) identifier_schema )comparison_operator )boolean_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__get_mapping) identifier__get_mapping )attribute (argument_list (subscript (identifier_schema) identifier_schema (string_'schema') string_'schema' )subscript )argument_list )call )return_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (subscript (identifier_schema) identifier_schema (string_'type') string_'type' )subscript (string_'list') string_'list' )comparison_operator (comparison_operator (string_'schema') string_'schema' (call (attribute (identifier_schema) identifier_schema (identifier_get) identifier_get )attribute (argument_list (string_'schema') string_'schema' (dictionary )dictionary )argument_list )call )comparison_operator )boolean_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__get_mapping) identifier__get_mapping )attribute (argument_list (subscript (subscript (identifier_schema) identifier_schema (string_'schema') string_'schema' )subscript (string_'schema') string_'schema' )subscript )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (subscript (identifier_schema) identifier_schema (string_'type') string_'type' )subscript (string_'datetime') string_'datetime' )comparison_operator (block (return_statement (dictionary (pair (string_'type') string_'type' (string_'date') string_'date' )pair )dictionary )return_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (subscript (identifier_schema) identifier_schema (string_'type') string_'type' )subscript (string_'string') string_'string' )comparison_operator (call (attribute (identifier_schema) identifier_schema (identifier_get) identifier_get )attribute (argument_list (string_'unique') string_'unique' )argument_list )call )boolean_operator (block (return_statement (dictionary (pair (string_'type') string_'type' (string_'string') string_'string' )pair (pair (string_'index') string_'index' (string_'not_analyzed') string_'not_analyzed' )pair )dictionary )return_statement )block )elif_clause )if_statement )block )function_definition )module
Get mapping for single field schema. :param schema: field schema
(module (function_definition (function_name_rebuild) function_name_rebuild (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_plugins) identifier_plugins (identifier_init) identifier_init )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_blockSignals) identifier_blockSignals )attribute (argument_list (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setUpdatesEnabled) identifier_setUpdatesEnabled )attribute (argument_list (False) False )argument_list )call )expression_statement (if_statement (parenthesized_expression (attribute (identifier_self) identifier_self (identifier__editor) identifier__editor )attribute )parenthesized_expression (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__editor) identifier__editor )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__editor) identifier__editor )attribute (identifier_setParent) identifier_setParent )attribute (argument_list (None) None )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__editor) identifier__editor )attribute (identifier_deleteLater) identifier_deleteLater )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__editor) identifier__editor )attribute (None) None )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_plugin_class) identifier_plugin_class (call (attribute (attribute (identifier_plugins) identifier_plugins (identifier_widgets) identifier_widgets )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__columnType) identifier__columnType )attribute )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (identifier_plugin_class) identifier_plugin_class )parenthesized_expression (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__editor) identifier__editor )attribute (call (identifier_plugin_class) identifier_plugin_class (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_layout) identifier_layout )attribute (argument_list )argument_list )call (identifier_addWidget) identifier_addWidget )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__editor) identifier__editor )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_blockSignals) identifier_blockSignals )attribute (argument_list (False) False )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setUpdatesEnabled) identifier_setUpdatesEnabled )attribute (argument_list (True) True )argument_list )call )expression_statement )block )function_definition )module
Clears out all the child widgets from this widget and creates the widget that best matches the column properties for this edit.
(module (function_definition (function_name_load) function_name_load (parameters (identifier_self) identifier_self (identifier_infile) identifier_infile )parameters (block (expression_statement (assignment (identifier_model) identifier_model (call (attribute (identifier_pickle) identifier_pickle (identifier_load) identifier_load )attribute (argument_list (identifier_infile) identifier_infile )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_model) identifier_model (identifier___dict__) identifier___dict__ )attribute )argument_list )call )expression_statement )block )function_definition )module
Deserialize a model from a stored file. By default, unpickle an entire object. If `dump` is overridden to use a different storage format, `load` should be as well. :param file outfile: A file-like object from which to retrieve the serialized model.
(module (function_definition (function_name_setmem) function_name_setmem (parameters (identifier_vm_) identifier_vm_ (identifier_memory) identifier_memory (default_parameter (identifier_config) identifier_config (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier___get_conn) identifier___get_conn (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dom) identifier_dom (call (identifier__get_domain) identifier__get_domain (argument_list (identifier_conn) identifier_conn (identifier_vm_) identifier_vm_ )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_VIRT_STATE_NAME_MAP) identifier_VIRT_STATE_NAME_MAP (identifier_get) identifier_get )attribute (argument_list (subscript (call (attribute (identifier_dom) identifier_dom (identifier_info) identifier_info )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (string_'unknown') string_'unknown' )argument_list )call (string_'shutdown') string_'shutdown' )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_flags) identifier_flags (attribute (identifier_libvirt) identifier_libvirt (identifier_VIR_DOMAIN_MEM_MAXIMUM) identifier_VIR_DOMAIN_MEM_MAXIMUM )attribute )assignment )expression_statement (if_statement (identifier_config) identifier_config (block (expression_statement (assignment (identifier_flags) identifier_flags (binary_operator (identifier_flags) identifier_flags (attribute (identifier_libvirt) identifier_libvirt (identifier_VIR_DOMAIN_AFFECT_CONFIG) identifier_VIR_DOMAIN_AFFECT_CONFIG )attribute )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_ret1) identifier_ret1 (call (attribute (identifier_dom) identifier_dom (identifier_setMemoryFlags) identifier_setMemoryFlags )attribute (argument_list (binary_operator (identifier_memory) identifier_memory (integer_1024) integer_1024 )binary_operator (identifier_flags) identifier_flags )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret2) identifier_ret2 (call (attribute (identifier_dom) identifier_dom (identifier_setMemoryFlags) identifier_setMemoryFlags )attribute (argument_list (binary_operator (identifier_memory) identifier_memory (integer_1024) integer_1024 )binary_operator (attribute (identifier_libvirt) identifier_libvirt (identifier_VIR_DOMAIN_AFFECT_CURRENT) identifier_VIR_DOMAIN_AFFECT_CURRENT )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (comparison_operator (identifier_ret1) identifier_ret1 (identifier_ret2) identifier_ret2 (integer_0) integer_0 )comparison_operator )return_statement )block )function_definition )module
Changes the amount of memory allocated to VM. The VM must be shutdown for this to work. :param vm_: name of the domain :param memory: memory amount to set in MB :param config: if True then libvirt will be asked to modify the config as well :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .. versionadded:: 2019.2.0 :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: .. code-block:: bash salt '*' virt.setmem <domain> <size> salt '*' virt.setmem my_domain 768
(module (function_definition (function_name_in6_getLocalUniquePrefix) function_name_in6_getLocalUniquePrefix (parameters )parameters (block (expression_statement (assignment (identifier_tod) identifier_tod (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_i) identifier_i (call (identifier_int) identifier_int (argument_list (identifier_tod) identifier_tod )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_j) identifier_j (call (identifier_int) identifier_int (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_tod) identifier_tod (identifier_i) identifier_i )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (integer_2) integer_2 (integer_32) integer_32 )binary_operator )parenthesized_expression )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tod) identifier_tod (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_"!II") string_"!II" (identifier_i) identifier_i (identifier_j) identifier_j )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mac) identifier_mac (call (identifier_RandMAC) identifier_RandMAC (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_eui64) identifier_eui64 (subscript (call (identifier_inet_pton) identifier_inet_pton (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET6) identifier_AF_INET6 )attribute (binary_operator (string_'::') string_'::' (call (identifier_in6_mactoifaceid) identifier_in6_mactoifaceid (argument_list (identifier_mac) identifier_mac )argument_list )call )binary_operator )argument_list )call (slice (integer_8) integer_8 (colon) colon )slice )subscript )assignment )expression_statement (import_statement (dotted_name (identifier_hashlib) identifier_hashlib )dotted_name )import_statement (expression_statement (assignment (identifier_globalid) identifier_globalid (subscript (call (attribute (call (attribute (identifier_hashlib) identifier_hashlib (identifier_sha1) identifier_sha1 )attribute (argument_list (binary_operator (identifier_tod) identifier_tod (identifier_eui64) identifier_eui64 )binary_operator )argument_list )call (identifier_digest) identifier_digest )attribute (argument_list )argument_list )call (slice (colon) colon (integer_5) integer_5 )slice )subscript )assignment )expression_statement (return_statement (call (identifier_inet_ntop) identifier_inet_ntop (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET6) identifier_AF_INET6 )attribute (binary_operator (binary_operator (string_b'\xfd') string_b'\xfd' (identifier_globalid) identifier_globalid )binary_operator (binary_operator (string_b'\x00') string_b'\x00' (integer_10) integer_10 )binary_operator )binary_operator )argument_list )call )return_statement )block )function_definition )module
Returns a pseudo-randomly generated Local Unique prefix. Function follows recommendation of Section 3.2.2 of RFC 4193 for prefix generation.
(module (function_definition (function_name__get_token) function_name__get_token (parameters )parameters (block (expression_statement (assignment (identifier_username) identifier_username (call (attribute (call (attribute (identifier___opts__) identifier___opts__ (identifier_get) identifier_get )attribute (argument_list (string_'rallydev') string_'rallydev' (dictionary )dictionary )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'username') string_'username' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_password) identifier_password (call (attribute (call (attribute (identifier___opts__) identifier___opts__ (identifier_get) identifier_get )attribute (argument_list (string_'rallydev') string_'rallydev' (dictionary )dictionary )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'password') string_'password' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (string_'https://rally1.rallydev.com/slm/webservice/v2.0/security/authorize') string_'https://rally1.rallydev.com/slm/webservice/v2.0/security/authorize' )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_http) identifier_http )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_decode) identifier_decode (True) True )keyword_argument (keyword_argument (identifier_decode_type) identifier_decode_type (string_'json') string_'json' )keyword_argument (keyword_argument (identifier_text) identifier_text (True) True )keyword_argument (keyword_argument (identifier_status) identifier_status (True) True )keyword_argument (keyword_argument (identifier_username) identifier_username (identifier_username) identifier_username )keyword_argument (keyword_argument (identifier_password) identifier_password (identifier_password) identifier_password )keyword_argument (keyword_argument (identifier_cookies) identifier_cookies (True) True )keyword_argument (keyword_argument (identifier_persist_session) identifier_persist_session (True) True )keyword_argument (keyword_argument (identifier_opts) identifier_opts (identifier___opts__) identifier___opts__ )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'dict') string_'dict' (identifier_result) identifier_result )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (subscript (subscript (subscript (identifier_result) identifier_result (string_'dict') string_'dict' )subscript (string_'OperationResult') string_'OperationResult' )subscript (string_'SecurityToken') string_'SecurityToken' )subscript )return_statement )block )function_definition )module
Get an auth token
(module (function_definition (function_name_draw) function_name_draw (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_n_feature_subsets_) identifier_n_feature_subsets_ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_means) identifier_means (call (attribute (attribute (identifier_self) identifier_self (identifier_cv_scores_) identifier_cv_scores_ )attribute (identifier_mean) identifier_mean )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sigmas) identifier_sigmas (call (attribute (attribute (identifier_self) identifier_self (identifier_cv_scores_) identifier_cv_scores_ )attribute (identifier_std) identifier_std )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute (identifier_fill_between) identifier_fill_between )attribute (argument_list (identifier_x) identifier_x (binary_operator (identifier_means) identifier_means (identifier_sigmas) identifier_sigmas )binary_operator (binary_operator (identifier_means) identifier_means (identifier_sigmas) identifier_sigmas )binary_operator (keyword_argument (identifier_alpha) identifier_alpha (float_0.25) float_0.25 )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute (identifier_plot) identifier_plot )attribute (argument_list (identifier_x) identifier_x (identifier_means) identifier_means (string_'o-') string_'o-' )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute (identifier_axvline) identifier_axvline )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_n_features_) identifier_n_features_ )attribute (keyword_argument (identifier_c) identifier_c (string_'k') string_'k' )keyword_argument (keyword_argument (identifier_ls) identifier_ls (string_'--') string_'--' )keyword_argument (keyword_argument (identifier_label) identifier_label (call (attribute (string_"n_features = {}\nscore = {:0.3f}") string_"n_features = {}\nscore = {:0.3f}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_n_features_) identifier_n_features_ )attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_cv_scores_) identifier_cv_scores_ )attribute (identifier_mean) identifier_mean )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call (identifier_max) identifier_max )attribute (argument_list )argument_list )call )argument_list )call )keyword_argument )argument_list )call )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute )return_statement )block )function_definition )module
Renders the rfecv curve.
(module (function_definition (function_name_charm_dir) function_name_charm_dir (parameters )parameters (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'JUJU_CHARM_DIR') string_'JUJU_CHARM_DIR' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_d) identifier_d (None) None )comparison_operator (block (return_statement (identifier_d) identifier_d )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'CHARM_DIR') string_'CHARM_DIR' )argument_list )call )return_statement )block )function_definition )module
Return the root directory of the current charm
(module (function_definition (function_name_gid_exists) function_name_gid_exists (parameters (identifier_gid) identifier_gid )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_grp) identifier_grp (identifier_getgrgid) identifier_getgrgid )attribute (argument_list (identifier_gid) identifier_gid )argument_list )call )expression_statement (expression_statement (assignment (identifier_gid_exists) identifier_gid_exists (True) True )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_gid_exists) identifier_gid_exists (False) False )assignment )expression_statement )block )except_clause )try_statement (return_statement (identifier_gid_exists) identifier_gid_exists )return_statement )block )function_definition )module
Check if a gid exists
(module (function_definition (function_name_create_changelog) function_name_create_changelog (parameters (default_parameter (identifier_project_dir) identifier_project_dir (attribute (identifier_os) identifier_os (identifier_curdir) identifier_curdir )attribute )default_parameter (default_parameter (identifier_bugtracker_url) identifier_bugtracker_url (string_'') string_'' )default_parameter (default_parameter (identifier_rpm_format) identifier_rpm_format (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_pkg_info_file) identifier_pkg_info_file (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_project_dir) identifier_project_dir (string_'PKG-INFO') string_'PKG-INFO' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_pkg_info_file) identifier_pkg_info_file )argument_list )call (block (return_statement )return_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (string_'CHANGELOG') string_'CHANGELOG' (string_'wb') string_'wb' )argument_list )call (as_pattern_target (identifier_changelog_fd) identifier_changelog_fd )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_changelog_fd) identifier_changelog_fd (identifier_write) identifier_write )attribute (argument_list (call (attribute (call (identifier_get_changelog) identifier_get_changelog (argument_list (keyword_argument (identifier_project_dir) identifier_project_dir (identifier_project_dir) identifier_project_dir )keyword_argument (keyword_argument (identifier_bugtracker_url) identifier_bugtracker_url (identifier_bugtracker_url) identifier_bugtracker_url )keyword_argument (keyword_argument (identifier_rpm_format) identifier_rpm_format (identifier_rpm_format) identifier_rpm_format )keyword_argument )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Creates the changelog file, if not in a package. :param project_dir: Path to the git repo of the project. :type project_dir: str :param bugtracker_url: Url to the bug tracker for the issues. :type bugtracker_url: str :param rpm_format: if set to True, will make the changelog rpm-compatible. :type rpm_format: bool :rises RuntimeError: If the changelog could not be retrieved
(module (function_definition (function_name_track) function_name_track (parameters (list_splat_pattern (identifier_fields) identifier_fields )list_splat_pattern )parameters (block (function_definition (function_name_inner) function_name_inner (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (call (identifier__track_class) identifier__track_class (argument_list (identifier_cls) identifier_cls (identifier_fields) identifier_fields )argument_list )call )expression_statement (expression_statement (call (identifier__add_get_tracking_url) identifier__add_get_tracking_url (argument_list (identifier_cls) identifier_cls )argument_list )call )expression_statement (return_statement (identifier_cls) identifier_cls )return_statement )block )function_definition (return_statement (identifier_inner) identifier_inner )return_statement )block )function_definition )module
Decorator used to track changes on Model's fields. :Example: >>> @track('name') ... class Human(models.Model): ... name = models.CharField(max_length=30)
(module (function_definition (function_name_master_pub) function_name_master_pub (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier__get_master_uri) identifier__get_master_uri (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (string_'master_ip') string_'master_ip' )subscript (attribute (identifier_self) identifier_self (identifier_publish_port) identifier_publish_port )attribute (keyword_argument (identifier_source_ip) identifier_source_ip (call (attribute (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (identifier_get) identifier_get )attribute (argument_list (string_'source_ip') string_'source_ip' )argument_list )call )keyword_argument (keyword_argument (identifier_source_port) identifier_source_port (call (attribute (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (identifier_get) identifier_get )attribute (argument_list (string_'source_publish_port') string_'source_publish_port' )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the master publish port
(module (function_definition (function_name_get_all_current_trains) function_name_get_all_current_trains (parameters (identifier_self) identifier_self (default_parameter (identifier_train_type) identifier_train_type (None) None )default_parameter (default_parameter (identifier_direction) identifier_direction (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (None) None )assignment )expression_statement (if_statement (identifier_train_type) identifier_train_type (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier_api_base_url) identifier_api_base_url )attribute (string_'getCurrentTrainsXML_WithTrainType') string_'getCurrentTrainsXML_WithTrainType' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'TrainType') string_'TrainType' (subscript (identifier_STATION_TYPE_TO_CODE_DICT) identifier_STATION_TYPE_TO_CODE_DICT (identifier_train_type) identifier_train_type )subscript )pair )dictionary )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier_api_base_url) identifier_api_base_url )attribute (string_'getCurrentTrainsXML') string_'getCurrentTrainsXML' )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (integer_10) integer_10 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (return_statement (list )list )return_statement )block )if_statement (expression_statement (assignment (identifier_trains) identifier_trains (call (attribute (identifier_self) identifier_self (identifier__parse_all_train_data) identifier__parse_all_train_data )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_content) identifier_content )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_direction) identifier_direction (None) None )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__prune_trains) identifier__prune_trains )attribute (argument_list (identifier_trains) identifier_trains (keyword_argument (identifier_direction) identifier_direction (identifier_direction) identifier_direction )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (identifier_trains) identifier_trains )return_statement )block )function_definition )module
Returns all trains that are due to start in the next 10 minutes @param train_type: ['mainline', 'suburban', 'dart']
(module (function_definition (function_name_safe_version) function_name_safe_version (parameters (identifier_version) identifier_version )parameters (block (try_statement (block (return_statement (call (identifier_str) identifier_str (argument_list (call (attribute (attribute (identifier_packaging) identifier_packaging (identifier_version) identifier_version )attribute (identifier_Version) identifier_Version )attribute (argument_list (identifier_version) identifier_version )argument_list )call )argument_list )call )return_statement )block (except_clause (attribute (attribute (identifier_packaging) identifier_packaging (identifier_version) identifier_version )attribute (identifier_InvalidVersion) identifier_InvalidVersion )attribute (block (expression_statement (assignment (identifier_version) identifier_version (call (attribute (identifier_version) identifier_version (identifier_replace) identifier_replace )attribute (argument_list (string_' ') string_' ' (string_'.') string_'.' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_'[^A-Za-z0-9.]+') string_'[^A-Za-z0-9.]+' (string_'-') string_'-' (identifier_version) identifier_version )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Convert an arbitrary string to a standard version string
(module (function_definition (function_name_tiles_are_equal) function_name_tiles_are_equal (parameters (identifier_tile_data_1) identifier_tile_data_1 (identifier_tile_data_2) identifier_tile_data_2 (identifier_fmt) identifier_fmt )parameters (block (if_statement (boolean_operator (identifier_fmt) identifier_fmt (comparison_operator (identifier_fmt) identifier_fmt (identifier_zip_format) identifier_zip_format )comparison_operator )boolean_operator (block (return_statement (call (identifier_metatiles_are_equal) identifier_metatiles_are_equal (argument_list (identifier_tile_data_1) identifier_tile_data_1 (identifier_tile_data_2) identifier_tile_data_2 )argument_list )call )return_statement )block (else_clause (block (return_statement (comparison_operator (identifier_tile_data_1) identifier_tile_data_1 (identifier_tile_data_2) identifier_tile_data_2 )comparison_operator )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns True if the tile data is equal in tile_data_1 and tile_data_2. For most formats, this is a simple byte-wise equality check. For zipped metatiles, we need to check the contents, as the zip format includes metadata such as timestamps and doesn't control file ordering.
(module (function_definition (function_name_where) function_name_where (parameters (identifier_self) identifier_self (identifier_predicate) identifier_predicate )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_closed) identifier_closed )attribute (argument_list )argument_list )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Attempt to call where() on a closed Queryable.") string_"Attempt to call where() on a closed Queryable." )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_is_callable) identifier_is_callable (argument_list (identifier_predicate) identifier_predicate )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (concatenated_string (string_"where() parameter predicate={predicate} is not ") string_"where() parameter predicate={predicate} is not " (string_"callable") string_"callable" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_predicate) identifier_predicate (call (identifier_repr) identifier_repr (argument_list (identifier_predicate) identifier_predicate )argument_list )call )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__create) identifier__create )attribute (argument_list (call (identifier_ifilter) identifier_ifilter (argument_list (identifier_predicate) identifier_predicate (identifier_self) identifier_self )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Filters elements according to whether they match a predicate. Note: This method uses deferred execution. Args: predicate: A unary function which is applied to each element in the source sequence. Source elements for which the predicate returns True will be present in the result. Returns: A Queryable over those elements of the source sequence for which the predicate is True. Raises: ValueError: If the Queryable is closed. TypeError: If the predicate is not callable.
(module (function_definition (function_name_watch) function_name_watch (parameters (identifier_self) identifier_self (identifier_selector) identifier_selector (identifier_callback) identifier_callback )parameters (block (if_statement (comparison_operator (identifier_selector) identifier_selector (attribute (identifier_self) identifier_self (identifier__monitors) identifier__monitors )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__monitors) identifier__monitors )attribute (identifier_selector) identifier_selector )subscript (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__monitors) identifier__monitors )attribute (identifier_selector) identifier_selector )subscript (identifier_add) identifier_add )attribute (argument_list (identifier_callback) identifier_callback )argument_list )call )expression_statement )block )function_definition )module
Call a function whenever a stream changes. Args: selector (DataStreamSelector): The selector to watch. If this is None, it is treated as a wildcard selector that matches every stream. callback (callable): The function to call when a new reading is pushed. Callback is called as: callback(stream, value)
(module (function_definition (function_name_sign_statement) function_name_sign_statement (parameters (identifier_self) identifier_self (identifier_statement) identifier_statement (identifier_node_name) identifier_node_name (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_key_file) identifier_key_file (None) None )default_parameter (default_parameter (identifier_node_id) identifier_node_id (None) None )default_parameter (default_parameter (identifier_id_attr) identifier_id_attr (string_'') string_'' )default_parameter )parameters (block (if_statement (not_operator (identifier_id_attr) identifier_id_attr )not_operator (block (expression_statement (assignment (identifier_id_attr) identifier_id_attr (attribute (identifier_self) identifier_self (identifier_id_attr) identifier_id_attr )attribute )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (not_operator (identifier_key_file) identifier_key_file )not_operator (identifier_key) identifier_key )boolean_operator (block (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_key_file) identifier_key_file )pattern_list (call (identifier_make_temp) identifier_make_temp (argument_list (call (attribute (call (identifier_str) identifier_str (argument_list (identifier_key) identifier_key )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call (string_'.pem') string_'.pem' )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (not_operator (identifier_key) identifier_key )not_operator (not_operator (identifier_key_file) identifier_key_file )not_operator )boolean_operator (block (expression_statement (assignment (identifier_key_file) identifier_key_file (attribute (identifier_self) identifier_self (identifier_key_file) identifier_key_file )attribute )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_crypto) identifier_crypto )attribute (identifier_sign_statement) identifier_sign_statement )attribute (argument_list (identifier_statement) identifier_statement (identifier_node_name) identifier_node_name (identifier_key_file) identifier_key_file (identifier_node_id) identifier_node_id (identifier_id_attr) identifier_id_attr )argument_list )call )return_statement )block )function_definition )module
Sign a SAML statement. :param statement: The statement to be signed :param node_name: string like 'urn:oasis:names:...:Assertion' :param key: The key to be used for the signing, either this or :param key_file: The file where the key can be found :param node_id: :param id_attr: The attribute name for the identifier, normally one of 'id','Id' or 'ID' :return: The signed statement
(module (function_definition (function_name_load) function_name_load (parameters (identifier_self) identifier_self (identifier_data) identifier_data (default_parameter (identifier_many) identifier_many (None) None )default_parameter (default_parameter (identifier_partial) identifier_partial (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ResumptionTokenSchema) identifier_ResumptionTokenSchema (identifier_self) identifier_self )argument_list )call (identifier_load) identifier_load )attribute (argument_list (identifier_data) identifier_data (keyword_argument (identifier_many) identifier_many (identifier_many) identifier_many )keyword_argument (keyword_argument (identifier_partial) identifier_partial (identifier_partial) identifier_partial )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_result) identifier_result (identifier_data) identifier_data )attribute (identifier_update) identifier_update )attribute (argument_list (call (attribute (call (attribute (attribute (identifier_result) identifier_result (identifier_data) identifier_data )attribute (identifier_get) identifier_get )attribute (argument_list (string_'resumptionToken') string_'resumptionToken' (dictionary )dictionary )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'kwargs') string_'kwargs' (dictionary )dictionary )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Deserialize a data structure to an object.
(module (function_definition (function_name_post_build) function_name_post_build (parameters (identifier_self) identifier_self (identifier_pkt) identifier_pkt (identifier_pay) identifier_pay )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_length) identifier_length )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_pkt) identifier_pkt (binary_operator (binary_operator (subscript (identifier_pkt) identifier_pkt (slice (colon) colon (integer_4) integer_4 )slice )subscript (call (identifier_chb) identifier_chb (argument_list (call (identifier_len) identifier_len (argument_list (identifier_pay) identifier_pay )argument_list )call )argument_list )call )binary_operator (subscript (identifier_pkt) identifier_pkt (slice (integer_5) integer_5 (colon) colon )slice )subscript )binary_operator )assignment )expression_statement )block )if_statement (return_statement (binary_operator (identifier_pkt) identifier_pkt (identifier_pay) identifier_pay )binary_operator )return_statement )block )function_definition )module
This will set the ByteField 'length' to the correct value.
(module (function_definition (function_name_bar) function_name_bar (parameters (typed_parameter (identifier_h) identifier_h (type (identifier_Histogram2D) identifier_Histogram2D )type )typed_parameter (keyword_separator )keyword_separator (typed_default_parameter (identifier_barmode) identifier_barmode (type (identifier_str) identifier_str )type (identifier_DEFAULT_BARMODE) identifier_DEFAULT_BARMODE )typed_default_parameter (typed_default_parameter (identifier_alpha) identifier_alpha (type (identifier_float) identifier_float )type (identifier_DEFAULT_ALPHA) identifier_DEFAULT_ALPHA )typed_default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_get_data_kwargs) identifier_get_data_kwargs (call (identifier_pop_many) identifier_pop_many (argument_list (identifier_kwargs) identifier_kwargs (string_"density") string_"density" (string_"cumulative") string_"cumulative" (string_"flatten") string_"flatten" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (list_comprehension (call (attribute (identifier_go) identifier_go (identifier_Bar) identifier_Bar )attribute (argument_list (keyword_argument (identifier_x) identifier_x (attribute (identifier_histogram) identifier_histogram (identifier_bin_centers) identifier_bin_centers )attribute )keyword_argument (keyword_argument (identifier_y) identifier_y (call (identifier_get_data) identifier_get_data (argument_list (identifier_histogram) identifier_histogram (dictionary_splat (identifier_get_data_kwargs) identifier_get_data_kwargs )dictionary_splat )argument_list )call )keyword_argument (keyword_argument (identifier_width) identifier_width (attribute (identifier_histogram) identifier_histogram (identifier_bin_widths) identifier_bin_widths )attribute )keyword_argument (keyword_argument (identifier_name) identifier_name (attribute (identifier_histogram) identifier_histogram (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_opacity) identifier_opacity (identifier_alpha) identifier_alpha )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (for_in_clause (identifier_histogram) identifier_histogram (identifier_h) identifier_h )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_layout) identifier_layout (call (attribute (identifier_go) identifier_go (identifier_Layout) identifier_Layout )attribute (argument_list (keyword_argument (identifier_barmode) identifier_barmode (identifier_barmode) identifier_barmode )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__add_ticks) identifier__add_ticks (argument_list (attribute (identifier_layout) identifier_layout (identifier_xaxis) identifier_xaxis )attribute (subscript (identifier_h) identifier_h (integer_0) integer_0 )subscript (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement (expression_statement (assignment (identifier_figure) identifier_figure (call (attribute (identifier_go) identifier_go (identifier_Figure) identifier_Figure )attribute (argument_list (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_layout) identifier_layout (identifier_layout) identifier_layout )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_figure) identifier_figure )return_statement )block )function_definition )module
Bar plot. Parameters ---------- alpha: Opacity (0.0 - 1.0) barmode : "overlay" | "group" | "stack"
(module (function_definition (function_name_mkdir) function_name_mkdir (parameters (identifier_self) identifier_self (identifier_pathobj) identifier_pathobj (identifier__) identifier__ )parameters (block (if_statement (boolean_operator (not_operator (attribute (identifier_pathobj) identifier_pathobj (identifier_drive) identifier_drive )attribute )not_operator (not_operator (attribute (identifier_pathobj) identifier_pathobj (identifier_root) identifier_root )attribute )not_operator )boolean_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"Full path required: '%s'") string_"Full path required: '%s'" (call (identifier_str) identifier_str (argument_list (identifier_pathobj) identifier_pathobj )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (identifier_pathobj) identifier_pathobj (identifier_exists) identifier_exists )attribute (argument_list )argument_list )call (block (raise_statement (call (identifier_OSError) identifier_OSError (argument_list (integer_17) integer_17 (binary_operator (string_"File exists: '%s'") string_"File exists: '%s'" (call (identifier_str) identifier_str (argument_list (identifier_pathobj) identifier_pathobj )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_pathobj) identifier_pathobj )argument_list )call (string_'/') string_'/' )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_text) identifier_text (identifier_code) identifier_code )pattern_list (call (attribute (identifier_self) identifier_self (identifier_rest_put) identifier_rest_put )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_session) identifier_session (attribute (identifier_pathobj) identifier_pathobj (identifier_session) identifier_session )attribute )keyword_argument (keyword_argument (identifier_verify) identifier_verify (attribute (identifier_pathobj) identifier_pathobj (identifier_verify) identifier_verify )attribute )keyword_argument (keyword_argument (identifier_cert) identifier_cert (attribute (identifier_pathobj) identifier_pathobj (identifier_cert) identifier_cert )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (comparison_operator (identifier_code) identifier_code (integer_201) integer_201 )comparison_operator )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"%s %d") string_"%s %d" (tuple (identifier_text) identifier_text (identifier_code) identifier_code )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Creates remote directory Note that this operation is not recursive
(module (function_definition (function_name__query_select_options) function_name__query_select_options (parameters (identifier_self) identifier_self (identifier_query) identifier_query (default_parameter (identifier_select_columns) identifier_select_columns (None) None )default_parameter )parameters (block (if_statement (identifier_select_columns) identifier_select_columns (block (expression_statement (assignment (identifier__load_options) identifier__load_options (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_column) identifier_column (identifier_select_columns) identifier_select_columns (block (if_statement (comparison_operator (string_".") string_"." (identifier_column) identifier_column )comparison_operator (block (expression_statement (assignment (identifier_model_relation) identifier_model_relation (call (attribute (identifier_self) identifier_self (identifier_get_related_model) identifier_get_related_model )attribute (argument_list (subscript (call (attribute (identifier_column) identifier_column (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_model_already_joinded) identifier_is_model_already_joinded )attribute (argument_list (identifier_query) identifier_query (identifier_model_relation) identifier_model_relation )argument_list )call )not_operator (block (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_query) identifier_query (identifier_join) identifier_join )attribute (argument_list (identifier_model_relation) identifier_model_relation )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier__load_options) identifier__load_options (identifier_append) identifier_append )attribute (argument_list (call (attribute (call (identifier_Load) identifier_Load (argument_list (identifier_model_relation) identifier_model_relation )argument_list )call (identifier_load_only) identifier_load_only )attribute (argument_list (subscript (call (attribute (identifier_column) identifier_column (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_1) integer_1 )subscript )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (if_statement (boolean_operator (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_relation) identifier_is_relation )attribute (argument_list (identifier_column) identifier_column )argument_list )call )not_operator (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier_obj) identifier_obj )attribute (identifier_column) identifier_column )argument_list )call (string_"__call__") string_"__call__" )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier__load_options) identifier__load_options (identifier_append) identifier_append )attribute (argument_list (call (attribute (call (identifier_Load) identifier_Load (argument_list (attribute (identifier_self) identifier_self (identifier_obj) identifier_obj )attribute )argument_list )call (identifier_load_only) identifier_load_only )attribute (argument_list (identifier_column) identifier_column )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier__load_options) identifier__load_options (identifier_append) identifier_append )attribute (argument_list (call (identifier_Load) identifier_Load (argument_list (attribute (identifier_self) identifier_self (identifier_obj) identifier_obj )attribute )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_query) identifier_query (identifier_options) identifier_options )attribute (argument_list (list_splat (call (identifier_tuple) identifier_tuple (argument_list (identifier__load_options) identifier__load_options )argument_list )call )list_splat )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_query) identifier_query )return_statement )block )function_definition )module
Add select load options to query. The goal is to only SQL select what is requested :param query: SQLAlchemy Query obj :param select_columns: (list) of columns :return: SQLAlchemy Query obj
(module (function_definition (function_name_put_cache) function_name_put_cache (parameters (identifier_self) identifier_self (identifier_minions) identifier_minions )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_cupd_out) identifier_cupd_out )attribute (identifier_send) identifier_send )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_serial) identifier_serial )attribute (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_minions) identifier_minions )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
published the given minions to the ConCache
(module (function_definition (function_name_coarse_grain) function_name_coarse_grain (parameters (identifier_G) identifier_G (identifier_ncg) identifier_ncg )parameters (block (if_statement (comparison_operator (identifier_ncg) identifier_ncg (integer_1) integer_1 )comparison_operator (block (return_statement (identifier_G) identifier_G )return_statement )block )if_statement (expression_statement (assignment (identifier_G) identifier_G (call (attribute (identifier_numpy) identifier_numpy (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_G) identifier_G )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_nbin) identifier_nbin (identifier_remainder) identifier_remainder )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (subscript (attribute (identifier_G) identifier_G (identifier_shape) identifier_shape )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_ncg) identifier_ncg )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_remainder) identifier_remainder (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_nbin) identifier_nbin (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_numpy) identifier_numpy (identifier_transpose) identifier_transpose )attribute (argument_list (list_comprehension (binary_operator (call (attribute (identifier_numpy) identifier_numpy (identifier_sum) identifier_sum )attribute (argument_list (subscript (identifier_G) identifier_G (ellipsis_...) ellipsis_... (slice (identifier_i) identifier_i (colon) colon (binary_operator (identifier_i) identifier_i (identifier_ncg) identifier_ncg )binary_operator )slice )subscript (keyword_argument (identifier_axis) identifier_axis (unary_operator (integer_1) integer_1 )unary_operator )keyword_argument )argument_list )call (subscript (attribute (subscript (identifier_G) identifier_G (ellipsis_...) ellipsis_... (slice (identifier_i) identifier_i (colon) colon (binary_operator (identifier_i) identifier_i (identifier_ncg) identifier_ncg )binary_operator )slice )subscript (identifier_shape) identifier_shape )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript )binary_operator (for_in_clause (identifier_i) identifier_i (call (attribute (identifier_numpy) identifier_numpy (identifier_arange) identifier_arange )attribute (argument_list (integer_0) integer_0 (binary_operator (identifier_ncg) identifier_ncg (identifier_nbin) identifier_nbin )binary_operator (identifier_ncg) identifier_ncg )argument_list )call )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Coarse-grain last index of array ``G``. Bin the last index of array ``G`` in bins of width ``ncg``, and replace each bin by its average. Return the binned results. Args: G: Array to be coarse-grained. ncg: Bin width for coarse-graining.
(module (function_definition (function_name_check_bidi) function_name_check_bidi (parameters (identifier_chars) identifier_chars )parameters (block (if_statement (not_operator (identifier_chars) identifier_chars )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_has_RandALCat) identifier_has_RandALCat (call (identifier_any) identifier_any (generator_expression (call (identifier_is_RandALCat) identifier_is_RandALCat (argument_list (identifier_c) identifier_c )argument_list )call (for_in_clause (identifier_c) identifier_c (identifier_chars) identifier_chars )for_in_clause )generator_expression )call )assignment )expression_statement (if_statement (not_operator (identifier_has_RandALCat) identifier_has_RandALCat )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_has_LCat) identifier_has_LCat (call (identifier_any) identifier_any (generator_expression (call (identifier_is_LCat) identifier_is_LCat (argument_list (identifier_c) identifier_c )argument_list )call (for_in_clause (identifier_c) identifier_c (identifier_chars) identifier_chars )for_in_clause )generator_expression )call )assignment )expression_statement (if_statement (identifier_has_LCat) identifier_has_LCat (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"L and R/AL characters must not occur in the same") string_"L and R/AL characters must not occur in the same" (string_" string") string_" string" )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (not_operator (call (identifier_is_RandALCat) identifier_is_RandALCat (argument_list (subscript (identifier_chars) identifier_chars (integer_0) integer_0 )subscript )argument_list )call )not_operator (not_operator (call (identifier_is_RandALCat) identifier_is_RandALCat (argument_list (subscript (identifier_chars) identifier_chars (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"R/AL string must start and end with R/AL character.") string_"R/AL string must start and end with R/AL character." )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Check proper bidirectionality as per stringprep. Operates on a list of unicode characters provided in `chars`.
(module (function_definition (function_name__add_finder) function_name__add_finder (parameters (identifier_importer) identifier_importer (identifier_finder) identifier_finder )parameters (block (expression_statement (assignment (identifier_existing_finder) identifier_existing_finder (call (identifier__get_finder) identifier__get_finder (argument_list (identifier_importer) identifier_importer )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_existing_finder) identifier_existing_finder )not_operator (block (expression_statement (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_register_finder) identifier_register_finder )attribute (argument_list (identifier_importer) identifier_importer (identifier_finder) identifier_finder )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_register_finder) identifier_register_finder )attribute (argument_list (identifier_importer) identifier_importer (call (attribute (identifier_ChainedFinder) identifier_ChainedFinder (identifier_of) identifier_of )attribute (argument_list (identifier_existing_finder) identifier_existing_finder (identifier_finder) identifier_finder )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Register a new pkg_resources path finder that does not replace the existing finder.
(module (function_definition (function_name_grid_reload_from_ids) function_name_grid_reload_from_ids (parameters (identifier_oargrid_jobids) identifier_oargrid_jobids )parameters (block (expression_statement (assignment (identifier_gk) identifier_gk (call (identifier_get_api_client) identifier_get_api_client (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_jobs) identifier_jobs (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_site) identifier_site (identifier_job_id) identifier_job_id )pattern_list (identifier_oargrid_jobids) identifier_oargrid_jobids (block (expression_statement (call (attribute (identifier_jobs) identifier_jobs (identifier_append) identifier_append )attribute (argument_list (subscript (attribute (subscript (attribute (identifier_gk) identifier_gk (identifier_sites) identifier_sites )attribute (identifier_site) identifier_site )subscript (identifier_jobs) identifier_jobs )attribute (identifier_job_id) identifier_job_id )subscript )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_jobs) identifier_jobs )return_statement )block )function_definition )module
Reload all running or pending jobs of Grid'5000 from their ids Args: oargrid_jobids (list): list of ``(site, oar_jobid)`` identifying the jobs on each site Returns: The list of python-grid5000 jobs retrieved
(module (function_definition (function_name_list_files) function_name_list_files (parameters (identifier_start_path) identifier_start_path )parameters (block (expression_statement (assignment (identifier_s) identifier_s (string_u'\n') string_u'\n' )assignment )expression_statement (for_statement (pattern_list (identifier_root) identifier_root (identifier_dirs) identifier_dirs (identifier_files) identifier_files )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_start_path) identifier_start_path )argument_list )call (block (expression_statement (assignment (identifier_level) identifier_level (call (attribute (call (attribute (identifier_root) identifier_root (identifier_replace) identifier_replace )attribute (argument_list (identifier_start_path) identifier_start_path (string_'') string_'' )argument_list )call (identifier_count) identifier_count )attribute (argument_list (attribute (identifier_os) identifier_os (identifier_sep) identifier_sep )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_indent) identifier_indent (binary_operator (binary_operator (string_' ') string_' ' (integer_4) integer_4 )binary_operator (identifier_level) identifier_level )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_s) identifier_s (call (attribute (string_u'{}{}/\n') string_u'{}{}/\n' (identifier_format) identifier_format )attribute (argument_list (identifier_indent) identifier_indent (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_root) identifier_root )argument_list )call )argument_list )call )augmented_assignment )expression_statement (expression_statement (assignment (identifier_sub_indent) identifier_sub_indent (binary_operator (binary_operator (string_' ') string_' ' (integer_4) integer_4 )binary_operator (parenthesized_expression (binary_operator (identifier_level) identifier_level (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (for_statement (identifier_f) identifier_f (identifier_files) identifier_files (block (expression_statement (augmented_assignment (identifier_s) identifier_s (call (attribute (string_u'{}{}\n') string_u'{}{}\n' (identifier_format) identifier_format )attribute (argument_list (identifier_sub_indent) identifier_sub_indent (identifier_f) identifier_f )argument_list )call )augmented_assignment )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
tree unix command replacement.
(module (function_definition (function_name_remove_gaps) function_name_remove_gaps (parameters (identifier_A) identifier_A (identifier_B) identifier_B )parameters (block (expression_statement (assignment (pattern_list (identifier_a_seq) identifier_a_seq (identifier_b_seq) identifier_b_seq )pattern_list (expression_list (list )list (list )list )expression_list )assignment )expression_statement (for_statement (pattern_list (identifier_a) identifier_a (identifier_b) identifier_b )pattern_list (call (identifier_zip) identifier_zip (argument_list (call (identifier_list) identifier_list (argument_list (identifier_A) identifier_A )argument_list )call (call (identifier_list) identifier_list (argument_list (identifier_B) identifier_B )argument_list )call )argument_list )call (block (if_statement (boolean_operator (boolean_operator (boolean_operator (comparison_operator (identifier_a) identifier_a (string_'-') string_'-' )comparison_operator (comparison_operator (identifier_a) identifier_a (string_'.') string_'.' )comparison_operator )boolean_operator (comparison_operator (identifier_b) identifier_b (string_'-') string_'-' )comparison_operator )boolean_operator (comparison_operator (identifier_b) identifier_b (string_'.') string_'.' )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_a_seq) identifier_a_seq (identifier_append) identifier_append )attribute (argument_list (identifier_a) identifier_a )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_b_seq) identifier_b_seq (identifier_append) identifier_append )attribute (argument_list (identifier_b) identifier_b )argument_list )call )expression_statement )block )for_statement (return_statement (expression_list (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_a_seq) identifier_a_seq )argument_list )call (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_b_seq) identifier_b_seq )argument_list )call )expression_list )return_statement )block )function_definition )module
skip column if either is a gap