sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_future) function_name_future (parameters (identifier_self) identifier_self (default_parameter (identifier_rev) identifier_rev (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_rev) identifier_rev (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_seek) identifier_seek )attribute (argument_list (identifier_rev) identifier_rev )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_WindowDictFutureView) identifier_WindowDictFutureView (argument_list (attribute (identifier_self) identifier_self (identifier__future) identifier__future )attribute )argument_list )call )return_statement )block )function_definition )module
Return a Mapping of items after the given revision. Default revision is the last one looked up.
(module (function_definition (function_name_persistent_write) function_name_persistent_write (parameters (identifier_self) identifier_self (identifier_address) identifier_address (identifier_byte) identifier_byte (default_parameter (identifier_refresh_config) identifier_refresh_config (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__persistent_write) identifier__persistent_write )attribute (argument_list (identifier_address) identifier_address (identifier_byte) identifier_byte )argument_list )call )expression_statement (if_statement (identifier_refresh_config) identifier_refresh_config (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_load_config) identifier_load_config )attribute (argument_list (False) False )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Write a single byte to an address in persistent memory. Parameters ---------- address : int Address in persistent memory (e.g., EEPROM). byte : int Value to write to address. refresh_config : bool, optional Is ``True``, :meth:`load_config()` is called afterward to refresh the configuration settings.
(module (function_definition (function_name_sum) function_name_sum (parameters (identifier_event_collection) identifier_event_collection (identifier_target_property) identifier_target_property (default_parameter (identifier_timeframe) identifier_timeframe (None) None )default_parameter (default_parameter (identifier_timezone) identifier_timezone (None) None )default_parameter (default_parameter (identifier_interval) identifier_interval (None) None )default_parameter (default_parameter (identifier_filters) identifier_filters (None) None )default_parameter (default_parameter (identifier_group_by) identifier_group_by (None) None )default_parameter (default_parameter (identifier_order_by) identifier_order_by (None) None )default_parameter (default_parameter (identifier_max_age) identifier_max_age (None) None )default_parameter (default_parameter (identifier_limit) identifier_limit (None) None )default_parameter )parameters (block (expression_statement (call (identifier__initialize_client_from_environment) identifier__initialize_client_from_environment (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier__client) identifier__client (identifier_sum) identifier_sum )attribute (argument_list (keyword_argument (identifier_event_collection) identifier_event_collection (identifier_event_collection) identifier_event_collection )keyword_argument (keyword_argument (identifier_timeframe) identifier_timeframe (identifier_timeframe) identifier_timeframe )keyword_argument (keyword_argument (identifier_timezone) identifier_timezone (identifier_timezone) identifier_timezone )keyword_argument (keyword_argument (identifier_interval) identifier_interval (identifier_interval) identifier_interval )keyword_argument (keyword_argument (identifier_filters) identifier_filters (identifier_filters) identifier_filters )keyword_argument (keyword_argument (identifier_group_by) identifier_group_by (identifier_group_by) identifier_group_by )keyword_argument (keyword_argument (identifier_order_by) identifier_order_by (identifier_order_by) identifier_order_by )keyword_argument (keyword_argument (identifier_target_property) identifier_target_property (identifier_target_property) identifier_target_property )keyword_argument (keyword_argument (identifier_max_age) identifier_max_age (identifier_max_age) identifier_max_age )keyword_argument (keyword_argument (identifier_limit) identifier_limit (identifier_limit) identifier_limit )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Performs a sum query Adds the values of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param order_by: dictionary or list of dictionary objects containing the property_name(s) to order by and the desired direction(s) of sorting. Example: {"property_name":"result", "direction":keen.direction.DESCENDING} May not be used without a group_by specified. :param limit: positive integer limiting the displayed results of a query using order_by :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds
(module (function_definition (function_name_update_config) function_name_update_config (parameters (identifier_self) identifier_self (default_parameter (identifier_filename) identifier_filename (string_"MAGTUNE_PYMAGICC.CFG") string_"MAGTUNE_PYMAGICC.CFG" )default_parameter (default_parameter (identifier_top_level_key) identifier_top_level_key (string_"nml_allcfgs") string_"nml_allcfgs" )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (identifier_self) identifier_self (identifier__format_config) identifier__format_config )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fname) identifier_fname (call (identifier_join) identifier_join (argument_list (attribute (identifier_self) identifier_self (identifier_run_dir) identifier_run_dir )attribute (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (if_statement (call (identifier_exists) identifier_exists (argument_list (identifier_fname) identifier_fname )argument_list )call (block (expression_statement (assignment (identifier_conf) identifier_conf (call (attribute (identifier_f90nml) identifier_f90nml (identifier_read) identifier_read )attribute (argument_list (identifier_fname) identifier_fname )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_conf) identifier_conf (dictionary (pair (identifier_top_level_key) identifier_top_level_key (dictionary )dictionary )pair )dictionary )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (subscript (identifier_conf) identifier_conf (identifier_top_level_key) identifier_top_level_key )subscript (identifier_update) identifier_update )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_f90nml) identifier_f90nml (identifier_write) identifier_write )attribute (argument_list (identifier_conf) identifier_conf (identifier_fname) identifier_fname (keyword_argument (identifier_force) identifier_force (True) True )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_conf) identifier_conf )return_statement )block )function_definition )module
Updates a configuration file for MAGICC Updates the contents of a fortran namelist in the run directory, creating a new namelist if none exists. Parameters ---------- filename : str Name of configuration file to write top_level_key : str Name of namelist to be written in the configuration file kwargs Other parameters to pass to the configuration file. No validation on the parameters is performed. Returns ------- dict The contents of the namelist which was written to file
(module (function_definition (function_name_completedefault) function_name_completedefault (parameters (identifier_self) identifier_self (identifier_text) identifier_text (identifier_line) identifier_line (identifier_begidx) identifier_begidx (identifier_endidx) identifier_endidx )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_argparser_completer) identifier_argparser_completer )attribute (call (identifier_any) identifier_any (argument_list (generator_expression (call (attribute (identifier_line) identifier_line (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (call (attribute (identifier_self) identifier_self (identifier_argparse_names) identifier_argparse_names )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )argument_list )call )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_argparser_completer) identifier_argparser_completer )attribute (identifier_rl_complete) identifier_rl_complete )attribute (argument_list (identifier_line) identifier_line (integer_0) integer_0 )argument_list )call )expression_statement (return_statement (list_comprehension (subscript (identifier_x) identifier_x (slice (identifier_begidx) identifier_begidx (colon) colon )slice )subscript (for_in_clause (identifier_x) identifier_x (attribute (attribute (identifier_self) identifier_self (identifier_argparser_completer) identifier_argparser_completer )attribute (identifier__rl_matches) identifier__rl_matches )attribute )for_in_clause )list_comprehension )return_statement )block (else_clause (block (return_statement (list )list )return_statement )block )else_clause )if_statement )block )function_definition )module
Accessing the argcompleter if available.
(module (function_definition (function_name__get_raw_objects) function_name__get_raw_objects (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_raw_objects') string_'_raw_objects' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call (identifier_api_endpoint) identifier_api_endpoint )attribute (keyword_argument (identifier_model) identifier_model (identifier_self) identifier_self )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__raw_objects) identifier__raw_objects )attribute (identifier_result) identifier_result )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__raw_objects) identifier__raw_objects )attribute )return_statement )block )function_definition )module
Helper function to populate the first page of raw objects for this tag. This has the side effect of creating the ``_raw_objects`` attribute of this object.
(module (function_definition (function_name_info) function_name_info (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_stat) identifier_stat (call (attribute (attribute (identifier_self) identifier_self (identifier__items) identifier__items )attribute (identifier_stat) identifier_stat )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'indx') string_'indx' (call (attribute (attribute (identifier_self) identifier_self (identifier__items) identifier__items )attribute (identifier_index) identifier_index )attribute (argument_list )argument_list )call )pair (pair (string_'metrics') string_'metrics' (call (attribute (attribute (identifier_self) identifier_self (identifier__metrics) identifier__metrics )attribute (identifier_index) identifier_index )attribute (argument_list )argument_list )call )pair (pair (string_'stat') string_'stat' (identifier_stat) identifier_stat )pair )dictionary )return_statement )block )function_definition )module
Returns information about the CryoTank instance. Returns: dict: A dict containing items and metrics indexes.
(module (function_definition (function_name__format_value_element) function_name__format_value_element (parameters (identifier_lines) identifier_lines (identifier_element) identifier_element (default_parameter (identifier_spacer) identifier_spacer (string_"") string_"" )default_parameter )parameters (block (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_append) identifier_append )attribute (argument_list (binary_operator (identifier_spacer) identifier_spacer (call (attribute (identifier_element) identifier_element (identifier_definition) identifier_definition )attribute (argument_list )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier__format_summary) identifier__format_summary (argument_list (identifier_lines) identifier_lines (identifier_element) identifier_element )argument_list )call )expression_statement (expression_statement (call (identifier__format_generic) identifier__format_generic (argument_list (identifier_lines) identifier_lines (identifier_element) identifier_element (list (string_"summary") string_"summary" )list )argument_list )call )expression_statement )block )function_definition )module
Formats a member or parameter for full documentation output.
(module (function_definition (function_name_cluster_replicate) function_name_cluster_replicate (parameters (identifier_self) identifier_self (identifier_node_id) identifier_node_id )parameters (block (expression_statement (assignment (identifier_fut) identifier_fut (call (attribute (identifier_self) identifier_self (identifier_execute) identifier_execute )attribute (argument_list (string_b'CLUSTER') string_b'CLUSTER' (string_b'REPLICATE') string_b'REPLICATE' (identifier_node_id) identifier_node_id )argument_list )call )assignment )expression_statement (return_statement (call (identifier_wait_ok) identifier_wait_ok (argument_list (identifier_fut) identifier_fut )argument_list )call )return_statement )block )function_definition )module
Reconfigure a node as a slave of the specified master node.
(module (function_definition (function_name_should_stream) function_name_should_stream (parameters (identifier_proxy_response) identifier_proxy_response )parameters (block (expression_statement (assignment (identifier_content_type) identifier_content_type (call (attribute (attribute (identifier_proxy_response) identifier_proxy_response (identifier_headers) identifier_headers )attribute (identifier_get) identifier_get )attribute (argument_list (string_'Content-Type') string_'Content-Type' )argument_list )call )assignment )expression_statement (if_statement (call (identifier_is_html_content_type) identifier_is_html_content_type (argument_list (identifier_content_type) identifier_content_type )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_content_length) identifier_content_length (call (identifier_int) identifier_int (argument_list (call (attribute (attribute (identifier_proxy_response) identifier_proxy_response (identifier_headers) identifier_headers )attribute (identifier_get) identifier_get )attribute (argument_list (string_'Content-Length') string_'Content-Length' (integer_0) integer_0 )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (identifier_content_length) identifier_content_length (integer_0) integer_0 )assignment )expression_statement )block )except_clause )try_statement (if_statement (boolean_operator (not_operator (identifier_content_length) identifier_content_length )not_operator (comparison_operator (identifier_content_length) identifier_content_length (identifier_MIN_STREAMING_LENGTH) identifier_MIN_STREAMING_LENGTH )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Function to verify if the proxy_response must be converted into a stream.This will be done by checking the proxy_response content-length and verify if its length is bigger than one stipulated by MIN_STREAMING_LENGTH. :param proxy_response: An Instance of urllib3.response.HTTPResponse :returns: A boolean stating if the proxy_response should be treated as a stream
(module (function_definition (function_name_instance_signals_and_handlers) function_name_instance_signals_and_handlers (parameters (identifier_cls) identifier_cls (identifier_instance) identifier_instance )parameters (block (expression_statement (assignment (identifier_isignals) identifier_isignals (call (attribute (attribute (identifier_cls) identifier_cls (identifier__signals) identifier__signals )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ihandlers) identifier_ihandlers (call (attribute (identifier_cls) identifier_cls (identifier__build_instance_handler_mapping) identifier__build_instance_handler_mapping )attribute (argument_list (identifier_instance) identifier_instance (attribute (identifier_cls) identifier_cls (identifier__signal_handlers) identifier__signal_handlers )attribute )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_isignals) identifier_isignals (identifier_ihandlers) identifier_ihandlers )expression_list )return_statement )block )function_definition )module
Calculate per-instance signals and handlers.
(module (function_definition (function_name_count_rows_distinct) function_name_count_rows_distinct (parameters (identifier_self) identifier_self (identifier_table) identifier_table (default_parameter (identifier_cols) identifier_cols (string_'*') string_'*' )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_fetch) identifier_fetch )attribute (argument_list (call (attribute (string_'SELECT COUNT(DISTINCT {0}) FROM {1}') string_'SELECT COUNT(DISTINCT {0}) FROM {1}' (identifier_format) identifier_format )attribute (argument_list (call (identifier_join_cols) identifier_join_cols (argument_list (identifier_cols) identifier_cols )argument_list )call (call (identifier_wrap) identifier_wrap (argument_list (identifier_table) identifier_table )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get the number distinct of rows in a particular table.
(module (function_definition (function_name_deps_used) function_name_deps_used (parameters (identifier_self) identifier_self (identifier_pkg) identifier_pkg (identifier_used) identifier_used )parameters (block (if_statement (call (identifier_find_package) identifier_find_package (argument_list (binary_operator (identifier_pkg) identifier_pkg (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_sp) identifier_sp )attribute )binary_operator (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_pkg_path) identifier_pkg_path )attribute )argument_list )call (block (if_statement (comparison_operator (identifier_pkg) identifier_pkg (call (attribute (attribute (identifier_self) identifier_self (identifier_deps_dict) identifier_deps_dict )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_deps_dict) identifier_deps_dict )attribute (identifier_pkg) identifier_pkg )subscript (identifier_used) identifier_used )assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (subscript (attribute (identifier_self) identifier_self (identifier_deps_dict) identifier_deps_dict )attribute (identifier_pkg) identifier_pkg )subscript (identifier_used) identifier_used )augmented_assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )function_definition )module
Create dependencies dictionary
(module (function_definition (function_name_read_gcvs) function_name_read_gcvs (parameters (identifier_filename) identifier_filename )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_fp) identifier_fp )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_parser) identifier_parser (call (identifier_GcvsParser) identifier_GcvsParser (argument_list (identifier_fp) identifier_fp )argument_list )call )assignment )expression_statement (for_statement (identifier_star) identifier_star (identifier_parser) identifier_parser (block (expression_statement (yield (identifier_star) identifier_star )yield )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Reads variable star data in `GCVS format`_. :param filename: path to GCVS data file (usually ``iii.dat``) .. _`GCVS format`: http://www.sai.msu.su/gcvs/gcvs/iii/html/
(module (function_definition (function_name_bech32_decode) function_name_bech32_decode (parameters (identifier_bech) identifier_bech )parameters (block (if_statement (parenthesized_expression (boolean_operator (parenthesized_expression (call (identifier_any) identifier_any (generator_expression (boolean_operator (comparison_operator (call (identifier_ord) identifier_ord (argument_list (identifier_x) identifier_x )argument_list )call (integer_33) integer_33 )comparison_operator (comparison_operator (call (identifier_ord) identifier_ord (argument_list (identifier_x) identifier_x )argument_list )call (integer_126) integer_126 )comparison_operator )boolean_operator (for_in_clause (identifier_x) identifier_x (identifier_bech) identifier_bech )for_in_clause )generator_expression )call )parenthesized_expression (parenthesized_expression (boolean_operator (comparison_operator (call (attribute (identifier_bech) identifier_bech (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_bech) identifier_bech )comparison_operator (comparison_operator (call (attribute (identifier_bech) identifier_bech (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call (identifier_bech) identifier_bech )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator )parenthesized_expression (block (return_statement (expression_list (None) None (None) None )expression_list )return_statement )block )if_statement (expression_statement (assignment (identifier_bech) identifier_bech (call (attribute (identifier_bech) identifier_bech (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_bech) identifier_bech (identifier_rfind) identifier_rfind )attribute (argument_list (string_'1') string_'1' )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (comparison_operator (identifier_pos) identifier_pos (integer_1) integer_1 )comparison_operator (comparison_operator (binary_operator (identifier_pos) identifier_pos (integer_7) integer_7 )binary_operator (call (identifier_len) identifier_len (argument_list (identifier_bech) identifier_bech )argument_list )call )comparison_operator )boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_bech) identifier_bech )argument_list )call (integer_90) integer_90 )comparison_operator )boolean_operator (block (return_statement (expression_list (None) None (None) None )expression_list )return_statement )block )if_statement (if_statement (not_operator (call (identifier_all) identifier_all (generator_expression (comparison_operator (identifier_x) identifier_x (identifier_CHARSET) identifier_CHARSET )comparison_operator (for_in_clause (identifier_x) identifier_x (subscript (identifier_bech) identifier_bech (slice (binary_operator (identifier_pos) identifier_pos (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript )for_in_clause )generator_expression )call )not_operator (block (return_statement (expression_list (None) None (None) None )expression_list )return_statement )block )if_statement (expression_statement (assignment (identifier_hrp) identifier_hrp (subscript (identifier_bech) identifier_bech (slice (colon) colon (identifier_pos) identifier_pos )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (list_comprehension (call (attribute (identifier_CHARSET) identifier_CHARSET (identifier_find) identifier_find )attribute (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (subscript (identifier_bech) identifier_bech (slice (binary_operator (identifier_pos) identifier_pos (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (not_operator (call (identifier_bech32_verify_checksum) identifier_bech32_verify_checksum (argument_list (identifier_hrp) identifier_hrp (identifier_data) identifier_data )argument_list )call )not_operator (block (return_statement (expression_list (None) None (None) None )expression_list )return_statement )block )if_statement (return_statement (expression_list (identifier_hrp) identifier_hrp (subscript (identifier_data) identifier_data (slice (colon) colon (unary_operator (integer_6) integer_6 )unary_operator )slice )subscript )expression_list )return_statement )block )function_definition )module
Validate a Bech32 string, and determine HRP and data.
(module (function_definition (function_name_get_reservations) function_name_get_reservations (parameters (identifier_self) identifier_self (identifier_email) identifier_email (identifier_date) identifier_date (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (argument_list (string_"GET") string_"GET" (call (attribute (string_"/1.1/space/bookings?email={}&date={}&limit=100") string_"/1.1/space/bookings?email={}&date={}&limit=100" (identifier_format) identifier_format )attribute (argument_list (identifier_email) identifier_email (identifier_date) identifier_date )argument_list )call (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (attribute (identifier_resp) identifier_resp (identifier_exceptions) identifier_exceptions )attribute (identifier_HTTPError) identifier_HTTPError )attribute (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (raise_statement (call (identifier_APIError) identifier_APIError (argument_list (call (attribute (string_"Server Error: {}") string_"Server Error: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_error) identifier_error )argument_list )call )argument_list )call )raise_statement )block )except_clause (except_clause (attribute (attribute (identifier_requests) identifier_requests (identifier_exceptions) identifier_exceptions )attribute (identifier_ConnectTimeout) identifier_ConnectTimeout )attribute (block (raise_statement (call (identifier_APIError) identifier_APIError (argument_list (string_"Timeout Error") string_"Timeout Error" )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_resp) identifier_resp (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Gets reservations for a given email. :param email: the email of the user who's reservations are to be fetched :type email: str
(module (function_definition (function_name_score) function_name_score (parameters (identifier_text) identifier_text (list_splat_pattern (identifier_score_functions) identifier_score_functions )list_splat_pattern )parameters (block (if_statement (not_operator (identifier_score_functions) identifier_score_functions )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"score_functions must not be empty") string_"score_functions must not be empty" )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_statistics) identifier_statistics (identifier_mean) identifier_mean )attribute (generator_expression (call (identifier_func) identifier_func (argument_list (identifier_text) identifier_text )argument_list )call (for_in_clause (identifier_func) identifier_func (identifier_score_functions) identifier_score_functions )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Score ``text`` using ``score_functions``. Examples: >>> score("abc", function_a) >>> score("abc", function_a, function_b) Args: text (str): The text to score *score_functions (variable length argument list): functions to score with Returns: Arithmetic mean of scores Raises: ValueError: If score_functions is empty
(module (function_definition (function_name_exon_overlap) function_name_exon_overlap (parameters (identifier_self) identifier_self (identifier_tx) identifier_tx (default_parameter (identifier_multi_minover) identifier_multi_minover (integer_10) integer_10 )default_parameter (default_parameter (identifier_multi_endfrac) identifier_multi_endfrac (integer_0) integer_0 )default_parameter (default_parameter (identifier_multi_midfrac) identifier_multi_midfrac (float_0.8) float_0.8 )default_parameter (default_parameter (identifier_single_minover) identifier_single_minover (integer_50) integer_50 )default_parameter (default_parameter (identifier_single_frac) identifier_single_frac (float_0.5) float_0.5 )default_parameter (default_parameter (identifier_multi_consec) identifier_multi_consec (True) True )default_parameter )parameters (block (return_statement (call (identifier_ExonOverlap) identifier_ExonOverlap (argument_list (identifier_self) identifier_self (identifier_tx) identifier_tx (identifier_multi_minover) identifier_multi_minover (identifier_multi_endfrac) identifier_multi_endfrac (identifier_multi_midfrac) identifier_multi_midfrac (identifier_single_minover) identifier_single_minover (identifier_single_frac) identifier_single_frac (keyword_argument (identifier_multi_consec) identifier_multi_consec (identifier_multi_consec) identifier_multi_consec )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get a report on how mucht the exons overlap :param tx: :param multi_minover: multi-exons need to overlap by at lest this much to be considered overlapped (default 10) :param multi_endfrac: multi-exons need an end fraction coverage of at least this by default (default 0) :param multi_midfrac: multi-exons need (default 0.8) mutual coverage for internal exons :parma single_minover: single-exons need at least this much shared overlap (default 50) :param single_frac: at least this fraction of single exons must overlap (default 0.5) :parma multi_consec: exons need to have multiexon consecutive mapping to consider it a match (default True) :type tx: :type multi_minover: int :type multi_endfrac: float :type multi_midfrac: float :type single_minover: int :type single_frac: float :type multi_consec: bool :return: ExonOverlap report :rtype: Transcript.ExonOverlap
(module (function_definition (function_name__create_non_null_wrapper) function_name__create_non_null_wrapper (parameters (identifier_name) identifier_name (identifier_t) identifier_t )parameters (block (expression_statement (string_'creates type wrapper for non-null of given type') string_'creates type wrapper for non-null of given type' )expression_statement (function_definition (function_name___new__) function_name___new__ (parameters (identifier_cls) identifier_cls (identifier_json_data) identifier_json_data (default_parameter (identifier_selection_list) identifier_selection_list (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_json_data) identifier_json_data (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (identifier_name) identifier_name (string_' received null value') string_' received null value' )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_t) identifier_t (argument_list (identifier_json_data) identifier_json_data (identifier_selection_list) identifier_selection_list )argument_list )call )return_statement )block )function_definition (function_definition (function_name___to_graphql_input__) function_name___to_graphql_input__ (parameters (identifier_value) identifier_value (default_parameter (identifier_indent) identifier_indent (integer_0) integer_0 )default_parameter (default_parameter (identifier_indent_string) identifier_indent_string (string_' ') string_' ' )default_parameter )parameters (block (return_statement (call (attribute (identifier_t) identifier_t (identifier___to_graphql_input__) identifier___to_graphql_input__ )attribute (argument_list (identifier_value) identifier_value (identifier_indent) identifier_indent (identifier_indent_string) identifier_indent_string )argument_list )call )return_statement )block )function_definition (return_statement (call (identifier_type) identifier_type (argument_list (identifier_name) identifier_name (tuple (identifier_t) identifier_t )tuple (dictionary (pair (string_'__new__') string_'__new__' (identifier___new__) identifier___new__ )pair (pair (binary_operator (string_'_%s__auto_register') string_'_%s__auto_register' (identifier_name) identifier_name )binary_operator (False) False )pair (pair (string_'__to_graphql_input__') string_'__to_graphql_input__' (identifier___to_graphql_input__) identifier___to_graphql_input__ )pair )dictionary )argument_list )call )return_statement )block )function_definition )module
creates type wrapper for non-null of given type
(module (function_definition (function_name_scores) function_name_scores (parameters (identifier_self) identifier_self (typed_parameter (identifier_text) identifier_text (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (identifier_float) identifier_float )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_values) identifier_values (call (identifier_extract) identifier_extract (argument_list (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_input_fn) identifier_input_fn (call (identifier__to_func) identifier__to_func (argument_list (tuple (list (identifier_values) identifier_values )list (list )list )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_prediction) identifier_prediction (call (attribute (attribute (identifier_self) identifier_self (identifier__classifier) identifier__classifier )attribute (identifier_predict_proba) identifier_predict_proba )attribute (argument_list (keyword_argument (identifier_input_fn) identifier_input_fn (identifier_input_fn) identifier_input_fn )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_probabilities) identifier_probabilities (call (attribute (call (identifier_next) identifier_next (argument_list (identifier_prediction) identifier_prediction )argument_list )call (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sorted_languages) identifier_sorted_languages (call (identifier_sorted) identifier_sorted (argument_list (attribute (identifier_self) identifier_self (identifier_languages) identifier_languages )attribute )argument_list )call )assignment )expression_statement (return_statement (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (identifier_sorted_languages) identifier_sorted_languages (identifier_probabilities) identifier_probabilities )argument_list )call )argument_list )call )return_statement )block )function_definition )module
A score for each language corresponding to the probability that the text is written in the given language. The score is a `float` value between 0.0 and 1.0 :param text: source code. :return: language to score dictionary
(module (function_definition (function_name_on_connected) function_name_on_connected (parameters (identifier_self) identifier_self (identifier_connection) identifier_connection )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'PikaClient: connected to RabbitMQ') string_'PikaClient: connected to RabbitMQ' )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_connected) identifier_connected )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_in_channel) identifier_in_channel )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_channel) identifier_channel )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_on_channel_open) identifier_on_channel_open )attribute )argument_list )call )assignment )expression_statement )block )function_definition )module
AMQP connection callback. Creates input channel. Args: connection: AMQP connection
(module (function_definition (function_name_reseed_apply) function_name_reseed_apply (parameters (identifier_self) identifier_self )parameters (type (identifier_DIDInfo) identifier_DIDInfo )type (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Wallet.reseed_apply >>>') string_'Wallet.reseed_apply >>>' )argument_list )call )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute )not_operator (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Wallet.reseed_init <!< Wallet %s is closed') string_'Wallet.reseed_init <!< Wallet %s is closed' (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (raise_statement (call (identifier_WalletState) identifier_WalletState (argument_list (call (attribute (string_'Wallet {} is closed') string_'Wallet {} is closed' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (await (call (attribute (identifier_did) identifier_did (identifier_replace_keys_apply) identifier_replace_keys_apply )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (attribute (identifier_self) identifier_self (identifier_did) identifier_did )attribute )argument_list )call )await )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_verkey) identifier_verkey )attribute (await (call (attribute (identifier_did) identifier_did (identifier_key_for_local_did) identifier_key_for_local_did )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (attribute (identifier_self) identifier_self (identifier_did) identifier_did )attribute )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_now) identifier_now (call (identifier_int) identifier_int (argument_list (call (identifier_time) identifier_time (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rv) identifier_rv (call (identifier_DIDInfo) identifier_DIDInfo (argument_list (attribute (identifier_self) identifier_self (identifier_did) identifier_did )attribute (attribute (identifier_self) identifier_self (identifier_verkey) identifier_verkey )attribute (dictionary (pair (string_'anchor') string_'anchor' (True) True )pair (pair (string_'since') string_'since' (identifier_now) identifier_now )pair (pair (string_'modified') string_'modified' (identifier_now) identifier_now )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (await (call (attribute (identifier_did) identifier_did (identifier_set_did_metadata) identifier_set_did_metadata )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (attribute (identifier_self) identifier_self (identifier_did) identifier_did )attribute (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (attribute (identifier_rv) identifier_rv (identifier_metadata) identifier_metadata )attribute )argument_list )call )argument_list )call )await )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_info) identifier_info )attribute (argument_list (string_'Wallet %s set seed hash metadata for DID %s') string_'Wallet %s set seed hash metadata for DID %s' (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier_did) identifier_did )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Wallet.reseed_apply <<< %s') string_'Wallet.reseed_apply <<< %s' (identifier_rv) identifier_rv )argument_list )call )expression_statement (return_statement (identifier_rv) identifier_rv )return_statement )block )function_definition )module
Replace verification key with new verification key from reseed operation. Raise WalletState if wallet is closed. :return: DIDInfo with new verification key and metadata for DID
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_item) identifier_item (call (attribute (attribute (identifier_self) identifier_self (identifier_item_finder) identifier_item_finder )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_item) identifier_item (unary_operator (integer_1) integer_1 )unary_operator )subscript (None) None )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_removed_count) identifier_removed_count )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )function_definition )module
remove the value found at key from the queue
(module (function_definition (function_name_GetPossibleGroup) function_name_GetPossibleGroup (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_this_method) identifier_this_method (call (attribute (attribute (identifier_self) identifier_self (identifier__call_queue) identifier__call_queue )attribute (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (identifier_this_method) identifier_this_method (identifier_self) identifier_self )comparison_operator )assert_statement (expression_statement (assignment (identifier_group) identifier_group (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_group) identifier_group (subscript (attribute (identifier_self) identifier_self (identifier__call_queue) identifier__call_queue )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (identifier_group) identifier_group )return_statement )block )function_definition )module
Returns a possible group from the end of the call queue or None if no other methods are on the stack.
(module (function_definition (function_name__slopes_directions) function_name__slopes_directions (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_dX) identifier_dX (identifier_dY) identifier_dY (default_parameter (identifier_method) identifier_method (string_'tarboton') string_'tarboton' )default_parameter )parameters (block (if_statement (comparison_operator (identifier_method) identifier_method (string_'tarboton') string_'tarboton' )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__tarboton_slopes_directions) identifier__tarboton_slopes_directions )attribute (argument_list (identifier_data) identifier_data (identifier_dX) identifier_dX (identifier_dY) identifier_dY )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_method) identifier_method (string_'central') string_'central' )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__central_slopes_directions) identifier__central_slopes_directions )attribute (argument_list (identifier_data) identifier_data (identifier_dX) identifier_dX (identifier_dY) identifier_dY )argument_list )call )return_statement )block )elif_clause )if_statement )block )function_definition )module
Wrapper to pick between various algorithms
(module (function_definition (function_name_peek) function_name_peek (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__fetch) identifier__fetch )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_pkt) identifier_pkt (subscript (attribute (identifier_self) identifier_self (identifier_pkt_queue) identifier_pkt_queue )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (identifier_pkt) identifier_pkt )return_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (raise_statement (call (identifier_StopIteration) identifier_StopIteration (argument_list )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Get the current packet without consuming it.
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self (identifier_file_des) identifier_file_des )parameters (block (expression_statement (assignment (identifier_file_handle) identifier_file_handle (call (attribute (attribute (identifier_self) identifier_self (identifier_filesystem) identifier_filesystem )attribute (identifier_get_open_file) identifier_get_open_file )attribute (argument_list (identifier_file_des) identifier_file_des )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_file_handle) identifier_file_handle (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Close a file descriptor. Args: file_des: An integer file descriptor for the file object requested. Raises: OSError: bad file descriptor. TypeError: if file descriptor is not an integer.
(module (function_definition (function_name_rename_acquisition) function_name_rename_acquisition (parameters (identifier_self) identifier_self (identifier_plate_name) identifier_plate_name (identifier_name) identifier_name (identifier_new_name) identifier_new_name )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'rename acquisistion "%s" of experiment "%s", plate "%s"') string_'rename acquisistion "%s" of experiment "%s", plate "%s"' (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_experiment_name) identifier_experiment_name )attribute (identifier_plate_name) identifier_plate_name )argument_list )call )expression_statement (expression_statement (assignment (identifier_content) identifier_content (dictionary (pair (string_'name') string_'name' (identifier_new_name) identifier_new_name )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_acquisition_id) identifier_acquisition_id (call (attribute (identifier_self) identifier_self (identifier__get_acquisition_id) identifier__get_acquisition_id )attribute (argument_list (identifier_plate_name) identifier_plate_name (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__build_api_url) identifier__build_api_url )attribute (argument_list (call (attribute (string_'/experiments/{experiment_id}/acquisitions/{acquisition_id}') string_'/experiments/{experiment_id}/acquisitions/{acquisition_id}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_experiment_id) identifier_experiment_id (attribute (identifier_self) identifier_self (identifier__experiment_id) identifier__experiment_id )attribute )keyword_argument (keyword_argument (identifier_acquisition_id) identifier_acquisition_id (identifier_acquisition_id) identifier_acquisition_id )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_put) identifier_put )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_json) identifier_json (identifier_content) identifier_content )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_res) identifier_res (identifier_raise_for_status) identifier_raise_for_status )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Renames an acquisition. Parameters ---------- plate_name: str name of the parent plate name: str name of the acquisition that should be renamed new_name: str name that should be given to the acquisition See also -------- :func:`tmserver.api.acquisition.update_acquisition` :class:`tmlib.models.acquisition.Acquisition`
(module (function_definition (function_name_to_api_repr) function_name_to_api_repr (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_resource) identifier_resource (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__properties) identifier__properties )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query_parameters) identifier_query_parameters (call (attribute (subscript (identifier_resource) identifier_resource (string_"query") string_"query" )subscript (identifier_get) identifier_get )attribute (argument_list (string_"queryParameters") string_"queryParameters" )argument_list )call )assignment )expression_statement (if_statement (identifier_query_parameters) identifier_query_parameters (block (if_statement (comparison_operator (call (attribute (subscript (identifier_query_parameters) identifier_query_parameters (integer_0) integer_0 )subscript (identifier_get) identifier_get )attribute (argument_list (string_"name") string_"name" )argument_list )call (None) None )comparison_operator (block (expression_statement (assignment (subscript (subscript (identifier_resource) identifier_resource (string_"query") string_"query" )subscript (string_"parameterMode") string_"parameterMode" )subscript (string_"POSITIONAL") string_"POSITIONAL" )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (subscript (identifier_resource) identifier_resource (string_"query") string_"query" )subscript (string_"parameterMode") string_"parameterMode" )subscript (string_"NAMED") string_"NAMED" )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (return_statement (identifier_resource) identifier_resource )return_statement )block )function_definition )module
Build an API representation of the query job config. Returns: dict: A dictionary in the format used by the BigQuery API.
(module (function_definition (function_name_gerrymanderNodeFilenames) function_name_gerrymanderNodeFilenames (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_node) identifier_node (attribute (identifier_self) identifier_self (identifier_all_nodes) identifier_all_nodes )attribute (block (expression_statement (assignment (attribute (identifier_node) identifier_node (identifier_file_name) identifier_file_name )attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_file_name) identifier_file_name )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_node) identifier_node (identifier_kind) identifier_kind )attribute (string_"file") string_"file" )comparison_operator (block (expression_statement (assignment (attribute (identifier_node) identifier_node (identifier_program_file) identifier_program_file )attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_program_file) identifier_program_file )attribute )argument_list )call )assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
When creating nodes, the filename needs to be relative to ``conf.py``, so it will include ``self.root_directory``. However, when generating the API, the file we are writing to is in the same directory as the generated node files so we need to remove the directory path from a given ExhaleNode's ``file_name`` before we can ``include`` it or use it in a ``toctree``.
(module (function_definition (function_name_mark_flags_as_required) function_name_mark_flags_as_required (parameters (identifier_flag_names) identifier_flag_names (default_parameter (identifier_flag_values) identifier_flag_values (attribute (identifier__flagvalues) identifier__flagvalues (identifier_FLAGS) identifier_FLAGS )attribute )default_parameter )parameters (block (for_statement (identifier_flag_name) identifier_flag_name (identifier_flag_names) identifier_flag_names (block (expression_statement (call (identifier_mark_flag_as_required) identifier_mark_flag_as_required (argument_list (identifier_flag_name) identifier_flag_name (identifier_flag_values) identifier_flag_values )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Ensures that flags are not None during program execution. Recommended usage: if __name__ == '__main__': flags.mark_flags_as_required(['flag1', 'flag2', 'flag3']) app.run() Args: flag_names: Sequence[str], names of the flags. flag_values: flags.FlagValues, optional FlagValues instance where the flags are defined. Raises: AttributeError: If any of flag name has not already been defined as a flag.
(module (function_definition (function_name_first_name) function_name_first_name (parameters (identifier_anon) identifier_anon (identifier_obj) identifier_obj (identifier_field) identifier_field (identifier_val) identifier_val )parameters (block (return_statement (call (attribute (attribute (identifier_anon) identifier_anon (identifier_faker) identifier_faker )attribute (identifier_first_name) identifier_first_name )attribute (argument_list (keyword_argument (identifier_field) identifier_field (identifier_field) identifier_field )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns a random first name
(module (function_definition (function_name_dependencies) function_name_dependencies (parameters (identifier_self) identifier_self (identifier_images) identifier_images )parameters (block (for_statement (identifier_dep) identifier_dep (attribute (attribute (identifier_self) identifier_self (identifier_commands) identifier_commands )attribute (identifier_dependent_images) identifier_dependent_images )attribute (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_dep) identifier_dep (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call )not_operator (block (expression_statement (yield (attribute (identifier_dep) identifier_dep (identifier_name) identifier_name )attribute )yield )expression_statement )block )if_statement )block )for_statement (for_statement (pattern_list (identifier_image) identifier_image (identifier__) identifier__ )pattern_list (call (attribute (identifier_self) identifier_self (identifier_dependency_images) identifier_dependency_images )attribute (argument_list )argument_list )call (block (expression_statement (yield (identifier_image) identifier_image )yield )expression_statement )block )for_statement )block )function_definition )module
Yield just the dependency images
(module (function_definition (function_name_geocode_address) function_name_geocode_address (parameters (identifier_self) identifier_self (identifier_address) identifier_address (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_fields) identifier_fields (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_"fields") string_"fields" (list )list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier__req) identifier__req )attribute (argument_list (keyword_argument (identifier_verb) identifier_verb (string_"geocode") string_"geocode" )keyword_argument (keyword_argument (identifier_params) identifier_params (dictionary (pair (string_"q") string_"q" (identifier_address) identifier_address )pair (pair (string_"fields") string_"fields" (identifier_fields) identifier_fields )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (identifier_response) identifier_response )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_Location) identifier_Location (argument_list (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Returns a Location dictionary with the components of the queried address and the geocoded location. >>> client = GeocodioClient('some_api_key') >>> client.geocode("1600 Pennsylvania Ave, Washington DC") { "input": { "address_components": { "number": "1600", "street": "Pennsylvania", "suffix": "Ave", "city": "Washington", "state": "DC" }, "formatted_address": "1600 Pennsylvania Ave, Washington DC" }, "results": [ { "address_components": { "number": "1600", "street": "Pennsylvania", "suffix": "Ave", "city": "Washington", "state": "DC", "zip": "20500" }, "formatted_address": "1600 Pennsylvania Ave, Washington DC, 20500", "location": { "lat": 38.897700000000, "lng": -77.03650000000, }, "accuracy": 1 }, { "address_components": { "number": "1600", "street": "Pennsylvania", "suffix": "Ave", "city": "Washington", "state": "DC", "zip": "20500" }, "formatted_address": "1600 Pennsylvania Ave, Washington DC, 20500", "location": { "lat": 38.897700000000, "lng": -77.03650000000, }, "accuracy": 0.8 } ] }
(module (function_definition (function_name_compute_edge_reduction) function_name_compute_edge_reduction (parameters (identifier_self) identifier_self )parameters (type (identifier_float) identifier_float )type (block (expression_statement (assignment (identifier_nb_init_edge) identifier_nb_init_edge (call (attribute (identifier_self) identifier_self (identifier_init_edge_number) identifier_init_edge_number )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nb_poweredge) identifier_nb_poweredge (call (attribute (identifier_self) identifier_self (identifier_edge_number) identifier_edge_number )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (binary_operator (parenthesized_expression (binary_operator (identifier_nb_init_edge) identifier_nb_init_edge (identifier_nb_poweredge) identifier_nb_poweredge )binary_operator )parenthesized_expression (parenthesized_expression (identifier_nb_init_edge) identifier_nb_init_edge )parenthesized_expression )binary_operator )return_statement )block )function_definition )module
Compute the edge reduction. Costly computation
(module (function_definition (function_name_set_authorization_password) function_name_set_authorization_password (parameters (identifier_self) identifier_self (identifier_password) identifier_password )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_authorization_password) identifier_authorization_password )attribute (identifier_password) identifier_password )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_changed_event) identifier_changed_event )attribute (identifier_emit) identifier_emit )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Changes the authorization password of the account. :type password: string :param password: The new authorization password.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_url_params) identifier_url_params )dictionary_splat_pattern )parameters (block (if_statement (identifier_url_params) identifier_url_params (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_http_method_args) identifier_http_method_args )attribute (string_"params") string_"params" )subscript (identifier_update) identifier_update )attribute (argument_list (identifier_url_params) identifier_url_params )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_http_method) identifier_http_method )attribute (argument_list (string_"GET") string_"GET" )argument_list )call )return_statement )block )function_definition )module
Makes the HTTP GET to the url.
(module (function_definition (function_name_add_string_pairs_from_text_view_element) function_name_add_string_pairs_from_text_view_element (parameters (identifier_xib_file) identifier_xib_file (identifier_results) identifier_results (identifier_text_view) identifier_text_view (identifier_special_ui_components_prefix) identifier_special_ui_components_prefix )parameters (block (expression_statement (assignment (identifier_text_view_entry_comment) identifier_text_view_entry_comment (call (identifier_extract_element_internationalized_comment) identifier_extract_element_internationalized_comment (argument_list (identifier_text_view) identifier_text_view )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_text_view_entry_comment) identifier_text_view_entry_comment (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (call (attribute (identifier_text_view) identifier_text_view (identifier_hasAttribute) identifier_hasAttribute )attribute (argument_list (string_'usesAttributedText') string_'usesAttributedText' )argument_list )call (comparison_operator (attribute (subscript (attribute (identifier_text_view) identifier_text_view (identifier_attributes) identifier_attributes )attribute (string_'usesAttributedText') string_'usesAttributedText' )subscript (identifier_value) identifier_value )attribute (string_'YES') string_'YES' )comparison_operator )boolean_operator (block (expression_statement (call (identifier_add_string_pairs_from_attributed_ui_element) identifier_add_string_pairs_from_attributed_ui_element (argument_list (identifier_results) identifier_results (identifier_text_view) identifier_text_view (identifier_text_view_entry_comment) identifier_text_view_entry_comment )argument_list )call )expression_statement )block (else_clause (block (try_statement (block (expression_statement (assignment (identifier_text_view_entry_key) identifier_text_view_entry_key (attribute (subscript (attribute (identifier_text_view) identifier_text_view (identifier_attributes) identifier_attributes )attribute (string_'text') string_'text' )subscript (identifier_value) identifier_value )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_text_view_entry_key) identifier_text_view_entry_key (binary_operator (identifier_text_view_entry_comment) identifier_text_view_entry_comment (string_' default text value') string_' default text value' )binary_operator )tuple )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )else_clause )if_statement (expression_statement (call (identifier_warn_if_element_not_of_class) identifier_warn_if_element_not_of_class (argument_list (identifier_text_view) identifier_text_view (string_'TextView') string_'TextView' (identifier_special_ui_components_prefix) identifier_special_ui_components_prefix )argument_list )call )expression_statement )block )function_definition )module
Adds string pairs from a textview element. Args: xib_file (str): Path to the xib file. results (list): The list to add the results to. text_view(element): The textview element from the xib, to extract the string pairs from. special_ui_components_prefix(str): A custom prefix for internationalize component to allow (default is only JT)
(module (function_definition (function_name_parse_line) function_name_parse_line (parameters (identifier_line) identifier_line )parameters (block (expression_statement (assignment (identifier_line) identifier_line (call (attribute (identifier_line) identifier_line (identifier_rstrip) identifier_rstrip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_line_type) identifier_line_type (call (identifier__get_line_type) identifier__get_line_type (argument_list (identifier_line) identifier_line )argument_list )call )assignment )expression_statement (return_statement (call (identifier_TabLine) identifier_TabLine (argument_list (keyword_argument (identifier_type) identifier_type (identifier_line_type) identifier_line_type )keyword_argument (keyword_argument (identifier_data) identifier_data (call (subscript (identifier__DATA_PARSERS) identifier__DATA_PARSERS (identifier_line_type) identifier_line_type )subscript (argument_list (identifier_line) identifier_line )argument_list )call )keyword_argument (keyword_argument (identifier_original) identifier_original (identifier_line) identifier_line )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Parse a line into a `TabLine` object.
(module (function_definition (function_name_count) function_name_count (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier_store) identifier_store )attribute (identifier_autocommit) identifier_autocommit )attribute )not_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier_store) identifier_store )attribute (identifier_checkpoint) identifier_checkpoint )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_target) identifier_target (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (attribute (attribute (identifier_tableClass) identifier_tableClass (identifier_storeID) identifier_storeID )attribute (identifier_getColumnName) identifier_getColumnName )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier_store) identifier_store )attribute )argument_list )call (for_in_clause (identifier_tableClass) identifier_tableClass (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier_tableClass) identifier_tableClass )attribute )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_sql) identifier_sql (identifier_args) identifier_args )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier__sqlAndArgs) identifier__sqlAndArgs )attribute (argument_list (string_'SELECT DISTINCT') string_'SELECT DISTINCT' (identifier_target) identifier_target )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sql) identifier_sql (binary_operator (binary_operator (string_'SELECT COUNT(*) FROM (') string_'SELECT COUNT(*) FROM (' (identifier_sql) identifier_sql )binary_operator (string_')') string_')' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (identifier_store) identifier_store )attribute (identifier_querySQL) identifier_querySQL )attribute (argument_list (identifier_sql) identifier_sql (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_result) identifier_result )argument_list )call (integer_1) integer_1 )comparison_operator (binary_operator (string_'more than one result: %r') string_'more than one result: %r' (tuple (identifier_result) identifier_result )tuple )binary_operator )assert_statement (return_statement (boolean_operator (subscript (subscript (identifier_result) identifier_result (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript (integer_0) integer_0 )boolean_operator )return_statement )block )function_definition )module
Count the number of distinct results of the wrapped query. @return: an L{int} representing the number of distinct results.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_value) identifier_value (dictionary )dictionary )assignment )expression_statement (for_statement (tuple_pattern (identifier_elementname) identifier_elementname (identifier_elementvar) identifier_elementvar )tuple_pattern (call (attribute (attribute (identifier_self) identifier_self (identifier__elementvars) identifier__elementvars )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_value) identifier_value (identifier_elementname) identifier_elementname )subscript (call (attribute (identifier_elementvar) identifier_elementvar (identifier_get) identifier_get )attribute (argument_list )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Return a dictionary that represents the Tcl array
(module (function_definition (function_name_assert_is_substring) function_name_assert_is_substring (parameters (identifier_substring) identifier_substring (identifier_subject) identifier_subject (default_parameter (identifier_message) identifier_message (None) None )default_parameter (default_parameter (identifier_extra) identifier_extra (None) None )default_parameter )parameters (block (assert_statement (parenthesized_expression (boolean_operator (boolean_operator (parenthesized_expression (comparison_operator (identifier_subject) identifier_subject (None) None )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (identifier_substring) identifier_substring (None) None )comparison_operator )parenthesized_expression )boolean_operator (parenthesized_expression (comparison_operator (call (attribute (identifier_subject) identifier_subject (identifier_find) identifier_find )attribute (argument_list (identifier_substring) identifier_substring )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator )parenthesized_expression )boolean_operator )parenthesized_expression (call (identifier__assert_fail_message) identifier__assert_fail_message (argument_list (identifier_message) identifier_message (identifier_substring) identifier_substring (identifier_subject) identifier_subject (string_"is not in") string_"is not in" (identifier_extra) identifier_extra )argument_list )call )assert_statement )block )function_definition )module
Raises an AssertionError if substring is not a substring of subject.
(module (function_definition (function_name_badge_color) function_name_badge_color (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_thresholds) identifier_thresholds )attribute )not_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_default_color) identifier_default_color )attribute )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_value_type) identifier_value_type )attribute (identifier_str) identifier_str )comparison_operator (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute (attribute (identifier_self) identifier_self (identifier_thresholds) identifier_thresholds )attribute )comparison_operator (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_thresholds) identifier_thresholds )attribute (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute )subscript )return_statement )block (else_clause (block (return_statement (attribute (identifier_self) identifier_self (identifier_default_color) identifier_default_color )attribute )return_statement )block )else_clause )if_statement )block )if_statement (expression_statement (assignment (identifier_threshold_list) identifier_threshold_list (list_comprehension (list (call (attribute (identifier_self) identifier_self (identifier_value_type) identifier_value_type )attribute (argument_list (subscript (identifier_i) identifier_i (integer_0) integer_0 )subscript )argument_list )call (subscript (identifier_i) identifier_i (integer_1) integer_1 )subscript )list (for_in_clause (identifier_i) identifier_i (call (attribute (attribute (identifier_self) identifier_self (identifier_thresholds) identifier_thresholds )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_threshold_list) identifier_threshold_list (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (subscript (identifier_x) identifier_x (integer_0) integer_0 )subscript )lambda )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_color) identifier_color (None) None )assignment )expression_statement (for_statement (pattern_list (identifier_threshold) identifier_threshold (identifier_color) identifier_color )pattern_list (identifier_threshold_list) identifier_threshold_list (block (if_statement (comparison_operator (call (identifier_float) identifier_float (argument_list (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute )argument_list )call (call (identifier_float) identifier_float (argument_list (identifier_threshold) identifier_threshold )argument_list )call )comparison_operator (block (return_statement (identifier_color) identifier_color )return_statement )block )if_statement )block )for_statement (if_statement (boolean_operator (identifier_color) identifier_color (attribute (identifier_self) identifier_self (identifier_use_max_when_value_exceeds) identifier_use_max_when_value_exceeds )attribute )boolean_operator (block (return_statement (identifier_color) identifier_color )return_statement )block (else_clause (block (return_statement (attribute (identifier_self) identifier_self (identifier_default_color) identifier_default_color )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
Find the badge color based on the thresholds.
(module (function_definition (function_name_delete_user_login) function_name_delete_user_login (parameters (identifier_self) identifier_self (identifier_id) identifier_id (identifier_user_id) identifier_user_id )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_"user_id") string_"user_id" )subscript (identifier_user_id) identifier_user_id )assignment )expression_statement (expression_statement (assignment (subscript (identifier_path) identifier_path (string_"id") string_"id" )subscript (identifier_id) identifier_id )assignment )expression_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_"DELETE /api/v1/users/{user_id}/logins/{id} with query params: {params} and form data: {data}") string_"DELETE /api/v1/users/{user_id}/logins/{id} 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_"DELETE") string_"DELETE" (call (attribute (string_"/api/v1/users/{user_id}/logins/{id}") string_"/api/v1/users/{user_id}/logins/{id}" (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_no_data) identifier_no_data (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Delete a user login. Delete an existing login.
(module (function_definition (function_name_detect_intent_texts) function_name_detect_intent_texts (parameters (identifier_project_id) identifier_project_id (identifier_session_id) identifier_session_id (identifier_texts) identifier_texts (identifier_language_code) identifier_language_code )parameters (block (import_statement (aliased_import (dotted_name (identifier_dialogflow_v2) identifier_dialogflow_v2 )dotted_name (identifier_dialogflow) identifier_dialogflow )aliased_import )import_statement (expression_statement (assignment (identifier_session_client) identifier_session_client (call (attribute (identifier_dialogflow) identifier_dialogflow (identifier_SessionsClient) identifier_SessionsClient )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_session) identifier_session (call (attribute (identifier_session_client) identifier_session_client (identifier_session_path) identifier_session_path )attribute (argument_list (identifier_project_id) identifier_project_id (identifier_session_id) identifier_session_id )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'Session path: {}\n') string_'Session path: {}\n' (identifier_format) identifier_format )attribute (argument_list (identifier_session) identifier_session )argument_list )call )argument_list )call )expression_statement (for_statement (identifier_text) identifier_text (identifier_texts) identifier_texts (block (expression_statement (assignment (identifier_text_input) identifier_text_input (call (attribute (attribute (identifier_dialogflow) identifier_dialogflow (identifier_types) identifier_types )attribute (identifier_TextInput) identifier_TextInput )attribute (argument_list (keyword_argument (identifier_text) identifier_text (identifier_text) identifier_text )keyword_argument (keyword_argument (identifier_language_code) identifier_language_code (identifier_language_code) identifier_language_code )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query_input) identifier_query_input (call (attribute (attribute (identifier_dialogflow) identifier_dialogflow (identifier_types) identifier_types )attribute (identifier_QueryInput) identifier_QueryInput )attribute (argument_list (keyword_argument (identifier_text) identifier_text (identifier_text_input) identifier_text_input )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_session_client) identifier_session_client (identifier_detect_intent) identifier_detect_intent )attribute (argument_list (keyword_argument (identifier_session) identifier_session (identifier_session) identifier_session )keyword_argument (keyword_argument (identifier_query_input) identifier_query_input (identifier_query_input) identifier_query_input )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'=') string_'=' (integer_20) integer_20 )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'Query text: {}') string_'Query text: {}' (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_response) identifier_response (identifier_query_result) identifier_query_result )attribute (identifier_query_text) identifier_query_text )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'Detected intent: {} (confidence: {})\n') string_'Detected intent: {} (confidence: {})\n' (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (attribute (identifier_response) identifier_response (identifier_query_result) identifier_query_result )attribute (identifier_intent) identifier_intent )attribute (identifier_display_name) identifier_display_name )attribute (attribute (attribute (identifier_response) identifier_response (identifier_query_result) identifier_query_result )attribute (identifier_intent_detection_confidence) identifier_intent_detection_confidence )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'Fulfillment text: {}\n') string_'Fulfillment text: {}\n' (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_response) identifier_response (identifier_query_result) identifier_query_result )attribute (identifier_fulfillment_text) identifier_fulfillment_text )attribute )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Returns the result of detect intent with texts as inputs. Using the same `session_id` between requests allows continuation of the conversation.
(module (function_definition (function_name_omega) function_name_omega (parameters (identifier_self) identifier_self (identifier_structure) identifier_structure (identifier_n) identifier_n (identifier_u) identifier_u )parameters (block (expression_statement (assignment (identifier_l0) identifier_l0 (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (attribute (attribute (identifier_structure) identifier_structure (identifier_lattice) identifier_lattice )attribute (identifier_matrix) identifier_matrix )attribute (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call (identifier_n) identifier_n )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_l0) identifier_l0 (float_1e-10) float_1e-10 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_weight) identifier_weight (binary_operator (call (identifier_float) identifier_float (argument_list (attribute (attribute (identifier_structure) identifier_structure (identifier_composition) identifier_composition )attribute (identifier_weight) identifier_weight )attribute )argument_list )call (float_1.66054e-27) float_1.66054e-27 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_vol) identifier_vol (binary_operator (attribute (identifier_structure) identifier_structure (identifier_volume) identifier_volume )attribute (float_1e-30) float_1e-30 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_vel) identifier_vel (binary_operator (parenthesized_expression (binary_operator (binary_operator (float_1e9) float_1e9 (call (attribute (subscript (identifier_self) identifier_self (integer_0) integer_0 )subscript (identifier_einsum_sequence) identifier_einsum_sequence )attribute (argument_list (list (identifier_n) identifier_n (identifier_u) identifier_u (identifier_n) identifier_n (identifier_u) identifier_u )list )argument_list )call )binary_operator (parenthesized_expression (binary_operator (identifier_weight) identifier_weight (identifier_vol) identifier_vol )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression (float_0.5) float_0.5 )binary_operator )assignment )expression_statement (return_statement (binary_operator (identifier_vel) identifier_vel (identifier_l0) identifier_l0 )binary_operator )return_statement )block )function_definition )module
Finds directional frequency contribution to the heat capacity from direction and polarization Args: structure (Structure): Structure to be used in directional heat capacity determination n (3x1 array-like): direction for Cv determination u (3x1 array-like): polarization direction, note that no attempt for verification of eigenvectors is made
(module (function_definition (function_name_and_yields) function_name_and_yields (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_values) identifier_values )list_splat_pattern )parameters (block (function_definition (function_name_generator) function_name_generator (parameters )parameters (block (for_statement (identifier_value) identifier_value (identifier_values) identifier_values (block (expression_statement (yield (identifier_value) identifier_value )yield )expression_statement )block )for_statement )block )function_definition (expression_statement (call (attribute (identifier_self) identifier_self (identifier___expect) identifier___expect )attribute (argument_list (identifier_Expectation) identifier_Expectation (call (identifier_Invoke) identifier_Invoke (argument_list (identifier_generator) identifier_generator )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Expects the return value of the expectation to be a generator of the given values
(module (function_definition (function_name_delif) function_name_delif (parameters (identifier_self) identifier_self (identifier_iname) identifier_iname )parameters (block (expression_statement (call (identifier__runshell) identifier__runshell (argument_list (list (identifier_brctlexe) identifier_brctlexe (string_'delif') string_'delif' (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (identifier_iname) identifier_iname )list (binary_operator (string_"Could not delete interface %s from %s.") string_"Could not delete interface %s from %s." (tuple (identifier_iname) identifier_iname (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )tuple )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Delete an interface from the bridge.
(module (function_definition (function_name_parse_data) function_name_parse_data (parameters (identifier_data) identifier_data (identifier_type) identifier_type (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_suffixes) identifier_suffixes (dictionary (pair (string_'xml') string_'xml' (string_'.osm') string_'.osm' )pair (pair (string_'pbf') string_'pbf' (string_'.pbf') string_'.pbf' )pair )dictionary )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_suffix) identifier_suffix (subscript (identifier_suffixes) identifier_suffixes (identifier_type) identifier_type )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Unknown data type "%s"') string_'Unknown data type "%s"' (identifier_type) identifier_type )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (pattern_list (identifier_fd) identifier_fd (identifier_filename) identifier_filename )pattern_list (call (attribute (identifier_tempfile) identifier_tempfile (identifier_mkstemp) identifier_mkstemp )attribute (argument_list (keyword_argument (identifier_suffix) identifier_suffix (identifier_suffix) identifier_suffix )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_write) identifier_write )attribute (argument_list (identifier_fd) identifier_fd (identifier_data) identifier_data )argument_list )call )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 (return_statement (call (identifier_parse_file) identifier_parse_file (argument_list (identifier_filename) identifier_filename (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Return an OSM networkx graph from the input OSM data Parameters ---------- data : string type : string ('xml' or 'pbf') >>> graph = parse_data(data, 'xml')
(module (function_definition (function_name_contrast) function_name_contrast (parameters (identifier_colour1) identifier_colour1 (identifier_colour2) identifier_colour2 )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_colour_for_type) identifier_colour_for_type (call (identifier_Colour) identifier_Colour (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_colour1) identifier_colour1 )argument_list )call (call (identifier_type) identifier_type (argument_list (identifier_colour_for_type) identifier_colour_for_type )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_mycolour1) identifier_mycolour1 (identifier_colour1) identifier_colour1 )assignment )expression_statement )block (else_clause (block (try_statement (block (expression_statement (assignment (identifier_mycolour1) identifier_mycolour1 (call (identifier_Colour) identifier_Colour (argument_list (identifier_colour1) identifier_colour1 )argument_list )call )assignment )expression_statement )block (except_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"colour1 must be a colourettu.colour") string_"colour1 must be a colourettu.colour" )argument_list )call )raise_statement )block )except_clause )try_statement )block )else_clause )if_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_colour2) identifier_colour2 )argument_list )call (call (identifier_type) identifier_type (argument_list (identifier_colour_for_type) identifier_colour_for_type )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_mycolour2) identifier_mycolour2 (identifier_colour2) identifier_colour2 )assignment )expression_statement )block (else_clause (block (try_statement (block (expression_statement (assignment (identifier_mycolour2) identifier_mycolour2 (call (identifier_Colour) identifier_Colour (argument_list (identifier_colour2) identifier_colour2 )argument_list )call )assignment )expression_statement )block (except_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"colour2 must be a colourettu.colour") string_"colour2 must be a colourettu.colour" )argument_list )call )raise_statement )block )except_clause )try_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_lum1) identifier_lum1 (call (attribute (identifier_mycolour1) identifier_mycolour1 (identifier_luminance) identifier_luminance )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lum2) identifier_lum2 (call (attribute (identifier_mycolour2) identifier_mycolour2 (identifier_luminance) identifier_luminance )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_minlum) identifier_minlum (call (identifier_min) identifier_min (argument_list (identifier_lum1) identifier_lum1 (identifier_lum2) identifier_lum2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_maxlum) identifier_maxlum (call (identifier_max) identifier_max (argument_list (identifier_lum1) identifier_lum1 (identifier_lum2) identifier_lum2 )argument_list )call )assignment )expression_statement (return_statement (binary_operator (parenthesized_expression (binary_operator (identifier_maxlum) identifier_maxlum (float_0.05) float_0.05 )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (identifier_minlum) identifier_minlum (float_0.05) float_0.05 )binary_operator )parenthesized_expression )binary_operator )return_statement )block )function_definition )module
r"""Determines the contrast between two colours. Args: colour1 (colourettu.Colour): a colour colour2 (colourettu.Colour): a second colour Contrast the difference in (perceived) brightness between colours. Values vary between 1:1 (a given colour on itself) and 21:1 (white on black). To compute contrast, two colours are required. .. code:: pycon >>> colourettu.contrast("#FFF", "#FFF") # white on white 1.0 >>> colourettu.contrast(c1, "#000") # black on white 20.999999999999996 >>> colourettu.contrast(c4, c5) 4.363552233203198 ``contrast`` can also be called on an already existing colour, but a second colour needs to be provided: .. code:: pycon >>> c4.contrast(c5) 4.363552233203198 .. note:: Uses the formula: \\[ contrast = \\frac{lum_1 + 0.05}{lum_2 + 0.05} \\] **Use of Contrast** For Basic readability, the ANSI standard is a contrast of 3:1 between the text and it's background. The W3C proposes this as a minimum accessibility standard for regular text under 18pt and bold text under 14pt. This is referred to as the *A* standard. The W3C defines a higher *AA* standard with a minimum contrast of 4.5:1. This is approximately equivalent to 20/40 vision, and is common for those over 80. The W3C define an even higher *AAA* standard with a 7:1 minimum contrast. This would be equivalent to 20/80 vision. Generally, it is assumed that those with vision beyond this would access the web with the use of assistive technologies. If needed, these constants are stored in the library. .. code:: pycon >>> colourettu.A_contrast 3.0 >>> colourettu.AA_contrast 4.5 >>> colourettu.AAA_contrast 7.0 I've also found mention that if the contrast is *too* great, this can also cause readability problems when reading longer passages. This is confirmed by personal experience, but I have been (yet) unable to find any quantitative research to this effect.
(module (function_definition (function_name__StructPackDecoder) function_name__StructPackDecoder (parameters (identifier_wire_type) identifier_wire_type (identifier_format) identifier_format )parameters (block (expression_statement (assignment (identifier_value_size) identifier_value_size (call (attribute (identifier_struct) identifier_struct (identifier_calcsize) identifier_calcsize )attribute (argument_list (identifier_format) identifier_format )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_local_unpack) identifier_local_unpack (attribute (identifier_struct) identifier_struct (identifier_unpack) identifier_unpack )attribute )assignment )expression_statement (function_definition (function_name_InnerDecode) function_name_InnerDecode (parameters (identifier_buffer) identifier_buffer (identifier_pos) identifier_pos )parameters (block (expression_statement (assignment (identifier_new_pos) identifier_new_pos (binary_operator (identifier_pos) identifier_pos (identifier_value_size) identifier_value_size )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (subscript (call (identifier_local_unpack) identifier_local_unpack (argument_list (identifier_format) identifier_format (subscript (identifier_buffer) identifier_buffer (slice (identifier_pos) identifier_pos (colon) colon (identifier_new_pos) identifier_new_pos )slice )subscript )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (tuple (identifier_result) identifier_result (identifier_new_pos) identifier_new_pos )tuple )return_statement )block )function_definition (return_statement (call (identifier__SimpleDecoder) identifier__SimpleDecoder (argument_list (identifier_wire_type) identifier_wire_type (identifier_InnerDecode) identifier_InnerDecode )argument_list )call )return_statement )block )function_definition )module
Return a constructor for a decoder for a fixed-width field. Args: wire_type: The field's wire type. format: The format string to pass to struct.unpack().
(module (function_definition (function_name_natural_breaks) function_name_natural_breaks (parameters (identifier_values) identifier_values (default_parameter (identifier_k) identifier_k (integer_5) integer_5 )default_parameter )parameters (block (expression_statement (assignment (identifier_values) identifier_values (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_uv) identifier_uv (call (attribute (identifier_np) identifier_np (identifier_unique) identifier_unique )attribute (argument_list (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_uvk) identifier_uvk (call (identifier_len) identifier_len (argument_list (identifier_uv) identifier_uv )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_uvk) identifier_uvk (identifier_k) identifier_k )comparison_operator (block (expression_statement (call (identifier_Warn) identifier_Warn (argument_list (string_'Warning: Not enough unique values in array to form k classes') string_'Warning: Not enough unique values in array to form k classes' (identifier_UserWarning) identifier_UserWarning )argument_list )call )expression_statement (expression_statement (call (identifier_Warn) identifier_Warn (argument_list (binary_operator (string_'Warning: setting k to %d') string_'Warning: setting k to %d' (identifier_uvk) identifier_uvk )binary_operator (identifier_UserWarning) identifier_UserWarning )argument_list )call )expression_statement (expression_statement (assignment (identifier_k) identifier_k (identifier_uvk) identifier_uvk )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_kres) identifier_kres (call (identifier__kmeans) identifier__kmeans (argument_list (identifier_values) identifier_values (identifier_k) identifier_k )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sids) identifier_sids (subscript (identifier_kres) identifier_kres (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_fit) identifier_fit (subscript (identifier_kres) identifier_kres (unary_operator (integer_2) integer_2 )unary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_class_ids) identifier_class_ids (subscript (identifier_kres) identifier_kres (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_cuts) identifier_cuts (subscript (identifier_kres) identifier_kres (integer_1) integer_1 )subscript )assignment )expression_statement (return_statement (tuple (identifier_sids) identifier_sids (identifier_class_ids) identifier_class_ids (identifier_fit) identifier_fit (identifier_cuts) identifier_cuts )tuple )return_statement )block )function_definition )module
natural breaks helper function Jenks natural breaks is kmeans in one dimension
(module (function_definition (function_name_value) function_name_value (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_choice) identifier_choice (call (identifier_weighted_choice) identifier_weighted_choice (argument_list (attribute (identifier_self) identifier_self (identifier__responses) identifier__responses )attribute )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_choice) identifier_choice (identifier_tuple) identifier_tuple )argument_list )call (block (return_statement (call (attribute (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (call (identifier_map) identifier_map (argument_list (identifier_str) identifier_str (identifier_choice) identifier_choice )argument_list )call )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_str) identifier_str (argument_list (identifier_choice) identifier_choice )argument_list )call )return_statement )block )function_definition )module
Fetch a random weighted choice
(module (function_definition (function_name_create_impression_event) function_name_create_impression_event (parameters (identifier_self) identifier_self (identifier_experiment) identifier_experiment (identifier_variation_id) identifier_variation_id (identifier_user_id) identifier_user_id (identifier_attributes) identifier_attributes )parameters (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_self) identifier_self (identifier__get_common_params) identifier__get_common_params )attribute (argument_list (identifier_user_id) identifier_user_id (identifier_attributes) identifier_attributes )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_impression_params) identifier_impression_params (call (attribute (identifier_self) identifier_self (identifier__get_required_params_for_impression) identifier__get_required_params_for_impression )attribute (argument_list (identifier_experiment) identifier_experiment (identifier_variation_id) identifier_variation_id )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (subscript (subscript (subscript (identifier_params) identifier_params (attribute (attribute (identifier_self) identifier_self (identifier_EventParams) identifier_EventParams )attribute (identifier_USERS) identifier_USERS )attribute )subscript (integer_0) integer_0 )subscript (attribute (attribute (identifier_self) identifier_self (identifier_EventParams) identifier_EventParams )attribute (identifier_SNAPSHOTS) identifier_SNAPSHOTS )attribute )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_impression_params) identifier_impression_params )argument_list )call )expression_statement (return_statement (call (identifier_Event) identifier_Event (argument_list (attribute (identifier_self) identifier_self (identifier_EVENTS_URL) identifier_EVENTS_URL )attribute (identifier_params) identifier_params (keyword_argument (identifier_http_verb) identifier_http_verb (attribute (identifier_self) identifier_self (identifier_HTTP_VERB) identifier_HTTP_VERB )attribute )keyword_argument (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier_HTTP_HEADERS) identifier_HTTP_HEADERS )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create impression Event to be sent to the logging endpoint. Args: experiment: Experiment for which impression needs to be recorded. variation_id: ID for variation which would be presented to user. user_id: ID for user. attributes: Dict representing user attributes and values which need to be recorded. Returns: Event object encapsulating the impression event.
(module (function_definition (function_name_EMAIL_REQUIRED) function_name_EMAIL_REQUIRED (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_allauth) identifier_allauth (identifier_account) identifier_account )dotted_name (aliased_import (dotted_name (identifier_app_settings) identifier_app_settings )dotted_name (identifier_account_settings) identifier_account_settings )aliased_import )import_from_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__setting) identifier__setting )attribute (argument_list (string_"EMAIL_REQUIRED") string_"EMAIL_REQUIRED" (attribute (identifier_account_settings) identifier_account_settings (identifier_EMAIL_REQUIRED) identifier_EMAIL_REQUIRED )attribute )argument_list )call )return_statement )block )function_definition )module
The user is required to hand over an e-mail address when signing up
(module (function_definition (function_name__load_sentence_list) function_name__load_sentence_list (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_result) identifier_result (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_entry) identifier_entry (call (attribute (identifier_textfile) identifier_textfile (identifier_read_separated_lines_generator) identifier_read_separated_lines_generator )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_separator) identifier_separator (string_'\t') string_'\t' )keyword_argument (keyword_argument (identifier_max_columns) identifier_max_columns (integer_3) integer_3 )keyword_argument )argument_list )call (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_include_languages) identifier_include_languages )attribute (None) None )comparison_operator (comparison_operator (subscript (identifier_entry) identifier_entry (integer_1) integer_1 )subscript (attribute (identifier_self) identifier_self (identifier_include_languages) identifier_include_languages )attribute )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_result) identifier_result (subscript (identifier_entry) identifier_entry (integer_0) integer_0 )subscript )subscript (subscript (identifier_entry) identifier_entry (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Load and filter the sentence list. Args: path (str): Path to the sentence list. Returns: dict: Dictionary of sentences (id : language, transcription)
(module (function_definition (function_name_starmap_async) function_name_starmap_async (parameters (identifier_function) identifier_function (identifier_iterables) identifier_iterables (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (identifier__map_or_starmap_async) identifier__map_or_starmap_async (argument_list (identifier_function) identifier_function (identifier_iterables) identifier_iterables (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs (string_"starmap") string_"starmap" )argument_list )call )return_statement )block )function_definition )module
This function is the multiprocessing.Pool.starmap_async version that supports multiple arguments. >>> return ([function(x1,x2,x3,..., args[0], args[1],...) for >>> (x1,x2,x3...) in iterable]) :param pm_parallel: Force parallelization on/off. If False, the function won't be asynchronous. :type pm_parallel: bool :param pm_chunksize: see :py:class:`multiprocessing.pool.Pool` :type pm_chunksize: int :param pm_callback: see :py:class:`multiprocessing.pool.Pool` :type pm_callback: function :param pm_error_callback: see :py:class:`multiprocessing.pool.Pool` :type pm_error_callback: function :param pm_pool: Pass an existing pool. :type pm_pool: multiprocessing.pool.Pool :param pm_processes: Number of processes to use in the pool. See :py:class:`multiprocessing.pool.Pool` :type pm_processes: int
(module (function_definition (function_name_get_boolean) function_name_get_boolean (parameters (identifier_self) identifier_self (identifier_input_string) identifier_input_string )parameters (block (if_statement (comparison_operator (identifier_input_string) identifier_input_string (tuple (string_'--write_roc') string_'--write_roc' (string_'--plot') string_'--plot' (string_'--compare') string_'--compare' )tuple )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_index) identifier_index (binary_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_index) identifier_index )attribute (argument_list (identifier_input_string) identifier_input_string )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (False) False )return_statement )block )except_clause )try_statement (return_statement (True) True )return_statement )block )if_statement )block )function_definition )module
Return boolean type user input
(module (function_definition (function_name_get_param_values) function_name_get_param_values (parameters (identifier_self_) identifier_self_ (default_parameter (identifier_onlychanged) identifier_onlychanged (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_self_or_cls) identifier_self_or_cls (attribute (identifier_self_) identifier_self_ (identifier_self_or_cls) identifier_self_or_cls )attribute )assignment )expression_statement (expression_statement (assignment (identifier_vals) identifier_vals (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_val) identifier_val )pattern_list (call (attribute (call (attribute (attribute (identifier_self_or_cls) identifier_self_or_cls (identifier_param) identifier_param )attribute (identifier_objects) identifier_objects )attribute (argument_list (string_'existing') string_'existing' )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (attribute (identifier_self_or_cls) identifier_self_or_cls (identifier_param) identifier_param )attribute (identifier_get_value_generator) identifier_get_value_generator )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_onlychanged) identifier_onlychanged )not_operator (not_operator (call (identifier_all_equal) identifier_all_equal (argument_list (identifier_value) identifier_value (attribute (identifier_val) identifier_val (identifier_default) identifier_default )attribute )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_vals) identifier_vals (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_name) identifier_name (identifier_value) identifier_value )tuple )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_vals) identifier_vals (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (call (identifier_itemgetter) identifier_itemgetter (argument_list (integer_0) integer_0 )argument_list )call )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_vals) identifier_vals )return_statement )block )function_definition )module
Return a list of name,value pairs for all Parameters of this object. When called on an instance with onlychanged set to True, will only return values that are not equal to the default value (onlychanged has no effect when called on a class).
(module (function_definition (function_name_closed) function_name_closed (parameters (identifier_self) identifier_self )parameters (block (for_statement (pattern_list (identifier_who) identifier_who (identifier_what) identifier_what (identifier_old) identifier_old (identifier_new) identifier_new )pattern_list (call (attribute (identifier_self) identifier_self (identifier_history) identifier_history )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (comparison_operator (identifier_what) identifier_what (string_"status") string_"status" )comparison_operator (comparison_operator (identifier_new) identifier_new (string_"closed") string_"closed" )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
True if ticket was closed in given time frame
(module (function_definition (function_name__fetch_features) function_name__fetch_features (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_next_page_url) identifier_next_page_url )attribute (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_response) identifier_response (call (identifier_get_json) identifier_get_json (argument_list (attribute (identifier_self) identifier_self (identifier_next_page_url) identifier_next_page_url )attribute (keyword_argument (identifier_post_values) identifier_post_values (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute )keyword_argument (keyword_argument (identifier_headers) identifier_headers (attribute (attribute (identifier_self) identifier_self (identifier_gpd_session) identifier_gpd_session )attribute (identifier_session_headers) identifier_session_headers )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_features) identifier_features )attribute (identifier_extend) identifier_extend )attribute (argument_list (subscript (identifier_response) identifier_response (string_'features') string_'features' )subscript )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_next_page_url) identifier_next_page_url )attribute (subscript (subscript (identifier_response) identifier_response (string_'pagination') string_'pagination' )subscript (string_'next') string_'next' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_layer_size) identifier_layer_size )attribute (subscript (subscript (identifier_response) identifier_response (string_'pagination') string_'pagination' )subscript (string_'total') string_'total' )subscript )assignment )expression_statement )block )function_definition )module
Retrieves a new page of features from Geopedia
(module (function_definition (function_name_ref_string_matches_ref_sequence) function_name_ref_string_matches_ref_sequence (parameters (identifier_self) identifier_self (identifier_ref_sequence) identifier_ref_sequence )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_POS) identifier_POS )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_end_pos) identifier_end_pos (call (attribute (identifier_self) identifier_self (identifier_ref_end_pos) identifier_ref_end_pos )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_end_pos) identifier_end_pos (call (identifier_len) identifier_len (argument_list (identifier_ref_sequence) identifier_ref_sequence )argument_list )call )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_REF) identifier_REF )attribute (subscript (identifier_ref_sequence) identifier_ref_sequence (slice (attribute (identifier_self) identifier_self (identifier_POS) identifier_POS )attribute (colon) colon (binary_operator (identifier_end_pos) identifier_end_pos (integer_1) integer_1 )binary_operator )slice )subscript )comparison_operator )return_statement )block )function_definition )module
Returns true iff the REF string in the record agrees with the given ref_sequence
(module (function_definition (function_name_convert_to_nested_dict) function_name_convert_to_nested_dict (parameters (identifier_dotted_dict) identifier_dotted_dict )parameters (block (expression_statement (assignment (identifier_nested_dict) identifier_nested_dict (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (identifier_iterate_flattened) identifier_iterate_flattened (argument_list (identifier_dotted_dict) identifier_dotted_dict )argument_list )call (block (expression_statement (call (identifier_set_by_dotted_path) identifier_set_by_dotted_path (argument_list (identifier_nested_dict) identifier_nested_dict (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_nested_dict) identifier_nested_dict )return_statement )block )function_definition )module
Convert a dict with dotted path keys to corresponding nested dict.
(module (function_definition (function_name_write_string) function_name_write_string (parameters (identifier_self) identifier_self (identifier_s) identifier_s (identifier_codec) identifier_codec )parameters (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_s) identifier_s )argument_list )call (attribute (identifier_self) identifier_self (identifier_bufsize) identifier_bufsize )attribute )argument_list )call (block (expression_statement (assignment (identifier_chunk) identifier_chunk (subscript (identifier_s) identifier_s (slice (identifier_i) identifier_i (colon) colon (binary_operator (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_bufsize) identifier_bufsize )attribute )binary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_buf) identifier_buf (identifier_consumed) identifier_consumed )pattern_list (call (attribute (identifier_codec) identifier_codec (identifier_encode) identifier_encode )attribute (argument_list (identifier_chunk) identifier_chunk )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (identifier_consumed) identifier_consumed (call (identifier_len) identifier_len (argument_list (identifier_chunk) identifier_chunk )argument_list )call )comparison_operator )assert_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (identifier_buf) identifier_buf )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Write string encoding it with codec into stream
(module (function_definition (function_name__create_eval_metric_composite) function_name__create_eval_metric_composite (parameters (typed_parameter (identifier_metric_names) identifier_metric_names (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter )parameters (type (attribute (attribute (identifier_mx) identifier_mx (identifier_metric) identifier_metric )attribute (identifier_CompositeEvalMetric) identifier_CompositeEvalMetric )attribute )type (block (expression_statement (assignment (identifier_metrics) identifier_metrics (list_comprehension (call (attribute (identifier_EarlyStoppingTrainer) identifier_EarlyStoppingTrainer (identifier__create_eval_metric) identifier__create_eval_metric )attribute (argument_list (identifier_metric_name) identifier_metric_name )argument_list )call (for_in_clause (identifier_metric_name) identifier_metric_name (identifier_metric_names) identifier_metric_names )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_mx) identifier_mx (identifier_metric) identifier_metric )attribute (identifier_create) identifier_create )attribute (argument_list (identifier_metrics) identifier_metrics )argument_list )call )return_statement )block )function_definition )module
Creates a composite EvalMetric given a list of metric names.
(module (function_definition (function_name_get_message) function_name_get_message (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_parameters) identifier_parameters )list_splat_pattern )parameters (block (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_message_fields) identifier_message_fields (identifier_header_fields) identifier_header_fields )pattern_list (call (attribute (identifier_self) identifier_self (identifier__get_parameters_with_defaults) identifier__get_parameters_with_defaults )attribute (argument_list (identifier_parameters) identifier_parameters )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__encode_message) identifier__encode_message )attribute (argument_list (identifier_message_fields) identifier_message_fields (identifier_header_fields) identifier_header_fields )argument_list )call )return_statement )block )function_definition )module
Get encoded message. * Send Message -keywords are convenience methods, that will call this to get the message object and then send it. Optional parameters are message field values separated with colon. Examples: | ${msg} = | Get message | | ${msg} = | Get message | field_name:value |
(module (function_definition (function_name_libvlc_vlm_get_event_manager) function_name_libvlc_vlm_get_event_manager (parameters (identifier_p_instance) identifier_p_instance )parameters (block (expression_statement (assignment (identifier_f) identifier_f (boolean_operator (call (attribute (identifier__Cfunctions) identifier__Cfunctions (identifier_get) identifier_get )attribute (argument_list (string_'libvlc_vlm_get_event_manager') string_'libvlc_vlm_get_event_manager' (None) None )argument_list )call (line_continuation_\) line_continuation_\ (call (identifier__Cfunction) identifier__Cfunction (argument_list (string_'libvlc_vlm_get_event_manager') string_'libvlc_vlm_get_event_manager' (tuple (tuple (integer_1) integer_1 )tuple )tuple (call (identifier_class_result) identifier_class_result (argument_list (identifier_EventManager) identifier_EventManager )argument_list )call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_void_p) identifier_c_void_p )attribute (identifier_Instance) identifier_Instance )argument_list )call )boolean_operator )assignment )expression_statement (return_statement (call (identifier_f) identifier_f (argument_list (identifier_p_instance) identifier_p_instance )argument_list )call )return_statement )block )function_definition )module
Get libvlc_event_manager from a vlm media. The p_event_manager is immutable, so you don't have to hold the lock. @param p_instance: a libvlc instance. @return: libvlc_event_manager.
(module (function_definition (function_name_exists) function_name_exists (parameters (identifier_self) identifier_self (identifier_table_id) identifier_table_id )parameters (block (import_from_statement (dotted_name (identifier_google) identifier_google (identifier_api_core) identifier_api_core (identifier_exceptions) identifier_exceptions )dotted_name (dotted_name (identifier_NotFound) identifier_NotFound )dotted_name )import_from_statement (expression_statement (assignment (identifier_table_ref) identifier_table_ref (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_dataset) identifier_dataset )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dataset_id) identifier_dataset_id )attribute )argument_list )call (identifier_table) identifier_table )attribute (argument_list (identifier_table_id) identifier_table_id )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_get_table) identifier_get_table )attribute (argument_list (identifier_table_ref) identifier_table_ref )argument_list )call )expression_statement (return_statement (True) True )return_statement )block (except_clause (identifier_NotFound) identifier_NotFound (block (return_statement (False) False )return_statement )block )except_clause (except_clause (as_pattern (attribute (identifier_self) identifier_self (identifier_http_error) identifier_http_error )attribute (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_process_http_error) identifier_process_http_error )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Check if a table exists in Google BigQuery Parameters ---------- table : str Name of table to be verified Returns ------- boolean true if table exists, otherwise false
(module (function_definition (function_name_register_previewer) function_name_register_previewer (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_previewer) identifier_previewer )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_previewers) identifier_previewers )attribute )comparison_operator (block (assert_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_previewers) identifier_previewers )attribute )comparison_operator (string_"Previewer with same name already registered") string_"Previewer with same name already registered" )assert_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_previewers) identifier_previewers )attribute (identifier_name) identifier_name )subscript (identifier_previewer) identifier_previewer )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_previewer) identifier_previewer (string_'previewable_extensions') string_'previewable_extensions' )argument_list )call (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__previewable_extensions) identifier__previewable_extensions )attribute (call (identifier_set) identifier_set (argument_list (attribute (identifier_previewer) identifier_previewer (identifier_previewable_extensions) identifier_previewable_extensions )attribute )argument_list )call )augmented_assignment )expression_statement )block )if_statement )block )function_definition )module
Register a previewer in the system.
(module (function_definition (function_name_search_project_root) function_name_search_project_root (parameters )parameters (block (while_statement (True) True (block (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (attribute (call (attribute (identifier_pathlib) identifier_pathlib (identifier_Path) identifier_Path )attribute (argument_list (string_"Miragefile.py") string_"Miragefile.py" )argument_list )call (identifier_is_file) identifier_is_file )attribute (argument_list )argument_list )call (call (attribute (call (attribute (identifier_pathlib) identifier_pathlib (identifier_Path) identifier_Path )attribute (argument_list (string_"Miragefile") string_"Miragefile" )argument_list )call (identifier_is_file) identifier_is_file )attribute (argument_list )argument_list )call )boolean_operator (block (return_statement (identifier_current) identifier_current )return_statement )block (elif_clause (comparison_operator (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call (string_"/") string_"/" )comparison_operator (block (raise_statement (identifier_FileNotFoundError) identifier_FileNotFoundError )raise_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (string_"../") string_"../" )argument_list )call )expression_statement )block )else_clause )if_statement )block )while_statement )block )function_definition )module
Search your Django project root. returns: - path:string Django project root path
(module (function_definition (function_name_manufacturer) function_name_manufacturer (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_buf) identifier_buf (attribute (call (attribute (identifier_ctypes) identifier_ctypes (identifier_cast) identifier_cast )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_sManu) identifier_sManu )attribute (attribute (identifier_ctypes) identifier_ctypes (identifier_c_char_p) identifier_c_char_p )attribute )argument_list )call (identifier_value) identifier_value )attribute )assignment )expression_statement (return_statement (conditional_expression (call (attribute (identifier_buf) identifier_buf (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call (identifier_buf) identifier_buf (None) None )conditional_expression )return_statement )block )function_definition )module
Returns the name of the manufacturer of the device. Args: self (JLinkDeviceInfo): the ``JLinkDeviceInfo`` instance Returns: Manufacturer name.
(module (function_definition (function_name_get_cfgdict_list_subset) function_name_get_cfgdict_list_subset (parameters (identifier_cfgdict_list) identifier_cfgdict_list (identifier_keys) identifier_keys )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (import_statement (aliased_import (dotted_name (identifier_utool) identifier_utool )dotted_name (identifier_ut) identifier_ut )aliased_import )import_statement (expression_statement (assignment (identifier_cfgdict_sublist_) identifier_cfgdict_sublist_ (list_comprehension (call (attribute (identifier_ut) identifier_ut (identifier_dict_subset) identifier_dict_subset )attribute (argument_list (identifier_cfgdict) identifier_cfgdict (identifier_keys) identifier_keys )argument_list )call (for_in_clause (identifier_cfgdict) identifier_cfgdict (identifier_cfgdict_list) identifier_cfgdict_list )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_cfgtups_sublist_) identifier_cfgtups_sublist_ (list_comprehension (call (identifier_tuple) identifier_tuple (argument_list (call (attribute (identifier_ut) identifier_ut (identifier_dict_to_keyvals) identifier_dict_to_keyvals )attribute (argument_list (identifier_cfgdict) identifier_cfgdict )argument_list )call )argument_list )call (for_in_clause (identifier_cfgdict) identifier_cfgdict (identifier_cfgdict_sublist_) identifier_cfgdict_sublist_ )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_cfgtups_sublist) identifier_cfgtups_sublist (call (attribute (identifier_ut) identifier_ut (identifier_unique_ordered) identifier_unique_ordered )attribute (argument_list (identifier_cfgtups_sublist_) identifier_cfgtups_sublist_ )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cfgdict_sublist) identifier_cfgdict_sublist (call (identifier_list) identifier_list (argument_list (call (identifier_map) identifier_map (argument_list (identifier_dict) identifier_dict (identifier_cfgtups_sublist) identifier_cfgtups_sublist )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_cfgdict_sublist) identifier_cfgdict_sublist )return_statement )block )function_definition )module
r""" returns list of unique dictionaries only with keys specified in keys Args: cfgdict_list (list): keys (list): Returns: list: cfglbl_list CommandLine: python -m utool.util_gridsearch --test-get_cfgdict_list_subset Example: >>> # ENABLE_DOCTEST >>> from utool.util_gridsearch import * # NOQA >>> import utool as ut >>> # build test data >>> cfgdict_list = [ ... {'K': 3, 'dcvs_clip_max': 0.1, 'p': 0.1}, ... {'K': 5, 'dcvs_clip_max': 0.1, 'p': 0.1}, ... {'K': 5, 'dcvs_clip_max': 0.1, 'p': 0.2}, ... {'K': 3, 'dcvs_clip_max': 0.2, 'p': 0.1}, ... {'K': 5, 'dcvs_clip_max': 0.2, 'p': 0.1}, ... {'K': 3, 'dcvs_clip_max': 0.2, 'p': 0.1}] >>> keys = ['K', 'dcvs_clip_max'] >>> # execute function >>> cfgdict_sublist = get_cfgdict_list_subset(cfgdict_list, keys) >>> # verify results >>> result = ut.repr4(cfgdict_sublist) >>> print(result) [ {'K': 3, 'dcvs_clip_max': 0.1}, {'K': 5, 'dcvs_clip_max': 0.1}, {'K': 3, 'dcvs_clip_max': 0.2}, {'K': 5, 'dcvs_clip_max': 0.2}, ]
(module (function_definition (function_name_write_byte_data) function_name_write_byte_data (parameters (identifier_self) identifier_self (identifier_address) identifier_address (identifier_register) identifier_register (identifier_value) identifier_value )parameters (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_"Writing byte data %s to register %s on device %s") string_"Writing byte data %s to register %s on device %s" (call (identifier_bin) identifier_bin (argument_list (identifier_value) identifier_value )argument_list )call (call (identifier_hex) identifier_hex (argument_list (identifier_register) identifier_register )argument_list )call (call (identifier_hex) identifier_hex (argument_list (identifier_address) identifier_address )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_driver) identifier_driver )attribute (identifier_write_byte_data) identifier_write_byte_data )attribute (argument_list (identifier_address) identifier_address (identifier_register) identifier_register (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Write a byte value to a device's register.
(module (function_definition (function_name__generate_statistics) function_name__generate_statistics (parameters (identifier_self) identifier_self (identifier_out_path) identifier_out_path (identifier_results_path) identifier_results_path )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_out_path) identifier_out_path )argument_list )call )not_operator (block (expression_statement (assignment (identifier_report) identifier_report (call (identifier_StatisticsReport) identifier_StatisticsReport (argument_list (attribute (identifier_self) identifier_self (identifier__corpus) identifier__corpus )attribute (attribute (identifier_self) identifier_self (identifier__tokenizer) identifier__tokenizer )attribute (identifier_results_path) identifier_results_path )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_report) identifier_report (identifier_generate_statistics) identifier_generate_statistics )attribute (argument_list )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_out_path) identifier_out_path (keyword_argument (identifier_mode) identifier_mode (string_'w') string_'w' )keyword_argument (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument (keyword_argument (identifier_newline) identifier_newline (string_'') string_'' )keyword_argument )argument_list )call (as_pattern_target (identifier_fh) identifier_fh )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_report) identifier_report (identifier_csv) identifier_csv )attribute (argument_list (identifier_fh) identifier_fh )argument_list )call )expression_statement )block )with_statement )block )if_statement )block )function_definition )module
Writes a statistics report for the results at `results_path` to `out_path`. Reuses an existing statistics report if one exists at `out_path`. :param out_path: path to output statistics report to :type out_path: `str` :param results_path: path of results to generate statistics for :type results_path: `str`
(module (function_definition (function_name_step1c) function_name_step1c (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (call (attribute (identifier_self) identifier_self (identifier_ends) identifier_ends )attribute (argument_list (list (string_'y') string_'y' )list )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_vowel_in_stem) identifier_vowel_in_stem )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_b) identifier_b )attribute (attribute (identifier_self) identifier_self (identifier_k) identifier_k )attribute )subscript (string_'i') string_'i' )assignment )expression_statement )block )if_statement )block )function_definition )module
turn terminal y into i if there's a vowel in stem
(module (function_definition (function_name_replaceelement) function_name_replaceelement (parameters (identifier_oldelem) identifier_oldelem (identifier_newelem) identifier_newelem )parameters (block (expression_statement (assignment (identifier_parent) identifier_parent (call (attribute (identifier_oldelem) identifier_oldelem (identifier_getparent) identifier_getparent )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_parent) identifier_parent (None) None )comparison_operator (block (expression_statement (assignment (identifier_size) identifier_size (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_parent) identifier_parent (identifier_getchildren) identifier_getchildren )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_x) identifier_x (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (identifier_size) identifier_size )argument_list )call (block (if_statement (comparison_operator (subscript (call (attribute (identifier_parent) identifier_parent (identifier_getchildren) identifier_getchildren )attribute (argument_list )argument_list )call (identifier_x) identifier_x )subscript (identifier_oldelem) identifier_oldelem )comparison_operator (block (expression_statement (call (attribute (identifier_parent) identifier_parent (identifier_remove) identifier_remove )attribute (argument_list (identifier_oldelem) identifier_oldelem )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parent) identifier_parent (identifier_insert) identifier_insert )attribute (argument_list (identifier_x) identifier_x (identifier_newelem) identifier_newelem )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )if_statement )block )function_definition )module
Given a parent element, replace oldelem with newelem.
(module (function_definition (function_name_initial_dist_from_config) function_name_initial_dist_from_config (parameters (identifier_cp) identifier_cp (identifier_variable_params) identifier_variable_params )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_cp) identifier_cp (identifier_get_subsections) identifier_get_subsections )attribute (argument_list (string_"initial") string_"initial" )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (concatenated_string (string_"Using a different distribution for the starting points ") string_"Using a different distribution for the starting points " (string_"than the prior.") string_"than the prior." )concatenated_string )argument_list )call )expression_statement (expression_statement (assignment (identifier_initial_dists) identifier_initial_dists (call (attribute (identifier_distributions) identifier_distributions (identifier_read_distributions_from_config) identifier_read_distributions_from_config )attribute (argument_list (identifier_cp) identifier_cp (keyword_argument (identifier_section) identifier_section (string_"initial") string_"initial" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_constraints) identifier_constraints (call (attribute (identifier_distributions) identifier_distributions (identifier_read_constraints_from_config) identifier_read_constraints_from_config )attribute (argument_list (identifier_cp) identifier_cp (keyword_argument (identifier_constraint_section) identifier_constraint_section (string_"initial_constraint") string_"initial_constraint" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_init_dist) identifier_init_dist (call (attribute (identifier_distributions) identifier_distributions (identifier_JointDistribution) identifier_JointDistribution )attribute (argument_list (identifier_variable_params) identifier_variable_params (list_splat (identifier_initial_dists) identifier_initial_dists )list_splat (dictionary_splat (dictionary (pair (string_"constraints") string_"constraints" (identifier_constraints) identifier_constraints )pair )dictionary )dictionary_splat )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_init_dist) identifier_init_dist (None) None )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_init_dist) identifier_init_dist )return_statement )block )function_definition )module
r"""Loads a distribution for the sampler start from the given config file. A distribution will only be loaded if the config file has a [initial-\*] section(s). Parameters ---------- cp : Config parser The config parser to try to load from. variable_params : list of str The variable parameters for the distribution. Returns ------- JointDistribution or None : The initial distribution. If no [initial-\*] section found in the config file, will just return None.
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__server_task) identifier__server_task )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_"AsyncValidatingWSServer.start() called twice, ignoring") string_"AsyncValidatingWSServer.start() called twice, ignoring" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_started_signal) identifier_started_signal (call (attribute (attribute (identifier_self) identifier_self (identifier__loop) identifier__loop )attribute (identifier_create_future) identifier_create_future )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__server_task) identifier__server_task )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__loop) identifier__loop )attribute (identifier_add_task) identifier_add_task )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__run_server_task) identifier__run_server_task )attribute (argument_list (identifier_started_signal) identifier_started_signal )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (await (identifier_started_signal) identifier_started_signal )await )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_port) identifier_port )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_port) identifier_port )attribute (call (attribute (identifier_started_signal) identifier_started_signal (identifier_result) identifier_result )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement )block )function_definition )module
Start the websocket server. When this method returns, the websocket server will be running and the port property of this class will have its assigned port number. This method should be called only once in the lifetime of the server and must be paired with a call to stop() to cleanly release the server's resources.
(module (function_definition (function_name_del_ns) function_name_del_ns (parameters (identifier_self) identifier_self (identifier_namespace) identifier_namespace )parameters (block (expression_statement (assignment (identifier_namespace) identifier_namespace (call (identifier_str) identifier_str (argument_list (identifier_namespace) identifier_namespace )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_attr_name) identifier_attr_name (None) None )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (identifier_namespace) identifier_namespace )argument_list )call (block (expression_statement (call (identifier_delattr) identifier_delattr (argument_list (identifier_self) identifier_self (identifier_namespace) identifier_namespace )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
will remove a namespace ref from the manager. either Arg is optional. args: namespace: prefix, string or Namespace() to remove
(module (function_definition (function_name__export_work_errors) function_name__export_work_errors (parameters (identifier_self) identifier_self (identifier_work) identifier_work (identifier_output_file) identifier_output_file )parameters (block (expression_statement (assignment (identifier_errors) identifier_errors (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_v) identifier_v (call (identifier_itervalues) identifier_itervalues (argument_list (attribute (identifier_work) identifier_work (identifier_work) identifier_work )attribute )argument_list )call (block (if_statement (boolean_operator (subscript (identifier_v) identifier_v (string_'is_completed') string_'is_completed' )subscript (comparison_operator (subscript (identifier_v) identifier_v (string_'error') string_'error' )subscript (None) None )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_errors) identifier_errors (identifier_add) identifier_add )attribute (argument_list (subscript (identifier_v) identifier_v (string_'error') string_'error' )subscript )argument_list )call )expression_statement )block )if_statement )block )for_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_output_file) identifier_output_file (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_e) identifier_e (call (identifier_sorted) identifier_sorted (argument_list (identifier_errors) identifier_errors )argument_list )call (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Saves errors for given work pieces into file. Args: work: instance of either AttackWorkPieces or DefenseWorkPieces output_file: name of the output file
(module (function_definition (function_name_clear_profiling_cookies) function_name_clear_profiling_cookies (parameters (identifier_request) identifier_request (identifier_response) identifier_response )parameters (block (if_statement (comparison_operator (string_'profile_page') string_'profile_page' (attribute (identifier_request) identifier_request (identifier_COOKIES) identifier_COOKIES )attribute )comparison_operator (block (expression_statement (assignment (identifier_path) identifier_path (attribute (identifier_request) identifier_request (identifier_path) identifier_path )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_set_cookie) identifier_set_cookie )attribute (argument_list (string_'profile_page') string_'profile_page' (keyword_argument (identifier_max_age) identifier_max_age (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_path) identifier_path (identifier_path) identifier_path )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Expire any cookie that initiated profiling request.
(module (function_definition (function_name_pattern_error) function_name_pattern_error (parameters (identifier_self) identifier_self (identifier_original) identifier_original (identifier_loc) identifier_loc (identifier_value_var) identifier_value_var (identifier_check_var) identifier_check_var )parameters (block (expression_statement (assignment (identifier_base_line) identifier_base_line (call (identifier_clean) identifier_clean (argument_list (call (attribute (identifier_self) identifier_self (identifier_reformat) identifier_reformat )attribute (argument_list (call (identifier_getline) identifier_getline (argument_list (identifier_loc) identifier_loc (identifier_original) identifier_original )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_line_wrap) identifier_line_wrap (call (attribute (identifier_self) identifier_self (identifier_wrap_str_of) identifier_wrap_str_of )attribute (argument_list (identifier_base_line) identifier_base_line )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_repr_wrap) identifier_repr_wrap (call (attribute (identifier_self) identifier_self (identifier_wrap_str_of) identifier_wrap_str_of )attribute (argument_list (call (identifier_ascii) identifier_ascii (argument_list (identifier_base_line) identifier_base_line )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (parenthesized_expression (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_"if not ") string_"if not " (identifier_check_var) identifier_check_var )binary_operator (string_":\n") string_":\n" )binary_operator (identifier_openindent) identifier_openindent )binary_operator (identifier_match_err_var) identifier_match_err_var )binary_operator (string_' = _coconut_MatchError("pattern-matching failed for " ') string_' = _coconut_MatchError("pattern-matching failed for " ' )binary_operator (identifier_repr_wrap) identifier_repr_wrap )binary_operator (string_' " in " + _coconut.repr(_coconut.repr(') string_' " in " + _coconut.repr(_coconut.repr(' )binary_operator (identifier_value_var) identifier_value_var )binary_operator (string_")))\n") string_")))\n" )binary_operator (identifier_match_err_var) identifier_match_err_var )binary_operator (string_".pattern = ") string_".pattern = " )binary_operator (identifier_line_wrap) identifier_line_wrap )binary_operator (string_"\n") string_"\n" )binary_operator (identifier_match_err_var) identifier_match_err_var )binary_operator (string_".value = ") string_".value = " )binary_operator (identifier_value_var) identifier_value_var )binary_operator (string_"\nraise ") string_"\nraise " )binary_operator (identifier_match_err_var) identifier_match_err_var )binary_operator (string_"\n") string_"\n" )binary_operator (identifier_closeindent) identifier_closeindent )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
Construct a pattern-matching error message.
(module (function_definition (function_name_shutdown_instances) function_name_shutdown_instances (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_min_size) identifier_min_size )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_max_size) identifier_max_size )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_desired_capacity) identifier_desired_capacity )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update) identifier_update )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Convenience method which shuts down all instances associated with this group.
(module (function_definition (function_name_get_attribute) function_name_get_attribute (parameters (identifier_self) identifier_self (identifier_reference) identifier_reference )parameters (block (expression_statement (assignment (pattern_list (identifier_prefix) identifier_prefix (identifier__) identifier__ (identifier_name) identifier_name )pattern_list (call (attribute (identifier_reference) identifier_reference (identifier_rpartition) identifier_rpartition )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_match) identifier_match (None) None )assignment )expression_statement (for_statement (identifier_attribute) identifier_attribute (attribute (identifier_self) identifier_self (identifier__contents) identifier__contents )attribute (block (if_statement (boolean_operator (comparison_operator (identifier_name) identifier_name (attribute (identifier_attribute) identifier_attribute (identifier_name) identifier_name )attribute )comparison_operator (line_continuation_\) line_continuation_\ (parenthesized_expression (boolean_operator (not_operator (identifier_prefix) identifier_prefix )not_operator (comparison_operator (identifier_prefix) identifier_prefix (attribute (identifier_attribute) identifier_attribute (identifier_prefix) identifier_prefix )attribute )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (if_statement (identifier_match) identifier_match (block (raise_statement (call (identifier_AttributeReferenceError) identifier_AttributeReferenceError (argument_list (call (attribute (string_'Ambiguous attribute reference: {}.') string_'Ambiguous attribute reference: {}.' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_attribute) identifier_attribute (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_match) identifier_match (identifier_attribute) identifier_attribute )assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (if_statement (identifier_match) identifier_match (block (return_statement (identifier_match) identifier_match )return_statement )block )if_statement (raise_statement (call (identifier_AttributeReferenceError) identifier_AttributeReferenceError (argument_list (call (attribute (string_'Attribute does not exist: {}') string_'Attribute does not exist: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_reference) identifier_reference )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Return the attribute that matches the reference. Raise an error if the attribute cannot be found, or if there is more then one match.
(module (function_definition (function_name__bare_name_matches) function_name__bare_name_matches (parameters (identifier_self) identifier_self (identifier_nodes) identifier_nodes )parameters (block (expression_statement (assignment (identifier_count) identifier_count (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_done) identifier_done (False) False )assignment )expression_statement (expression_statement (assignment (identifier_max) identifier_max (call (identifier_len) identifier_len (argument_list (identifier_nodes) identifier_nodes )argument_list )call )assignment )expression_statement (while_statement (boolean_operator (not_operator (identifier_done) identifier_done )not_operator (comparison_operator (identifier_count) identifier_count (identifier_max) identifier_max )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_done) identifier_done (True) True )assignment )expression_statement (for_statement (identifier_leaf) identifier_leaf (attribute (identifier_self) identifier_self (identifier_content) identifier_content )attribute (block (if_statement (call (attribute (subscript (identifier_leaf) identifier_leaf (integer_0) integer_0 )subscript (identifier_match) identifier_match )attribute (argument_list (subscript (identifier_nodes) identifier_nodes (identifier_count) identifier_count )subscript (identifier_r) identifier_r )argument_list )call (block (expression_statement (augmented_assignment (identifier_count) identifier_count (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_done) identifier_done (False) False )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )while_statement (expression_statement (assignment (subscript (identifier_r) identifier_r (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )subscript (subscript (identifier_nodes) identifier_nodes (slice (colon) colon (identifier_count) identifier_count )slice )subscript )assignment )expression_statement (return_statement (expression_list (identifier_count) identifier_count (identifier_r) identifier_r )expression_list )return_statement )block )function_definition )module
Special optimized matcher for bare_name.
(module (function_definition (function_name_createDashboardOverlay) function_name_createDashboardOverlay (parameters (identifier_self) identifier_self (identifier_pchOverlayKey) identifier_pchOverlayKey (identifier_pchOverlayFriendlyName) identifier_pchOverlayFriendlyName )parameters (block (expression_statement (assignment (identifier_fn) identifier_fn (attribute (attribute (identifier_self) identifier_self (identifier_function_table) identifier_function_table )attribute (identifier_createDashboardOverlay) identifier_createDashboardOverlay )attribute )assignment )expression_statement (expression_statement (assignment (identifier_pMainHandle) identifier_pMainHandle (call (identifier_VROverlayHandle_t) identifier_VROverlayHandle_t (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pThumbnailHandle) identifier_pThumbnailHandle (call (identifier_VROverlayHandle_t) identifier_VROverlayHandle_t (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_fn) identifier_fn (argument_list (identifier_pchOverlayKey) identifier_pchOverlayKey (identifier_pchOverlayFriendlyName) identifier_pchOverlayFriendlyName (call (identifier_byref) identifier_byref (argument_list (identifier_pMainHandle) identifier_pMainHandle )argument_list )call (call (identifier_byref) identifier_byref (argument_list (identifier_pThumbnailHandle) identifier_pThumbnailHandle )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_result) identifier_result (identifier_pMainHandle) identifier_pMainHandle (identifier_pThumbnailHandle) identifier_pThumbnailHandle )expression_list )return_statement )block )function_definition )module
Creates a dashboard overlay and returns its handle
(module (function_definition (function_name_warsaw_to_warsawmass) function_name_warsaw_to_warsawmass (parameters (identifier_C) identifier_C (default_parameter (identifier_parameters) identifier_parameters (None) None )default_parameter (default_parameter (identifier_sectors) identifier_sectors (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_default_parameters) identifier_default_parameters (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_parameters) identifier_parameters (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_p) identifier_p (identifier_update) identifier_update )attribute (argument_list (identifier_parameters) identifier_parameters )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_C_out) identifier_C_out (call (attribute (identifier_C) identifier_C (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_C_rotate_u) identifier_C_rotate_u (list (string_'uphi') string_'uphi' (string_'uG') string_'uG' (string_'uW') string_'uW' (string_'uB') string_'uB' )list )assignment )expression_statement (for_statement (identifier_name) identifier_name (identifier_C_rotate_u) identifier_C_rotate_u (block (expression_statement (assignment (identifier__array) identifier__array (call (identifier_smeft_toarray) identifier_smeft_toarray (argument_list (identifier_name) identifier_name (identifier_C) identifier_C )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_V) identifier_V (call (attribute (attribute (identifier_ckmutil) identifier_ckmutil (identifier_ckm) identifier_ckm )attribute (identifier_ckm_tree) identifier_ckm_tree )attribute (argument_list (subscript (identifier_p) identifier_p (string_"Vus") string_"Vus" )subscript (subscript (identifier_p) identifier_p (string_"Vub") string_"Vub" )subscript (subscript (identifier_p) identifier_p (string_"Vcb") string_"Vcb" )subscript (subscript (identifier_p) identifier_p (string_"delta") string_"delta" )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_UuL) identifier_UuL (attribute (call (attribute (identifier_V) identifier_V (identifier_conj) identifier_conj )attribute (argument_list )argument_list )call (identifier_T) identifier_T )attribute )assignment )expression_statement (expression_statement (assignment (identifier__array) identifier__array (binary_operator (attribute (call (attribute (identifier_UuL) identifier_UuL (identifier_conj) identifier_conj )attribute (argument_list )argument_list )call (identifier_T) identifier_T )attribute (identifier__array) identifier__array )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier__dict) identifier__dict (call (identifier_smeft_fromarray) identifier_smeft_fromarray (argument_list (identifier_name) identifier_name (identifier__array) identifier__array )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_C_out) identifier_C_out (identifier_update) identifier_update )attribute (argument_list (identifier__dict) identifier__dict )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier__array) identifier__array (call (identifier_smeft_toarray) identifier_smeft_toarray (argument_list (string_'llphiphi') string_'llphiphi' (identifier_C) identifier_C )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__array) identifier__array (call (attribute (identifier_np) identifier_np (identifier_diag) identifier_diag )attribute (argument_list (subscript (call (attribute (attribute (identifier_ckmutil) identifier_ckmutil (identifier_diag) identifier_diag )attribute (identifier_msvd) identifier_msvd )attribute (argument_list (identifier__array) identifier__array )argument_list )call (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__dict) identifier__dict (call (identifier_smeft_fromarray) identifier_smeft_fromarray (argument_list (string_'llphiphi') string_'llphiphi' (identifier__array) identifier__array )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_C_out) identifier_C_out (identifier_update) identifier_update )attribute (argument_list (identifier__dict) identifier__dict )argument_list )call )expression_statement (return_statement (identifier_C_out) identifier_C_out )return_statement )block )function_definition )module
Translate from the Warsaw basis to the 'Warsaw mass' basis. Parameters used: - `Vus`, `Vub`, `Vcb`, `gamma`: elements of the unitary CKM matrix (defined as the mismatch between left-handed quark mass matrix diagonalization matrices).
(module (function_definition (function_name__CheckCollation) function_name__CheckCollation (parameters (identifier_cursor) identifier_cursor )parameters (block (expression_statement (assignment (identifier_cur_collation_connection) identifier_cur_collation_connection (call (identifier__ReadVariable) identifier__ReadVariable (argument_list (string_"collation_connection") string_"collation_connection" (identifier_cursor) identifier_cursor )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_cur_collation_connection) identifier_cur_collation_connection (identifier_COLLATION) identifier_COLLATION )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_warning) identifier_warning )attribute (argument_list (string_"Require MySQL collation_connection of %s, got %s.") string_"Require MySQL collation_connection of %s, got %s." (identifier_COLLATION) identifier_COLLATION (identifier_cur_collation_connection) identifier_cur_collation_connection )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_cur_collation_database) identifier_cur_collation_database (call (identifier__ReadVariable) identifier__ReadVariable (argument_list (string_"collation_database") string_"collation_database" (identifier_cursor) identifier_cursor )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_cur_collation_database) identifier_cur_collation_database (identifier_COLLATION) identifier_COLLATION )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_"Require MySQL collation_database of %s, got %s.") string_"Require MySQL collation_database of %s, got %s." (string_" To create your database, use: %s") string_" To create your database, use: %s" )concatenated_string (identifier_COLLATION) identifier_COLLATION (identifier_cur_collation_database) identifier_cur_collation_database (identifier_CREATE_DATABASE_QUERY) identifier_CREATE_DATABASE_QUERY )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Checks MySQL collation and warns if misconfigured.
(module (function_definition (function_name_list) function_name_list (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'user') string_'user' (attribute (identifier_self) identifier_self (identifier_user_id) identifier_user_id )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_blocks) identifier_blocks (subscript (attribute (identifier_response) identifier_response (identifier_data) identifier_data )attribute (string_'blocks') string_'blocks' )subscript )assignment )expression_statement (return_statement (list_comprehension (call (identifier_Block) identifier_Block (argument_list (identifier_self) identifier_self (dictionary_splat (identifier_block) identifier_block )dictionary_splat )argument_list )call (for_in_clause (identifier_block) identifier_block (identifier_blocks) identifier_blocks )for_in_clause )list_comprehension )return_statement )block )function_definition )module
List the users you have blocked. :return: a list of :class:`~groupy.api.blocks.Block`'s :rtype: :class:`list`
(module (function_definition (function_name_ordered_list) function_name_ordered_list (parameters (identifier_text_array) identifier_text_array )parameters (block (expression_statement (assignment (identifier_text_list) identifier_text_list (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_number) identifier_number (identifier_item) identifier_item )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_text_array) identifier_text_array )argument_list )call (block (expression_statement (call (attribute (identifier_text_list) identifier_text_list (identifier_append) identifier_append )attribute (argument_list (binary_operator (binary_operator (call (attribute (parenthesized_expression (binary_operator (call (identifier_esc_format) identifier_esc_format (argument_list (binary_operator (identifier_number) identifier_number (integer_1) integer_1 )binary_operator )argument_list )call (string_".") string_"." )binary_operator )parenthesized_expression (identifier_ljust) identifier_ljust )attribute (argument_list (integer_3) integer_3 )argument_list )call (string_" ") string_" " )binary_operator (call (identifier_esc_format) identifier_esc_format (argument_list (identifier_item) identifier_item )argument_list )call )binary_operator )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_text_list) identifier_text_list )argument_list )call )return_statement )block )function_definition )module
Return an ordered list from an array. >>> ordered_list(["first", "second", "third", "fourth"]) '1. first\\n2. second\\n3. third\\n4. fourth'
(module (function_definition (function_name_words) function_name_words (parameters (identifier_ctx) identifier_ctx (identifier_input) identifier_input (identifier_output) identifier_output )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'chemdataextractor.read.elements') string_'chemdataextractor.read.elements' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_'Reading %s') string_'Reading %s' (attribute (identifier_input) identifier_input (identifier_name) identifier_name )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_doc) identifier_doc (call (attribute (identifier_Document) identifier_Document (identifier_from_file) identifier_from_file )attribute (argument_list (identifier_input) identifier_input )argument_list )call )assignment )expression_statement (for_statement (identifier_element) identifier_element (attribute (identifier_doc) identifier_doc (identifier_elements) identifier_elements )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_element) identifier_element (identifier_Text) identifier_Text )argument_list )call (block (for_statement (identifier_sentence) identifier_sentence (attribute (identifier_element) identifier_element (identifier_sentences) identifier_sentences )attribute (block (expression_statement (call (attribute (identifier_output) identifier_output (identifier_write) identifier_write )attribute (argument_list (call (attribute (string_u' ') string_u' ' (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_sentence) identifier_sentence (identifier_raw_tokens) identifier_raw_tokens )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_output) identifier_output (identifier_write) identifier_write )attribute (argument_list (string_u'\n') string_u'\n' )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )for_statement )block )function_definition )module
Read input document, and output words.
(module (function_definition (function_name_from_) function_name_from_ (parameters (identifier_cls) identifier_cls (identifier_gsim) identifier_gsim )parameters (block (expression_statement (assignment (identifier_ltbranch) identifier_ltbranch (call (identifier_N) identifier_N (argument_list (string_'logicTreeBranch') string_'logicTreeBranch' (dictionary (pair (string_'branchID') string_'branchID' (string_'b1') string_'b1' )pair )dictionary (keyword_argument (identifier_nodes) identifier_nodes (list (call (identifier_N) identifier_N (argument_list (string_'uncertaintyModel') string_'uncertaintyModel' (keyword_argument (identifier_text) identifier_text (call (identifier_str) identifier_str (argument_list (identifier_gsim) identifier_gsim )argument_list )call )keyword_argument )argument_list )call (call (identifier_N) identifier_N (argument_list (string_'uncertaintyWeight') string_'uncertaintyWeight' (keyword_argument (identifier_text) identifier_text (string_'1.0') string_'1.0' )keyword_argument )argument_list )call )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lt) identifier_lt (call (identifier_N) identifier_N (argument_list (string_'logicTree') string_'logicTree' (dictionary (pair (string_'logicTreeID') string_'logicTreeID' (string_'lt1') string_'lt1' )pair )dictionary (keyword_argument (identifier_nodes) identifier_nodes (list (call (identifier_N) identifier_N (argument_list (string_'logicTreeBranchingLevel') string_'logicTreeBranchingLevel' (dictionary (pair (string_'branchingLevelID') string_'branchingLevelID' (string_'bl1') string_'bl1' )pair )dictionary (keyword_argument (identifier_nodes) identifier_nodes (list (call (identifier_N) identifier_N (argument_list (string_'logicTreeBranchSet') string_'logicTreeBranchSet' (dictionary (pair (string_'applyToTectonicRegionType') string_'applyToTectonicRegionType' (string_'*') string_'*' )pair (pair (string_'branchSetID') string_'branchSetID' (string_'bs1') string_'bs1' )pair (pair (string_'uncertaintyType') string_'uncertaintyType' (string_'gmpeModel') string_'gmpeModel' )pair )dictionary (keyword_argument (identifier_nodes) identifier_nodes (list (identifier_ltbranch) identifier_ltbranch )list )keyword_argument )argument_list )call )list )keyword_argument )argument_list )call )list )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (call (identifier_repr) identifier_repr (argument_list (identifier_gsim) identifier_gsim )argument_list )call (list (string_'*') string_'*' )list (keyword_argument (identifier_ltnode) identifier_ltnode (identifier_lt) identifier_lt )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Generate a trivial GsimLogicTree from a single GSIM instance.
(module (function_definition (function_name_node_mkdir) function_name_node_mkdir (parameters (identifier_self) identifier_self (default_parameter (identifier_path) identifier_path (string_'') string_'' )default_parameter )parameters (block (expression_statement (string_'Does not raise any errors if dir already exists.') string_'Does not raise any errors if dir already exists.' )expression_statement (return_statement (call (identifier_self) identifier_self (argument_list (identifier_path) identifier_path (keyword_argument (identifier_data) identifier_data (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_kind) identifier_kind (string_'directory') string_'directory' )keyword_argument )argument_list )call )keyword_argument (keyword_argument (identifier_encode) identifier_encode (string_'json') string_'json' )keyword_argument (keyword_argument (identifier_method) identifier_method (string_'put') string_'put' )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Does not raise any errors if dir already exists.
(module (function_definition (function_name__write) function_name__write (parameters (identifier_self) identifier_self (identifier_session) identifier_session (identifier_openFile) identifier_openFile (identifier_replaceParamFile) identifier_replaceParamFile )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_raster) identifier_raster )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_converter) identifier_converter (call (identifier_RasterConverter) identifier_RasterConverter (argument_list (identifier_session) identifier_session )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_grassAsciiGrid) identifier_grassAsciiGrid (call (attribute (identifier_converter) identifier_converter (identifier_getAsGrassAsciiRaster) identifier_getAsGrassAsciiRaster )attribute (argument_list (keyword_argument (identifier_rasterFieldName) identifier_rasterFieldName (string_'raster') string_'raster' )keyword_argument (keyword_argument (identifier_tableName) identifier_tableName (attribute (identifier_self) identifier_self (identifier___tablename__) identifier___tablename__ )attribute )keyword_argument (keyword_argument (identifier_rasterIdFieldName) identifier_rasterIdFieldName (string_'id') string_'id' )keyword_argument (keyword_argument (identifier_rasterId) identifier_rasterId (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_openFile) identifier_openFile (identifier_write) identifier_write )attribute (argument_list (identifier_grassAsciiGrid) identifier_grassAsciiGrid )argument_list )call )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_rasterText) identifier_rasterText )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_openFile) identifier_openFile (identifier_write) identifier_write )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_rasterText) identifier_rasterText )attribute )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Raster Map File Write to File Method
(module (function_definition (function_name_is_installed) function_name_is_installed (parameters (identifier_self) identifier_self (identifier_pkgname) identifier_pkgname )parameters (block (return_statement (call (identifier_any) identifier_any (generator_expression (identifier_d) identifier_d (for_in_clause (identifier_d) identifier_d (call (attribute (identifier_self) identifier_self (identifier_get_distributions) identifier_get_distributions )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (attribute (identifier_d) identifier_d (identifier_project_name) identifier_project_name )attribute (identifier_pkgname) identifier_pkgname )comparison_operator )if_clause )generator_expression )call )return_statement )block )function_definition )module
Given a package name, returns whether it is installed in the environment :param str pkgname: The name of a package :return: Whether the supplied package is installed in the environment :rtype: bool
(module (function_definition (function_name_extract_user_id) function_name_extract_user_id (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (identifier_self) identifier_self (identifier_extract_payload) identifier_extract_payload )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_user_id_attribute) identifier_user_id_attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_user_id) identifier_user_id )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_payload) identifier_payload (identifier_get) identifier_get )attribute (argument_list (identifier_user_id_attribute) identifier_user_id_attribute (None) None )argument_list )call )return_statement )block )function_definition )module
Extract a user id from a request object.
(module (function_definition (function_name__get_type_name) function_name__get_type_name (parameters (identifier_type_) identifier_type_ )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (identifier_repr) identifier_repr (argument_list (identifier_type_) identifier_type_ )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_name) identifier_name (identifier_startswith) identifier_startswith )attribute (argument_list (string_"<") string_"<" )argument_list )call (block (expression_statement (assignment (identifier_name) identifier_name (call (identifier_getattr) identifier_getattr (argument_list (identifier_type_) identifier_type_ (string_"__qualname__") string_"__qualname__" (call (identifier_getattr) identifier_getattr (argument_list (identifier_type_) identifier_type_ (string_"__name__") string_"__name__" (string_"") string_"" )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (boolean_operator (subscript (call (attribute (identifier_name) identifier_name (identifier_rsplit) identifier_rsplit )attribute (argument_list (string_".") string_"." (integer_1) integer_1 )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript (call (identifier_repr) identifier_repr (argument_list (identifier_type_) identifier_type_ )argument_list )call )boolean_operator )return_statement )block )function_definition )module
Return a displayable name for the type. Args: type_: A class object. Returns: A string value describing the class name that can be used in a natural language sentence.
(module (function_definition (function_name_sign_message) function_name_sign_message (parameters (identifier_privkey_path) identifier_privkey_path (identifier_message) identifier_message (default_parameter (identifier_passphrase) identifier_passphrase (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_key) identifier_key (call (identifier_get_rsa_key) identifier_get_rsa_key (argument_list (identifier_privkey_path) identifier_privkey_path (identifier_passphrase) identifier_passphrase )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'salt.crypt.sign_message: Signing message.') string_'salt.crypt.sign_message: Signing message.' )argument_list )call )expression_statement (if_statement (identifier_HAS_M2) identifier_HAS_M2 (block (expression_statement (assignment (identifier_md) identifier_md (call (attribute (identifier_EVP) identifier_EVP (identifier_MessageDigest) identifier_MessageDigest )attribute (argument_list (string_'sha1') string_'sha1' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_md) identifier_md (identifier_update) identifier_update )attribute (argument_list (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_stringutils) identifier_stringutils )attribute (identifier_to_bytes) identifier_to_bytes )attribute (argument_list (identifier_message) identifier_message )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_digest) identifier_digest (call (attribute (identifier_md) identifier_md (identifier_final) identifier_final )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_key) identifier_key (identifier_sign) identifier_sign )attribute (argument_list (identifier_digest) identifier_digest )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (identifier_signer) identifier_signer (call (attribute (identifier_PKCS1_v1_5) identifier_PKCS1_v1_5 (identifier_new) identifier_new )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_signer) identifier_signer (identifier_sign) identifier_sign )attribute (argument_list (call (attribute (identifier_SHA) identifier_SHA (identifier_new) identifier_new )attribute (argument_list (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_stringutils) identifier_stringutils )attribute (identifier_to_bytes) identifier_to_bytes )attribute (argument_list (identifier_message) identifier_message )argument_list )call )argument_list )call )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Use Crypto.Signature.PKCS1_v1_5 to sign a message. Returns the signature.
(module (function_definition (function_name__find_spelling_errors_in_chunks) function_name__find_spelling_errors_in_chunks (parameters (identifier_chunks) identifier_chunks (identifier_contents) identifier_contents (default_parameter (identifier_valid_words_dictionary) identifier_valid_words_dictionary (None) None )default_parameter (default_parameter (identifier_technical_words_dictionary) identifier_technical_words_dictionary (None) None )default_parameter (default_parameter (identifier_user_dictionary_words) identifier_user_dictionary_words (None) None )default_parameter )parameters (block (for_statement (identifier_chunk) identifier_chunk (identifier_chunks) identifier_chunks (block (for_statement (identifier_error) identifier_error (call (identifier_spellcheck_region) identifier_spellcheck_region (argument_list (attribute (identifier_chunk) identifier_chunk (identifier_data) identifier_data )attribute (identifier_valid_words_dictionary) identifier_valid_words_dictionary (identifier_technical_words_dictionary) identifier_technical_words_dictionary (identifier_user_dictionary_words) identifier_user_dictionary_words )argument_list )call (block (expression_statement (assignment (identifier_col_offset) identifier_col_offset (call (identifier__determine_character_offset) identifier__determine_character_offset (argument_list (attribute (identifier_error) identifier_error (identifier_line_offset) identifier_line_offset )attribute (attribute (identifier_error) identifier_error (identifier_column_offset) identifier_column_offset )attribute (attribute (identifier_chunk) identifier_chunk (identifier_column) identifier_column )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (subscript (identifier__SPELLCHECK_MESSAGES) identifier__SPELLCHECK_MESSAGES (attribute (identifier_error) identifier_error (identifier_error_type) identifier_error_type )attribute )subscript (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_error) identifier_error (identifier_word) identifier_word )attribute )argument_list )call )assignment )expression_statement (expression_statement (yield (call (identifier__populate_spelling_error) identifier__populate_spelling_error (argument_list (attribute (identifier_error) identifier_error (identifier_word) identifier_word )attribute (attribute (identifier_error) identifier_error (identifier_suggestions) identifier_suggestions )attribute (identifier_contents) identifier_contents (binary_operator (attribute (identifier_error) identifier_error (identifier_line_offset) identifier_line_offset )attribute (attribute (identifier_chunk) identifier_chunk (identifier_line) identifier_line )attribute )binary_operator (identifier_col_offset) identifier_col_offset (identifier_msg) identifier_msg )argument_list )call )yield )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
For each chunk and a set of valid and technical words, find errors.
(module (function_definition (function_name_metrics) function_name_metrics (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_vel) identifier_vel (identifier_metrics) identifier_metrics (identifier_loss_metric) identifier_loss_metric )dotted_name (dotted_name (identifier_Loss) identifier_Loss )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_vel) identifier_vel (identifier_metrics) identifier_metrics (identifier_accuracy) identifier_accuracy )dotted_name (dotted_name (identifier_Accuracy) identifier_Accuracy )dotted_name )import_from_statement (return_statement (list (call (identifier_Loss) identifier_Loss (argument_list )argument_list )call (call (identifier_Accuracy) identifier_Accuracy (argument_list )argument_list )call )list )return_statement )block )function_definition )module
Set of metrics for this model