sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name__set_session_cookie) function_name__set_session_cookie (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Setting session cookie for %s') string_'Setting session cookie for %s' (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_id) identifier_id )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_secure_cookie) identifier_set_secure_cookie )attribute (argument_list (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__session_cookie_name) identifier__session_cookie_name )attribute )keyword_argument (keyword_argument (identifier_value) identifier_value (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_expires) identifier_expires (attribute (identifier_self) identifier_self (identifier__cookie_expiration) identifier__cookie_expiration )attribute )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Set the session data cookie.
(module (function_definition (function_name__resolve_attribute) function_name__resolve_attribute (parameters (identifier_self) identifier_self (identifier_attribute) identifier_attribute )parameters (block (expression_statement (assignment (identifier_value) identifier_value (subscript (attribute (identifier_self) identifier_self (identifier_attributes) identifier_attributes )attribute (identifier_attribute) identifier_attribute )subscript )assignment )expression_statement (if_statement (not_operator (identifier_value) identifier_value )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_resolved_value) identifier_resolved_value (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_'\$\((.*?)\)') string_'\$\((.*?)\)' (attribute (identifier_self) identifier_self (identifier__resolve_attribute_match) identifier__resolve_attribute_match )attribute (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (return_statement (identifier_resolved_value) identifier_resolved_value )return_statement )block )function_definition )module
Recursively replaces references to other attributes with their value. Args: attribute (str): The name of the attribute to resolve. Returns: str: The resolved value of 'attribute'.
(module (function_definition (function_name_get_help_width) function_name_get_help_width (parameters )parameters (block (if_statement (boolean_operator (boolean_operator (not_operator (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_isatty) identifier_isatty )attribute (argument_list )argument_list )call )not_operator (comparison_operator (identifier_termios) identifier_termios (None) None )comparison_operator )boolean_operator (comparison_operator (identifier_fcntl) identifier_fcntl (None) None )comparison_operator )boolean_operator (block (return_statement (identifier__DEFAULT_HELP_WIDTH) identifier__DEFAULT_HELP_WIDTH )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_fcntl) identifier_fcntl (identifier_ioctl) identifier_ioctl )attribute (argument_list (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (attribute (identifier_termios) identifier_termios (identifier_TIOCGWINSZ) identifier_TIOCGWINSZ )attribute (string_'1234') string_'1234' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_columns) identifier_columns (subscript (call (attribute (identifier_struct) identifier_struct (identifier_unpack) identifier_unpack )attribute (argument_list (string_'hh') string_'hh' (identifier_data) identifier_data )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_columns) identifier_columns (identifier__MIN_HELP_WIDTH) identifier__MIN_HELP_WIDTH )comparison_operator (block (return_statement (identifier_columns) identifier_columns )return_statement )block )if_statement (return_statement (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_os) identifier_os (identifier_getenv) identifier_getenv )attribute (argument_list (string_'COLUMNS') string_'COLUMNS' (identifier__DEFAULT_HELP_WIDTH) identifier__DEFAULT_HELP_WIDTH )argument_list )call )argument_list )call )return_statement )block (except_clause (tuple (identifier_TypeError) identifier_TypeError (identifier_IOError) identifier_IOError (attribute (identifier_struct) identifier_struct (identifier_error) identifier_error )attribute )tuple (block (return_statement (identifier__DEFAULT_HELP_WIDTH) identifier__DEFAULT_HELP_WIDTH )return_statement )block )except_clause )try_statement )block )function_definition )module
Returns the integer width of help lines that is used in TextWrap.
(module (function_definition (function_name_parse_column_filters) function_name_parse_column_filters (parameters (list_splat_pattern (identifier_definitions) identifier_definitions )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_fltrs) identifier_fltrs (list )list )assignment )expression_statement (for_statement (identifier_def_) identifier_def_ (call (identifier__flatten) identifier__flatten (argument_list (identifier_definitions) identifier_definitions )argument_list )call (block (if_statement (call (identifier_is_filter_tuple) identifier_is_filter_tuple (argument_list (identifier_def_) identifier_def_ )argument_list )call (block (expression_statement (call (attribute (identifier_fltrs) identifier_fltrs (identifier_append) identifier_append )attribute (argument_list (identifier_def_) identifier_def_ )argument_list )call )expression_statement )block (else_clause (block (for_statement (identifier_splitdef) identifier_splitdef (subscript (call (attribute (identifier_DELIM_REGEX) identifier_DELIM_REGEX (identifier_split) identifier_split )attribute (argument_list (identifier_def_) identifier_def_ )argument_list )call (slice (colon) colon (colon) colon (integer_2) integer_2 )slice )subscript (block (expression_statement (call (attribute (identifier_fltrs) identifier_fltrs (identifier_extend) identifier_extend )attribute (argument_list (call (identifier_parse_column_filter) identifier_parse_column_filter (argument_list (identifier_splitdef) identifier_splitdef )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_fltrs) identifier_fltrs )return_statement )block )function_definition )module
Parse multiple compound column filter definitions Examples -------- >>> parse_column_filters('snr > 10', 'frequency < 1000') [('snr', <function operator.gt>, 10.), ('frequency', <function operator.lt>, 1000.)] >>> parse_column_filters('snr > 10 && frequency < 1000') [('snr', <function operator.gt>, 10.), ('frequency', <function operator.lt>, 1000.)]
(module (function_definition (function_name__attach_new) function_name__attach_new (parameters (identifier_self) identifier_self (identifier_records) identifier_records (identifier_current) identifier_current (default_parameter (identifier_touch) identifier_touch (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_changes) identifier_changes (dictionary (pair (string_'attached') string_'attached' (list )list )pair (pair (string_'updated') string_'updated' (list )list )pair )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_id) identifier_id (identifier_attributes) identifier_attributes )pattern_list (call (attribute (identifier_records) identifier_records (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_id) identifier_id (identifier_current) identifier_current )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_attach) identifier_attach )attribute (argument_list (identifier_id) identifier_id (identifier_attributes) identifier_attributes (identifier_touch) identifier_touch )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (identifier_changes) identifier_changes (string_'attached') string_'attached' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_id) identifier_id )argument_list )call )expression_statement )block (elif_clause (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_attributes) identifier_attributes )argument_list )call (integer_0) integer_0 )comparison_operator (call (attribute (identifier_self) identifier_self (identifier_update_existing_pivot) identifier_update_existing_pivot )attribute (argument_list (identifier_id) identifier_id (identifier_attributes) identifier_attributes (identifier_touch) identifier_touch )argument_list )call )boolean_operator (block (expression_statement (call (attribute (subscript (identifier_changes) identifier_changes (string_'updated') string_'updated' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_id) identifier_id )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (identifier_changes) identifier_changes )return_statement )block )function_definition )module
Attach all of the IDs that aren't in the current dict.
(module (function_definition (function_name_match_host) function_name_match_host (parameters (identifier_host) identifier_host (identifier_domainlist) identifier_domainlist )parameters (block (if_statement (not_operator (identifier_host) identifier_host )not_operator (block (return_statement (False) False )return_statement )block )if_statement (for_statement (identifier_domain) identifier_domain (identifier_domainlist) identifier_domainlist (block (if_statement (call (attribute (identifier_domain) identifier_domain (identifier_startswith) identifier_startswith )attribute (argument_list (string_'.') string_'.' )argument_list )call (block (if_statement (call (attribute (identifier_host) identifier_host (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block (elif_clause (comparison_operator (identifier_host) identifier_host (identifier_domain) identifier_domain )comparison_operator (block (return_statement (True) True )return_statement )block )elif_clause )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Return True if host matches an entry in given domain list.
(module (function_definition (function_name_restart_user) function_name_restart_user (parameters (identifier_self) identifier_self (identifier_subid) identifier_subid )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data_base) identifier_data_base )attribute )argument_list )call (block (expression_statement (assignment (identifier_data_base) identifier_data_base (binary_operator (string_"%s/%s") string_"%s/%s" (tuple (attribute (identifier_self) identifier_self (identifier_data_base) identifier_data_base )attribute (identifier_subid) identifier_subid )tuple )binary_operator )assignment )expression_statement (for_statement (identifier_ext) identifier_ext (list (string_'revoked') string_'revoked' (string_'finished') string_'finished' )list (block (expression_statement (assignment (identifier_folder) identifier_folder (binary_operator (string_"%s_%s") string_"%s_%s" (tuple (identifier_data_base) identifier_data_base (identifier_ext) identifier_ext )tuple )binary_operator )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_folder) identifier_folder )argument_list )call (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_rename) identifier_rename )attribute (argument_list (identifier_folder) identifier_folder (identifier_data_base) identifier_data_base )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_'Restarting %s, folder is %s.') string_'Restarting %s, folder is %s.' (tuple (identifier_subid) identifier_subid (identifier_data_base) identifier_data_base )tuple )binary_operator )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (binary_operator (string_'%s does not have revoked or finished folder, no changes necessary.') string_'%s does not have revoked or finished folder, no changes necessary.' (parenthesized_expression (identifier_subid) identifier_subid )parenthesized_expression )binary_operator )argument_list )call )expression_statement (return_statement (identifier_data_base) identifier_data_base )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (binary_operator (string_'%s does not exist, cannot restart. %s') string_'%s does not exist, cannot restart. %s' (tuple (attribute (identifier_self) identifier_self (identifier_database) identifier_database )attribute (identifier_subid) identifier_subid )tuple )binary_operator )argument_list )call )expression_statement )block )function_definition )module
restart user will remove any "finished" or "revoked" extensions from the user folder to restart the session. This command always comes from the client users function, so we know subid does not start with the study identifer first
(module (function_definition (function_name_get_me) function_name_get_me (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_request_json) identifier_request_json )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'me') string_'me' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_user) identifier_user (call (attribute (identifier_objects) identifier_objects (identifier_Redditor) identifier_Redditor )attribute (argument_list (identifier_self) identifier_self (subscript (identifier_response) identifier_response (string_'name') string_'name' )subscript (identifier_response) identifier_response )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_user) identifier_user (identifier___class__) identifier___class__ )attribute (attribute (identifier_objects) identifier_objects (identifier_LoggedInRedditor) identifier_LoggedInRedditor )attribute )assignment )expression_statement (return_statement (identifier_user) identifier_user )return_statement )block )function_definition )module
Return a LoggedInRedditor object. Note: This function is only intended to be used with an 'identity' providing OAuth2 grant.
(module (function_definition (function_name_license_name) function_name_license_name (parameters (identifier_self) identifier_self (identifier_license_name) identifier_license_name )parameters (block (expression_statement (assignment (identifier_allowed_values) identifier_allowed_values (list (string_"CC0-1.0") string_"CC0-1.0" (string_"CC-BY-SA-4.0") string_"CC-BY-SA-4.0" (string_"GPL-2.0") string_"GPL-2.0" (string_"ODbL-1.0") string_"ODbL-1.0" (string_"CC-BY-NC-SA-4.0") string_"CC-BY-NC-SA-4.0" (string_"unknown") string_"unknown" (string_"DbCL-1.0") string_"DbCL-1.0" (string_"CC-BY-SA-3.0") string_"CC-BY-SA-3.0" (string_"copyright-authors") string_"copyright-authors" (string_"other") string_"other" (string_"reddit-api") string_"reddit-api" (string_"world-bank") string_"world-bank" )list )assignment )expression_statement (if_statement (comparison_operator (identifier_license_name) identifier_license_name (identifier_allowed_values) identifier_allowed_values )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Invalid value for `license_name` ({0}), must be one of {1}") string_"Invalid value for `license_name` ({0}), must be one of {1}" (identifier_format) identifier_format )attribute (argument_list (identifier_license_name) identifier_license_name (identifier_allowed_values) identifier_allowed_values )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__license_name) identifier__license_name )attribute (identifier_license_name) identifier_license_name )assignment )expression_statement )block )function_definition )module
Sets the license_name of this DatasetNewRequest. The license that should be associated with the dataset # noqa: E501 :param license_name: The license_name of this DatasetNewRequest. # noqa: E501 :type: str
(module (function_definition (function_name_plot_eeg_erp_topo) function_name_plot_eeg_erp_topo (parameters (identifier_all_epochs) identifier_all_epochs (default_parameter (identifier_colors) identifier_colors (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_all_evokeds) identifier_all_evokeds (call (identifier_eeg_to_all_evokeds) identifier_eeg_to_all_evokeds (argument_list (identifier_all_epochs) identifier_all_epochs )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_participant) identifier_participant (identifier_epochs) identifier_epochs )pattern_list (call (attribute (identifier_all_evokeds) identifier_all_evokeds (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (pattern_list (identifier_cond) identifier_cond (identifier_epoch) identifier_epoch )pattern_list (call (attribute (identifier_epochs) identifier_epochs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_data) identifier_data (identifier_cond) identifier_cond )subscript (list )list )assignment )expression_statement )block )for_statement )block )for_statement (for_statement (pattern_list (identifier_participant) identifier_participant (identifier_epochs) identifier_epochs )pattern_list (call (attribute (identifier_all_evokeds) identifier_all_evokeds (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (pattern_list (identifier_cond) identifier_cond (identifier_epoch) identifier_epoch )pattern_list (call (attribute (identifier_epochs) identifier_epochs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (subscript (identifier_data) identifier_data (identifier_cond) identifier_cond )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_epoch) identifier_epoch )argument_list )call )expression_statement )block )for_statement )block )for_statement (if_statement (comparison_operator (identifier_colors) identifier_colors (None) None )comparison_operator (block (expression_statement (assignment (identifier_color_list) identifier_color_list (list )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_color_list) identifier_color_list (None) None )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_evokeds) identifier_evokeds (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_condition) identifier_condition (identifier_evoked) identifier_evoked )pattern_list (call (attribute (identifier_data) identifier_data (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_grand_average) identifier_grand_average (call (attribute (identifier_mne) identifier_mne (identifier_grand_average) identifier_grand_average )attribute (argument_list (identifier_evoked) identifier_evoked )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_grand_average) identifier_grand_average (identifier_comment) identifier_comment )attribute (identifier_condition) identifier_condition )assignment )expression_statement (expression_statement (augmented_assignment (identifier_evokeds) identifier_evokeds (list (identifier_grand_average) identifier_grand_average )list )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_colors) identifier_colors (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_color_list) identifier_color_list (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_colors) identifier_colors (identifier_condition) identifier_condition )subscript )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_plot) identifier_plot (call (attribute (attribute (identifier_mne) identifier_mne (identifier_viz) identifier_viz )attribute (identifier_plot_evoked_topo) identifier_plot_evoked_topo )attribute (argument_list (identifier_evokeds) identifier_evokeds (keyword_argument (identifier_background_color) identifier_background_color (string_"w") string_"w" )keyword_argument (keyword_argument (identifier_color) identifier_color (identifier_color_list) identifier_color_list )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (parenthesized_expression (identifier_plot) identifier_plot )parenthesized_expression )return_statement )block )function_definition )module
Plot butterfly plot. DOCS INCOMPLETE :(
(module (function_definition (function_name_cl_mutect) function_name_cl_mutect (parameters (identifier_self) identifier_self (identifier_params) identifier_params (identifier_tmp_dir) identifier_tmp_dir )parameters (block (expression_statement (assignment (identifier_gatk_jar) identifier_gatk_jar (call (attribute (identifier_self) identifier_self (identifier__get_jar) identifier__get_jar )attribute (argument_list (string_"muTect") string_"muTect" (list (string_"mutect") string_"mutect" )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_jvm_opts) identifier_jvm_opts (call (attribute (identifier_config_utils) identifier_config_utils (identifier_adjust_opts) identifier_adjust_opts )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__jvm_opts) identifier__jvm_opts )attribute (dictionary (pair (string_"algorithm") string_"algorithm" (dictionary (pair (string_"memory_adjust") string_"memory_adjust" (dictionary (pair (string_"magnitude") string_"magnitude" (float_1.1) float_1.1 )pair (pair (string_"direction") string_"direction" (string_"decrease") string_"decrease" )pair )dictionary )pair )dictionary )pair )dictionary )argument_list )call )assignment )expression_statement (return_statement (binary_operator (binary_operator (binary_operator (binary_operator (list (string_"java") string_"java" )list (identifier_jvm_opts) identifier_jvm_opts )binary_operator (call (identifier_get_default_jvm_opts) identifier_get_default_jvm_opts (argument_list (identifier_tmp_dir) identifier_tmp_dir )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (list (string_"-jar") string_"-jar" (identifier_gatk_jar) identifier_gatk_jar )list )binary_operator (list_comprehension (call (identifier_str) identifier_str (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_params) identifier_params )for_in_clause )list_comprehension )binary_operator )return_statement )block )function_definition )module
Define parameters to run the mutect paired algorithm.
(module (function_definition (function_name__post_analysis) function_name__post_analysis (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__make_completed_functions) identifier__make_completed_functions )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_new_changes) identifier_new_changes (call (attribute (identifier_self) identifier_self (identifier__iteratively_analyze_function_features) identifier__iteratively_analyze_function_features )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_functions_do_not_return) identifier_functions_do_not_return (subscript (identifier_new_changes) identifier_new_changes (string_'functions_do_not_return') string_'functions_do_not_return' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_function_callsites) identifier__update_function_callsites )attribute (argument_list (identifier_functions_do_not_return) identifier_functions_do_not_return )argument_list )call )expression_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_edges) identifier_edges )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__pending_edges) identifier__pending_edges )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (pattern_list (identifier_src_node) identifier_src_node (identifier_dst_node) identifier_dst_node (identifier_data) identifier_data )pattern_list (identifier_edges) identifier_edges (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__graph_add_edge) identifier__graph_add_edge )attribute (argument_list (identifier_src_node) identifier_src_node (identifier_dst_node) identifier_dst_node (dictionary_splat (identifier_data) identifier_data )dictionary_splat )argument_list )call )expression_statement )block )for_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__remove_non_return_edges) identifier__remove_non_return_edges )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_CFGBase) identifier_CFGBase (identifier__post_analysis) identifier__post_analysis )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Post-CFG-construction. :return: None
(module (function_definition (function_name_scale_rc) function_name_scale_rc (parameters (identifier_self) identifier_self (identifier_servo) identifier_servo (identifier_min) identifier_min (identifier_max) identifier_max (identifier_param) identifier_param )parameters (block (expression_statement (assignment (identifier_min_pwm) identifier_min_pwm (call (attribute (identifier_self) identifier_self (identifier_get_mav_param) identifier_get_mav_param )attribute (argument_list (binary_operator (string_'%s_MIN') string_'%s_MIN' (identifier_param) identifier_param )binary_operator (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_max_pwm) identifier_max_pwm (call (attribute (identifier_self) identifier_self (identifier_get_mav_param) identifier_get_mav_param )attribute (argument_list (binary_operator (string_'%s_MAX') string_'%s_MAX' (identifier_param) identifier_param )binary_operator (integer_0) integer_0 )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_min_pwm) identifier_min_pwm (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_max_pwm) identifier_max_pwm (integer_0) integer_0 )comparison_operator )boolean_operator (block (return_statement (integer_0) integer_0 )return_statement )block )if_statement (if_statement (comparison_operator (identifier_max_pwm) identifier_max_pwm (identifier_min_pwm) identifier_min_pwm )comparison_operator (block (expression_statement (assignment (identifier_p) identifier_p (float_0.0) float_0.0 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_p) identifier_p (binary_operator (parenthesized_expression (binary_operator (identifier_servo) identifier_servo (identifier_min_pwm) identifier_min_pwm )binary_operator )parenthesized_expression (call (identifier_float) identifier_float (argument_list (binary_operator (identifier_max_pwm) identifier_max_pwm (identifier_min_pwm) identifier_min_pwm )binary_operator )argument_list )call )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_v) identifier_v (binary_operator (identifier_min) identifier_min (binary_operator (identifier_p) identifier_p (parenthesized_expression (binary_operator (identifier_max) identifier_max (identifier_min) identifier_min )binary_operator )parenthesized_expression )binary_operator )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_v) identifier_v (identifier_min) identifier_min )comparison_operator (block (expression_statement (assignment (identifier_v) identifier_v (identifier_min) identifier_min )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_v) identifier_v (identifier_max) identifier_max )comparison_operator (block (expression_statement (assignment (identifier_v) identifier_v (identifier_max) identifier_max )assignment )expression_statement )block )if_statement (return_statement (identifier_v) identifier_v )return_statement )block )function_definition )module
scale a PWM value
(module (function_definition (function_name_is_instance_throughput_too_low) function_name_is_instance_throughput_too_low (parameters (identifier_self) identifier_self (identifier_inst_id) identifier_inst_id )parameters (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_self) identifier_self (identifier_instance_throughput_ratio) identifier_instance_throughput_ratio )attribute (argument_list (identifier_inst_id) identifier_inst_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_r) identifier_r (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (concatenated_string (string_"{} instance {} throughput is not ") string_"{} instance {} throughput is not " (string_"measurable.") string_"measurable." )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self (identifier_inst_id) identifier_inst_id )argument_list )call )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_too_low) identifier_too_low (comparison_operator (identifier_r) identifier_r (attribute (identifier_self) identifier_self (identifier_Delta) identifier_Delta )attribute )comparison_operator )assignment )expression_statement (if_statement (identifier_too_low) identifier_too_low (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_display) identifier_display )attribute (argument_list (call (attribute (string_"{}{} instance {} throughput ratio {} is lower than Delta {}.") string_"{}{} instance {} throughput ratio {} is lower than Delta {}." (identifier_format) identifier_format )attribute (argument_list (identifier_MONITORING_PREFIX) identifier_MONITORING_PREFIX (identifier_self) identifier_self (identifier_inst_id) identifier_inst_id (identifier_r) identifier_r (attribute (identifier_self) identifier_self (identifier_Delta) identifier_Delta )attribute )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_trace) identifier_trace )attribute (argument_list (call (attribute (string_"{} instance {} throughput ratio {} is acceptable.") string_"{} instance {} throughput ratio {} is acceptable." (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self (identifier_inst_id) identifier_inst_id (identifier_r) identifier_r )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_too_low) identifier_too_low )return_statement )block )function_definition )module
Return whether the throughput of the master instance is greater than the acceptable threshold
(module (function_definition (function_name_simplices) function_name_simplices (parameters (identifier_self) identifier_self )parameters (block (return_statement (list_comprehension (call (identifier_Simplex) identifier_Simplex (argument_list (list_comprehension (subscript (attribute (identifier_self) identifier_self (identifier_points) identifier_points )attribute (identifier_i) identifier_i )subscript (for_in_clause (identifier_i) identifier_i (identifier_v) identifier_v )for_in_clause )list_comprehension )argument_list )call (for_in_clause (identifier_v) identifier_v (attribute (identifier_self) identifier_self (identifier_vertices) identifier_vertices )attribute )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Returns the simplices of the triangulation.
(module (function_definition (function_name_run_tasks) function_name_run_tasks (parameters (identifier_tasks) identifier_tasks (default_parameter (identifier_max_workers) identifier_max_workers (None) None )default_parameter (default_parameter (identifier_use_processes) identifier_use_processes (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_futures) identifier_futures (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_use_processes) identifier_use_processes (block (expression_statement (assignment (identifier_get_executor) identifier_get_executor (attribute (attribute (identifier_concurrent) identifier_concurrent (identifier_futures) identifier_futures )attribute (identifier_ProcessPoolExecutor) identifier_ProcessPoolExecutor )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_get_executor) identifier_get_executor (attribute (attribute (identifier_concurrent) identifier_concurrent (identifier_futures) identifier_futures )attribute (identifier_ThreadPoolExecutor) identifier_ThreadPoolExecutor )attribute )assignment )expression_statement )block )else_clause )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_get_executor) identifier_get_executor (argument_list (identifier_max_workers) identifier_max_workers )argument_list )call (as_pattern_target (identifier_executor) identifier_executor )as_pattern_target )as_pattern )with_item )with_clause (block (function_definition (function_name_execute) function_name_execute (parameters (identifier_function) identifier_function (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_future) identifier_future (call (attribute (identifier_executor) identifier_executor (identifier_submit) identifier_submit )attribute (argument_list (identifier_function) identifier_function )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_future) identifier_future (identifier_name) identifier_name )attribute (identifier_name) identifier_name )assignment )expression_statement (expression_statement (call (attribute (identifier_futures) identifier_futures (identifier_add) identifier_add )attribute (argument_list (identifier_future) identifier_future )argument_list )call )expression_statement )block )function_definition (function_definition (function_name_wait) function_name_wait (parameters )parameters (block (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (expression_statement (assignment (identifier_waited) identifier_waited (call (attribute (attribute (identifier_concurrent) identifier_concurrent (identifier_futures) identifier_futures )attribute (identifier_wait) identifier_wait )attribute (argument_list (identifier_futures) identifier_futures (keyword_argument (identifier_return_when) identifier_return_when (attribute (attribute (identifier_concurrent) identifier_concurrent (identifier_futures) identifier_futures )attribute (identifier_FIRST_COMPLETED) identifier_FIRST_COMPLETED )attribute )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_future) identifier_future (attribute (identifier_waited) identifier_waited (identifier_done) identifier_done )attribute (block (expression_statement (assignment (identifier_exc) identifier_exc (call (attribute (identifier_future) identifier_future (identifier_exception) identifier_exception )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_exc) identifier_exc (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (call (identifier_TaskResult) identifier_TaskResult (argument_list (attribute (identifier_future) identifier_future (identifier_name) identifier_name )attribute (True) True (None) None (call (attribute (identifier_future) identifier_future (identifier_result) identifier_result )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (call (identifier_TaskResult) identifier_TaskResult (argument_list (attribute (identifier_future) identifier_future (identifier_name) identifier_name )attribute (False) False (identifier_exc) identifier_exc (None) None )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_futures) identifier_futures (identifier_remove) identifier_remove )attribute (argument_list (identifier_future) identifier_future )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition (return_statement (call (identifier_task_loop) identifier_task_loop (argument_list (identifier_tasks) identifier_tasks (identifier_execute) identifier_execute (identifier_wait) identifier_wait )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Run an iterable of tasks. tasks: The iterable of tasks max_workers: (optional, None) The maximum number of workers to use. As of Python 3.5, if None is passed to the thread executor will default to 5 * the number of processors and the process executor will default to the number of processors. If you are running an older version, consider this a non-optional value. use_processes: (optional, False) use a process pool instead of a thread pool.
(module (function_definition (function_name_get_topic_keyword_dictionary) function_name_get_topic_keyword_dictionary (parameters )parameters (block (expression_statement (assignment (identifier_topic_keyword_dictionary) identifier_topic_keyword_dictionary (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_file_row_gen) identifier_file_row_gen (call (identifier_get_file_row_generator) identifier_get_file_row_generator (argument_list (binary_operator (binary_operator (call (identifier_get_package_path) identifier_get_package_path (argument_list )argument_list )call (string_"/twitter/res/topics/topic_keyword_mapping") string_"/twitter/res/topics/topic_keyword_mapping" )binary_operator (string_".txt") string_".txt" )binary_operator (string_",") string_"," (string_"utf-8") string_"utf-8" )argument_list )call )assignment )expression_statement (for_statement (identifier_file_row) identifier_file_row (identifier_file_row_gen) identifier_file_row_gen (block (expression_statement (assignment (subscript (identifier_topic_keyword_dictionary) identifier_topic_keyword_dictionary (subscript (identifier_file_row) identifier_file_row (integer_0) integer_0 )subscript )subscript (call (identifier_set) identifier_set (argument_list (list_comprehension (identifier_keyword) identifier_keyword (for_in_clause (identifier_keyword) identifier_keyword (subscript (identifier_file_row) identifier_file_row (slice (integer_1) integer_1 (colon) colon )slice )subscript )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_topic_keyword_dictionary) identifier_topic_keyword_dictionary )return_statement )block )function_definition )module
Opens the topic-keyword map resource file and returns the corresponding python dictionary. - Input: - file_path: The path pointing to the topic-keyword map resource file. - Output: - topic_set: A topic to keyword python dictionary.
(module (function_definition (function_name__overlap_slices) function_name__overlap_slices (parameters (identifier_self) identifier_self (identifier_shape) identifier_shape )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_shape) identifier_shape )argument_list )call (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'input shape must have 2 elements.') string_'input shape must have 2 elements.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_xmin) identifier_xmin (attribute (attribute (identifier_self) identifier_self (identifier_bbox) identifier_bbox )attribute (identifier_ixmin) identifier_ixmin )attribute )assignment )expression_statement (expression_statement (assignment (identifier_xmax) identifier_xmax (attribute (attribute (identifier_self) identifier_self (identifier_bbox) identifier_bbox )attribute (identifier_ixmax) identifier_ixmax )attribute )assignment )expression_statement (expression_statement (assignment (identifier_ymin) identifier_ymin (attribute (attribute (identifier_self) identifier_self (identifier_bbox) identifier_bbox )attribute (identifier_iymin) identifier_iymin )attribute )assignment )expression_statement (expression_statement (assignment (identifier_ymax) identifier_ymax (attribute (attribute (identifier_self) identifier_self (identifier_bbox) identifier_bbox )attribute (identifier_iymax) identifier_iymax )attribute )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (boolean_operator (comparison_operator (identifier_xmin) identifier_xmin (subscript (identifier_shape) identifier_shape (integer_1) integer_1 )subscript )comparison_operator (comparison_operator (identifier_ymin) identifier_ymin (subscript (identifier_shape) identifier_shape (integer_0) integer_0 )subscript )comparison_operator )boolean_operator (comparison_operator (identifier_xmax) identifier_xmax (integer_0) integer_0 )comparison_operator )boolean_operator (comparison_operator (identifier_ymax) identifier_ymax (integer_0) integer_0 )comparison_operator )boolean_operator (block (return_statement (expression_list (None) None (None) None )expression_list )return_statement )block )if_statement (expression_statement (assignment (identifier_slices_large) identifier_slices_large (tuple (call (identifier_slice) identifier_slice (argument_list (call (identifier_max) identifier_max (argument_list (identifier_ymin) identifier_ymin (integer_0) integer_0 )argument_list )call (call (identifier_min) identifier_min (argument_list (identifier_ymax) identifier_ymax (subscript (identifier_shape) identifier_shape (integer_0) integer_0 )subscript )argument_list )call )argument_list )call (call (identifier_slice) identifier_slice (argument_list (call (identifier_max) identifier_max (argument_list (identifier_xmin) identifier_xmin (integer_0) integer_0 )argument_list )call (call (identifier_min) identifier_min (argument_list (identifier_xmax) identifier_xmax (subscript (identifier_shape) identifier_shape (integer_1) integer_1 )subscript )argument_list )call )argument_list )call )tuple )assignment )expression_statement (expression_statement (assignment (identifier_slices_small) identifier_slices_small (tuple (call (identifier_slice) identifier_slice (argument_list (call (identifier_max) identifier_max (argument_list (unary_operator (identifier_ymin) identifier_ymin )unary_operator (integer_0) integer_0 )argument_list )call (call (identifier_min) identifier_min (argument_list (binary_operator (identifier_ymax) identifier_ymax (identifier_ymin) identifier_ymin )binary_operator (binary_operator (subscript (identifier_shape) identifier_shape (integer_0) integer_0 )subscript (identifier_ymin) identifier_ymin )binary_operator )argument_list )call )argument_list )call (call (identifier_slice) identifier_slice (argument_list (call (identifier_max) identifier_max (argument_list (unary_operator (identifier_xmin) identifier_xmin )unary_operator (integer_0) integer_0 )argument_list )call (call (identifier_min) identifier_min (argument_list (binary_operator (identifier_xmax) identifier_xmax (identifier_xmin) identifier_xmin )binary_operator (binary_operator (subscript (identifier_shape) identifier_shape (integer_1) integer_1 )subscript (identifier_xmin) identifier_xmin )binary_operator )argument_list )call )argument_list )call )tuple )assignment )expression_statement (return_statement (expression_list (identifier_slices_large) identifier_slices_large (identifier_slices_small) identifier_slices_small )expression_list )return_statement )block )function_definition )module
Calculate the slices for the overlapping part of the bounding box and an array of the given shape. Parameters ---------- shape : tuple of int The ``(ny, nx)`` shape of array where the slices are to be applied. Returns ------- slices_large : tuple of slices A tuple of slice objects for each axis of the large array, such that ``large_array[slices_large]`` extracts the region of the large array that overlaps with the small array. slices_small : slice A tuple of slice objects for each axis of the small array, such that ``small_array[slices_small]`` extracts the region of the small array that is inside the large array.
(module (function_definition (function_name_get_project_endpoint_from_env) function_name_get_project_endpoint_from_env (parameters (default_parameter (identifier_project_id) identifier_project_id (None) None )default_parameter (default_parameter (identifier_host) identifier_host (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_project_id) identifier_project_id (boolean_operator (identifier_project_id) identifier_project_id (call (attribute (identifier_os) identifier_os (identifier_getenv) identifier_getenv )attribute (argument_list (identifier__DATASTORE_PROJECT_ID_ENV) identifier__DATASTORE_PROJECT_ID_ENV )argument_list )call )boolean_operator )assignment )expression_statement (if_statement (not_operator (identifier_project_id) identifier_project_id )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'project_id was not provided. Either pass it in ') string_'project_id was not provided. Either pass it in ' (string_'directly or set DATASTORE_PROJECT_ID.') string_'directly or set DATASTORE_PROJECT_ID.' )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (identifier_os) identifier_os (identifier_getenv) identifier_getenv )attribute (argument_list (identifier__DATASTORE_HOST_ENV) identifier__DATASTORE_HOST_ENV )argument_list )call (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_'Ignoring value of environment variable DATASTORE_HOST. ') string_'Ignoring value of environment variable DATASTORE_HOST. ' (string_'To point datastore to a host running locally, use the ') string_'To point datastore to a host running locally, use the ' (string_'environment variable DATASTORE_EMULATOR_HOST') string_'environment variable DATASTORE_EMULATOR_HOST' )concatenated_string )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_url_override) identifier_url_override (call (attribute (identifier_os) identifier_os (identifier_getenv) identifier_getenv )attribute (argument_list (identifier__DATASTORE_URL_OVERRIDE_ENV) identifier__DATASTORE_URL_OVERRIDE_ENV )argument_list )call )assignment )expression_statement (if_statement (identifier_url_override) identifier_url_override (block (return_statement (binary_operator (string_'%s/projects/%s') string_'%s/projects/%s' (tuple (identifier_url_override) identifier_url_override (identifier_project_id) identifier_project_id )tuple )binary_operator )return_statement )block )if_statement (expression_statement (assignment (identifier_localhost) identifier_localhost (call (attribute (identifier_os) identifier_os (identifier_getenv) identifier_getenv )attribute (argument_list (identifier__DATASTORE_EMULATOR_HOST_ENV) identifier__DATASTORE_EMULATOR_HOST_ENV )argument_list )call )assignment )expression_statement (if_statement (identifier_localhost) identifier_localhost (block (return_statement (parenthesized_expression (binary_operator (string_'http://%s/%s/projects/%s') string_'http://%s/%s/projects/%s' (tuple (identifier_localhost) identifier_localhost (identifier_API_VERSION) identifier_API_VERSION (identifier_project_id) identifier_project_id )tuple )binary_operator )parenthesized_expression )return_statement )block )if_statement (expression_statement (assignment (identifier_host) identifier_host (boolean_operator (identifier_host) identifier_host (identifier_GOOGLEAPIS_HOST) identifier_GOOGLEAPIS_HOST )boolean_operator )assignment )expression_statement (return_statement (binary_operator (string_'https://%s/%s/projects/%s') string_'https://%s/%s/projects/%s' (tuple (identifier_host) identifier_host (identifier_API_VERSION) identifier_API_VERSION (identifier_project_id) identifier_project_id )tuple )binary_operator )return_statement )block )function_definition )module
Get Datastore project endpoint from environment variables. Args: project_id: The Cloud project, defaults to the environment variable DATASTORE_PROJECT_ID. host: The Cloud Datastore API host to use. Returns: the endpoint to use, for example https://datastore.googleapis.com/v1/projects/my-project Raises: ValueError: if the wrong environment variable was set or a project_id was not provided.
(module (function_definition (function_name_view) function_name_view (parameters (identifier_self) identifier_self (default_parameter (identifier_dtype) identifier_dtype (None) None )default_parameter )parameters (block (return_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier__constructor) identifier__constructor )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__values) identifier__values )attribute (identifier_view) identifier_view )attribute (argument_list (identifier_dtype) identifier_dtype )argument_list )call (keyword_argument (identifier_index) identifier_index (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute )keyword_argument )argument_list )call (identifier___finalize__) identifier___finalize__ )attribute (argument_list (identifier_self) identifier_self )argument_list )call )return_statement )block )function_definition )module
Create a new view of the Series. This function will return a new Series with a view of the same underlying values in memory, optionally reinterpreted with a new data type. The new data type must preserve the same size in bytes as to not cause index misalignment. Parameters ---------- dtype : data type Data type object or one of their string representations. Returns ------- Series A new Series object as a view of the same data in memory. See Also -------- numpy.ndarray.view : Equivalent numpy function to create a new view of the same data in memory. Notes ----- Series are instantiated with ``dtype=float64`` by default. While ``numpy.ndarray.view()`` will return a view with the same data type as the original array, ``Series.view()`` (without specified dtype) will try using ``float64`` and may fail if the original data type size in bytes is not the same. Examples -------- >>> s = pd.Series([-2, -1, 0, 1, 2], dtype='int8') >>> s 0 -2 1 -1 2 0 3 1 4 2 dtype: int8 The 8 bit signed integer representation of `-1` is `0b11111111`, but the same bytes represent 255 if read as an 8 bit unsigned integer: >>> us = s.view('uint8') >>> us 0 254 1 255 2 0 3 1 4 2 dtype: uint8 The views share the same underlying values: >>> us[0] = 128 >>> s 0 -128 1 -1 2 0 3 1 4 2 dtype: int8
(module (function_definition (function_name_normalized) function_name_normalized (parameters (identifier_a) identifier_a (default_parameter (identifier_axis) identifier_axis (unary_operator (integer_1) integer_1 )unary_operator )default_parameter (default_parameter (identifier_order) identifier_order (integer_2) integer_2 )default_parameter )parameters (block (import_statement (dotted_name (identifier_numpy) identifier_numpy )dotted_name )import_statement (expression_statement (assignment (identifier_l2) identifier_l2 (call (attribute (identifier_numpy) identifier_numpy (identifier_atleast_1d) identifier_atleast_1d )attribute (argument_list (call (attribute (attribute (identifier_numpy) identifier_numpy (identifier_linalg) identifier_linalg )attribute (identifier_norm) identifier_norm )attribute (argument_list (identifier_a) identifier_a (identifier_order) identifier_order (identifier_axis) identifier_axis )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_l2) identifier_l2 (comparison_operator (identifier_l2) identifier_l2 (integer_0) integer_0 )comparison_operator )subscript (integer_1) integer_1 )assignment )expression_statement (return_statement (binary_operator (identifier_a) identifier_a (call (attribute (identifier_numpy) identifier_numpy (identifier_expand_dims) identifier_expand_dims )attribute (argument_list (identifier_l2) identifier_l2 (identifier_axis) identifier_axis )argument_list )call )binary_operator )return_statement )block )function_definition )module
Return normalized vector for arbitrary axis Args ---- a: ndarray (n,3) Tri-axial vector data axis: int Axis index to overwhich to normalize order: int Order of nomalization to calculate Notes ----- This function was adapted from the following StackOverflow answer: http://stackoverflow.com/a/21032099/943773
(module (function_definition (function_name__sample_weight) function_name__sample_weight (parameters (identifier_kappa) identifier_kappa (identifier_dim) identifier_dim )parameters (block (expression_statement (assignment (identifier_dim) identifier_dim (binary_operator (identifier_dim) identifier_dim (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_b) identifier_b (binary_operator (identifier_dim) identifier_dim (parenthesized_expression (binary_operator (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (binary_operator (float_4.) float_4. (binary_operator (identifier_kappa) identifier_kappa (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (identifier_dim) identifier_dim (integer_2) integer_2 )binary_operator )binary_operator )argument_list )call (binary_operator (integer_2) integer_2 (identifier_kappa) identifier_kappa )binary_operator )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (binary_operator (parenthesized_expression (binary_operator (float_1.) float_1. (identifier_b) identifier_b )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (float_1.) float_1. (identifier_b) identifier_b )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (binary_operator (binary_operator (identifier_kappa) identifier_kappa (identifier_x) identifier_x )binary_operator (binary_operator (identifier_dim) identifier_dim (call (attribute (identifier_np) identifier_np (identifier_log) identifier_log )attribute (argument_list (binary_operator (integer_1) integer_1 (binary_operator (identifier_x) identifier_x (integer_2) integer_2 )binary_operator )binary_operator )argument_list )call )binary_operator )binary_operator )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_z) identifier_z (call (attribute (attribute (identifier_np) identifier_np (identifier_random) identifier_random )attribute (identifier_beta) identifier_beta )attribute (argument_list (binary_operator (identifier_dim) identifier_dim (float_2.) float_2. )binary_operator (binary_operator (identifier_dim) identifier_dim (float_2.) float_2. )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_w) identifier_w (binary_operator (parenthesized_expression (binary_operator (float_1.) float_1. (binary_operator (parenthesized_expression (binary_operator (float_1.) float_1. (identifier_b) identifier_b )binary_operator )parenthesized_expression (identifier_z) identifier_z )binary_operator )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (float_1.) float_1. (binary_operator (parenthesized_expression (binary_operator (float_1.) float_1. (identifier_b) identifier_b )binary_operator )parenthesized_expression (identifier_z) identifier_z )binary_operator )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_u) identifier_u (call (attribute (attribute (identifier_np) identifier_np (identifier_random) identifier_random )attribute (identifier_uniform) identifier_uniform )attribute (argument_list (keyword_argument (identifier_low) identifier_low (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_high) identifier_high (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (binary_operator (binary_operator (binary_operator (identifier_kappa) identifier_kappa (identifier_w) identifier_w )binary_operator (binary_operator (identifier_dim) identifier_dim (call (attribute (identifier_np) identifier_np (identifier_log) identifier_log )attribute (argument_list (binary_operator (float_1.) float_1. (binary_operator (identifier_x) identifier_x (identifier_w) identifier_w )binary_operator )binary_operator )argument_list )call )binary_operator )binary_operator (identifier_c) identifier_c )binary_operator (call (attribute (identifier_np) identifier_np (identifier_log) identifier_log )attribute (argument_list (identifier_u) identifier_u )argument_list )call )comparison_operator (block (return_statement (identifier_w) identifier_w )return_statement )block )if_statement )block )while_statement )block )function_definition )module
Rejection sampling scheme for sampling distance from center on surface of the sphere.
(module (function_definition (function_name_request_vms_info) function_name_request_vms_info (parameters (identifier_self) identifier_self (identifier_payload) identifier_payload )parameters (block (expression_statement (assignment (identifier_agent) identifier_agent (call (attribute (identifier_payload) identifier_payload (identifier_get) identifier_get )attribute (argument_list (string_'agent') string_'agent' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'request_vms_info: Getting VMs info for %s') string_'request_vms_info: Getting VMs info for %s' (identifier_agent) identifier_agent )argument_list )call )expression_statement (expression_statement (assignment (identifier_req) identifier_req (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_host) identifier_host (call (attribute (identifier_payload) identifier_payload (identifier_get) identifier_get )attribute (argument_list (string_'agent') string_'agent' )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_instances) identifier_instances (call (attribute (identifier_self) identifier_self (identifier_get_vms_for_this_req) identifier_get_vms_for_this_req )attribute (argument_list (dictionary_splat (identifier_req) identifier_req )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_vm_info) identifier_vm_info (list )list )assignment )expression_statement (for_statement (identifier_vm) identifier_vm (identifier_instances) identifier_instances (block (expression_statement (call (attribute (identifier_vm_info) identifier_vm_info (identifier_append) identifier_append )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_status) identifier_status (attribute (identifier_vm) identifier_vm (identifier_status) identifier_status )attribute )keyword_argument (keyword_argument (identifier_vm_mac) identifier_vm_mac (attribute (identifier_vm) identifier_vm (identifier_mac) identifier_mac )attribute )keyword_argument (keyword_argument (identifier_segmentation_id) identifier_segmentation_id (attribute (identifier_vm) identifier_vm (identifier_segmentation_id) identifier_segmentation_id )attribute )keyword_argument (keyword_argument (identifier_host) identifier_host (attribute (identifier_vm) identifier_vm (identifier_host) identifier_host )attribute )keyword_argument (keyword_argument (identifier_port_uuid) identifier_port_uuid (attribute (identifier_vm) identifier_vm (identifier_port_id) identifier_port_id )attribute )keyword_argument (keyword_argument (identifier_net_uuid) identifier_net_uuid (attribute (identifier_vm) identifier_vm (identifier_network_id) identifier_network_id )attribute )keyword_argument (keyword_argument (identifier_oui) identifier_oui (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_ip_addr) identifier_ip_addr (attribute (identifier_vm) identifier_vm (identifier_ip) identifier_ip )attribute )keyword_argument (keyword_argument (identifier_vm_name) identifier_vm_name (attribute (identifier_vm) identifier_vm (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_vm_uuid) identifier_vm_uuid (attribute (identifier_vm) identifier_vm (identifier_instance_id) identifier_instance_id )attribute )keyword_argument (keyword_argument (identifier_gw_mac) identifier_gw_mac (attribute (identifier_vm) identifier_vm (identifier_gw_mac) identifier_gw_mac )attribute )keyword_argument (keyword_argument (identifier_fwd_mod) identifier_fwd_mod (attribute (identifier_vm) identifier_vm (identifier_fwd_mod) identifier_fwd_mod )attribute )keyword_argument (keyword_argument (identifier_oui_id) identifier_oui_id (string_'cisco') string_'cisco' )keyword_argument )argument_list )call )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_neutron_event) identifier_neutron_event )attribute (identifier_send_vm_info) identifier_send_vm_info )attribute (argument_list (identifier_agent) identifier_agent (call (identifier_str) identifier_str (argument_list (identifier_vm_info) identifier_vm_info )argument_list )call )argument_list )call )expression_statement )block (except_clause (tuple (attribute (identifier_rpc) identifier_rpc (identifier_MessagingTimeout) identifier_MessagingTimeout )attribute (attribute (identifier_rpc) identifier_rpc (identifier_RPCException) identifier_RPCException )attribute (attribute (identifier_rpc) identifier_rpc (identifier_RemoteError) identifier_RemoteError )attribute )tuple (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (string_'Failed to send VM info to agent.') string_'Failed to send VM info to agent.' )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Get the VMs from the database and send the info to the agent.
(module (function_definition (function_name_insert_option_group) function_name_insert_option_group (parameters (identifier_self) identifier_self (identifier_idx) identifier_idx (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_group) identifier_group (call (attribute (identifier_self) identifier_self (identifier_add_option_group) identifier_add_option_group )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 (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_option_groups) identifier_option_groups )attribute (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_option_groups) identifier_option_groups )attribute (identifier_insert) identifier_insert )attribute (argument_list (identifier_idx) identifier_idx (identifier_group) identifier_group )argument_list )call )expression_statement (return_statement (identifier_group) identifier_group )return_statement )block )function_definition )module
Insert an OptionGroup at a given position.
(module (function_definition (function_name_NormalizeRelativePath) function_name_NormalizeRelativePath (parameters (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_path_components) identifier_path_components (call (attribute (identifier_path) identifier_path (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_normalized_components) identifier_normalized_components (list )list )assignment )expression_statement (for_statement (identifier_component) identifier_component (identifier_path_components) identifier_path_components (block (if_statement (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_r'{[A-Za-z0-9_]+}$') string_r'{[A-Za-z0-9_]+}$' (identifier_component) identifier_component )argument_list )call (block (expression_statement (call (attribute (identifier_normalized_components) identifier_normalized_components (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'{%s}') string_'{%s}' (call (attribute (identifier_Names) identifier_Names (identifier_CleanName) identifier_CleanName )attribute (argument_list (subscript (identifier_component) identifier_component (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )argument_list )call )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_normalized_components) identifier_normalized_components (identifier_append) identifier_append )attribute (argument_list (identifier_component) identifier_component )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (call (attribute (string_'/') string_'/' (identifier_join) identifier_join )attribute (argument_list (identifier_normalized_components) identifier_normalized_components )argument_list )call )return_statement )block )function_definition )module
Normalize camelCase entries in path.
(module (function_definition (function_name_GetAll) function_name_GetAll (parameters (identifier_self) identifier_self (identifier_interface_name) identifier_interface_name (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (binary_operator (string_'GetAll ') string_'GetAll ' (identifier_interface_name) identifier_interface_name )binary_operator )argument_list )call )expression_statement (if_statement (not_operator (identifier_interface_name) identifier_interface_name )not_operator (block (expression_statement (assignment (identifier_interface_name) identifier_interface_name (attribute (identifier_self) identifier_self (identifier_interface) identifier_interface )attribute )assignment )expression_statement )block )if_statement (try_statement (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_props) identifier_props )attribute (identifier_interface_name) identifier_interface_name )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (attribute (attribute (identifier_dbus) identifier_dbus (identifier_exceptions) identifier_exceptions )attribute (identifier_DBusException) identifier_DBusException )attribute (argument_list (binary_operator (string_'no such interface ') string_'no such interface ' (identifier_interface_name) identifier_interface_name )binary_operator (keyword_argument (identifier_name) identifier_name (binary_operator (attribute (identifier_self) identifier_self (identifier_interface) identifier_interface )attribute (string_'.UnknownInterface') string_'.UnknownInterface' )binary_operator )keyword_argument )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Standard D-Bus API for getting all property values
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_text) identifier_text (identifier_name) identifier_name (identifier_field) identifier_field (default_parameter (identifier_type) identifier_type (string_'term') string_'term' )default_parameter (default_parameter (identifier_size) identifier_size (None) None )default_parameter (default_parameter (identifier_params) identifier_params (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_func) identifier_func (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_type) identifier_type (string_'completion') string_'completion' )comparison_operator (block (expression_statement (assignment (identifier_func) identifier_func (attribute (identifier_self) identifier_self (identifier_add_completion) identifier_add_completion )attribute )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_type) identifier_type (string_'phrase') string_'phrase' )comparison_operator (block (expression_statement (assignment (identifier_func) identifier_func (attribute (identifier_self) identifier_self (identifier_add_phrase) identifier_add_phrase )attribute )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_type) identifier_type (string_'term') string_'term' )comparison_operator (block (expression_statement (assignment (identifier_func) identifier_func (attribute (identifier_self) identifier_self (identifier_add_term) identifier_add_term )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_InvalidQuery) identifier_InvalidQuery (argument_list (string_'Invalid type') string_'Invalid type' )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (call (identifier_func) identifier_func (argument_list (keyword_argument (identifier_text) identifier_text (identifier_text) identifier_text )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_field) identifier_field (identifier_field) identifier_field )keyword_argument (keyword_argument (identifier_size) identifier_size (identifier_size) identifier_size )keyword_argument (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Set the suggester of given type. :param text: text :param name: name of suggest :param field: field to be used :param type: type of suggester to add, available types are: completion, phrase, term :param size: number of phrases :param params: dict of additional parameters to pass to the suggester :return: None
(module (function_definition (function_name_optimizer_tensor) function_name_optimizer_tensor (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (attribute (identifier_tf) identifier_tf (identifier_Tensor) identifier_Tensor )attribute )type (type (attribute (identifier_tf) identifier_tf (identifier_Operation) identifier_Operation )attribute )type )type_parameter )generic_type )type (block (return_statement (call (identifier__get_attr) identifier__get_attr (argument_list (identifier_self) identifier_self (keyword_argument (identifier__optimizer_tensor) identifier__optimizer_tensor (None) None )keyword_argument )argument_list )call )return_statement )block )function_definition )module
The `optimizer_tensor` is an attribute for getting optimization's optimizer tensor.
(module (function_definition (function_name_recv) function_name_recv (parameters (identifier_self) identifier_self (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_start) identifier_start (call (identifier_time) identifier_time (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_time_left) identifier_time_left (identifier_timeout) identifier_timeout )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (pattern_list (identifier_msg) identifier_msg (identifier_already_filtered) identifier_already_filtered )pattern_list (call (attribute (identifier_self) identifier_self (identifier__recv_internal) identifier__recv_internal )attribute (argument_list (keyword_argument (identifier_timeout) identifier_timeout (identifier_time_left) identifier_time_left )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_msg) identifier_msg (parenthesized_expression (boolean_operator (identifier_already_filtered) identifier_already_filtered (call (attribute (identifier_self) identifier_self (identifier__matches_filters) identifier__matches_filters )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_log) identifier_log )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_RECV_LOGGING_LEVEL) identifier_RECV_LOGGING_LEVEL )attribute (string_'Received: %s') string_'Received: %s' (identifier_msg) identifier_msg )argument_list )call )expression_statement (return_statement (identifier_msg) identifier_msg )return_statement )block (elif_clause (comparison_operator (identifier_timeout) identifier_timeout (None) None )comparison_operator (block (continue_statement )continue_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_time_left) identifier_time_left (binary_operator (identifier_timeout) identifier_timeout (parenthesized_expression (binary_operator (call (identifier_time) identifier_time (argument_list )argument_list )call (identifier_start) identifier_start )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_time_left) identifier_time_left (integer_0) integer_0 )comparison_operator (block (continue_statement )continue_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )while_statement )block )function_definition )module
Block waiting for a message from the Bus. :type timeout: float or None :param timeout: seconds to wait for a message or None to wait indefinitely :rtype: can.Message or None :return: None on timeout or a :class:`can.Message` object. :raises can.CanError: if an error occurred while reading
(module (function_definition (function_name_parse) function_name_parse (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_tokenize) identifier_tokenize )attribute (argument_list )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_debug) identifier_debug )attribute (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Tokens found: %s") string_"Tokens found: %s" (attribute (identifier_self) identifier_self (identifier_token_list) identifier_token_list )attribute )binary_operator )argument_list )call )expression_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_parse_tree) identifier_parse_tree (call (attribute (identifier_self) identifier_self (identifier_parse2) identifier_parse2 )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement (return_statement (identifier_parse_tree) identifier_parse_tree )return_statement )block )function_definition )module
Tokenizes and parses an arithmetic expression into a parse tree. @return: Returns a token string. @rtype: lems.parser.expr.ExprNode
(module (function_definition (function_name_FromFile) function_name_FromFile (parameters (identifier_cls) identifier_cls (identifier_filename) identifier_filename (default_parameter (identifier_mime_type) identifier_mime_type (None) None )default_parameter (default_parameter (identifier_auto_transfer) identifier_auto_transfer (True) True )default_parameter (default_parameter (identifier_gzip_encoded) identifier_gzip_encoded (False) False )default_parameter (dictionary_splat_pattern (identifier_kwds) identifier_kwds )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_NotFoundError) identifier_NotFoundError )attribute (argument_list (binary_operator (string_'Could not find file %s') string_'Could not find file %s' (identifier_path) identifier_path )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (identifier_mime_type) identifier_mime_type )not_operator (block (expression_statement (assignment (pattern_list (identifier_mime_type) identifier_mime_type (identifier__) identifier__ )pattern_list (call (attribute (identifier_mimetypes) identifier_mimetypes (identifier_guess_type) identifier_guess_type )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_mime_type) identifier_mime_type (None) None )comparison_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_InvalidUserInputError) identifier_InvalidUserInputError )attribute (argument_list (binary_operator (string_'Could not guess mime type for %s') string_'Could not guess mime type for %s' (identifier_path) identifier_path )binary_operator )argument_list )call )raise_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_size) identifier_size (attribute (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_path) identifier_path )argument_list )call (identifier_st_size) identifier_st_size )attribute )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'rb') string_'rb' )argument_list )call (identifier_mime_type) identifier_mime_type (keyword_argument (identifier_total_size) identifier_total_size (identifier_size) identifier_size )keyword_argument (keyword_argument (identifier_close_stream) identifier_close_stream (True) True )keyword_argument (keyword_argument (identifier_auto_transfer) identifier_auto_transfer (identifier_auto_transfer) identifier_auto_transfer )keyword_argument (keyword_argument (identifier_gzip_encoded) identifier_gzip_encoded (identifier_gzip_encoded) identifier_gzip_encoded )keyword_argument (dictionary_splat (identifier_kwds) identifier_kwds )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Create a new Upload object from a filename.
(module (function_definition (function_name_got_scheduler_module_type_defined) function_name_got_scheduler_module_type_defined (parameters (identifier_self) identifier_self (identifier_module_type) identifier_module_type )parameters (block (for_statement (identifier_scheduler_link) identifier_scheduler_link (attribute (identifier_self) identifier_self (identifier_schedulers) identifier_schedulers )attribute (block (for_statement (identifier_module) identifier_module (attribute (identifier_scheduler_link) identifier_scheduler_link (identifier_modules) identifier_modules )attribute (block (if_statement (call (attribute (identifier_module) identifier_module (identifier_is_a_module) identifier_is_a_module )attribute (argument_list (identifier_module_type) identifier_module_type )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Check if a module type is defined in one of the schedulers :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool TODO: Factorize it with got_broker_module_type_defined
(module (function_definition (function_name_height_to_geopotential) function_name_height_to_geopotential (parameters (identifier_height) identifier_height )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_geopot) identifier_geopot (binary_operator (binary_operator (attribute (identifier_mpconsts) identifier_mpconsts (identifier_G) identifier_G )attribute (attribute (identifier_mpconsts) identifier_mpconsts (identifier_me) identifier_me )attribute )binary_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (integer_1) integer_1 (attribute (identifier_mpconsts) identifier_mpconsts (identifier_Re) identifier_Re )attribute )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (integer_1) integer_1 (parenthesized_expression (binary_operator (attribute (identifier_mpconsts) identifier_mpconsts (identifier_Re) identifier_Re )attribute (identifier_height) identifier_height )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (return_statement (identifier_geopot) identifier_geopot )return_statement )block )function_definition )module
r"""Compute geopotential for a given height. Parameters ---------- height : `pint.Quantity` Height above sea level (array_like) Returns ------- `pint.Quantity` The corresponding geopotential value(s) Examples -------- >>> from metpy.constants import g, G, me, Re >>> import metpy.calc >>> from metpy.units import units >>> height = np.linspace(0,10000, num = 11) * units.m >>> geopot = metpy.calc.height_to_geopotential(height) >>> geopot <Quantity([ 0. 9817.46806283 19631.85526579 29443.16305888 39251.39289118 49056.54621087 58858.62446525 68657.62910064 78453.56156253 88246.42329545 98036.21574306], 'meter ** 2 / second ** 2')> Notes ----- Derived from definition of geopotential in [Hobbs2006]_ pg.14 Eq.1.8.
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_self) identifier_self (identifier_position) identifier_position )parameters (block (if_statement (comparison_operator (identifier_position) identifier_position (integer_0) integer_0 )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_remove_first) identifier_remove_first )attribute (argument_list )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (identifier_position) identifier_position (binary_operator (call (attribute (identifier_self) identifier_self (identifier_length) identifier_length )attribute (argument_list )argument_list )call (integer_1) integer_1 )binary_operator )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_remove_last) identifier_remove_last )attribute (argument_list )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_counter) identifier_counter (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_last_node) identifier_last_node (attribute (identifier_self) identifier_self (identifier_head) identifier_head )attribute )assignment )expression_statement (expression_statement (assignment (identifier_current_node) identifier_current_node (attribute (identifier_self) identifier_self (identifier_head) identifier_head )attribute )assignment )expression_statement (while_statement (boolean_operator (comparison_operator (identifier_current_node) identifier_current_node (None) None )comparison_operator (comparison_operator (identifier_counter) identifier_counter (identifier_position) identifier_position )comparison_operator )boolean_operator (block (if_statement (comparison_operator (identifier_counter) identifier_counter (identifier_position) identifier_position )comparison_operator (block (expression_statement (assignment (attribute (identifier_last_node) identifier_last_node (identifier_next_node) identifier_next_node )attribute (attribute (identifier_current_node) identifier_current_node (identifier_next_node) identifier_next_node )attribute )assignment )expression_statement (return_statement (True) True )return_statement )block )if_statement (expression_statement (assignment (identifier_last_node) identifier_last_node (identifier_current_node) identifier_current_node )assignment )expression_statement (expression_statement (assignment (identifier_current_node) identifier_current_node (attribute (identifier_current_node) identifier_current_node (identifier_next_node) identifier_next_node )attribute )assignment )expression_statement (expression_statement (augmented_assignment (identifier_counter) identifier_counter (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (return_statement (False) False )return_statement )block )function_definition )module
Removes at index :param position: Index of removal :return: bool: True iff removal completed successfully
(module (function_definition (function_name__find_update_fields) function_name__find_update_fields (parameters (identifier_cls) identifier_cls (identifier_field) identifier_field (identifier_doc) identifier_doc )parameters (block (function_definition (function_name_find_partial_matches) function_name_find_partial_matches (parameters )parameters (block (for_statement (identifier_key) identifier_key (identifier_doc) identifier_doc (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_field) identifier_field )argument_list )call )comparison_operator (block (if_statement (boolean_operator (call (attribute (identifier_key) identifier_key (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_field) identifier_field )argument_list )call (comparison_operator (subscript (identifier_key) identifier_key (call (identifier_len) identifier_len (argument_list (identifier_field) identifier_field )argument_list )call )subscript (string_".") string_"." )comparison_operator )boolean_operator (block (expression_statement (yield (expression_list (list (identifier_key) identifier_key )list (subscript (identifier_doc) identifier_doc (identifier_key) identifier_key )subscript )expression_list )yield )expression_statement )block )if_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_field) identifier_field )argument_list )call )comparison_operator (block (if_statement (boolean_operator (call (attribute (identifier_field) identifier_field (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_key) identifier_key )argument_list )call (comparison_operator (subscript (identifier_field) identifier_field (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call )subscript (string_".") string_"." )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_matched) identifier_matched (call (attribute (identifier_cls) identifier_cls (identifier__find_field) identifier__find_field )attribute (argument_list (subscript (identifier_field) identifier_field (slice (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript (subscript (identifier_doc) identifier_doc (identifier_key) identifier_key )subscript )argument_list )call )assignment )expression_statement (if_statement (identifier_matched) identifier_matched (block (expression_statement (assignment (identifier_match) identifier_match (subscript (identifier_matched) identifier_matched (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (subscript (identifier_match) identifier_match (integer_0) integer_0 )subscript (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier_key) identifier_key )argument_list )call )expression_statement (expression_statement (yield (identifier_match) identifier_match )yield )expression_statement )block )if_statement (return_statement )return_statement )block )if_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition (try_statement (block (return_statement (list (tuple (list (identifier_field) identifier_field )list (subscript (identifier_doc) identifier_doc (identifier_field) identifier_field )subscript )tuple )list )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (call (identifier_list) identifier_list (argument_list (call (identifier_find_partial_matches) identifier_find_partial_matches (argument_list )argument_list )call )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Find the fields in the update document which match the given field. Both the field and the top level keys in the doc may be in dot notation, eg "a.b.c". Returns a list of tuples (path, field_value) or the empty list if the field is not present.
(module (function_definition (function_name__obtain_lock_or_raise) function_name__obtain_lock_or_raise (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier__has_lock) identifier__has_lock )attribute (argument_list )argument_list )call (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_lock_file) identifier_lock_file (call (attribute (identifier_self) identifier_self (identifier__lock_file_path) identifier__lock_file_path )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_lock_file) identifier_lock_file )argument_list )call (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (binary_operator (string_"Lock for file %r did already exist, delete %r in case the lock is illegal") string_"Lock for file %r did already exist, delete %r in case the lock is illegal" (tuple (attribute (identifier_self) identifier_self (identifier__file_path) identifier__file_path )attribute (identifier_lock_file) identifier_lock_file )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_fd) identifier_fd (call (attribute (identifier_os) identifier_os (identifier_open) identifier_open )attribute (argument_list (identifier_lock_file) identifier_lock_file (binary_operator (binary_operator (attribute (identifier_os) identifier_os (identifier_O_WRONLY) identifier_O_WRONLY )attribute (attribute (identifier_os) identifier_os (identifier_O_CREAT) identifier_O_CREAT )attribute )binary_operator (attribute (identifier_os) identifier_os (identifier_O_EXCL) identifier_O_EXCL )attribute )binary_operator (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_close) identifier_close )attribute (argument_list (identifier_fd) identifier_fd )argument_list )call )expression_statement )block (except_clause (identifier_OSError) identifier_OSError (identifier_e) identifier_e (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__owns_lock) identifier__owns_lock )attribute (True) True )assignment )expression_statement )block )function_definition )module
Create a lock file as flag for other instances, mark our instance as lock-holder :raise IOError: if a lock was already present or a lock file could not be written
(module (function_definition (function_name_search) function_name_search (parameters (identifier_self) identifier_self (identifier_dsl) identifier_dsl (identifier_params) identifier_params )parameters (block (expression_statement (assignment (identifier_query_parameters) identifier_query_parameters (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (identifier_params) identifier_params (block (expression_statement (call (attribute (identifier_query_parameters) identifier_query_parameters (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_CITEDBY_THRIFT) identifier_CITEDBY_THRIFT )attribute (identifier_kwargs) identifier_kwargs )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_key) identifier_key )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )for_statement (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_search) identifier_search )attribute (argument_list (identifier_dsl) identifier_dsl (identifier_query_parameters) identifier_query_parameters )argument_list )call )assignment )expression_statement )block (except_clause (attribute (attribute (identifier_self) identifier_self (identifier_CITEDBY_THRIFT) identifier_CITEDBY_THRIFT )attribute (identifier_ServerError) identifier_ServerError )attribute (block (raise_statement (call (identifier_ServerError) identifier_ServerError (argument_list (string_'you may trying to run a bad DSL Query') string_'you may trying to run a bad DSL Query' )argument_list )call )raise_statement )block )except_clause )try_statement (try_statement (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_result) identifier_result )argument_list )call )return_statement )block (except_clause (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition )module
Free queries to ES index. dsl (string): with DSL query params (list): [(key, value), (key, value)] where key is a query parameter, and value is the value required for parameter, ex: [('size', '0'), ('search_type', 'count')]
(module (function_definition (function_name_line) function_name_line (parameters (identifier_x_fn) identifier_x_fn (identifier_y_fn) identifier_y_fn (keyword_separator )keyword_separator (default_parameter (identifier_options) identifier_options (dictionary )dictionary )default_parameter (dictionary_splat_pattern (identifier_interact_params) identifier_interact_params )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_fig) identifier_fig (boolean_operator (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'_fig') string_'_fig' (False) False )argument_list )call (call (identifier__create_fig) identifier__create_fig (argument_list (keyword_argument (identifier_options) identifier_options (identifier_options) identifier_options )keyword_argument )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (assignment (list_pattern (identifier_line) identifier_line )list_pattern (parenthesized_expression (call (identifier__create_marks) identifier__create_marks (argument_list (keyword_argument (identifier_fig) identifier_fig (identifier_fig) identifier_fig )keyword_argument (keyword_argument (identifier_marks) identifier_marks (list (attribute (identifier_bq) identifier_bq (identifier_Lines) identifier_Lines )attribute )list )keyword_argument (keyword_argument (identifier_options) identifier_options (identifier_options) identifier_options )keyword_argument )argument_list )call )parenthesized_expression )assignment )expression_statement (expression_statement (call (identifier__add_marks) identifier__add_marks (argument_list (identifier_fig) identifier_fig (list (identifier_line) identifier_line )list )argument_list )call )expression_statement (function_definition (function_name_wrapped) function_name_wrapped (parameters (dictionary_splat_pattern (identifier_interact_params) identifier_interact_params )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_x_data) identifier_x_data (call (attribute (identifier_util) identifier_util (identifier_maybe_call) identifier_maybe_call )attribute (argument_list (identifier_x_fn) identifier_x_fn (identifier_interact_params) identifier_interact_params (keyword_argument (identifier_prefix) identifier_prefix (string_'x') string_'x' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_line) identifier_line (identifier_x) identifier_x )attribute (identifier_x_data) identifier_x_data )assignment )expression_statement (expression_statement (assignment (identifier_y_bound) identifier_y_bound (call (attribute (identifier_util) identifier_util (identifier_maybe_curry) identifier_maybe_curry )attribute (argument_list (identifier_y_fn) identifier_y_fn (identifier_x_data) identifier_x_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_line) identifier_line (identifier_y) identifier_y )attribute (call (attribute (identifier_util) identifier_util (identifier_maybe_call) identifier_maybe_call )attribute (argument_list (identifier_y_bound) identifier_y_bound (identifier_interact_params) identifier_interact_params (keyword_argument (identifier_prefix) identifier_prefix (string_'y') string_'y' )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition (expression_statement (assignment (identifier_controls) identifier_controls (call (attribute (identifier_widgets) identifier_widgets (identifier_interactive) identifier_interactive )attribute (argument_list (identifier_wrapped) identifier_wrapped (dictionary_splat (identifier_interact_params) identifier_interact_params )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_widgets) identifier_widgets (identifier_VBox) identifier_VBox )attribute (argument_list (list (identifier_controls) identifier_controls (identifier_fig) identifier_fig )list )argument_list )call )return_statement )block )function_definition )module
Generates an interactive line chart that allows users to change the parameters of the inputs x_fn and y_fn. Args: x_fn (Array | (*args -> Array str | Array int | Array float)): If array, uses array values for x-coordinates. If function, must take parameters to interact with and return an array of strings or numbers. These will become the x-coordinates of the line plot. y_fn (Array | (Array, *args -> Array int | Array float)): If array, uses array values for y-coordinates. If function, must take in the output of x_fn as its first parameter and optionally other parameters to interact with. Must return an array of numbers. These will become the y-coordinates of the line plot. Kwargs: {options} interact_params (dict): Keyword arguments in the same format as `ipywidgets.interact`. One argument is required for each argument of both `x_fn` and `y_fn`. If `x_fn` and `y_fn` have conflicting parameter names, prefix the corresponding kwargs with `x__` and `y__`. Returns: VBox with two children: the interactive controls and the figure. >>> line([1, 2, 3], [4, 7, 10]) VBox(...) >>> def x_values(max): return np.arange(0, max) >>> def y_values(xs, sd): ... return xs + np.random.normal(len(xs), scale=sd) >>> line(x_values, y_values, max=(10, 50), sd=(1, 10)) VBox(...)
(module (function_definition (function_name_serialized) function_name_serialized (parameters (identifier_self) identifier_self (default_parameter (identifier_prepend_date) identifier_prepend_date (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier_serialized_name) identifier_serialized_name )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_datetime) identifier_datetime (call (attribute (identifier_self) identifier_self (identifier_serialized_time) identifier_serialized_time )attribute (argument_list (identifier_prepend_date) identifier_prepend_date )argument_list )call )assignment )expression_statement (return_statement (binary_operator (string_"%s %s") string_"%s %s" (tuple (identifier_datetime) identifier_datetime (identifier_name) identifier_name )tuple )binary_operator )return_statement )block )function_definition )module
Return a string fully representing the fact.
(module (function_definition (function_name_eeg_name_frequencies) function_name_eeg_name_frequencies (parameters (identifier_freqs) identifier_freqs )parameters (block (expression_statement (assignment (identifier_freqs) identifier_freqs (call (identifier_list) identifier_list (argument_list (identifier_freqs) identifier_freqs )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_freqs_names) identifier_freqs_names (list )list )assignment )expression_statement (for_statement (identifier_freq) identifier_freq (identifier_freqs) identifier_freqs (block (if_statement (comparison_operator (identifier_freq) identifier_freq (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"UltraLow") string_"UltraLow" )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_3) integer_3 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Delta") string_"Delta" )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_7) integer_7 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Theta") string_"Theta" )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_9) integer_9 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Alpha1/Mu") string_"Alpha1/Mu" )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_12) integer_12 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Alpha2/Mu") string_"Alpha2/Mu" )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_13) integer_13 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Beta1/Mu") string_"Beta1/Mu" )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_17) integer_17 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Beta1") string_"Beta1" )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_30) integer_30 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Beta2") string_"Beta2" )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_40) integer_40 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Gamma1") string_"Gamma1" )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_freq) identifier_freq (integer_50) integer_50 )comparison_operator (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"Gamma2") string_"Gamma2" )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_freqs_names) identifier_freqs_names (identifier_append) identifier_append )attribute (argument_list (string_"UltraHigh") string_"UltraHigh" )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (parenthesized_expression (identifier_freqs_names) identifier_freqs_names )parenthesized_expression )return_statement )block )function_definition )module
Name frequencies according to standart classifications. Parameters ---------- freqs : list or numpy.array list of floats containing frequencies to classify. Returns ---------- freqs_names : list Named frequencies Example ---------- >>> import neurokit as nk >>> >>> nk.eeg_name_frequencies([0.5, 1.5, 3, 5, 7, 15]) Notes ---------- *Details* - Delta: 1-3Hz - Theta: 4-7Hz - Alpha1: 8-9Hz - Alpha2: 10-12Hz - Beta1: 13-17Hz - Beta2: 18-30Hz - Gamma1: 31-40Hz - Gamma2: 41-50Hz - Mu: 8-13Hz *Authors* - Dominique Makowski (https://github.com/DominiqueMakowski) References ------------ - None
(module (function_definition (function_name_csv_to_pickle) function_name_csv_to_pickle (parameters (default_parameter (identifier_path) identifier_path (binary_operator (identifier_ROOT) identifier_ROOT (string_"raw") string_"raw" )binary_operator )default_parameter (default_parameter (identifier_clean) identifier_clean (False) False )default_parameter )parameters (block (for_statement (identifier_file) identifier_file (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_base) identifier_base (identifier_ext) identifier_ext )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_file) identifier_file )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_ext) identifier_ext (string_".csv") string_".csv" )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (identifier_LOG) identifier_LOG (argument_list (string_f"converting {file} to pickle") string_f"converting {file} to pickle" )argument_list )call )expression_statement (expression_statement (assignment (identifier_df) identifier_df (call (attribute (identifier_pd) identifier_pd (identifier_read_csv) identifier_read_csv )attribute (argument_list (binary_operator (identifier_path) identifier_path (identifier_file) identifier_file )binary_operator (keyword_argument (identifier_low_memory) identifier_low_memory (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_WRITE_DF) identifier_WRITE_DF (argument_list (identifier_df) identifier_df (binary_operator (identifier_path) identifier_path (parenthesized_expression (binary_operator (binary_operator (identifier_base) identifier_base (string_".") string_"." )binary_operator (identifier_FILE_EXTENSION) identifier_FILE_EXTENSION )binary_operator )parenthesized_expression )binary_operator (dictionary_splat (identifier_WRITE_DF_OPTS) identifier_WRITE_DF_OPTS )dictionary_splat )argument_list )call )expression_statement (if_statement (identifier_clean) identifier_clean (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (binary_operator (identifier_path) identifier_path (identifier_file) identifier_file )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_LOG) identifier_LOG (argument_list (string_f"removed {file}") string_f"removed {file}" )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Convert all CSV files in path to pickle.
(module (function_definition (function_name_angle_to_cartesian) function_name_angle_to_cartesian (parameters (identifier_lon) identifier_lon (identifier_lat) identifier_lat )parameters (block (expression_statement (assignment (identifier_theta) identifier_theta (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (binary_operator (binary_operator (attribute (identifier_np) identifier_np (identifier_pi) identifier_pi )attribute (float_2.) float_2. )binary_operator (identifier_lat) identifier_lat )binary_operator )argument_list )call )assignment )expression_statement (return_statement (attribute (call (attribute (identifier_np) identifier_np (identifier_vstack) identifier_vstack )attribute (argument_list (tuple (binary_operator (call (attribute (identifier_np) identifier_np (identifier_sin) identifier_sin )attribute (argument_list (identifier_theta) identifier_theta )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_cos) identifier_cos )attribute (argument_list (identifier_lon) identifier_lon )argument_list )call )binary_operator (binary_operator (call (attribute (identifier_np) identifier_np (identifier_sin) identifier_sin )attribute (argument_list (identifier_theta) identifier_theta )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_sin) identifier_sin )attribute (argument_list (identifier_lon) identifier_lon )argument_list )call )binary_operator (call (attribute (identifier_np) identifier_np (identifier_cos) identifier_cos )attribute (argument_list (identifier_theta) identifier_theta )argument_list )call )tuple )argument_list )call (identifier_T) identifier_T )attribute )return_statement )block )function_definition )module
Convert spherical coordinates to cartesian unit vectors.
(module (function_definition (function_name_settings) function_name_settings (parameters (identifier_cls) identifier_cls )parameters (block (import_from_statement (dotted_name (identifier_bernard) identifier_bernard (identifier_platforms) identifier_platforms (identifier_management) identifier_management )dotted_name (dotted_name (identifier_get_platform_settings) identifier_get_platform_settings )dotted_name )import_from_statement (for_statement (identifier_platform) identifier_platform (call (identifier_get_platform_settings) identifier_get_platform_settings (argument_list )argument_list )call (block (expression_statement (assignment (identifier_candidate) identifier_candidate (call (identifier_import_class) identifier_import_class (argument_list (subscript (identifier_platform) identifier_platform (string_'class') string_'class' )subscript )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_candidate) identifier_candidate (identifier_cls) identifier_cls )comparison_operator (block (return_statement (call (attribute (identifier_platform) identifier_platform (identifier_get) identifier_get )attribute (argument_list (string_'settings') string_'settings' (dictionary )dictionary )argument_list )call )return_statement )block )if_statement )block )for_statement )block )function_definition )module
Find the settings for the current class inside the platforms configuration.
(module (function_definition (function_name_complete_from_dir) function_name_complete_from_dir (parameters (identifier_directory) identifier_directory )parameters (block (global_statement (identifier_currDirModule) identifier_currDirModule )global_statement (if_statement (comparison_operator (identifier_currDirModule) identifier_currDirModule (None) None )comparison_operator (block (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (comparison_operator (subscript (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (integer_0) integer_0 )subscript (identifier_currDirModule) identifier_currDirModule )comparison_operator )boolean_operator (block (delete_statement (subscript (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (integer_0) integer_0 )subscript )delete_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_currDirModule) identifier_currDirModule (identifier_directory) identifier_directory )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier_directory) identifier_directory )argument_list )call )expression_statement )block )function_definition )module
This is necessary so that we get the imports from the same directory where the file we are completing is located.
(module (function_definition (function_name__extract_when) function_name__extract_when (parameters (identifier_body) identifier_body )parameters (block (expression_statement (assignment (identifier_when) identifier_when (call (attribute (identifier_body) identifier_body (identifier_get) identifier_get )attribute (argument_list (string_'timestamp') string_'timestamp' (call (attribute (identifier_body) identifier_body (identifier_get) identifier_get )attribute (argument_list (string_'_context_timestamp') string_'_context_timestamp' )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_when) identifier_when (block (return_statement (call (attribute (attribute (identifier_Datatype) identifier_Datatype (identifier_datetime) identifier_datetime )attribute (identifier_convert) identifier_convert )attribute (argument_list (identifier_when) identifier_when )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_utcnow) identifier_utcnow (argument_list )argument_list )call )return_statement )block )function_definition )module
Extract the generated datetime from the notification.
(module (function_definition (function_name_fqname_to_id) function_name_fqname_to_id (parameters (identifier_self) identifier_self (identifier_fq_name) identifier_fq_name (identifier_type) identifier_type )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_"type") string_"type" (identifier_type) identifier_type )pair (pair (string_"fq_name") string_"fq_name" (call (identifier_list) identifier_list (argument_list (identifier_fq_name) identifier_fq_name )argument_list )call )pair )dictionary )assignment )expression_statement (return_statement (subscript (call (attribute (identifier_self) identifier_self (identifier_post_json) identifier_post_json )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_make_url) identifier_make_url )attribute (argument_list (string_"/fqname-to-id") string_"/fqname-to-id" )argument_list )call (identifier_data) identifier_data )argument_list )call (string_"uuid") string_"uuid" )subscript )return_statement )block )function_definition )module
Return uuid for fq_name :param fq_name: resource fq name :type fq_name: FQName :param type: resource type :type type: str :rtype: UUIDv4 str :raises HttpError: fq_name not found
(module (function_definition (function_name_get_option_columns) function_name_get_option_columns (parameters (identifier_self) identifier_self (identifier_typ) identifier_typ (identifier_element) identifier_element )parameters (block (expression_statement (assignment (identifier_inter) identifier_inter (call (attribute (identifier_self) identifier_self (identifier_get_typ_interface) identifier_get_typ_interface )attribute (argument_list (identifier_typ) identifier_typ )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_inter) identifier_inter (identifier_get_option_columns) identifier_get_option_columns )attribute (argument_list (identifier_element) identifier_element )argument_list )call )return_statement )block )function_definition )module
Return the column of the model to show for each level Because each level might be displayed in a combobox. So you might want to provide the column to show. :param typ: the typ of options. E.g. Asset, Alembic, Camera etc :type typ: str :param element: The element for wich the options should be fetched. :type element: :class:`jukeboxcore.djadapter.models.Asset` | :class:`jukeboxcore.djadapter.models.Shot` :returns: a list of columns :rtype: list :raises: None
(module (function_definition (function_name_junk_folder) function_name_junk_folder (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_folder_constructor) identifier_folder_constructor )attribute (argument_list (keyword_argument (identifier_parent) identifier_parent (identifier_self) identifier_self )keyword_argument (keyword_argument (identifier_name) identifier_name (string_'Junk') string_'Junk' )keyword_argument (keyword_argument (identifier_folder_id) identifier_folder_id (attribute (attribute (identifier_OutlookWellKnowFolderNames) identifier_OutlookWellKnowFolderNames (identifier_JUNK) identifier_JUNK )attribute (identifier_value) identifier_value )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Shortcut to get Junk Folder instance :rtype: mailbox.Folder
(module (function_definition (function_name_right_click_high_equalarea) function_name_right_click_high_equalarea (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (if_statement (call (attribute (identifier_event) identifier_event (identifier_LeftIsDown) identifier_LeftIsDown )attribute (argument_list )argument_list )call (block (return_statement )return_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_high_EA_setting) identifier_high_EA_setting )attribute (string_"Zoom") string_"Zoom" )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_high_EA_setting) identifier_high_EA_setting )attribute (string_"Pan") string_"Pan" )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_toolbar4) identifier_toolbar4 )attribute (identifier_pan) identifier_pan )attribute (argument_list (string_'off') string_'off' )argument_list )call )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_high_EA_setting) identifier_high_EA_setting )attribute (string_"Pan") string_"Pan" )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_high_EA_setting) identifier_high_EA_setting )attribute (string_"Zoom") string_"Zoom" )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_toolbar4) identifier_toolbar4 )attribute (identifier_zoom) identifier_zoom )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )elif_clause )if_statement )block )function_definition )module
toggles between zoom and pan effects for the high equal area on right click Parameters ---------- event : the wx.MouseEvent that triggered the call of this function Alters ------ high_EA_setting, toolbar4 setting
(module (function_definition (function_name_plot) function_name_plot (parameters (identifier_x) identifier_x (identifier_y) identifier_y (default_parameter (identifier_units) identifier_units (string_'absolute') string_'absolute' )default_parameter (default_parameter (identifier_axis) identifier_axis (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (comparison_operator (identifier_axis) identifier_axis (None) None )comparison_operator (block (expression_statement (assignment (identifier_axis) identifier_axis (call (attribute (identifier_plt) identifier_plt (identifier_gca) identifier_gca )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (attribute (identifier_units) identifier_units (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_'relative') string_'relative' )comparison_operator (block (expression_statement (assignment (identifier_x) identifier_x (call (identifier_rel2abs_x) identifier_rel2abs_x (argument_list (identifier_x) identifier_x (identifier_axis) identifier_axis )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y) identifier_y (call (identifier_rel2abs_y) identifier_rel2abs_y (argument_list (identifier_y) identifier_y (identifier_axis) identifier_axis )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_axis) identifier_axis (identifier_plot) identifier_plot )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
r''' Plot. :arguments: **x, y** (``list``) Coordinates. :options: **units** ([``'absolute'``] | ``'relative'``) The type of units in which the coordinates are specified. Relative coordinates correspond to a fraction of the relevant axis. If you use relative coordinates, be sure to set the limits and scale before calling this function! ... Any ``plt.plot(...)`` option. :returns: The handle of the ``plt.plot(...)`` command.
(module (function_definition (function_name_set_id_format) function_name_set_id_format (parameters (identifier_portal) identifier_portal (identifier_format) identifier_format )parameters (block (expression_statement (assignment (identifier_bs) identifier_bs (attribute (identifier_portal) identifier_portal (identifier_bika_setup) identifier_bika_setup )attribute )assignment )expression_statement (if_statement (comparison_operator (string_'portal_type') string_'portal_type' (identifier_format) identifier_format )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Applying format {} for {}") string_"Applying format {} for {}" (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_format) identifier_format (identifier_get) identifier_get )attribute (argument_list (string_'form') string_'form' (string_'') string_'' )argument_list )call (call (attribute (identifier_format) identifier_format (identifier_get) identifier_get )attribute (argument_list (string_'portal_type') string_'portal_type' )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_portal_type) identifier_portal_type (subscript (identifier_format) identifier_format (string_'portal_type') string_'portal_type' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_ids) identifier_ids (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_id_map) identifier_id_map (call (attribute (identifier_bs) identifier_bs (identifier_getIDFormatting) identifier_getIDFormatting )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_record) identifier_record (identifier_id_map) identifier_id_map (block (if_statement (comparison_operator (call (attribute (identifier_record) identifier_record (identifier_get) identifier_get )attribute (argument_list (string_'portal_type') string_'portal_type' (string_'') string_'' )argument_list )call (identifier_portal_type) identifier_portal_type )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_ids) identifier_ids (identifier_append) identifier_append )attribute (argument_list (identifier_record) identifier_record )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_ids) identifier_ids (identifier_append) identifier_append )attribute (argument_list (identifier_format) identifier_format )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_bs) identifier_bs (identifier_setIDFormatting) identifier_setIDFormatting )attribute (argument_list (identifier_ids) identifier_ids )argument_list )call )expression_statement )block )function_definition )module
Sets the id formatting in setup for the format provided
(module (function_definition (function_name_get_int_from_user) function_name_get_int_from_user (parameters (identifier_self) identifier_self (default_parameter (identifier_title) identifier_title (string_"Enter integer value") string_"Enter integer value" )default_parameter (default_parameter (identifier_cond_func) identifier_cond_func (lambda (lambda_parameters (identifier_i) identifier_i )lambda_parameters (comparison_operator (identifier_i) identifier_i (None) None )comparison_operator )lambda )default_parameter )parameters (block (expression_statement (assignment (identifier_is_integer) identifier_is_integer (False) False )assignment )expression_statement (while_statement (not_operator (identifier_is_integer) identifier_is_integer )not_operator (block (expression_statement (assignment (identifier_dlg) identifier_dlg (call (attribute (identifier_wx) identifier_wx (identifier_TextEntryDialog) identifier_TextEntryDialog )attribute (argument_list (None) None (identifier_title) identifier_title (identifier_title) identifier_title )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_dlg) identifier_dlg (identifier_ShowModal) identifier_ShowModal )attribute (argument_list )argument_list )call (attribute (identifier_wx) identifier_wx (identifier_ID_OK) identifier_ID_OK )attribute )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_dlg) identifier_dlg (identifier_GetValue) identifier_GetValue )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_dlg) identifier_dlg (identifier_Destroy) identifier_Destroy )attribute (argument_list )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_integer) identifier_integer (call (identifier_int) identifier_int (argument_list (identifier_result) identifier_result )argument_list )call )assignment )expression_statement (if_statement (call (identifier_cond_func) identifier_cond_func (argument_list (identifier_integer) identifier_integer )argument_list )call (block (expression_statement (assignment (identifier_is_integer) identifier_is_integer (True) True )assignment )expression_statement )block )if_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )while_statement (return_statement (identifier_integer) identifier_integer )return_statement )block )function_definition )module
Opens an integer entry dialog and returns integer Parameters ---------- title: String \tDialog title cond_func: Function \tIf cond_func of int(<entry_value> then result is returned. \tOtherwise the dialog pops up again.
(module (function_definition (function_name__get_rh_methods) function_name__get_rh_methods (parameters (identifier_rh) identifier_rh )parameters (block (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (call (identifier_vars) identifier_vars (argument_list (identifier_rh) identifier_rh )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_all) identifier_all (argument_list (list (comparison_operator (identifier_k) identifier_k (identifier_HTTP_METHODS) identifier_HTTP_METHODS )comparison_operator (call (identifier_is_method) identifier_is_method (argument_list (identifier_v) identifier_v )argument_list )call (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_v) identifier_v (string_"input_schema") string_"input_schema" )argument_list )call )list )argument_list )call (block (expression_statement (yield (tuple (identifier_k) identifier_k (identifier_v) identifier_v )tuple )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Yield all HTTP methods in ``rh`` that are decorated with schema.validate
(module (function_definition (function_name_generate) function_name_generate (parameters (identifier_env) identifier_env )parameters (block (global_statement (identifier_GhostscriptAction) identifier_GhostscriptAction )global_statement (try_statement (block (if_statement (comparison_operator (identifier_GhostscriptAction) identifier_GhostscriptAction (None) None )comparison_operator (block (expression_statement (assignment (identifier_GhostscriptAction) identifier_GhostscriptAction (call (attribute (attribute (identifier_SCons) identifier_SCons (identifier_Action) identifier_Action )attribute (identifier_Action) identifier_Action )attribute (argument_list (string_'$GSCOM') string_'$GSCOM' (string_'$GSCOMSTR') string_'$GSCOMSTR' )argument_list )call )assignment )expression_statement )block )if_statement (import_from_statement (dotted_name (identifier_SCons) identifier_SCons (identifier_Tool) identifier_Tool )dotted_name (dotted_name (identifier_pdf) identifier_pdf )dotted_name )import_from_statement (expression_statement (call (attribute (identifier_pdf) identifier_pdf (identifier_generate) identifier_generate )attribute (argument_list (identifier_env) identifier_env )argument_list )call )expression_statement (expression_statement (assignment (identifier_bld) identifier_bld (subscript (subscript (identifier_env) identifier_env (string_'BUILDERS') string_'BUILDERS' )subscript (string_'PDF') string_'PDF' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_bld) identifier_bld (identifier_add_action) identifier_add_action )attribute (argument_list (string_'.ps') string_'.ps' (identifier_GhostscriptAction) identifier_GhostscriptAction )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_ImportError) identifier_ImportError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_gsbuilder) identifier_gsbuilder (call (attribute (attribute (identifier_SCons) identifier_SCons (identifier_Builder) identifier_Builder )attribute (identifier_Builder) identifier_Builder )attribute (argument_list (keyword_argument (identifier_action) identifier_action (call (attribute (attribute (identifier_SCons) identifier_SCons (identifier_Action) identifier_Action )attribute (identifier_Action) identifier_Action )attribute (argument_list (string_'$GSCOM') string_'$GSCOM' (string_'$GSCOMSTR') string_'$GSCOMSTR' )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_env) identifier_env (string_'BUILDERS') string_'BUILDERS' )subscript (string_'Gs') string_'Gs' )subscript (identifier_gsbuilder) identifier_gsbuilder )assignment )expression_statement (expression_statement (assignment (subscript (identifier_env) identifier_env (string_'GS') string_'GS' )subscript (identifier_gs) identifier_gs )assignment )expression_statement (expression_statement (assignment (subscript (identifier_env) identifier_env (string_'GSFLAGS') string_'GSFLAGS' )subscript (call (attribute (attribute (identifier_SCons) identifier_SCons (identifier_Util) identifier_Util )attribute (identifier_CLVar) identifier_CLVar )attribute (argument_list (string_'-dNOPAUSE -dBATCH -sDEVICE=pdfwrite') string_'-dNOPAUSE -dBATCH -sDEVICE=pdfwrite' )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_env) identifier_env (string_'GSCOM') string_'GSCOM' )subscript (string_'$GS $GSFLAGS -sOutputFile=$TARGET $SOURCES') string_'$GS $GSFLAGS -sOutputFile=$TARGET $SOURCES' )assignment )expression_statement )block )function_definition )module
Add Builders and construction variables for Ghostscript to an Environment.
(module (function_definition (function_name_list_users_in_group_category) function_name_list_users_in_group_category (parameters (identifier_self) identifier_self (identifier_group_category_id) identifier_group_category_id (default_parameter (identifier_search_term) identifier_search_term (None) None )default_parameter (default_parameter (identifier_unassigned) identifier_unassigned (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_path) identifier_path (string_"group_category_id") string_"group_category_id" )subscript (identifier_group_category_id) identifier_group_category_id )assignment )expression_statement (if_statement (comparison_operator (identifier_search_term) identifier_search_term (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_"search_term") string_"search_term" )subscript (identifier_search_term) identifier_search_term )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_unassigned) identifier_unassigned (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_"unassigned") string_"unassigned" )subscript (identifier_unassigned) identifier_unassigned )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"GET /api/v1/group_categories/{group_category_id}/users with query params: {params} and form data: {data}") string_"GET /api/v1/group_categories/{group_category_id}/users with query params: {params} and form data: {data}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (dictionary_splat (identifier_path) identifier_path )dictionary_splat )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_generic_request) identifier_generic_request )attribute (argument_list (string_"GET") string_"GET" (call (attribute (string_"/api/v1/group_categories/{group_category_id}/users") string_"/api/v1/group_categories/{group_category_id}/users" (identifier_format) identifier_format )attribute (argument_list (dictionary_splat (identifier_path) identifier_path )dictionary_splat )argument_list )call (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_all_pages) identifier_all_pages (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
List users in group category. Returns a list of users in the group category.
(module (function_definition (function_name_remote_get) function_name_remote_get (parameters (identifier_cwd) identifier_cwd (default_parameter (identifier_remote) identifier_remote (string_'origin') string_'origin' )default_parameter (default_parameter (identifier_user) identifier_user (None) None )default_parameter (default_parameter (identifier_password) identifier_password (None) None )default_parameter (default_parameter (identifier_redact_auth) identifier_redact_auth (True) True )default_parameter (default_parameter (identifier_ignore_retcode) identifier_ignore_retcode (False) False )default_parameter (default_parameter (identifier_output_encoding) identifier_output_encoding (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_cwd) identifier_cwd (call (identifier__expand_path) identifier__expand_path (argument_list (identifier_cwd) identifier_cwd (identifier_user) identifier_user )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_all_remotes) identifier_all_remotes (call (identifier_remotes) identifier_remotes (argument_list (identifier_cwd) identifier_cwd (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_password) identifier_password (identifier_password) identifier_password )keyword_argument (keyword_argument (identifier_redact_auth) identifier_redact_auth (identifier_redact_auth) identifier_redact_auth )keyword_argument (keyword_argument (identifier_ignore_retcode) identifier_ignore_retcode (identifier_ignore_retcode) identifier_ignore_retcode )keyword_argument (keyword_argument (identifier_output_encoding) identifier_output_encoding (identifier_output_encoding) identifier_output_encoding )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_remote) identifier_remote (identifier_all_remotes) identifier_all_remotes )comparison_operator (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (string_'Remote \'{0}\' not present in git checkout located at {1}') string_'Remote \'{0}\' not present in git checkout located at {1}' (identifier_format) identifier_format )attribute (argument_list (identifier_remote) identifier_remote (identifier_cwd) identifier_cwd )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (identifier_all_remotes) identifier_all_remotes (identifier_remote) identifier_remote )subscript )return_statement )block )function_definition )module
Get the fetch and push URL for a specific remote cwd The path to the git checkout remote : origin Name of the remote to query user User under which to run the git command. By default, the command is run by the user under which the minion is running. password Windows only. Required when specifying ``user``. This parameter will be ignored on non-Windows platforms. .. versionadded:: 2016.3.4 redact_auth : True Set to ``False`` to include the username/password if the remote uses HTTPS Basic Auth. Otherwise, this information will be redacted. .. warning:: Setting this to ``False`` will not only reveal any HTTPS Basic Auth that is configured, but the return data will also be written to the job cache. When possible, it is recommended to use SSH for authentication. .. versionadded:: 2015.5.6 ignore_retcode : False If ``True``, do not log an error to the minion log if the git command returns a nonzero exit status. .. versionadded:: 2015.8.0 output_encoding Use this option to specify which encoding to use to decode the output from any git commands which are run. This should not be needed in most cases. .. note:: This should only be needed if the files in the repository were created with filenames using an encoding other than UTF-8 to handle Unicode characters. .. versionadded:: 2018.3.1 CLI Examples: .. code-block:: bash salt myminion git.remote_get /path/to/repo salt myminion git.remote_get /path/to/repo upstream
(module (function_definition (function_name_solve) function_name_solve (parameters (identifier_self) identifier_self (identifier_value) identifier_value (identifier_filter_) identifier_filter_ )parameters (block (try_statement (block (return_statement (subscript (identifier_value) identifier_value (boolean_operator (attribute (identifier_filter_) identifier_filter_ (identifier_slice) identifier_slice )attribute (attribute (identifier_filter_) identifier_filter_ (identifier_index) identifier_index )attribute )boolean_operator )subscript )return_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition )module
Get slice or entry defined by an index from the given value. Arguments --------- value : ? A value to solve in combination with the given filter. filter_ : dataql.resource.SliceFilter An instance of ``SliceFilter``to solve with the given value. Example ------- >>> from dataql.solvers.registry import Registry >>> registry = Registry() >>> solver = SliceSolver(registry) >>> solver.solve([1, 2, 3], SliceFilter(1)) 2 >>> solver.solve([1, 2, 3], SliceFilter(slice(1, None, None))) [2, 3] >>> solver.solve([1, 2, 3], SliceFilter(slice(0, 2, 2))) [1] >>> solver.solve([1, 2, 3], SliceFilter(4))
(module (function_definition (function_name_tag) function_name_tag (parameters (identifier_self) identifier_self (identifier_image) identifier_image (identifier_repository) identifier_repository (default_parameter (identifier_tag) identifier_tag (None) None )default_parameter (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'tag') string_'tag' (identifier_tag) identifier_tag )pair (pair (string_'repo') string_'repo' (identifier_repository) identifier_repository )pair (pair (string_'force') string_'force' (conditional_expression (integer_1) integer_1 (identifier_force) identifier_force (integer_0) integer_0 )conditional_expression )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (argument_list (string_"/images/{0}/tag") string_"/images/{0}/tag" (identifier_image) identifier_image )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_self) identifier_self (identifier__post) identifier__post )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__raise_for_status) identifier__raise_for_status )attribute (argument_list (identifier_res) identifier_res )argument_list )call )expression_statement (return_statement (comparison_operator (attribute (identifier_res) identifier_res (identifier_status_code) identifier_status_code )attribute (integer_201) integer_201 )comparison_operator )return_statement )block )function_definition )module
Tag an image into a repository. Similar to the ``docker tag`` command. Args: image (str): The image to tag repository (str): The repository to set for the tag tag (str): The tag name force (bool): Force Returns: (bool): ``True`` if successful Raises: :py:class:`docker.errors.APIError` If the server returns an error. Example: >>> client.tag('ubuntu', 'localhost:5000/ubuntu', 'latest', force=True)
(module (function_definition (function_name_name_without_zeroes) function_name_name_without_zeroes (parameters (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_first_zero) identifier_first_zero (call (attribute (identifier_name) identifier_name (identifier_find) identifier_find )attribute (argument_list (string_b'\0') string_b'\0' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_first_zero) identifier_first_zero (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (return_statement (identifier_name) identifier_name )return_statement )block (else_clause (block (return_statement (call (identifier_str) identifier_str (argument_list (subscript (identifier_name) identifier_name (slice (colon) colon (identifier_first_zero) identifier_first_zero )slice )subscript )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Return a human-readable name without LSDJ's trailing zeroes. :param name: the name from which to strip zeroes :rtype: the name, without trailing zeroes
(module (function_definition (function_name_bisect) function_name_bisect (parameters (identifier_func) identifier_func (identifier_a) identifier_a (identifier_b) identifier_b (default_parameter (identifier_xtol) identifier_xtol (float_1e-12) float_1e-12 )default_parameter (default_parameter (identifier_maxiter) identifier_maxiter (integer_100) integer_100 )default_parameter )parameters (block (expression_statement (assignment (identifier_fa) identifier_fa (call (identifier_func) identifier_func (argument_list (identifier_a) identifier_a )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_fa) identifier_fa (float_0.) float_0. )comparison_operator (block (return_statement (identifier_a) identifier_a )return_statement )block )if_statement (expression_statement (assignment (identifier_fb) identifier_fb (call (identifier_func) identifier_func (argument_list (identifier_b) identifier_b )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_fb) identifier_fb (float_0.) float_0. )comparison_operator (block (return_statement (identifier_b) identifier_b )return_statement )block )if_statement (assert_statement (comparison_operator (call (identifier_sign) identifier_sign (argument_list (identifier_fa) identifier_fa )argument_list )call (call (identifier_sign) identifier_sign (argument_list (identifier_fb) identifier_fb )argument_list )call )comparison_operator )assert_statement (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (identifier_maxiter) identifier_maxiter )argument_list )call (block (expression_statement (assignment (identifier_c) identifier_c (binary_operator (parenthesized_expression (binary_operator (identifier_a) identifier_a (identifier_b) identifier_b )binary_operator )parenthesized_expression (float_2.) float_2. )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_fc) identifier_fc (call (identifier_func) identifier_func (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_fc) identifier_fc (float_0.) float_0. )comparison_operator (comparison_operator (binary_operator (call (identifier_abs) identifier_abs (argument_list (binary_operator (identifier_b) identifier_b (identifier_a) identifier_a )binary_operator )argument_list )call (float_2.) float_2. )binary_operator (identifier_xtol) identifier_xtol )comparison_operator )boolean_operator (block (return_statement (identifier_c) identifier_c )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_sign) identifier_sign (argument_list (identifier_fc) identifier_fc )argument_list )call (call (identifier_sign) identifier_sign (argument_list (call (identifier_func) identifier_func (argument_list (identifier_a) identifier_a )argument_list )call )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_a) identifier_a (identifier_c) identifier_c )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_b) identifier_b (identifier_c) identifier_c )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_'Failed to converge after %d iterations.') string_'Failed to converge after %d iterations.' (identifier_maxiter) identifier_maxiter )binary_operator )argument_list )call )raise_statement )block )else_clause )for_statement )block )function_definition )module
Finds the root of `func` using the bisection method. Requirements ------------ - func must be continuous function that accepts a single number input and returns a single number - `func(a)` and `func(b)` must have opposite sign Parameters ---------- func : function the function that we want to find the root of a : number one of the bounds on the input b : number the other bound on the input xtol : number, optional the solution tolerance of the input value. The algorithm is considered converged if `abs(b-a)2. < xtol` maxiter : number, optional the maximum number of iterations allowed for convergence
(module (function_definition (function_name_setup_block_and_grid) function_name_setup_block_and_grid (parameters (identifier_problem_size) identifier_problem_size (identifier_grid_div) identifier_grid_div (identifier_params) identifier_params (default_parameter (identifier_block_size_names) identifier_block_size_names (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_threads) identifier_threads (call (identifier_get_thread_block_dimensions) identifier_get_thread_block_dimensions (argument_list (identifier_params) identifier_params (identifier_block_size_names) identifier_block_size_names )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_current_problem_size) identifier_current_problem_size (call (identifier_get_problem_size) identifier_get_problem_size (argument_list (identifier_problem_size) identifier_problem_size (identifier_params) identifier_params )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_grid) identifier_grid (call (identifier_get_grid_dimensions) identifier_get_grid_dimensions (argument_list (identifier_current_problem_size) identifier_current_problem_size (identifier_params) identifier_params (identifier_grid_div) identifier_grid_div (identifier_block_size_names) identifier_block_size_names )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_threads) identifier_threads (identifier_grid) identifier_grid )expression_list )return_statement )block )function_definition )module
compute problem size, thread block and grid dimensions for this kernel
(module (function_definition (function_name_print_what_is_playing) function_name_print_what_is_playing (parameters (identifier_loop) identifier_loop )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Discovering devices on network...') string_'Discovering devices on network...' )argument_list )call )expression_statement (expression_statement (assignment (identifier_atvs) identifier_atvs (await (call (attribute (identifier_pyatv) identifier_pyatv (identifier_scan_for_apple_tvs) identifier_scan_for_apple_tvs )attribute (argument_list (identifier_loop) identifier_loop (keyword_argument (identifier_timeout) identifier_timeout (integer_5) integer_5 )keyword_argument )argument_list )call )await )assignment )expression_statement (if_statement (not_operator (identifier_atvs) identifier_atvs )not_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'no device found') string_'no device found' (keyword_argument (identifier_file) identifier_file (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute )keyword_argument )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'Connecting to {0}') string_'Connecting to {0}' (identifier_format) identifier_format )attribute (argument_list (attribute (subscript (identifier_atvs) identifier_atvs (integer_0) integer_0 )subscript (identifier_address) identifier_address )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_atv) identifier_atv (call (attribute (identifier_pyatv) identifier_pyatv (identifier_connect_to_apple_tv) identifier_connect_to_apple_tv )attribute (argument_list (subscript (identifier_atvs) identifier_atvs (integer_0) integer_0 )subscript (identifier_loop) identifier_loop )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_playing) identifier_playing (await (call (attribute (attribute (identifier_atv) identifier_atv (identifier_metadata) identifier_metadata )attribute (identifier_playing) identifier_playing )attribute (argument_list )argument_list )call )await )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Currently playing:') string_'Currently playing:' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_playing) identifier_playing )argument_list )call )expression_statement )block (finally_clause (block (expression_statement (await (call (attribute (identifier_atv) identifier_atv (identifier_logout) identifier_logout )attribute (argument_list )argument_list )call )await )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Find a device and print what is playing.
(module (function_definition (function_name_generate_docs) function_name_generate_docs (parameters (identifier_app) identifier_app )parameters (block (expression_statement (assignment (identifier_config) identifier_config (attribute (identifier_app) identifier_app (identifier_config) identifier_config )attribute )assignment )expression_statement (expression_statement (assignment (identifier_config_dir) identifier_config_dir (attribute (attribute (identifier_app) identifier_app (identifier_env) identifier_env )attribute (identifier_srcdir) identifier_srcdir )attribute )assignment )expression_statement (expression_statement (assignment (identifier_source_root) identifier_source_root (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_config_dir) identifier_config_dir (attribute (identifier_config) identifier_config (identifier_apidoc_source_root) identifier_apidoc_source_root )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output_root) identifier_output_root (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_config_dir) identifier_config_dir (attribute (identifier_config) identifier_config (identifier_apidoc_output_root) identifier_apidoc_output_root )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_execution_dir) identifier_execution_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_config_dir) identifier_config_dir (string_'..') string_'..' )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_cleanup) identifier_cleanup (argument_list (identifier_output_root) identifier_output_root )argument_list )call )expression_statement (expression_statement (assignment (identifier_command) identifier_command (list (string_'sphinx-apidoc') string_'sphinx-apidoc' (string_'-f') string_'-f' (string_'-o') string_'-o' (identifier_output_root) identifier_output_root (identifier_source_root) identifier_source_root )list )assignment )expression_statement (for_statement (identifier_exclude) identifier_exclude (attribute (identifier_config) identifier_config (identifier_apidoc_exclude) identifier_apidoc_exclude )attribute (block (expression_statement (call (attribute (identifier_command) identifier_command (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_source_root) identifier_source_root (identifier_exclude) identifier_exclude )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_process) identifier_process (call (identifier_Popen) identifier_Popen (argument_list (identifier_command) identifier_command (keyword_argument (identifier_cwd) identifier_cwd (identifier_execution_dir) identifier_execution_dir )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_process) identifier_process (identifier_wait) identifier_wait )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Run sphinx-apidoc to generate Python API documentation for the project.
(module (function_definition (function_name_get_frame) function_name_get_frame (parameters (identifier_self) identifier_self (identifier_in_data) identifier_in_data (identifier_frame_count) identifier_frame_count (identifier_time_info) identifier_time_info (identifier_status) identifier_status )parameters (block (while_statement (attribute (identifier_self) identifier_self (identifier_keep_listening) identifier_keep_listening )attribute (block (try_statement (block (expression_statement (assignment (identifier_frame) identifier_frame (call (attribute (attribute (identifier_self) identifier_self (identifier_queue) identifier_queue )attribute (identifier_get) identifier_get )attribute (argument_list (False) False (keyword_argument (identifier_timeout) identifier_timeout (identifier_queue_timeout) identifier_queue_timeout )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (tuple (identifier_frame) identifier_frame (attribute (identifier_pyaudio) identifier_pyaudio (identifier_paContinue) identifier_paContinue )attribute )tuple )return_statement )block (except_clause (identifier_Empty) identifier_Empty (block (pass_statement )pass_statement )block )except_clause )try_statement )block )while_statement (return_statement (tuple (None) None (attribute (identifier_pyaudio) identifier_pyaudio (identifier_paComplete) identifier_paComplete )attribute )tuple )return_statement )block )function_definition )module
Callback function for the pyaudio stream. Don't use directly.
(module (function_definition (function_name__ExtractContentFromDataStream) function_name__ExtractContentFromDataStream (parameters (identifier_self) identifier_self (identifier_mediator) identifier_mediator (identifier_file_entry) identifier_file_entry (identifier_data_stream_name) identifier_data_stream_name )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_processing_status) identifier_processing_status )attribute (attribute (identifier_definitions) identifier_definitions (identifier_STATUS_INDICATOR_EXTRACTING) identifier_STATUS_INDICATOR_EXTRACTING )attribute )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__processing_profiler) identifier__processing_profiler )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__processing_profiler) identifier__processing_profiler )attribute (identifier_StartTiming) identifier_StartTiming )attribute (argument_list (string_'extracting') string_'extracting' )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__event_extractor) identifier__event_extractor )attribute (identifier_ParseDataStream) identifier_ParseDataStream )attribute (argument_list (identifier_mediator) identifier_mediator (identifier_file_entry) identifier_file_entry (identifier_data_stream_name) identifier_data_stream_name )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__processing_profiler) identifier__processing_profiler )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__processing_profiler) identifier__processing_profiler )attribute (identifier_StopTiming) identifier_StopTiming )attribute (argument_list (string_'extracting') string_'extracting' )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_processing_status) identifier_processing_status )attribute (attribute (identifier_definitions) identifier_definitions (identifier_STATUS_INDICATOR_RUNNING) identifier_STATUS_INDICATOR_RUNNING )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_last_activity_timestamp) identifier_last_activity_timestamp )attribute (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement )block )function_definition )module
Extracts content from a data stream. Args: mediator (ParserMediator): mediates the interactions between parsers and other components, such as storage and abort signals. file_entry (dfvfs.FileEntry): file entry to extract its content. data_stream_name (str): name of the data stream whose content is to be extracted.
(module (function_definition (function_name_commit_signal) function_name_commit_signal (parameters (identifier_data_id) identifier_data_id )parameters (block (if_statement (not_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_settings) identifier_settings (string_'FLOW_MANAGER_DISABLE_AUTO_CALLS') string_'FLOW_MANAGER_DISABLE_AUTO_CALLS' (False) False )argument_list )call )not_operator (block (expression_statement (assignment (identifier_immediate) identifier_immediate (call (identifier_getattr) identifier_getattr (argument_list (identifier_settings) identifier_settings (string_'FLOW_MANAGER_SYNC_AUTO_CALLS') string_'FLOW_MANAGER_SYNC_AUTO_CALLS' (False) False )argument_list )call )assignment )expression_statement (expression_statement (call (call (identifier_async_to_sync) identifier_async_to_sync (argument_list (attribute (identifier_manager) identifier_manager (identifier_communicate) identifier_communicate )attribute )argument_list )call (argument_list (keyword_argument (identifier_data_id) identifier_data_id (identifier_data_id) identifier_data_id )keyword_argument (keyword_argument (identifier_save_settings) identifier_save_settings (False) False )keyword_argument (keyword_argument (identifier_run_sync) identifier_run_sync (identifier_immediate) identifier_immediate )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Nudge manager at the end of every Data object save event.
(module (function_definition (function_name_is_git_repo) function_name_is_git_repo (parameters )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (expression_list (string_"git") string_"git" (string_"rev-parse") string_"rev-parse" (string_"--git-dir") string_"--git-dir" )expression_list )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_subprocess) identifier_subprocess (identifier_run) identifier_run )attribute (argument_list (identifier_cmd) identifier_cmd (keyword_argument (identifier_stdout) identifier_stdout (attribute (identifier_subprocess) identifier_subprocess (identifier_DEVNULL) identifier_DEVNULL )attribute )keyword_argument (keyword_argument (identifier_check) identifier_check (True) True )keyword_argument )argument_list )call )expression_statement (return_statement (True) True )return_statement )block (except_clause (attribute (identifier_subprocess) identifier_subprocess (identifier_CalledProcessError) identifier_CalledProcessError )attribute (block (return_statement (False) False )return_statement )block )except_clause )try_statement )block )function_definition )module
Check whether the current folder is a Git repo.
(module (function_definition (function_name_set_value) function_name_set_value (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (global_statement (identifier__config) identifier__config )global_statement (if_statement (comparison_operator (identifier__config) identifier__config (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'configuration not set; must run figgypy.set_config first') string_'configuration not set; must run figgypy.set_config first' )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier__config) identifier__config (identifier_set_value) identifier_set_value )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Set value in the global Config object.
(module (function_definition (function_name_send) function_name_send (parameters (identifier_self) identifier_self (default_parameter (identifier_payload) identifier_payload (string_'') string_'' )default_parameter (default_parameter (identifier_action_type) identifier_action_type (string_'') string_'' )default_parameter (default_parameter (identifier_channel) identifier_channel (None) None )default_parameter (dictionary_splat_pattern (identifier_kwds) identifier_kwds )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_channel) identifier_channel (boolean_operator (identifier_channel) identifier_channel (attribute (identifier_self) identifier_self (identifier_producer_channel) identifier_producer_channel )attribute )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (identifier_serialize_action) identifier_serialize_action (argument_list (keyword_argument (identifier_action_type) identifier_action_type (identifier_action_type) identifier_action_type )keyword_argument (keyword_argument (identifier_payload) identifier_payload (identifier_payload) identifier_payload )keyword_argument (dictionary_splat (identifier_kwds) identifier_kwds )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (await (call (attribute (attribute (identifier_self) identifier_self (identifier__producer) identifier__producer )attribute (identifier_send) identifier_send )attribute (argument_list (identifier_channel) identifier_channel (call (attribute (identifier_message) identifier_message (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )argument_list )call )await )return_statement )block )function_definition )module
This method sends a message over the kafka stream.
(module (function_definition (function_name_from_dict) function_name_from_dict (parameters (identifier_cls) identifier_cls (typed_parameter (identifier_data) identifier_data (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_str) identifier_str )type (type (identifier_int) identifier_int )type )type_parameter )generic_type )type )type_parameter )generic_type )type )typed_parameter )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_dict) identifier_dict )argument_list )call )assert_statement (if_statement (comparison_operator (string_'ensembl_id') string_'ensembl_id' (identifier_data) identifier_data )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'An "ensembl_id" key is missing!') string_'An "ensembl_id" key is missing!' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_dict) identifier_dict (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (for_statement (identifier_attr) identifier_attr (list (string_'name') string_'name' (string_'chromosome') string_'chromosome' (string_'position') string_'position' (string_'length') string_'length' (string_'type') string_'type' (string_'source') string_'source' )list (block (if_statement (boolean_operator (comparison_operator (identifier_attr) identifier_attr (identifier_data) identifier_data )comparison_operator (comparison_operator (subscript (identifier_data) identifier_data (identifier_attr) identifier_attr )subscript (string_'') string_'' )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (identifier_attr) identifier_attr )subscript (None) None )assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'type_') string_'type_' )subscript (subscript (identifier_data) identifier_data (string_'type') string_'type' )subscript )assignment )expression_statement (delete_statement (subscript (identifier_data) identifier_data (string_'type') string_'type' )subscript )delete_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (dictionary_splat (identifier_data) identifier_data )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Generate an `ExpGene` object from a dictionary. Parameters ---------- data : dict A dictionary with keys corresponding to attribute names. Attributes with missing keys will be assigned `None`. Returns ------- `ExpGene` The gene.
(module (function_definition (function_name_with_args) function_name_with_args (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_new_info) identifier_new_info (call (attribute (identifier_mutablerecords) identifier_mutablerecords (identifier_CopyRecord) identifier_CopyRecord )attribute (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_new_info) identifier_new_info (identifier_options) identifier_options )attribute (call (attribute (attribute (identifier_new_info) identifier_new_info (identifier_options) identifier_options )attribute (identifier_format_strings) identifier_format_strings )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_new_info) identifier_new_info (identifier_extra_kwargs) identifier_extra_kwargs )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_new_info) identifier_new_info (identifier_measurements) identifier_measurements )attribute (list_comprehension (call (attribute (identifier_m) identifier_m (identifier_with_args) identifier_with_args )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (for_in_clause (identifier_m) identifier_m (attribute (identifier_self) identifier_self (identifier_measurements) identifier_measurements )attribute )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_new_info) identifier_new_info )return_statement )block )function_definition )module
Send these keyword-arguments to the phase when called.
(module (function_definition (function_name_fit) function_name_fit (parameters (identifier_self) identifier_self (identifier_x) identifier_x (default_parameter (identifier_fudge) identifier_fudge (float_1e-18) float_1e-18 )default_parameter )parameters (block (assert_statement (comparison_operator (attribute (identifier_x) identifier_x (identifier_ndim) identifier_ndim )attribute (integer_2) integer_2 )comparison_operator )assert_statement (expression_statement (assignment (pattern_list (identifier_ns) identifier_ns (identifier_nc) identifier_nc )pattern_list (attribute (identifier_x) identifier_x (identifier_shape) identifier_shape )attribute )assignment )expression_statement (expression_statement (assignment (identifier_x_cov) identifier_x_cov (call (attribute (identifier_np) identifier_np (identifier_cov) identifier_cov )attribute (argument_list (identifier_x) identifier_x (keyword_argument (identifier_rowvar) identifier_rowvar (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (attribute (identifier_x_cov) identifier_x_cov (identifier_shape) identifier_shape )attribute (tuple (identifier_nc) identifier_nc (identifier_nc) identifier_nc )tuple )comparison_operator )assert_statement (expression_statement (assignment (pattern_list (identifier_d) identifier_d (identifier_v) identifier_v )pattern_list (call (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_eigh) identifier_eigh )attribute (argument_list (identifier_x_cov) identifier_x_cov )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_np) identifier_np (identifier_diag) identifier_diag )attribute (argument_list (binary_operator (float_1.) float_1. (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (identifier_d) identifier_d (identifier_fudge) identifier_fudge )binary_operator )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_w) identifier_w (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (identifier_v) identifier_v (identifier_d) identifier_d )argument_list )call (attribute (identifier_v) identifier_v (identifier_T) identifier_T )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__matrix) identifier__matrix )attribute (identifier_w) identifier_w )assignment )expression_statement (return_statement (identifier_w) identifier_w )return_statement )block )function_definition )module
Compute the whitening matrix. Parameters ---------- x : array An `(n_samples, n_channels)` array.
(module (function_definition (function_name_add_sub_directory) function_name_add_sub_directory (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_sub_dir_path) identifier_sub_dir_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_results_root) identifier_results_root )attribute (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_sub_dir_path) identifier_sub_dir_path (keyword_argument (identifier_exist_ok) identifier_exist_ok (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__directories) identifier__directories )attribute (identifier_key) identifier_key )subscript (identifier_sub_dir_path) identifier_sub_dir_path )assignment )expression_statement (return_statement (identifier_sub_dir_path) identifier_sub_dir_path )return_statement )block )function_definition )module
Adds a sub-directory to the results directory. Parameters ---------- key: str A look-up key for the directory path. path: str The relative path from the root of the results directory to the sub-directory. Returns ------- str: The absolute path to the sub-directory.
(module (function_definition (function_name_list) function_name_list (parameters (identifier_self) identifier_self (default_parameter (identifier_prefix) identifier_prefix (string_'') string_'' )default_parameter (default_parameter (identifier_delimiter) identifier_delimiter (string_'') string_'' )default_parameter (default_parameter (identifier_marker) identifier_marker (string_'') string_'' )default_parameter (default_parameter (identifier_headers) identifier_headers (None) None )default_parameter )parameters (block (return_statement (call (identifier_BucketListResultSet) identifier_BucketListResultSet (argument_list (identifier_self) identifier_self (identifier_prefix) identifier_prefix (identifier_delimiter) identifier_delimiter (identifier_marker) identifier_marker (identifier_headers) identifier_headers )argument_list )call )return_statement )block )function_definition )module
List key objects within a bucket. This returns an instance of an BucketListResultSet that automatically handles all of the result paging, etc. from S3. You just need to keep iterating until there are no more results. Called with no arguments, this will return an iterator object across all keys within the bucket. The Key objects returned by the iterator are obtained by parsing the results of a GET on the bucket, also known as the List Objects request. The XML returned by this request contains only a subset of the information about each key. Certain metadata fields such as Content-Type and user metadata are not available in the XML. Therefore, if you want these additional metadata fields you will have to do a HEAD request on the Key in the bucket. :type prefix: string :param prefix: allows you to limit the listing to a particular prefix. For example, if you call the method with prefix='/foo/' then the iterator will only cycle through the keys that begin with the string '/foo/'. :type delimiter: string :param delimiter: can be used in conjunction with the prefix to allow you to organize and browse your keys hierarchically. See: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ for more details. :type marker: string :param marker: The "marker" of where you are in the result set :rtype: :class:`boto.s3.bucketlistresultset.BucketListResultSet` :return: an instance of a BucketListResultSet that handles paging, etc
(module (function_definition (function_name_get_app_state) function_name_get_app_state (parameters )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_g) identifier_g (string_'app_state') string_'app_state' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_model) identifier_model (call (identifier_get_model) identifier_get_model (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_g) identifier_g (identifier_app_state) identifier_app_state )attribute (dictionary (pair (string_'app_title') string_'app_title' (identifier_APP_TITLE) identifier_APP_TITLE )pair (pair (string_'model_name') string_'model_name' (attribute (call (identifier_type) identifier_type (argument_list (identifier_model) identifier_model )argument_list )call (identifier___name__) identifier___name__ )attribute )pair (pair (string_'latest_ckpt_name') string_'latest_ckpt_name' (attribute (identifier_model) identifier_model (identifier_latest_ckpt_name) identifier_latest_ckpt_name )attribute )pair (pair (string_'latest_ckpt_time') string_'latest_ckpt_time' (attribute (identifier_model) identifier_model (identifier_latest_ckpt_time) identifier_latest_ckpt_time )attribute )pair )dictionary )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_g) identifier_g (identifier_app_state) identifier_app_state )attribute )return_statement )block )function_definition )module
Get current status of application in context Returns: :obj:`dict` of application status
(module (function_definition (function_name_running) function_name_running (parameters (identifier_opts) identifier_opts )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (expression_statement (assignment (identifier_proc_dir) identifier_proc_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (subscript (identifier_opts) identifier_opts (string_'cachedir') string_'cachedir' )subscript (string_'proc') string_'proc' )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_proc_dir) identifier_proc_dir )argument_list )call )not_operator (block (return_statement (identifier_ret) identifier_ret )return_statement )block )if_statement (for_statement (identifier_fn_) identifier_fn_ (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_proc_dir) identifier_proc_dir )argument_list )call (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_proc_dir) identifier_proc_dir (identifier_fn_) identifier_fn_ )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier__read_proc_file) identifier__read_proc_file (argument_list (identifier_path) identifier_path (identifier_opts) identifier_opts )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block )if_statement )block (except_clause (tuple (identifier_IOError) identifier_IOError (identifier_OSError) identifier_OSError )tuple (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Return the running jobs on this minion
(module (function_definition (function_name_setImembPtr) function_name_setImembPtr (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_jseg) identifier_jseg (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_sec) identifier_sec (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_secs) identifier_secs )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_hSec) identifier_hSec (subscript (identifier_sec) identifier_sec (string_'hObj') string_'hObj' )subscript )assignment )expression_statement (for_statement (pattern_list (identifier_iseg) identifier_iseg (identifier_seg) identifier_seg )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_hSec) identifier_hSec )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_imembPtr) identifier_imembPtr )attribute (identifier_pset) identifier_pset )attribute (argument_list (identifier_jseg) identifier_jseg (attribute (identifier_seg) identifier_seg (identifier__ref_i_membrane_) identifier__ref_i_membrane_ )attribute )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_jseg) identifier_jseg (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Set PtrVector to point to the i_membrane_
(module (function_definition (function_name_parse_xml_to_obj) function_name_parse_xml_to_obj (parameters (identifier_self) identifier_self (identifier_xml_file) identifier_xml_file (default_parameter (identifier_check_version) identifier_check_version (True) True )default_parameter (default_parameter (identifier_check_root) identifier_check_root (True) True )default_parameter (default_parameter (identifier_encoding) identifier_encoding (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_root) identifier_root (call (identifier_get_etree_root) identifier_get_etree_root (argument_list (identifier_xml_file) identifier_xml_file (keyword_argument (identifier_encoding) identifier_encoding (identifier_encoding) identifier_encoding )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_check_root) identifier_check_root (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_root_tag) identifier__check_root_tag )attribute (argument_list (identifier_root) identifier_root )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_check_version) identifier_check_version (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_version) identifier__check_version )attribute (argument_list (identifier_root) identifier_root )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_entity_class) identifier_entity_class (call (attribute (identifier_self) identifier_self (identifier_get_entity_class) identifier_get_entity_class )attribute (argument_list (attribute (identifier_root) identifier_root (identifier_tag) identifier_tag )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_entity_obj) identifier_entity_obj (call (attribute (attribute (identifier_entity_class) identifier_entity_class (identifier__binding_class) identifier__binding_class )attribute (identifier_factory) identifier_factory )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_entity_obj) identifier_entity_obj (identifier_build) identifier_build )attribute (argument_list (identifier_root) identifier_root )argument_list )call )expression_statement (return_statement (identifier_entity_obj) identifier_entity_obj )return_statement )block )function_definition )module
Creates a STIX binding object from the supplied xml file. Args: xml_file: A filename/path or a file-like object representing a STIX instance document check_version: Inspect the version before parsing. check_root: Inspect the root element before parsing. encoding: The character encoding of the input `xml_file`. Raises: .UnknownVersionError: If `check_version` is ``True`` and `xml_file` does not contain STIX version information. .UnsupportedVersionError: If `check_version` is ``False`` and `xml_file` contains an unsupported STIX version. .UnsupportedRootElement: If `check_root` is ``True`` and `xml_file` contains an invalid root element.
(module (function_definition (function_name_pct_positive) function_name_pct_positive (parameters (identifier_self) identifier_self (default_parameter (identifier_threshold) identifier_threshold (float_0.0) float_0.0 )default_parameter )parameters (block (return_statement (binary_operator (call (attribute (identifier_np) identifier_np (identifier_count_nonzero) identifier_count_nonzero )attribute (argument_list (subscript (identifier_self) identifier_self (comparison_operator (identifier_self) identifier_self (identifier_threshold) identifier_threshold )comparison_operator )subscript )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_count) identifier_count )attribute (argument_list )argument_list )call )binary_operator )return_statement )block )function_definition )module
Pct. of periods in which `self` is greater than `threshold.` Parameters ---------- threshold : {float, TSeries, pd.Series}, default 0. Returns ------- float
(module (function_definition (function_name_html_error_template) function_name_html_error_template (parameters )parameters (block (import_statement (dotted_name (identifier_mako) identifier_mako (identifier_template) identifier_template )dotted_name )import_statement (return_statement (call (attribute (attribute (identifier_mako) identifier_mako (identifier_template) identifier_template )attribute (identifier_Template) identifier_Template )attribute (argument_list (identifier_r) identifier_r (keyword_argument (identifier_output_encoding) identifier_output_encoding (call (attribute (identifier_sys) identifier_sys (identifier_getdefaultencoding) identifier_getdefaultencoding )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_encoding_errors) identifier_encoding_errors (string_'htmlentityreplace') string_'htmlentityreplace' )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Provides a template that renders a stack trace in an HTML format, providing an excerpt of code as well as substituting source template filenames, line numbers and code for that of the originating source template, as applicable. The template's default ``encoding_errors`` value is ``'htmlentityreplace'``. The template has two options. With the ``full`` option disabled, only a section of an HTML document is returned. With the ``css`` option disabled, the default stylesheet won't be included.
(module (function_definition (function_name_trim_join_unit) function_name_trim_join_unit (parameters (identifier_join_unit) identifier_join_unit (identifier_length) identifier_length )parameters (block (if_statement (comparison_operator (integer_0) integer_0 (attribute (identifier_join_unit) identifier_join_unit (identifier_indexers) identifier_indexers )attribute )comparison_operator (block (expression_statement (assignment (identifier_extra_indexers) identifier_extra_indexers (attribute (identifier_join_unit) identifier_join_unit (identifier_indexers) identifier_indexers )attribute )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_join_unit) identifier_join_unit (identifier_block) identifier_block )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_extra_block) identifier_extra_block (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_extra_block) identifier_extra_block (call (attribute (attribute (identifier_join_unit) identifier_join_unit (identifier_block) identifier_block )attribute (identifier_getitem_block) identifier_getitem_block )attribute (argument_list (call (identifier_slice) identifier_slice (argument_list (identifier_length) identifier_length (None) None )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_join_unit) identifier_join_unit (identifier_block) identifier_block )attribute (call (attribute (attribute (identifier_join_unit) identifier_join_unit (identifier_block) identifier_block )attribute (identifier_getitem_block) identifier_getitem_block )attribute (argument_list (call (identifier_slice) identifier_slice (argument_list (identifier_length) identifier_length )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_extra_block) identifier_extra_block (attribute (identifier_join_unit) identifier_join_unit (identifier_block) identifier_block )attribute )assignment )expression_statement (expression_statement (assignment (identifier_extra_indexers) identifier_extra_indexers (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (attribute (identifier_join_unit) identifier_join_unit (identifier_indexers) identifier_indexers )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_extra_indexers) identifier_extra_indexers (integer_0) integer_0 )subscript (subscript (subscript (identifier_extra_indexers) identifier_extra_indexers (integer_0) integer_0 )subscript (slice (identifier_length) identifier_length (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_join_unit) identifier_join_unit (identifier_indexers) identifier_indexers )attribute (integer_0) integer_0 )subscript (subscript (subscript (attribute (identifier_join_unit) identifier_join_unit (identifier_indexers) identifier_indexers )attribute (integer_0) integer_0 )subscript (slice (colon) colon (identifier_length) identifier_length )slice )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_extra_shape) identifier_extra_shape (binary_operator (tuple (binary_operator (subscript (attribute (identifier_join_unit) identifier_join_unit (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (identifier_length) identifier_length )binary_operator )tuple (subscript (attribute (identifier_join_unit) identifier_join_unit (identifier_shape) identifier_shape )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_join_unit) identifier_join_unit (identifier_shape) identifier_shape )attribute (binary_operator (tuple (identifier_length) identifier_length )tuple (subscript (attribute (identifier_join_unit) identifier_join_unit (identifier_shape) identifier_shape )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )binary_operator )assignment )expression_statement (return_statement (call (identifier_JoinUnit) identifier_JoinUnit (argument_list (keyword_argument (identifier_block) identifier_block (identifier_extra_block) identifier_extra_block )keyword_argument (keyword_argument (identifier_indexers) identifier_indexers (identifier_extra_indexers) identifier_extra_indexers )keyword_argument (keyword_argument (identifier_shape) identifier_shape (identifier_extra_shape) identifier_extra_shape )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Reduce join_unit's shape along item axis to length. Extra items that didn't fit are returned as a separate block.
(module (function_definition (function_name_info) function_name_info (parameters (identifier_self) identifier_self (default_parameter (identifier_section) identifier_section (string_'default') string_'default' )default_parameter )parameters (block (if_statement (not_operator (identifier_section) identifier_section )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"invalid section") string_"invalid section" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_fut) identifier_fut (call (attribute (identifier_self) identifier_self (identifier_execute) identifier_execute )attribute (argument_list (string_b'INFO') string_b'INFO' (identifier_section) identifier_section (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_wait_convert) identifier_wait_convert (argument_list (identifier_fut) identifier_fut (identifier_parse_info) identifier_parse_info )argument_list )call )return_statement )block )function_definition )module
Get information and statistics about the server. If called without argument will return default set of sections. For available sections, see http://redis.io/commands/INFO :raises ValueError: if section is invalid
(module (function_definition (function_name_auto_slug) function_name_auto_slug (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_slug) identifier_slug (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_slug) identifier_slug (None) None )comparison_operator (block (expression_statement (assignment (identifier_slug) identifier_slug (call (identifier_slugify) identifier_slugify (argument_list (identifier_slug) identifier_slug (keyword_argument (identifier_separator) identifier_separator (attribute (identifier_self) identifier_self (identifier_SLUG_SEPARATOR) identifier_SLUG_SEPARATOR )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_session) identifier_session (call (attribute (attribute (identifier_sa) identifier_sa (identifier_orm) identifier_orm )attribute (identifier_object_session) identifier_object_session )attribute (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_session) identifier_session )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (call (attribute (identifier_session) identifier_session (identifier_query) identifier_query )attribute (argument_list (attribute (identifier_Entity) identifier_Entity (identifier_slug) identifier_slug )attribute )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (comparison_operator (attribute (identifier_Entity) identifier_Entity (identifier__entity_type) identifier__entity_type )attribute (attribute (identifier_self) identifier_self (identifier_object_type) identifier_object_type )attribute )comparison_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_query) identifier_query (identifier_filter) identifier_filter )attribute (argument_list (comparison_operator (attribute (identifier_Entity) identifier_Entity (identifier_id) identifier_id )attribute (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )comparison_operator )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_slug_re) identifier_slug_re (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (binary_operator (call (attribute (identifier_re) identifier_re (identifier_escape) identifier_escape )attribute (argument_list (identifier_slug) identifier_slug )argument_list )call (string_r"-?(-\d+)?") string_r"-?(-\d+)?" )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (list_comprehension (call (identifier_int) identifier_int (argument_list (boolean_operator (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call (integer_0) integer_0 )boolean_operator )argument_list )call (for_in_clause (identifier_m) identifier_m (generator_expression (call (attribute (identifier_slug_re) identifier_slug_re (identifier_match) identifier_match )attribute (argument_list (attribute (identifier_s) identifier_s (identifier_slug) identifier_slug )attribute )argument_list )call (for_in_clause (identifier_s) identifier_s (call (attribute (identifier_query) identifier_query (identifier_all) identifier_all )attribute (argument_list )argument_list )call )for_in_clause (if_clause (attribute (identifier_s) identifier_s (identifier_slug) identifier_slug )attribute )if_clause )generator_expression )for_in_clause (if_clause (identifier_m) identifier_m )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_max_id) identifier_max_id (binary_operator (call (identifier_max) identifier_max (argument_list (unary_operator (integer_1) integer_1 )unary_operator (unary_operator (integer_1) integer_1 )unary_operator (list_splat (identifier_results) identifier_results )list_splat )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement (if_statement (identifier_max_id) identifier_max_id (block (expression_statement (assignment (identifier_slug) identifier_slug (string_f"{slug}-{max_id}") string_f"{slug}-{max_id}" )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_slug) identifier_slug )return_statement )block )function_definition )module
This property is used to auto-generate a slug from the name attribute. It can be customized by subclasses.
(module (function_definition (function_name_socket_monitor_loop) function_name_socket_monitor_loop (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (while_statement (True) True (block (expression_statement (call (attribute (attribute (identifier_gevent) identifier_gevent (identifier_socket) identifier_socket )attribute (identifier_wait_read) identifier_wait_read )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_socket) identifier_socket )attribute (identifier_fileno) identifier_fileno )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__handle_log_rotations) identifier__handle_log_rotations )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_capture_packet) identifier_capture_packet )attribute (argument_list )argument_list )call )expression_statement )block )while_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clean_up) identifier_clean_up )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Monitor the socket and log captured data.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_sid) identifier_sid )parameters (block (return_statement (call (identifier_ApplicationContext) identifier_ApplicationContext (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (keyword_argument (identifier_account_sid) identifier_account_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'account_sid') string_'account_sid' )subscript )keyword_argument (keyword_argument (identifier_sid) identifier_sid (identifier_sid) identifier_sid )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Constructs a ApplicationContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.application.ApplicationContext :rtype: twilio.rest.api.v2010.account.application.ApplicationContext
(module (function_definition (function_name_encode_constructor_arguments) function_name_encode_constructor_arguments (parameters (identifier_self) identifier_self (identifier_args) identifier_args )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_constructor_data) identifier_constructor_data )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"The contract interface didn't have a constructor") string_"The contract interface didn't have a constructor" )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_encode_abi) identifier_encode_abi (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_constructor_data) identifier_constructor_data )attribute (string_'encode_types') string_'encode_types' )subscript (identifier_args) identifier_args )argument_list )call )return_statement )block )function_definition )module
Return the encoded constructor call.
(module (function_definition (function_name__get_geom_type) function_name__get_geom_type (parameters (identifier_type_bytes) identifier_type_bytes )parameters (block (expression_statement (assignment (identifier_high_byte) identifier_high_byte (subscript (identifier_type_bytes) identifier_type_bytes (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (attribute (identifier_six) identifier_six (identifier_PY3) identifier_PY3 )attribute (block (expression_statement (assignment (identifier_high_byte) identifier_high_byte (call (identifier_bytes) identifier_bytes (argument_list (list (identifier_high_byte) identifier_high_byte )list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_has_srid) identifier_has_srid (comparison_operator (identifier_high_byte) identifier_high_byte (string_b'\x20') string_b'\x20' )comparison_operator )assignment )expression_statement (if_statement (identifier_has_srid) identifier_has_srid (block (expression_statement (assignment (identifier_type_bytes) identifier_type_bytes (call (identifier_as_bin_str) identifier_as_bin_str (argument_list (binary_operator (string_b'\x00') string_b'\x00' (subscript (identifier_type_bytes) identifier_type_bytes (slice (integer_1) integer_1 (colon) colon )slice )subscript )binary_operator )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_type_bytes) identifier_type_bytes (call (identifier_as_bin_str) identifier_as_bin_str (argument_list (identifier_type_bytes) identifier_type_bytes )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_geom_type) identifier_geom_type (call (attribute (identifier__BINARY_TO_GEOM_TYPE) identifier__BINARY_TO_GEOM_TYPE (identifier_get) identifier_get )attribute (argument_list (identifier_type_bytes) identifier_type_bytes )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_geom_type) identifier_geom_type (identifier_type_bytes) identifier_type_bytes (identifier_has_srid) identifier_has_srid )expression_list )return_statement )block )function_definition )module
Get the GeoJSON geometry type label from a WKB type byte string. :param type_bytes: 4 byte string in big endian byte order containing a WKB type number. It may also contain a "has SRID" flag in the high byte (the first type, since this is big endian byte order), indicated as 0x20. If the SRID flag is not set, the high byte will always be null (0x00). :returns: 3-tuple ofGeoJSON geometry type label, the bytes resprenting the geometry type, and a separate "has SRID" flag. If the input `type_bytes` contains an SRID flag, it will be removed. >>> # Z Point, with SRID flag >>> _get_geom_type(b'\\x20\\x00\\x03\\xe9') == ( ... 'Point', b'\\x00\\x00\\x03\\xe9', True) True >>> # 2D MultiLineString, without SRID flag >>> _get_geom_type(b'\\x00\\x00\\x00\\x05') == ( ... 'MultiLineString', b'\\x00\\x00\\x00\\x05', False) True
(module (function_definition (function_name_to_sky) function_name_to_sky (parameters (identifier_self) identifier_self (identifier_wcs) identifier_wcs (default_parameter (identifier_origin) identifier_origin (identifier__DEFAULT_WCS_ORIGIN) identifier__DEFAULT_WCS_ORIGIN )default_parameter (default_parameter (identifier_mode) identifier_mode (identifier__DEFAULT_WCS_MODE) identifier__DEFAULT_WCS_MODE )default_parameter )parameters (block (return_statement (call (attribute (identifier_SkyCoord) identifier_SkyCoord (identifier_from_pixel) identifier_from_pixel )attribute (argument_list (keyword_argument (identifier_xp) identifier_xp (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute )keyword_argument (keyword_argument (identifier_yp) identifier_yp (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute )keyword_argument (keyword_argument (identifier_wcs) identifier_wcs (identifier_wcs) identifier_wcs )keyword_argument (keyword_argument (identifier_origin) identifier_origin (identifier_origin) identifier_origin )keyword_argument (keyword_argument (identifier_mode) identifier_mode (identifier_mode) identifier_mode )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Convert this `PixCoord` to `~astropy.coordinates.SkyCoord`. Calls :meth:`astropy.coordinates.SkyCoord.from_pixel`. See parameter description there.
(module (function_definition (function_name__normalize_numpy_indices) function_name__normalize_numpy_indices (parameters (identifier_i) identifier_i )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_i) identifier_i (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_i) identifier_i (identifier_dtype) identifier_dtype )attribute (identifier_bool) identifier_bool )comparison_operator (block (expression_statement (assignment (identifier_i) identifier_i (call (identifier_tuple) identifier_tuple (generator_expression (call (attribute (identifier_j) identifier_j (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call (for_in_clause (identifier_j) identifier_j (call (attribute (identifier_i) identifier_i (identifier_nonzero) identifier_nonzero )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )call )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_i) identifier_i (identifier_dtype) identifier_dtype )attribute (identifier_int) identifier_int )comparison_operator (block (expression_statement (assignment (identifier_i) identifier_i (call (attribute (identifier_i) identifier_i (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement )block )if_statement (return_statement (identifier_i) identifier_i )return_statement )block )function_definition )module
Normalize the index in case it is a numpy integer or boolean array.
(module (function_definition (function_name_choose) function_name_choose (parameters (identifier_n) identifier_n (identifier_k) identifier_k )parameters (block (import_statement (dotted_name (identifier_scipy) identifier_scipy (identifier_misc) identifier_misc )dotted_name )import_statement (return_statement (call (attribute (attribute (identifier_scipy) identifier_scipy (identifier_misc) identifier_misc )attribute (identifier_comb) identifier_comb )attribute (argument_list (identifier_n) identifier_n (identifier_k) identifier_k (keyword_argument (identifier_exact) identifier_exact (True) True )keyword_argument (keyword_argument (identifier_repetition) identifier_repetition (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
N choose k binomial combination (without replacement) scipy.special.binom
(module (function_definition (function_name_docx_table_from_xml_node) function_name_docx_table_from_xml_node (parameters (typed_parameter (identifier_table_node) identifier_table_node (type (attribute (identifier_ElementTree) identifier_ElementTree (identifier_Element) identifier_Element )attribute )type )typed_parameter (typed_parameter (identifier_level) identifier_level (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_config) identifier_config (type (identifier_TextProcessingConfig) identifier_TextProcessingConfig )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_table) identifier_table (call (identifier_CustomDocxTable) identifier_CustomDocxTable (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_row_node) identifier_row_node (identifier_table_node) identifier_table_node (block (if_statement (comparison_operator (attribute (identifier_row_node) identifier_row_node (identifier_tag) identifier_tag )attribute (identifier_DOCX_TABLE_ROW) identifier_DOCX_TABLE_ROW )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_table) identifier_table (identifier_new_row) identifier_new_row )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_cell_node) identifier_cell_node (identifier_row_node) identifier_row_node (block (if_statement (comparison_operator (attribute (identifier_cell_node) identifier_cell_node (identifier_tag) identifier_tag )attribute (identifier_DOCX_TABLE_CELL) identifier_DOCX_TABLE_CELL )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_table) identifier_table (identifier_new_cell) identifier_new_cell )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_para_node) identifier_para_node (identifier_cell_node) identifier_cell_node (block (expression_statement (assignment (identifier_text) identifier_text (call (identifier_docx_text_from_xml_node) identifier_docx_text_from_xml_node (argument_list (identifier_para_node) identifier_para_node (identifier_level) identifier_level (identifier_config) identifier_config )argument_list )call )assignment )expression_statement (if_statement (identifier_text) identifier_text (block (expression_statement (call (attribute (identifier_table) identifier_table (identifier_add_paragraph) identifier_add_paragraph )attribute (argument_list (identifier_text) identifier_text )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement )block )for_statement (return_statement (call (identifier_docx_process_table) identifier_docx_process_table (argument_list (identifier_table) identifier_table (identifier_config) identifier_config )argument_list )call )return_statement )block )function_definition )module
Converts an XML node representing a DOCX table into a textual representation. Args: table_node: XML node level: current level in XML hierarchy (used for recursion; start level is 0) config: :class:`TextProcessingConfig` control object Returns: string representation
(module (function_definition (function_name_resize) function_name_resize (parameters (identifier_self) identifier_self (identifier_size) identifier_size )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_post) identifier_post )attribute (argument_list (call (attribute (string_'{}/resize') string_'{}/resize' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_Volume) identifier_Volume (identifier_api_endpoint) identifier_api_endpoint )attribute (keyword_argument (identifier_model) identifier_model (identifier_self) identifier_self )keyword_argument (keyword_argument (identifier_data) identifier_data (dictionary (pair (string_"size") string_"size" (identifier_size) identifier_size )pair )dictionary )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__populate) identifier__populate )attribute (argument_list (attribute (identifier_result) identifier_result (identifier_json) identifier_json )attribute )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Resizes this Volume
(module (function_definition (function_name_get_client_settings_config_file) function_name_get_client_settings_config_file (parameters (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_config_files) identifier_config_files (list (string_'/etc/softlayer.conf') string_'/etc/softlayer.conf' (string_'~/.softlayer') string_'~/.softlayer' )list )assignment )expression_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'config_file') string_'config_file' )argument_list )call (block (expression_statement (call (attribute (identifier_config_files) identifier_config_files (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'config_file') string_'config_file' )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_config_files) identifier_config_files (list_comprehension (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_f) identifier_f )argument_list )call (for_in_clause (identifier_f) identifier_f (identifier_config_files) identifier_config_files )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (attribute (attribute (identifier_utils) identifier_utils (identifier_configparser) identifier_configparser )attribute (identifier_RawConfigParser) identifier_RawConfigParser )attribute (argument_list (dictionary (pair (string_'username') string_'username' (string_'') string_'' )pair (pair (string_'api_key') string_'api_key' (string_'') string_'' )pair (pair (string_'endpoint_url') string_'endpoint_url' (string_'') string_'' )pair (pair (string_'timeout') string_'timeout' (string_'0') string_'0' )pair (pair (string_'proxy') string_'proxy' (string_'') string_'' )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_read) identifier_read )attribute (argument_list (identifier_config_files) identifier_config_files )argument_list )call )expression_statement (if_statement (call (attribute (identifier_config) identifier_config (identifier_has_section) identifier_has_section )attribute (argument_list (string_'softlayer') string_'softlayer' )argument_list )call (block (return_statement (dictionary (pair (string_'endpoint_url') string_'endpoint_url' (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'softlayer') string_'softlayer' (string_'endpoint_url') string_'endpoint_url' )argument_list )call )pair (pair (string_'timeout') string_'timeout' (call (attribute (identifier_config) identifier_config (identifier_getfloat) identifier_getfloat )attribute (argument_list (string_'softlayer') string_'softlayer' (string_'timeout') string_'timeout' )argument_list )call )pair (pair (string_'proxy') string_'proxy' (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'softlayer') string_'softlayer' (string_'proxy') string_'proxy' )argument_list )call )pair (pair (string_'username') string_'username' (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'softlayer') string_'softlayer' (string_'username') string_'username' )argument_list )call )pair (pair (string_'api_key') string_'api_key' (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'softlayer') string_'softlayer' (string_'api_key') string_'api_key' )argument_list )call )pair )dictionary )return_statement )block )if_statement )block )function_definition )module
Retrieve client settings from the possible config file locations. :param \\*\\*kwargs: Arguments that are passed into the client instance
(module (function_definition (function_name_get) function_name_get (parameters (identifier_cls) identifier_cls (identifier_bucket) identifier_bucket (identifier_key) identifier_key (default_parameter (identifier_version_id) identifier_version_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_filters) identifier_filters (list (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_bucket_id) identifier_bucket_id )attribute (call (identifier_as_bucket_id) identifier_as_bucket_id (argument_list (identifier_bucket) identifier_bucket )argument_list )call )comparison_operator (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_key) identifier_key )attribute (identifier_key) identifier_key )comparison_operator )list )assignment )expression_statement (if_statement (identifier_version_id) identifier_version_id (block (expression_statement (call (attribute (identifier_filters) identifier_filters (identifier_append) identifier_append )attribute (argument_list (comparison_operator (attribute (identifier_cls) identifier_cls (identifier_version_id) identifier_version_id )attribute (identifier_version_id) identifier_version_id )comparison_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_filters) identifier_filters (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_cls) identifier_cls (identifier_is_head) identifier_is_head )attribute (identifier_is_) identifier_is_ )attribute (argument_list (True) True )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_filters) identifier_filters (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_cls) identifier_cls (identifier_file_id) identifier_file_id )attribute (identifier_isnot) identifier_isnot )attribute (argument_list (None) None )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (call (attribute (attribute (identifier_cls) identifier_cls (identifier_query) identifier_query )attribute (identifier_filter) identifier_filter )attribute (argument_list (list_splat (identifier_filters) identifier_filters )list_splat )argument_list )call (identifier_one_or_none) identifier_one_or_none )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Fetch a specific object. By default the latest object version is returned, if ``version_id`` is not set. :param bucket: The bucket (instance or id) to get the object from. :param key: Key of object. :param version_id: Specific version of an object.
(module (function_definition (function_name_tvdb_login) function_name_tvdb_login (parameters (identifier_api_key) identifier_api_key )parameters (block (expression_statement (assignment (identifier_url) identifier_url (string_"https://api.thetvdb.com/login") string_"https://api.thetvdb.com/login" )assignment )expression_statement (expression_statement (assignment (identifier_body) identifier_body (dictionary (pair (string_"apikey") string_"apikey" (identifier_api_key) identifier_api_key )pair )dictionary )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_status) identifier_status (identifier_content) identifier_content )pattern_list (call (identifier__request_json) identifier__request_json (argument_list (identifier_url) identifier_url (keyword_argument (identifier_body) identifier_body (identifier_body) identifier_body )keyword_argument (keyword_argument (identifier_cache) identifier_cache (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_status) identifier_status (integer_401) integer_401 )comparison_operator (block (raise_statement (call (identifier_MapiProviderException) identifier_MapiProviderException (argument_list (string_"invalid api key") string_"invalid api key" )argument_list )call )raise_statement )block (elif_clause (boolean_operator (comparison_operator (identifier_status) identifier_status (integer_200) integer_200 )comparison_operator (not_operator (call (attribute (identifier_content) identifier_content (identifier_get) identifier_get )attribute (argument_list (string_"token") string_"token" )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_MapiNetworkException) identifier_MapiNetworkException (argument_list (string_"TVDb down or unavailable?") string_"TVDb down or unavailable?" )argument_list )call )raise_statement )block )elif_clause )if_statement (return_statement (subscript (identifier_content) identifier_content (string_"token") string_"token" )subscript )return_statement )block )function_definition )module
Logs into TVDb using the provided api key Note: You can register for a free TVDb key at thetvdb.com/?tab=apiregister Online docs: api.thetvdb.com/swagger#!/Authentication/post_login=
(module (function_definition (function_name_ValidateChildren) function_name_ValidateChildren (parameters (identifier_self) identifier_self (identifier_problems) identifier_problems )parameters (block (assert_statement (attribute (identifier_self) identifier_self (identifier__schedule) identifier__schedule )attribute (string_"Trip must be in a schedule to ValidateChildren") string_"Trip must be in a schedule to ValidateChildren" )assert_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ValidateNoDuplicateStopSequences) identifier_ValidateNoDuplicateStopSequences )attribute (argument_list (identifier_problems) identifier_problems )argument_list )call )expression_statement (expression_statement (assignment (identifier_stoptimes) identifier_stoptimes (call (attribute (identifier_self) identifier_self (identifier_GetStopTimes) identifier_GetStopTimes )attribute (argument_list (identifier_problems) identifier_problems )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_stoptimes) identifier_stoptimes (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (attribute (identifier_x) identifier_x (identifier_stop_sequence) identifier_stop_sequence )attribute )lambda )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ValidateTripStartAndEndTimes) identifier_ValidateTripStartAndEndTimes )attribute (argument_list (identifier_problems) identifier_problems (identifier_stoptimes) identifier_stoptimes )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ValidateStopTimesSequenceHasIncreasingTimeAndDistance) identifier_ValidateStopTimesSequenceHasIncreasingTimeAndDistance )attribute (argument_list (identifier_problems) identifier_problems (identifier_stoptimes) identifier_stoptimes )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ValidateShapeDistTraveledSmallerThanMaxShapeDistance) identifier_ValidateShapeDistTraveledSmallerThanMaxShapeDistance )attribute (argument_list (identifier_problems) identifier_problems (identifier_stoptimes) identifier_stoptimes )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ValidateDistanceFromStopToShape) identifier_ValidateDistanceFromStopToShape )attribute (argument_list (identifier_problems) identifier_problems (identifier_stoptimes) identifier_stoptimes )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ValidateFrequencies) identifier_ValidateFrequencies )attribute (argument_list (identifier_problems) identifier_problems )argument_list )call )expression_statement )block )function_definition )module
Validate StopTimes and headways of this trip.
(module (function_definition (function_name_serve_forever) function_name_serve_forever (parameters (identifier_self) identifier_self (default_parameter (identifier_poll_interval) identifier_poll_interval (float_0.5) float_0.5 )default_parameter )parameters (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_serial_port) identifier_serial_port )attribute (identifier_timeout) identifier_timeout )attribute (identifier_poll_interval) identifier_poll_interval )assignment )expression_statement (while_statement (not_operator (attribute (identifier_self) identifier_self (identifier__shutdown_request) identifier__shutdown_request )attribute )not_operator (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_serve_once) identifier_serve_once )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (tuple (identifier_CRCError) identifier_CRCError (attribute (identifier_struct) identifier_struct (identifier_error) identifier_error )attribute )tuple (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_'Can\'t handle request: {0}') string_'Can\'t handle request: {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement )block )except_clause (except_clause (tuple (identifier_SerialTimeoutException) identifier_SerialTimeoutException (identifier_ValueError) identifier_ValueError )tuple (block (pass_statement )pass_statement )block )except_clause )try_statement )block )while_statement )block )function_definition )module
Wait for incomming requests.
(module (function_definition (function_name_trunc) function_name_trunc (parameters (identifier_text) identifier_text (identifier_length) identifier_length )parameters (block (if_statement (comparison_operator (identifier_length) identifier_length (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"length should be 1 or larger") string_"length should be 1 or larger" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_text) identifier_text (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text_length) identifier_text_length (call (identifier_wcswidth) identifier_wcswidth (argument_list (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_text_length) identifier_text_length (identifier_length) identifier_length )comparison_operator (block (return_statement (identifier_text) identifier_text )return_statement )block )if_statement (expression_statement (assignment (identifier_chars_to_truncate) identifier_chars_to_truncate (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_trunc_length) identifier_trunc_length (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_char) identifier_char (call (identifier_reversed) identifier_reversed (argument_list (identifier_text) identifier_text )argument_list )call (block (expression_statement (augmented_assignment (identifier_chars_to_truncate) identifier_chars_to_truncate (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_trunc_length) identifier_trunc_length (call (identifier_wcwidth) identifier_wcwidth (argument_list (identifier_char) identifier_char )argument_list )call )augmented_assignment )expression_statement (if_statement (comparison_operator (binary_operator (identifier_text_length) identifier_text_length (identifier_trunc_length) identifier_trunc_length )binary_operator (identifier_length) identifier_length )comparison_operator (block (break_statement )break_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_n) identifier_n (binary_operator (identifier_chars_to_truncate) identifier_chars_to_truncate (integer_1) integer_1 )binary_operator )assignment )expression_statement (return_statement (binary_operator (call (attribute (subscript (identifier_text) identifier_text (slice (colon) colon (unary_operator (identifier_n) identifier_n )unary_operator )slice )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (string_'…') string_'…' )binary_operator )return_statement )block )function_definition )module
Truncates text to given length, taking into account wide characters. If truncated, the last char is replaced by an elipsis.
(module (function_definition (function_name_replace_ext) function_name_replace_ext (parameters (identifier_filename) identifier_filename (identifier_ext) identifier_ext )parameters (block (if_statement (call (attribute (identifier_ext) identifier_ext (identifier_startswith) identifier_startswith )attribute (argument_list (string_'.') string_'.' )argument_list )call (block (expression_statement (assignment (identifier_ext) identifier_ext (subscript (identifier_ext) identifier_ext (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_stem) identifier_stem (identifier__) identifier__ )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (return_statement (parenthesized_expression (binary_operator (binary_operator (identifier_stem) identifier_stem (string_'.') string_'.' )binary_operator (identifier_ext) identifier_ext )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
Return new pathname formed by replacing extension in `filename` with `ext`.
(module (function_definition (function_name_get_accuracy) function_name_get_accuracy (parameters (identifier_targets) identifier_targets (identifier_outputs) identifier_outputs (default_parameter (identifier_k) identifier_k (integer_1) integer_1 )default_parameter (default_parameter (identifier_ignore_index) identifier_ignore_index (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_n_correct) identifier_n_correct (float_0.0) float_0.0 )assignment )expression_statement (for_statement (pattern_list (identifier_target) identifier_target (identifier_output) identifier_output )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_targets) identifier_targets (identifier_outputs) identifier_outputs )argument_list )call (block (if_statement (boolean_operator (not_operator (call (attribute (identifier_torch) identifier_torch (identifier_is_tensor) identifier_is_tensor )attribute (argument_list (identifier_target) identifier_target )argument_list )call )not_operator (call (identifier_is_scalar) identifier_is_scalar (argument_list (identifier_target) identifier_target )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_target) identifier_target (call (attribute (identifier_torch) identifier_torch (identifier_LongTensor) identifier_LongTensor )attribute (argument_list (list (identifier_target) identifier_target )list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (not_operator (call (attribute (identifier_torch) identifier_torch (identifier_is_tensor) identifier_is_tensor )attribute (argument_list (identifier_output) identifier_output )argument_list )call )not_operator (call (identifier_is_scalar) identifier_is_scalar (argument_list (identifier_output) identifier_output )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_output) identifier_output (call (attribute (identifier_torch) identifier_torch (identifier_LongTensor) identifier_LongTensor )attribute (argument_list (list (list (identifier_output) identifier_output )list )list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_predictions) identifier_predictions (subscript (call (attribute (identifier_output) identifier_output (identifier_topk) identifier_topk )attribute (argument_list (keyword_argument (identifier_k) identifier_k (call (identifier_min) identifier_min (argument_list (identifier_k) identifier_k (call (identifier_len) identifier_len (argument_list (identifier_output) identifier_output )argument_list )call )argument_list )call )keyword_argument (keyword_argument (identifier_dim) identifier_dim (integer_0) integer_0 )keyword_argument )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (for_statement (identifier_prediction) identifier_prediction (identifier_predictions) identifier_predictions (block (if_statement (call (identifier_torch_equals_ignore_index) identifier_torch_equals_ignore_index (argument_list (call (attribute (identifier_target) identifier_target (identifier_squeeze) identifier_squeeze )attribute (argument_list )argument_list )call (call (attribute (identifier_prediction) identifier_prediction (identifier_squeeze) identifier_squeeze )attribute (argument_list )argument_list )call (keyword_argument (identifier_ignore_index) identifier_ignore_index (identifier_ignore_index) identifier_ignore_index )keyword_argument )argument_list )call (block (expression_statement (augmented_assignment (identifier_n_correct) identifier_n_correct (integer_1) integer_1 )augmented_assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (expression_list (binary_operator (identifier_n_correct) identifier_n_correct (call (identifier_len) identifier_len (argument_list (identifier_targets) identifier_targets )argument_list )call )binary_operator (call (identifier_int) identifier_int (argument_list (identifier_n_correct) identifier_n_correct )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_targets) identifier_targets )argument_list )call )expression_list )return_statement )block )function_definition )module
Get the accuracy top-k accuracy between two tensors. Args: targets (1 - 2D :class:`torch.Tensor`): Target or true vector against which to measure saccuracy outputs (1 - 3D :class:`torch.Tensor`): Prediction or output vector ignore_index (int, optional): Specifies a target index that is ignored Returns: :class:`tuple` consisting of accuracy (:class:`float`), number correct (:class:`int`) and total (:class:`int`) Example: >>> import torch >>> from torchnlp.metrics import get_accuracy >>> targets = torch.LongTensor([1, 2, 3, 4, 5]) >>> outputs = torch.LongTensor([1, 2, 2, 3, 5]) >>> accuracy, n_correct, n_total = get_accuracy(targets, outputs, ignore_index=3) >>> accuracy 0.8 >>> n_correct 4 >>> n_total 5