sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_create_release_settings_action) function_name_create_release_settings_action (parameters (identifier_target) identifier_target (identifier_source) identifier_source (identifier_env) identifier_env )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (identifier_str) identifier_str (argument_list (subscript (identifier_source) identifier_source (integer_0) integer_0 )subscript )argument_list )call (string_"r") string_"r" )argument_list )call (as_pattern_target (identifier_fileobj) identifier_fileobj )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_settings) identifier_settings (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_fileobj) identifier_fileobj )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (assignment (subscript (identifier_settings) identifier_settings (string_'release') string_'release' )subscript (True) True )assignment )expression_statement (expression_statement (assignment (subscript (identifier_settings) identifier_settings (string_'release_date') string_'release_date' )subscript (call (attribute (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (identifier_isoformat) identifier_isoformat )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_settings) identifier_settings (string_'dependency_versions') string_'dependency_versions' )subscript (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_dep) identifier_dep (attribute (subscript (identifier_env) identifier_env (string_'TILE') string_'TILE' )subscript (identifier_dependencies) identifier_dependencies )attribute (block (expression_statement (assignment (identifier_tile) identifier_tile (call (identifier_IOTile) identifier_IOTile (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (string_'build') string_'build' (string_'deps') string_'deps' (subscript (identifier_dep) identifier_dep (string_'unique_id') string_'unique_id' )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_settings) identifier_settings (string_'dependency_versions') string_'dependency_versions' )subscript (subscript (identifier_dep) identifier_dep (string_'unique_id') string_'unique_id' )subscript )subscript (call (identifier_str) identifier_str (argument_list (attribute (identifier_tile) identifier_tile (identifier_parsed_version) identifier_parsed_version )attribute )argument_list )call )assignment )expression_statement )block )for_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (identifier_str) identifier_str (argument_list (subscript (identifier_target) identifier_target (integer_0) integer_0 )subscript )argument_list )call (string_"w") string_"w" )argument_list )call (as_pattern_target (identifier_fileobj) identifier_fileobj )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_json) identifier_json (identifier_dump) identifier_dump )attribute (argument_list (identifier_settings) identifier_settings (identifier_fileobj) identifier_fileobj (keyword_argument (identifier_indent) identifier_indent (integer_4) integer_4 )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Copy module_settings.json and add release and build information
(module (function_definition (function_name_make_soma) function_name_make_soma (parameters (identifier_points) identifier_points (default_parameter (identifier_soma_check) identifier_soma_check (None) None )default_parameter (default_parameter (identifier_soma_class) identifier_soma_class (identifier_SOMA_CONTOUR) identifier_SOMA_CONTOUR )default_parameter )parameters (block (if_statement (identifier_soma_check) identifier_soma_check (block (expression_statement (call (identifier_soma_check) identifier_soma_check (argument_list (identifier_points) identifier_points )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_stype) identifier_stype (call (identifier__get_type) identifier__get_type (argument_list (identifier_points) identifier_points (identifier_soma_class) identifier_soma_class )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_stype) identifier_stype (None) None )comparison_operator (block (raise_statement (call (identifier_SomaError) identifier_SomaError (argument_list (string_'Invalid soma points') string_'Invalid soma points' )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_stype) identifier_stype (argument_list (identifier_points) identifier_points )argument_list )call )return_statement )block )function_definition )module
Make a soma object from a set of points Infers the soma type (SomaSinglePoint, SomaSimpleContour) from the points and the 'soma_class' Parameters: points: collection of points forming a soma. soma_check: optional validation function applied to points. Should raise a SomaError if points not valid. soma_class(str): one of 'contour' or 'cylinder' to specify the type Raises: SomaError if no soma points found, points incompatible with soma, or if soma_check(points) fails.
(module (function_definition (function_name_from_jsondict) function_name_from_jsondict (parameters (identifier_cls) identifier_cls (identifier_dict_) identifier_dict_ (default_parameter (identifier_decode_string) identifier_decode_string (attribute (identifier_base64) identifier_base64 (identifier_b64decode) identifier_b64decode )attribute )default_parameter (dictionary_splat_pattern (identifier_additional_args) identifier_additional_args )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_decode) identifier_decode (lambda (lambda_parameters (identifier_k) identifier_k (identifier_x) identifier_x )lambda_parameters (call (attribute (identifier_cls) identifier_cls (identifier__decode_value) identifier__decode_value )attribute (argument_list (identifier_k) identifier_k (identifier_x) identifier_x (identifier_decode_string) identifier_decode_string (dictionary_splat (identifier_additional_args) identifier_additional_args )dictionary_splat )argument_list )call )lambda )assignment )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (identifier_cls) identifier_cls (identifier__restore_args) identifier__restore_args )attribute (argument_list (call (identifier__mapdict_kv) identifier__mapdict_kv (argument_list (identifier_decode) identifier_decode (identifier_dict_) identifier_dict_ )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (call (identifier_cls) identifier_cls (argument_list (dictionary_splat (call (identifier_dict) identifier_dict (argument_list (identifier_kwargs) identifier_kwargs (dictionary_splat (identifier_additional_args) identifier_additional_args )dictionary_splat )argument_list )call )dictionary_splat )argument_list )call )return_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"CLS %s") string_"CLS %s" (identifier_cls) identifier_cls )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"ARG %s") string_"ARG %s" (identifier_dict_) identifier_dict_ )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"KWARG %s") string_"KWARG %s" (identifier_kwargs) identifier_kwargs )binary_operator )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )function_definition )module
r"""Create an instance from a JSON style dict. Instantiate this class with parameters specified by the dict. This method takes the following arguments. .. tabularcolumns:: |l|L| =============== ===================================================== Argument Descrpition =============== ===================================================== dict\_ A dictionary which describes the parameters. For example, {"Param1": 100, "Param2": 200} decode_string (Optional) specify how to decode strings. The default is base64. This argument is used only for attributes which don't have explicit type annotations in _TYPE class attribute. additional_args (Optional) Additional kwargs for constructor. =============== =====================================================
(module (function_definition (function_name_process_args) function_name_process_args (parameters (identifier_mod_id) identifier_mod_id (identifier_args) identifier_args (identifier_type_args) identifier_type_args )parameters (block (expression_statement (assignment (identifier_res) identifier_res (call (identifier_list) identifier_list (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_type_args) identifier_type_args )argument_list )call )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'Too many arguments specified for module "{}" (Got {}, expected ') string_'Too many arguments specified for module "{}" (Got {}, expected ' (string_'{})') string_'{})' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_mod_id) identifier_mod_id (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_type_args) identifier_type_args )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_type_args) identifier_type_args )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_arg_info) identifier_arg_info (subscript (identifier_type_args) identifier_type_args (identifier_i) identifier_i )subscript )assignment )expression_statement (if_statement (comparison_operator (string_"default") string_"default" (identifier_arg_info) identifier_arg_info )comparison_operator (block (expression_statement (call (attribute (identifier_args) identifier_args (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_arg_info) identifier_arg_info (string_"default") string_"default" )subscript )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'Not enough module arguments supplied for module "{}" (Got ') string_'Not enough module arguments supplied for module "{}" (Got ' (string_'{}, expecting {})') string_'{}, expecting {})' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_mod_id) identifier_mod_id (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_type_args) identifier_type_args )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_args) identifier_args )return_statement )block )function_definition )module
Takes as input a list of arguments defined on a module and the information about the required arguments defined on the corresponding module type. Validates that the number of supplied arguments is valid and fills any missing arguments with their default values from the module type
(module (function_definition (function_name_get_one) function_name_get_one (parameters (identifier_self) identifier_self (default_parameter (identifier_cls) identifier_cls (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_case) identifier_case (conditional_expression (call (identifier_cls) identifier_cls (argument_list )argument_list )call (identifier_cls) identifier_cls (call (attribute (identifier_self) identifier_self (identifier__CasesClass) identifier__CasesClass )attribute (argument_list )argument_list )call )conditional_expression )assignment )expression_statement (for_statement (pattern_list (identifier_attr) identifier_attr (identifier_value) identifier_value )pattern_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_case) identifier_case (identifier_attr) identifier_attr (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_case) identifier_case )return_statement )block )function_definition )module
Returns a one case.
(module (function_definition (function_name_open_font) function_name_open_font (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_fid) identifier_fid (call (attribute (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute (identifier_allocate_resource_id) identifier_allocate_resource_id )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ec) identifier_ec (call (attribute (identifier_error) identifier_error (identifier_CatchError) identifier_CatchError )attribute (argument_list (attribute (identifier_error) identifier_error (identifier_BadName) identifier_BadName )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_request) identifier_request (identifier_OpenFont) identifier_OpenFont )attribute (argument_list (keyword_argument (identifier_display) identifier_display (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute )keyword_argument (keyword_argument (identifier_onerror) identifier_onerror (identifier_ec) identifier_ec )keyword_argument (keyword_argument (identifier_fid) identifier_fid (identifier_fid) identifier_fid )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sync) identifier_sync )attribute (argument_list )argument_list )call )expression_statement (if_statement (call (attribute (identifier_ec) identifier_ec (identifier_get_error) identifier_get_error )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute (identifier_free_resource_id) identifier_free_resource_id )attribute (argument_list (identifier_fid) identifier_fid )argument_list )call )expression_statement (return_statement (None) None )return_statement )block (else_clause (block (expression_statement (assignment (identifier_cls) identifier_cls (call (attribute (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute (identifier_get_resource_class) identifier_get_resource_class )attribute (argument_list (string_'font') string_'font' (attribute (identifier_fontable) identifier_fontable (identifier_Font) identifier_Font )attribute )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute (identifier_fid) identifier_fid (keyword_argument (identifier_owner) identifier_owner (integer_1) integer_1 )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Open the font identifed by the pattern name and return its font object. If name does not match any font, None is returned.
(module (function_definition (function_name_kube_cronjob_next_schedule_time) function_name_kube_cronjob_next_schedule_time (parameters (identifier_self) identifier_self (identifier_metric) identifier_metric (identifier_scraper_config) identifier_scraper_config )parameters (block (expression_statement (assignment (identifier_check_basename) identifier_check_basename (binary_operator (subscript (identifier_scraper_config) identifier_scraper_config (string_'namespace') string_'namespace' )subscript (string_'.cronjob.on_schedule_check') string_'.cronjob.on_schedule_check' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_curr_time) identifier_curr_time (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_sample) identifier_sample (attribute (identifier_metric) identifier_metric (identifier_samples) identifier_samples )attribute (block (expression_statement (assignment (identifier_on_schedule) identifier_on_schedule (binary_operator (call (identifier_int) identifier_int (argument_list (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_SAMPLE_VALUE) identifier_SAMPLE_VALUE )attribute )subscript )argument_list )call (identifier_curr_time) identifier_curr_time )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_tags) identifier_tags (list_comprehension (call (attribute (identifier_self) identifier_self (identifier__format_tag) identifier__format_tag )attribute (argument_list (identifier_label_name) identifier_label_name (identifier_label_value) identifier_label_value (identifier_scraper_config) identifier_scraper_config )argument_list )call (for_in_clause (pattern_list (identifier_label_name) identifier_label_name (identifier_label_value) identifier_label_value )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_SAMPLE_LABELS) identifier_SAMPLE_LABELS )attribute )subscript )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (augmented_assignment (identifier_tags) identifier_tags (subscript (identifier_scraper_config) identifier_scraper_config (string_'custom_tags') string_'custom_tags' )subscript )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_on_schedule) identifier_on_schedule (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_"The service check scheduled at {} is {} seconds late") string_"The service check scheduled at {} is {} seconds late" (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_time) identifier_time (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d %H:%M:%S') string_'%Y-%m-%d %H:%M:%S' (call (attribute (identifier_time) identifier_time (identifier_gmtime) identifier_gmtime )attribute (argument_list (call (identifier_int) identifier_int (argument_list (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_SAMPLE_VALUE) identifier_SAMPLE_VALUE )attribute )subscript )argument_list )call )argument_list )call )argument_list )call (identifier_on_schedule) identifier_on_schedule )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_service_check) identifier_service_check )attribute (argument_list (identifier_check_basename) identifier_check_basename (attribute (identifier_self) identifier_self (identifier_CRITICAL) identifier_CRITICAL )attribute (keyword_argument (identifier_tags) identifier_tags (identifier_tags) identifier_tags )keyword_argument (keyword_argument (identifier_message) identifier_message (identifier_message) identifier_message )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_service_check) identifier_service_check )attribute (argument_list (identifier_check_basename) identifier_check_basename (attribute (identifier_self) identifier_self (identifier_OK) identifier_OK )attribute (keyword_argument (identifier_tags) identifier_tags (identifier_tags) identifier_tags )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Time until the next schedule
(module (function_definition (function_name__decode_var) function_name__decode_var (parameters (identifier_cls) identifier_cls (identifier_string) identifier_string )parameters (block (expression_statement (assignment (identifier_str_match) identifier_str_match (call (attribute (attribute (identifier_cls) identifier_cls (identifier_quoted_string_regex) identifier_quoted_string_regex )attribute (identifier_match) identifier_match )attribute (argument_list (identifier_string) identifier_string )argument_list )call )assignment )expression_statement (if_statement (identifier_str_match) identifier_str_match (block (return_statement (call (attribute (identifier_string) identifier_string (identifier_strip) identifier_strip )attribute (argument_list (conditional_expression (string_"'") string_"'" (subscript (call (attribute (identifier_str_match) identifier_str_match (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (string_'"') string_'"' )conditional_expression )argument_list )call )return_statement )block (elif_clause (boolean_operator (call (attribute (identifier_string) identifier_string (identifier_isdigit) identifier_isdigit )attribute (argument_list )argument_list )call (comparison_operator (call (attribute (attribute (identifier_cls) identifier_cls (identifier_is_digit_regex) identifier_is_digit_regex )attribute (identifier_match) identifier_match )attribute (argument_list (identifier_string) identifier_string )argument_list )call (None) None )comparison_operator )boolean_operator (block (return_statement (call (identifier_int) identifier_int (argument_list (identifier_string) identifier_string )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (call (attribute (identifier_string) identifier_string (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (tuple (string_"true") string_"true" (string_"false") string_"false" )tuple )comparison_operator (block (return_statement (comparison_operator (call (attribute (identifier_string) identifier_string (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_"true") string_"true" )comparison_operator )return_statement )block )elif_clause (elif_clause (call (attribute (call (attribute (identifier_string) identifier_string (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_"-") string_"-" )argument_list )call (identifier_isdigit) identifier_isdigit )attribute (argument_list )argument_list )call (block (try_statement (block (return_statement (call (identifier_int) identifier_int (argument_list (identifier_string) identifier_string )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (identifier_string) identifier_string )return_statement )block )except_clause )try_statement )block )elif_clause (elif_clause (comparison_operator (string_".") string_"." (call (attribute (identifier_string) identifier_string (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_"-") string_"-" )argument_list )call )comparison_operator (block (try_statement (block (return_statement (call (identifier_float) identifier_float (argument_list (identifier_string) identifier_string )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (identifier_string) identifier_string )return_statement )block )except_clause )try_statement )block )elif_clause (else_clause (block (return_statement (identifier_string) identifier_string )return_statement )block )else_clause )if_statement )block )function_definition )module
Decodes a given string into the appropriate type in Python. :param str string: The string to decode :return: The decoded value
(module (function_definition (function_name_get_installed_version) function_name_get_installed_version (parameters (identifier_dist_name) identifier_dist_name (default_parameter (identifier_working_set) identifier_working_set (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_req) identifier_req (call (attribute (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_Requirement) identifier_Requirement )attribute (identifier_parse) identifier_parse )attribute (argument_list (identifier_dist_name) identifier_dist_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_working_set) identifier_working_set (None) None )comparison_operator (block (expression_statement (assignment (identifier_working_set) identifier_working_set (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_WorkingSet) identifier_WorkingSet )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_dist) identifier_dist (call (attribute (identifier_working_set) identifier_working_set (identifier_find) identifier_find )attribute (argument_list (identifier_req) identifier_req )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (attribute (identifier_dist) identifier_dist (identifier_version) identifier_version )attribute (identifier_dist) identifier_dist (None) None )conditional_expression )return_statement )block )function_definition )module
Get the installed version of dist_name avoiding pkg_resources cache
(module (function_definition (function_name_is44) function_name_is44 (parameters (identifier_msg) identifier_msg )parameters (block (if_statement (call (identifier_allzeros) identifier_allzeros (argument_list (identifier_msg) identifier_msg )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_d) identifier_d (call (identifier_hex2bin) identifier_hex2bin (argument_list (call (identifier_data) identifier_data (argument_list (identifier_msg) identifier_msg )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (identifier_wrongstatus) identifier_wrongstatus (argument_list (identifier_d) identifier_d (integer_5) integer_5 (integer_6) integer_6 (integer_23) integer_23 )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (if_statement (call (identifier_wrongstatus) identifier_wrongstatus (argument_list (identifier_d) identifier_d (integer_35) integer_35 (integer_36) integer_36 (integer_46) integer_46 )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (if_statement (call (identifier_wrongstatus) identifier_wrongstatus (argument_list (identifier_d) identifier_d (integer_47) integer_47 (integer_48) integer_48 (integer_49) integer_49 )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (if_statement (call (identifier_wrongstatus) identifier_wrongstatus (argument_list (identifier_d) identifier_d (integer_50) integer_50 (integer_51) integer_51 (integer_56) integer_56 )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_bin2int) identifier_bin2int (argument_list (subscript (identifier_d) identifier_d (slice (integer_0) integer_0 (colon) colon (integer_4) integer_4 )slice )subscript )argument_list )call (integer_4) integer_4 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_vw) identifier_vw (call (identifier_wind44) identifier_wind44 (argument_list (identifier_msg) identifier_msg )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_vw) identifier_vw (None) None )comparison_operator (comparison_operator (subscript (identifier_vw) identifier_vw (integer_0) integer_0 )subscript (integer_250) integer_250 )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_temp) identifier_temp (identifier_temp2) identifier_temp2 )pattern_list (call (identifier_temp44) identifier_temp44 (argument_list (identifier_msg) identifier_msg )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (identifier_min) identifier_min (argument_list (identifier_temp) identifier_temp (identifier_temp2) identifier_temp2 )argument_list )call (integer_60) integer_60 )comparison_operator (comparison_operator (call (identifier_max) identifier_max (argument_list (identifier_temp) identifier_temp (identifier_temp2) identifier_temp2 )argument_list )call (unary_operator (integer_80) integer_80 )unary_operator )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Check if a message is likely to be BDS code 4,4. Meteorological routine air report Args: msg (String): 28 bytes hexadecimal message string Returns: bool: True or False
(module (function_definition (function_name_withHeartbeater) function_name_withHeartbeater (parameters (identifier_cls) identifier_cls (identifier_heartbeater) identifier_heartbeater )parameters (block (expression_statement (assignment (identifier_instance) identifier_instance (call (identifier_cls) identifier_cls (argument_list (identifier_heartbeater) identifier_heartbeater )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_heartbeater) identifier_heartbeater (identifier_writeHeartbeat) identifier_writeHeartbeat )attribute (attribute (identifier_instance) identifier_instance (identifier_heartbeat) identifier_heartbeat )attribute )assignment )expression_statement (return_statement (identifier_instance) identifier_instance )return_statement )block )function_definition )module
Connect a SockJSProtocolMachine to its heartbeater.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (default_parameter (identifier_tags) identifier_tags (list )list )default_parameter (default_parameter (identifier_trigger_ids) identifier_trigger_ids (list )list )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_tags) identifier_tags )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'tags') string_'tags' )subscript (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (identifier_tags) identifier_tags )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_trigger_ids) identifier_trigger_ids )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'triggerIds') string_'triggerIds' )subscript (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (identifier_trigger_ids) identifier_trigger_ids )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__service_url) identifier__service_url )attribute (argument_list (string_'triggers') string_'triggers' (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_triggers_dict) identifier_triggers_dict (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_Trigger) identifier_Trigger (identifier_list_to_object_list) identifier_list_to_object_list )attribute (argument_list (identifier_triggers_dict) identifier_triggers_dict )argument_list )call )return_statement )block )function_definition )module
Get triggers with optional filtering. Querying without parameters returns all the trigger definitions. :param tags: Fetch triggers with matching tags only. Use * to match all values. :param trigger_ids: List of triggerIds to fetch
(module (function_definition (function_name_remove_instance) function_name_remove_instance (parameters (identifier_self) identifier_self (identifier_instance) identifier_instance )parameters (block (if_statement (attribute (identifier_instance) identifier_instance (identifier_is_external) identifier_is_external )attribute (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Request external process to stop for %s") string_"Request external process to stop for %s" (attribute (identifier_instance) identifier_instance (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_instance) identifier_instance (identifier_stop_process) identifier_stop_process )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"External process stopped.") string_"External process stopped." )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_instance) identifier_instance (identifier_clear_queues) identifier_clear_queues )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_daemon) identifier_daemon )attribute (identifier_sync_manager) identifier_sync_manager )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_instances) identifier_instances )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_instance) identifier_instance )argument_list )call )expression_statement )block )function_definition )module
Request to cleanly remove the given instance. If instance is external also shutdown it cleanly :param instance: instance to remove :type instance: object :return: None
(module (function_definition (function_name_update_result_ctrl) function_name_update_result_ctrl (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (if_statement (not_operator (identifier_self) identifier_self )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_printLen) identifier_printLen (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_result_ctrl) identifier_result_ctrl )attribute (identifier_SetValue) identifier_SetValue )attribute (argument_list (string_'') string_'' )argument_list )call )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_event) identifier_event (string_'msg') string_'msg' )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_result_ctrl) identifier_result_ctrl )attribute (identifier_AppendText) identifier_AppendText )attribute (argument_list (attribute (identifier_event) identifier_event (identifier_msg) identifier_msg )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_printLen) identifier_printLen (call (identifier_len) identifier_len (argument_list (attribute (identifier_event) identifier_event (identifier_msg) identifier_msg )attribute )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_event) identifier_event (string_'err') string_'err' )argument_list )call (block (expression_statement (assignment (identifier_errLen) identifier_errLen (call (identifier_len) identifier_len (argument_list (attribute (identifier_event) identifier_event (identifier_err) identifier_err )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_errStyle) identifier_errStyle (call (attribute (identifier_wx) identifier_wx (identifier_TextAttr) identifier_TextAttr )attribute (argument_list (attribute (identifier_wx) identifier_wx (identifier_RED) identifier_RED )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_result_ctrl) identifier_result_ctrl )attribute (identifier_AppendText) identifier_AppendText )attribute (argument_list (attribute (identifier_event) identifier_event (identifier_err) identifier_err )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_result_ctrl) identifier_result_ctrl )attribute (identifier_SetStyle) identifier_SetStyle )attribute (argument_list (identifier_printLen) identifier_printLen (binary_operator (identifier_printLen) identifier_printLen (identifier_errLen) identifier_errLen )binary_operator (identifier_errStyle) identifier_errStyle )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_event) identifier_event (string_'err') string_'err' )argument_list )call )not_operator (comparison_operator (attribute (identifier_event) identifier_event (identifier_err) identifier_err )attribute (string_'') string_'' )comparison_operator )boolean_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier__ok_pressed) identifier__ok_pressed )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_Destroy) identifier_Destroy )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__ok_pressed) identifier__ok_pressed )attribute (False) False )assignment )expression_statement )block )function_definition )module
Update event result following execution by main window
(module (function_definition (function_name_to_dataframe) function_name_to_dataframe (parameters (identifier_self) identifier_self (default_parameter (identifier_fieldnames) identifier_fieldnames (tuple )tuple )default_parameter (default_parameter (identifier_verbose) identifier_verbose (True) True )default_parameter (default_parameter (identifier_index) identifier_index (None) None )default_parameter (default_parameter (identifier_coerce_float) identifier_coerce_float (False) False )default_parameter (default_parameter (identifier_datetime_index) identifier_datetime_index (False) False )default_parameter )parameters (block (return_statement (call (identifier_read_frame) identifier_read_frame (argument_list (identifier_self) identifier_self (keyword_argument (identifier_fieldnames) identifier_fieldnames (identifier_fieldnames) identifier_fieldnames )keyword_argument (keyword_argument (identifier_verbose) identifier_verbose (identifier_verbose) identifier_verbose )keyword_argument (keyword_argument (identifier_index_col) identifier_index_col (identifier_index) identifier_index )keyword_argument (keyword_argument (identifier_coerce_float) identifier_coerce_float (identifier_coerce_float) identifier_coerce_float )keyword_argument (keyword_argument (identifier_datetime_index) identifier_datetime_index (identifier_datetime_index) identifier_datetime_index )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns a DataFrame from the queryset Paramaters ----------- fieldnames: The model field names(columns) to utilise in creating the DataFrame. You can span a relationships in the usual Django ORM way by using the foreign key field name separated by double underscores and refer to a field in a related model. index: specify the field to use for the index. If the index field is not in fieldnames it will be appended. This is mandatory for timeseries. verbose: If this is ``True`` then populate the DataFrame with the human readable versions for foreign key fields else use the actual values set in the model coerce_float: Attempt to convert values to non-string, non-numeric objects (like decimal.Decimal) to floating point. datetime_index: specify whether index should be converted to a DateTimeIndex.
(module (function_definition (function_name__new_song) function_name__new_song (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_s) identifier_s (attribute (identifier_self) identifier_self (identifier_song) identifier_song )attribute )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_shuffle) identifier_shuffle )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_song) identifier_song )attribute (subscript (attribute (identifier_self) identifier_self (identifier_shuffles) identifier_shuffles )attribute (call (attribute (identifier_random) identifier_random (identifier_randrange) identifier_randrange )attribute (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_shuffles) identifier_shuffles )attribute )argument_list )call )argument_list )call )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_song) identifier_song )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_song) identifier_song )attribute (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_loop) identifier_loop )attribute )argument_list )call )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_song) identifier_song )attribute (integer_0) integer_0 )assignment )expression_statement )block )if_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_dif_song) identifier_dif_song )attribute (comparison_operator (identifier_s) identifier_s (attribute (identifier_self) identifier_self (identifier_song) identifier_song )attribute )comparison_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (integer_0) integer_0 )assignment )expression_statement )block )function_definition )module
Used internally to get a metasong index.
(module (function_definition (function_name_get_optional) function_name_get_optional (parameters (identifier_self) identifier_self (typed_parameter (identifier_key) identifier_key (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_default) identifier_default (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (identifier_default) identifier_default )argument_list )call )return_statement )block )function_definition )module
Simply get a argument with given key. Deprecated. Use `session.state.get()` instead.
(module (function_definition (function_name_border) function_name_border (parameters (identifier_self) identifier_self (identifier_L) identifier_L )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute (identifier_L_shape) identifier_L_shape )comparison_operator (block (expression_statement (call (attribute (identifier_L) identifier_L (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute )argument_list )call )expression_statement )block (else_clause (block (for_statement (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_sons) identifier_sons )attribute (block (expression_statement (call (attribute (identifier_x) identifier_x (identifier_border) identifier_border )attribute (argument_list (identifier_L) identifier_L )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Append to L the border of the subtree.
(module (function_definition (function_name_stream_request_body) function_name_stream_request_body (parameters (typed_parameter (identifier_cls) identifier_cls (type (generic_type (identifier_Type) identifier_Type (type_parameter (type (identifier_RequestHandler) identifier_RequestHandler )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_Type) identifier_Type (type_parameter (type (identifier_RequestHandler) identifier_RequestHandler )type )type_parameter )generic_type )type (block (if_statement (not_operator (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_cls) identifier_cls (identifier_RequestHandler) identifier_RequestHandler )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"expected subclass of RequestHandler, got %r") string_"expected subclass of RequestHandler, got %r" (identifier_cls) identifier_cls )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__stream_request_body) identifier__stream_request_body )attribute (True) True )assignment )expression_statement (return_statement (identifier_cls) identifier_cls )return_statement )block )function_definition )module
Apply to `RequestHandler` subclasses to enable streaming body support. This decorator implies the following changes: * `.HTTPServerRequest.body` is undefined, and body arguments will not be included in `RequestHandler.get_argument`. * `RequestHandler.prepare` is called when the request headers have been read instead of after the entire body has been read. * The subclass must define a method ``data_received(self, data):``, which will be called zero or more times as data is available. Note that if the request has an empty body, ``data_received`` may not be called. * ``prepare`` and ``data_received`` may return Futures (such as via ``@gen.coroutine``, in which case the next method will not be called until those futures have completed. * The regular HTTP method (``post``, ``put``, etc) will be called after the entire body has been read. See the `file receiver demo <https://github.com/tornadoweb/tornado/tree/master/demos/file_upload/>`_ for example usage.
(module (function_definition (function_name_is_module_reloadable) function_name_is_module_reloadable (parameters (identifier_self) identifier_self (identifier_module) identifier_module (identifier_modname) identifier_modname )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_has_cython) identifier_has_cython )attribute (block (return_statement (False) False )return_statement )block (else_clause (block (if_statement (parenthesized_expression (boolean_operator (call (attribute (identifier_self) identifier_self (identifier_is_module_in_pathlist) identifier_is_module_in_pathlist )attribute (argument_list (identifier_module) identifier_module )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_is_module_in_namelist) identifier_is_module_in_namelist )attribute (argument_list (identifier_modname) identifier_modname )argument_list )call )boolean_operator )parenthesized_expression (block (return_statement (False) False )return_statement )block (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )function_definition )module
Decide if a module is reloadable or not.
(module (function_definition (function_name_add_node_set_configuration) function_name_add_node_set_configuration (parameters (identifier_self) identifier_self (identifier_param_name) identifier_param_name (identifier_node_to_value) identifier_node_to_value )parameters (block (for_statement (pattern_list (identifier_nid) identifier_nid (identifier_val) identifier_val )pattern_list (call (attribute (attribute (identifier_future) identifier_future (identifier_utils) identifier_utils )attribute (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_node_to_value) identifier_node_to_value )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_node_configuration) identifier_add_node_configuration )attribute (argument_list (identifier_param_name) identifier_param_name (identifier_nid) identifier_nid (identifier_val) identifier_val )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Set Nodes parameter :param param_name: parameter identifier (as specified by the chosen model) :param node_to_value: dictionary mapping each node a parameter value
(module (function_definition (function_name_pre_process_data) function_name_pre_process_data (parameters (identifier_filepath) identifier_filepath )parameters (block (expression_statement (assignment (identifier_positive_path) identifier_positive_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_filepath) identifier_filepath (string_'pos') string_'pos' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_negative_path) identifier_negative_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_filepath) identifier_filepath (string_'neg') string_'neg' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pos_label) identifier_pos_label (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (identifier_neg_label) identifier_neg_label (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_dataset) identifier_dataset (list )list )assignment )expression_statement (for_statement (identifier_filename) identifier_filename (call (attribute (identifier_glob) identifier_glob (identifier_glob) identifier_glob )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_positive_path) identifier_positive_path (string_'*.txt') string_'*.txt' )argument_list )call )argument_list )call (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_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_dataset) identifier_dataset (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_pos_label) identifier_pos_label (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )tuple )argument_list )call )expression_statement )block )with_statement )block )for_statement (for_statement (identifier_filename) identifier_filename (call (attribute (identifier_glob) identifier_glob (identifier_glob) identifier_glob )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_negative_path) identifier_negative_path (string_'*.txt') string_'*.txt' )argument_list )call )argument_list )call (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_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_dataset) identifier_dataset (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_neg_label) identifier_neg_label (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )tuple )argument_list )call )expression_statement )block )with_statement )block )for_statement (expression_statement (call (identifier_shuffle) identifier_shuffle (argument_list (identifier_dataset) identifier_dataset )argument_list )call )expression_statement (return_statement (identifier_dataset) identifier_dataset )return_statement )block )function_definition )module
This is dependent on your training data source but we will try to generalize it as best as possible.
(module (function_definition (function_name_models_get) function_name_models_get (parameters (identifier_self) identifier_self (identifier_resource_url) identifier_resource_url )parameters (block (expression_statement (assignment (pattern_list (identifier_obj_dir) identifier_obj_dir (identifier_obj_json) identifier_obj_json (identifier_is_active) identifier_is_active (identifier_cache_id) identifier_cache_id )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_object) identifier_get_object )attribute (argument_list (identifier_resource_url) identifier_resource_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_model) identifier_model (call (identifier_ModelHandle) identifier_ModelHandle (argument_list (identifier_obj_json) identifier_obj_json )argument_list )call )assignment )expression_statement (if_statement (not_operator (comparison_operator (identifier_cache_id) identifier_cache_id (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute )comparison_operator )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_cache_add) identifier_cache_add )attribute (argument_list (identifier_resource_url) identifier_resource_url (identifier_cache_id) identifier_cache_id )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_model) identifier_model )return_statement )block )function_definition )module
Get handle for model resource at given Url. Parameters ---------- resource_url : string Url for subject resource at SCO-API Returns ------- models.ModelHandle Handle for local copy of subject resource
(module (function_definition (function_name_enter_config_value) function_name_enter_config_value (parameters (identifier_self) identifier_self (identifier_key) identifier_key (default_parameter (identifier_default) identifier_default (string_"") string_"" )default_parameter )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_input) identifier_input (argument_list (binary_operator (binary_operator (string_'Please enter a value for ') string_'Please enter a value for ' (identifier_key) identifier_key )binary_operator (string_': ') string_': ' )binary_operator )argument_list )call )assignment )expression_statement (if_statement (identifier_value) identifier_value (block (return_statement (identifier_value) identifier_value )return_statement )block (else_clause (block (return_statement (identifier_default) identifier_default )return_statement )block )else_clause )if_statement )block )function_definition )module
Prompts user for a value
(module (function_definition (function_name__qstr) function_name__qstr (parameters (identifier_self) identifier_self (identifier_question) identifier_question )parameters (block (expression_statement (string_"we need to cope with a list, or a list of lists") string_"we need to cope with a list, or a list of lists" )expression_statement (expression_statement (assignment (identifier_parts) identifier_parts (list )list )assignment )expression_statement (for_statement (identifier_entry) identifier_entry (identifier_question) identifier_question (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_entry) identifier_entry )argument_list )call (identifier_list) identifier_list )comparison_operator (block (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__qstr) identifier__qstr )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'"%s"<%d>') string_'"%s"<%d>' (tuple (call (attribute (attribute (identifier_self) identifier_self (identifier__count_data) identifier__count_data )attribute (identifier_get_candidate_title) identifier_get_candidate_title )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call (identifier_entry) identifier_entry )tuple )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_parts) identifier_parts )argument_list )call )return_statement )block )function_definition )module
we need to cope with a list, or a list of lists
(module (function_definition (function_name_interpoled_resampling) function_name_interpoled_resampling (parameters (identifier_W) identifier_W (identifier_x) identifier_x )parameters (block (expression_statement (assignment (identifier_N) identifier_N (subscript (attribute (identifier_W) identifier_W (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_idx) identifier_idx (call (attribute (identifier_np) identifier_np (identifier_argsort) identifier_argsort )attribute (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_xs) identifier_xs (subscript (identifier_x) identifier_x (identifier_idx) identifier_idx )subscript )assignment )expression_statement (expression_statement (assignment (identifier_ws) identifier_ws (subscript (identifier_W) identifier_W (identifier_idx) identifier_idx )subscript )assignment )expression_statement (expression_statement (assignment (identifier_cs) identifier_cs (call (attribute (identifier_np) identifier_np (identifier_cumsum) identifier_cumsum )attribute (argument_list (call (identifier_avg_n_nplusone) identifier_avg_n_nplusone (argument_list (identifier_ws) identifier_ws )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_u) identifier_u (call (attribute (identifier_random) identifier_random (identifier_rand) identifier_rand )attribute (argument_list (identifier_N) identifier_N )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_xrs) identifier_xrs (call (attribute (identifier_np) identifier_np (identifier_empty) identifier_empty )attribute (argument_list (identifier_N) identifier_N )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_where) identifier_where (call (attribute (identifier_np) identifier_np (identifier_searchsorted) identifier_searchsorted )attribute (argument_list (identifier_cs) identifier_cs (identifier_u) identifier_u )argument_list )call )assignment )expression_statement (for_statement (identifier_n) identifier_n (call (identifier_range) identifier_range (argument_list (identifier_N) identifier_N )argument_list )call (block (expression_statement (assignment (identifier_m) identifier_m (subscript (identifier_where) identifier_where (identifier_n) identifier_n )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_m) identifier_m (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (subscript (identifier_xrs) identifier_xrs (identifier_n) identifier_n )subscript (subscript (identifier_xs) identifier_xs (integer_0) integer_0 )subscript )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_m) identifier_m (identifier_N) identifier_N )comparison_operator (block (expression_statement (assignment (subscript (identifier_xrs) identifier_xrs (identifier_n) identifier_n )subscript (subscript (identifier_xs) identifier_xs (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (subscript (identifier_xrs) identifier_xrs (identifier_n) identifier_n )subscript (call (identifier_interpol) identifier_interpol (argument_list (subscript (identifier_cs) identifier_cs (binary_operator (identifier_m) identifier_m (integer_1) integer_1 )binary_operator )subscript (subscript (identifier_cs) identifier_cs (identifier_m) identifier_m )subscript (subscript (identifier_xs) identifier_xs (binary_operator (identifier_m) identifier_m (integer_1) integer_1 )binary_operator )subscript (subscript (identifier_xs) identifier_xs (identifier_m) identifier_m )subscript (subscript (identifier_u) identifier_u (identifier_n) identifier_n )subscript )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_xrs) identifier_xrs )return_statement )block )function_definition )module
Resampling based on an interpolated CDF, as described in Malik and Pitt. Parameters ---------- W: (N,) array weights x: (N,) array particles Returns ------- xrs: (N,) array the resampled particles
(module (function_definition (function_name_interaction_method) function_name_interaction_method (parameters (identifier_self) identifier_self (identifier_kind) identifier_kind (identifier_x) identifier_x )parameters (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_code) identifier_code )attribute (identifier_ERR_INTERACTION_REQUIRED) identifier_ERR_INTERACTION_REQUIRED )comparison_operator )boolean_operator (block (raise_statement (call (identifier_InteractionError) identifier_InteractionError (argument_list (call (attribute (string_'not an interaction-required error (code {})') string_'not an interaction-required error (code {})' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_code) identifier_code )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_entry) identifier_entry (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (identifier_interaction_methods) identifier_interaction_methods )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_kind) identifier_kind )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_entry) identifier_entry (None) None )comparison_operator (block (raise_statement (call (identifier_InteractionMethodNotFound) identifier_InteractionMethodNotFound (argument_list (call (attribute (string_'interaction method {} not found') string_'interaction method {} not found' (identifier_format) identifier_format )attribute (argument_list (identifier_kind) identifier_kind )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_x) identifier_x (identifier_from_dict) identifier_from_dict )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )return_statement )block )function_definition )module
Checks whether the error is an InteractionRequired error that implements the method with the given name, and JSON-unmarshals the method-specific data into x by calling its from_dict method with the deserialized JSON object. @param kind The interaction method kind (string). @param x A class with a class method from_dict that returns a new instance of the interaction info for the given kind. @return The result of x.from_dict.
(module (function_definition (function_name_convert_unit) function_name_convert_unit (parameters (identifier_value) identifier_value (identifier_unit) identifier_unit (identifier_to) identifier_to )parameters (block (if_statement (comparison_operator (identifier_unit) identifier_unit (identifier_to) identifier_to )comparison_operator (block (return_statement (identifier_value) identifier_value )return_statement )block )if_statement (expression_statement (assignment (identifier_units) identifier_units (tuple (string_'W') string_'W' (string_'D') string_'D' (string_'h') string_'h' (string_'m') string_'m' (string_'s') string_'s' (string_'ms') string_'ms' (string_'us') string_'us' (string_'ns') string_'ns' )tuple )assignment )expression_statement (expression_statement (assignment (identifier_factors) identifier_factors (tuple (integer_7) integer_7 (integer_24) integer_24 (integer_60) integer_60 (integer_60) integer_60 (integer_1000) integer_1000 (integer_1000) integer_1000 (integer_1000) integer_1000 )tuple )assignment )expression_statement (expression_statement (assignment (identifier_monthly_units) identifier_monthly_units (tuple (string_'Y') string_'Y' (string_'Q') string_'Q' (string_'M') string_'M' )tuple )assignment )expression_statement (expression_statement (assignment (identifier_monthly_factors) identifier_monthly_factors (tuple (integer_4) integer_4 (integer_3) integer_3 )tuple )assignment )expression_statement (try_statement (block (expression_statement (assignment (pattern_list (identifier_i) identifier_i (identifier_j) identifier_j )pattern_list (expression_list (call (attribute (identifier_units) identifier_units (identifier_index) identifier_index )attribute (argument_list (identifier_unit) identifier_unit )argument_list )call (call (attribute (identifier_units) identifier_units (identifier_index) identifier_index )attribute (argument_list (identifier_to) identifier_to )argument_list )call )expression_list )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_i) identifier_i (identifier_j) identifier_j )pattern_list (expression_list (call (attribute (identifier_monthly_units) identifier_monthly_units (identifier_index) identifier_index )attribute (argument_list (identifier_unit) identifier_unit )argument_list )call (call (attribute (identifier_monthly_units) identifier_monthly_units (identifier_index) identifier_index )attribute (argument_list (identifier_to) identifier_to )argument_list )call )expression_list )assignment )expression_statement (expression_statement (assignment (identifier_factors) identifier_factors (identifier_monthly_factors) identifier_monthly_factors )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Cannot convert to or from variable length interval') string_'Cannot convert to or from variable length interval' )argument_list )call )raise_statement )block )except_clause )try_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_factor) identifier_factor (call (attribute (identifier_functools) identifier_functools (identifier_reduce) identifier_reduce )attribute (argument_list (attribute (identifier_operator) identifier_operator (identifier_mul) identifier_mul )attribute (subscript (identifier_factors) identifier_factors (slice (call (identifier_min) identifier_min (argument_list (identifier_i) identifier_i (identifier_j) identifier_j )argument_list )call (colon) colon (call (identifier_max) identifier_max (argument_list (identifier_i) identifier_i (identifier_j) identifier_j )argument_list )call )slice )subscript (integer_1) integer_1 )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (identifier_factor) identifier_factor (integer_1) integer_1 )comparison_operator )assert_statement (if_statement (comparison_operator (identifier_i) identifier_i (identifier_j) identifier_j )comparison_operator (block (return_statement (binary_operator (identifier_value) identifier_value (identifier_factor) identifier_factor )binary_operator )return_statement )block )if_statement (assert_statement (comparison_operator (identifier_i) identifier_i (identifier_j) identifier_j )comparison_operator )assert_statement (return_statement (binary_operator (identifier_value) identifier_value (identifier_factor) identifier_factor )binary_operator )return_statement )block )function_definition )module
Convert `value`, is assumed to be in units of `unit`, to units of `to`. Parameters ---------- value : Union[numbers.Real, ibis.expr.types.NumericValue] Returns ------- Union[numbers.Integral, ibis.expr.types.NumericValue] Examples -------- >>> one_second = 1000 >>> x = convert_unit(one_second, 'ms', 's') >>> x 1 >>> one_second = 1 >>> x = convert_unit(one_second, 's', 'ms') >>> x 1000 >>> x = convert_unit(one_second, 's', 's') >>> x 1 >>> x = convert_unit(one_second, 's', 'M') Traceback (most recent call last): ... ValueError: Cannot convert to or from variable length interval
(module (function_definition (function_name_get_commands_aliases_and_macros_for_completion) function_name_get_commands_aliases_and_macros_for_completion (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_visible_commands) identifier_visible_commands (call (identifier_set) identifier_set (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_visible_commands) identifier_get_visible_commands )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_alias_names) identifier_alias_names (call (identifier_set) identifier_set (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_alias_names) identifier_get_alias_names )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_macro_names) identifier_macro_names (call (identifier_set) identifier_set (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_macro_names) identifier_get_macro_names )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (identifier_list) identifier_list (argument_list (binary_operator (binary_operator (identifier_visible_commands) identifier_visible_commands (identifier_alias_names) identifier_alias_names )binary_operator (identifier_macro_names) identifier_macro_names )binary_operator )argument_list )call )return_statement )block )function_definition )module
Return a list of visible commands, aliases, and macros for tab completion
(module (function_definition (function_name_endless_permutations) function_name_endless_permutations (parameters (identifier_N) identifier_N (default_parameter (identifier_random_state) identifier_random_state (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_generator) identifier_generator (call (identifier_check_random_state) identifier_check_random_state (argument_list (identifier_random_state) identifier_random_state )argument_list )call )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_batch_inds) identifier_batch_inds (call (attribute (identifier_generator) identifier_generator (identifier_permutation) identifier_permutation )attribute (argument_list (identifier_N) identifier_N )argument_list )call )assignment )expression_statement (for_statement (identifier_b) identifier_b (identifier_batch_inds) identifier_batch_inds (block (expression_statement (yield (identifier_b) identifier_b )yield )expression_statement )block )for_statement )block )while_statement )block )function_definition )module
Generate an endless sequence of random integers from permutations of the set [0, ..., N). If we call this N times, we will sweep through the entire set without replacement, on the (N+1)th call a new permutation will be created, etc. Parameters ---------- N: int the length of the set random_state: int or RandomState, optional random seed Yields ------ int: a random int from the set [0, ..., N)
(module (function_definition (function_name_binormal_curve_single_list) function_name_binormal_curve_single_list (parameters (identifier_obj) identifier_obj (identifier_param_list) identifier_param_list (identifier_normalize) identifier_normalize )parameters (block (expression_statement (assignment (identifier_ret_vector) identifier_ret_vector (list )list )assignment )expression_statement (for_statement (identifier_param) identifier_param (identifier_param_list) identifier_param_list (block (expression_statement (assignment (identifier_temp) identifier_temp (call (identifier_binormal_curve_single) identifier_binormal_curve_single (argument_list (identifier_obj) identifier_obj (identifier_param) identifier_param (identifier_normalize) identifier_normalize )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ret_vector) identifier_ret_vector (identifier_append) identifier_append )attribute (argument_list (identifier_temp) identifier_temp )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list (identifier_ret_vector) identifier_ret_vector )argument_list )call )return_statement )block )function_definition )module
Evaluates the curve binormal vectors at the given list of parameter values. :param obj: input curve :type obj: abstract.Curve :param param_list: parameter list :type param_list: list or tuple :param normalize: if True, the returned vector is converted to a unit vector :type normalize: bool :return: a list containing "point" and "vector" pairs :rtype: tuple
(module (function_definition (function_name_get_rss_feed_content) function_name_get_rss_feed_content (parameters (identifier_url) identifier_url (default_parameter (identifier_offset) identifier_offset (integer_0) integer_0 )default_parameter (default_parameter (identifier_limit) identifier_limit (None) None )default_parameter (default_parameter (identifier_exclude_items_in) identifier_exclude_items_in (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_end) identifier_end (conditional_expression (binary_operator (identifier_limit) identifier_limit (identifier_offset) identifier_offset )binary_operator (comparison_operator (identifier_limit) identifier_limit (None) None )comparison_operator (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (identifier__get) identifier__get (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_feed_data) identifier_feed_data (call (attribute (identifier_feedparser) identifier_feedparser (identifier_parse) identifier_parse )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_text) identifier_text )attribute )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_feed_data) identifier_feed_data (identifier_feed) identifier_feed )attribute )not_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (string_'No valid feed data found at {}') string_'No valid feed data found at {}' (identifier_format) identifier_format )attribute (argument_list (identifier_url) identifier_url )argument_list )call )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_content) identifier_content (attribute (identifier_feed_data) identifier_feed_data (identifier_entries) identifier_entries )attribute )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_parse_error) identifier_parse_error )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (string_'Failed to parse feed from {}: {}') string_'Failed to parse feed from {}: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_url) identifier_url (call (identifier_str) identifier_str (argument_list (identifier_parse_error) identifier_parse_error )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )except_clause )try_statement (if_statement (identifier_exclude_items_in) identifier_exclude_items_in (block (expression_statement (assignment (identifier_exclude_ids) identifier_exclude_ids (list_comprehension (subscript (identifier_item) identifier_item (string_'guid') string_'guid' )subscript (for_in_clause (identifier_item) identifier_item (identifier_exclude_items_in) identifier_exclude_items_in )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (list_comprehension (identifier_item) identifier_item (for_in_clause (identifier_item) identifier_item (identifier_content) identifier_content )for_in_clause (if_clause (comparison_operator (subscript (identifier_item) identifier_item (string_'guid') string_'guid' )subscript (identifier_exclude_ids) identifier_exclude_ids )comparison_operator )if_clause )list_comprehension )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_content) identifier_content (subscript (identifier_content) identifier_content (slice (identifier_offset) identifier_offset (colon) colon (identifier_end) identifier_end )slice )subscript )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_content) identifier_content (block (expression_statement (assignment (identifier_updated_time) identifier_updated_time (call (attribute (identifier_time) identifier_time (identifier_mktime) identifier_mktime )attribute (argument_list (subscript (identifier_item) identifier_item (string_'updated_parsed') string_'updated_parsed' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_item) identifier_item (string_'updated_datetime') string_'updated_datetime' )subscript (call (attribute (identifier_datetime) identifier_datetime (identifier_fromtimestamp) identifier_fromtimestamp )attribute (argument_list (identifier_updated_time) identifier_updated_time )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_content) identifier_content )return_statement )block )function_definition )module
Get the entries from an RSS feed
(module (function_definition (function_name_align_add) function_name_align_add (parameters (identifier_tree) identifier_tree (identifier_key) identifier_key (identifier_item) identifier_item (default_parameter (identifier_align_thres) identifier_align_thres (float_2.0) float_2.0 )default_parameter )parameters (block (for_statement (pattern_list (identifier_near_key) identifier_near_key (identifier_near_list) identifier_near_list )pattern_list (call (identifier_get_near_items) identifier_get_near_items (argument_list (identifier_tree) identifier_tree (identifier_key) identifier_key )argument_list )call (block (if_statement (comparison_operator (call (identifier_abs) identifier_abs (argument_list (binary_operator (identifier_key) identifier_key (identifier_near_key) identifier_near_key )binary_operator )argument_list )call (identifier_align_thres) identifier_align_thres )comparison_operator (block (expression_statement (call (attribute (identifier_near_list) identifier_near_list (identifier_append) identifier_append )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_tree) identifier_tree (identifier_key) identifier_key )subscript (list (identifier_item) identifier_item )list )assignment )expression_statement )block )function_definition )module
Adding the item object to a binary tree with the given key while allow for small key differences close_enough_func that checks if two keys are within threshold
(module (function_definition (function_name_get_sql_insert) function_name_get_sql_insert (parameters (typed_parameter (identifier_table) identifier_table (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_fieldlist) identifier_fieldlist (type (generic_type (identifier_Sequence) identifier_Sequence (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter (typed_default_parameter (identifier_delims) identifier_delims (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_str) identifier_str )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (tuple (string_"") string_"" (string_"") string_"" )tuple )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (return_statement (parenthesized_expression (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_"INSERT INTO ") string_"INSERT INTO " (call (identifier_delimit) identifier_delimit (argument_list (identifier_table) identifier_table (identifier_delims) identifier_delims )argument_list )call )binary_operator (string_" (") string_" (" )binary_operator (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (identifier_delimit) identifier_delimit (argument_list (identifier_x) identifier_x (identifier_delims) identifier_delims )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_fieldlist) identifier_fieldlist )for_in_clause )list_comprehension )argument_list )call )binary_operator (string_") VALUES (") string_") VALUES (" )binary_operator (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (binary_operator (list (string_"?") string_"?" )list (call (identifier_len) identifier_len (argument_list (identifier_fieldlist) identifier_fieldlist )argument_list )call )binary_operator )argument_list )call )binary_operator (string_")") string_")" )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
Returns ?-marked SQL for an INSERT statement.
(module (function_definition (function_name_register_resource) function_name_register_resource (parameters (identifier_mod) identifier_mod (identifier_view) identifier_view (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_resource_name) identifier_resource_name (subscript (call (attribute (attribute (identifier_view) identifier_view (identifier___name__) identifier___name__ )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (slice (colon) colon (unary_operator (integer_8) integer_8 )unary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_endpoint) identifier_endpoint (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'endpoint') string_'endpoint' (call (attribute (string_"{}_api") string_"{}_api" (identifier_format) identifier_format )attribute (argument_list (identifier_resource_name) identifier_resource_name )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_plural_resource_name) identifier_plural_resource_name (call (attribute (call (attribute (identifier_inflect) identifier_inflect (identifier_engine) identifier_engine )attribute (argument_list )argument_list )call (identifier_plural) identifier_plural )attribute (argument_list (identifier_resource_name) identifier_resource_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'url') string_'url' (identifier_plural_resource_name) identifier_plural_resource_name )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_'/{}') string_'/{}' (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_view) identifier_view (string_'_url') string_'_url' (identifier_url) identifier_url )argument_list )call )expression_statement (expression_statement (assignment (identifier_view_func) identifier_view_func (call (attribute (identifier_view) identifier_view (identifier_as_view) identifier_as_view )attribute (argument_list (identifier_endpoint) identifier_endpoint )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_mod) identifier_mod (identifier_add_url_rule) identifier_add_url_rule )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_view_func) identifier_view_func (identifier_view_func) identifier_view_func )keyword_argument (keyword_argument (identifier_methods) identifier_methods (list (string_'GET') string_'GET' (string_'POST') string_'POST' (string_'OPTIONS') string_'OPTIONS' )list )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_mod) identifier_mod (identifier_add_url_rule) identifier_add_url_rule )attribute (argument_list (call (attribute (string_'{}/<obj_id>') string_'{}/<obj_id>' (identifier_format) identifier_format )attribute (argument_list (identifier_url) identifier_url )argument_list )call (keyword_argument (identifier_view_func) identifier_view_func (identifier_view_func) identifier_view_func )keyword_argument (keyword_argument (identifier_methods) identifier_methods (list (string_'GET') string_'GET' (string_'PATCH') string_'PATCH' (string_'PUT') string_'PUT' (string_'DELETE') string_'DELETE' (string_'OPTIONS') string_'OPTIONS' )list )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Register the resource on the resource name or a custom url
(module (function_definition (function_name_setImgShape) function_name_setImgShape (parameters (identifier_self) identifier_self (identifier_shape) identifier_shape )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_img) identifier_img )attribute (call (identifier_type) identifier_type (argument_list (string_'Dummy') string_'Dummy' (tuple (identifier_object) identifier_object )tuple (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_img) identifier_img )attribute (identifier_shape) identifier_shape )attribute (identifier_shape) identifier_shape )assignment )expression_statement )block )function_definition )module
image shape must be known for calculating camera matrix if method==Manual and addPoints is used instead of addImg this method must be called before .coeffs are obtained
(module (function_definition (function_name_getch) function_name_getch (parameters (identifier_self) identifier_self )parameters (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_string) identifier_string )attribute (slice (binary_operator (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (integer_1) integer_1 )binary_operator (colon) colon (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute )slice )subscript )return_statement )block )function_definition )module
Get a single character and advance the scan pointer. >>> s = Scanner("abc") >>> s.getch() 'a' >>> s.getch() 'b' >>> s.getch() 'c' >>> s.pos 3
(module (function_definition (function_name_create_month_selectbox) function_name_create_month_selectbox (parameters (identifier_name) identifier_name (default_parameter (identifier_selected_month) identifier_selected_month (integer_0) integer_0 )default_parameter (default_parameter (identifier_ln) identifier_ln (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ln) identifier_ln (call (identifier_default_ln) identifier_default_ln (argument_list (identifier_ln) identifier_ln )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (binary_operator (string_"<select name=\"%s\">\n") string_"<select name=\"%s\">\n" (identifier_name) identifier_name )binary_operator )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (integer_13) integer_13 )argument_list )call (block (expression_statement (augmented_assignment (identifier_out) identifier_out (binary_operator (string_"<option value=\"%i\"") string_"<option value=\"%i\"" (identifier_i) identifier_i )binary_operator )augmented_assignment )expression_statement (if_statement (parenthesized_expression (comparison_operator (identifier_i) identifier_i (identifier_selected_month) identifier_selected_month )comparison_operator )parenthesized_expression (block (expression_statement (augmented_assignment (identifier_out) identifier_out (string_" selected=\"selected\"") string_" selected=\"selected\"" )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_out) identifier_out (binary_operator (string_">%s</option>\n") string_">%s</option>\n" (call (identifier_get_i18n_month_name) identifier_get_i18n_month_name (argument_list (identifier_i) identifier_i (identifier_ln) identifier_ln )argument_list )call )binary_operator )augmented_assignment )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_out) identifier_out (string_"</select>\n") string_"</select>\n" )augmented_assignment )expression_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Creates an HTML menu for month selection. Value of selected field is numeric. @param name: name of the control, your form will be sent with name=value... @param selected_month: preselect a month. use 0 for the Label 'Month' @param ln: language of the menu @return: html as string
(module (function_definition (function_name_build_truncated_gr_mfd) function_name_build_truncated_gr_mfd (parameters (identifier_mfd) identifier_mfd )parameters (block (return_statement (call (identifier_Node) identifier_Node (argument_list (string_"truncGutenbergRichterMFD") string_"truncGutenbergRichterMFD" (dictionary (pair (string_"aValue") string_"aValue" (attribute (identifier_mfd) identifier_mfd (identifier_a_val) identifier_a_val )attribute )pair (pair (string_"bValue") string_"bValue" (attribute (identifier_mfd) identifier_mfd (identifier_b_val) identifier_b_val )attribute )pair (pair (string_"minMag") string_"minMag" (attribute (identifier_mfd) identifier_mfd (identifier_min_mag) identifier_min_mag )attribute )pair (pair (string_"maxMag") string_"maxMag" (attribute (identifier_mfd) identifier_mfd (identifier_max_mag) identifier_max_mag )attribute )pair )dictionary )argument_list )call )return_statement )block )function_definition )module
Parses the truncated Gutenberg Richter MFD as a Node :param mfd: MFD as instance of :class: `openquake.hazardlib.mfd.truncated_gr.TruncatedGRMFD` :returns: Instance of :class:`openquake.baselib.node.Node`
(module (function_definition (function_name__reads_in_peaks) function_name__reads_in_peaks (parameters (identifier_bam_file) identifier_bam_file (identifier_peaks_file) identifier_peaks_file (identifier_sample) identifier_sample )parameters (block (if_statement (not_operator (identifier_peaks_file) identifier_peaks_file )not_operator (block (return_statement (dictionary )dictionary )return_statement )block )if_statement (expression_statement (assignment (identifier_rip) identifier_rip (call (identifier_number_of_mapped_reads) identifier_number_of_mapped_reads (argument_list (identifier_sample) identifier_sample (identifier_bam_file) identifier_bam_file (keyword_argument (identifier_bed_file) identifier_bed_file (identifier_peaks_file) identifier_peaks_file )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_"metrics") string_"metrics" (dictionary (pair (string_"RiP") string_"RiP" (identifier_rip) identifier_rip )pair )dictionary )pair )dictionary )return_statement )block )function_definition )module
Calculate number of reads in peaks
(module (function_definition (function_name_create_terms_index) function_name_create_terms_index (parameters (identifier_es) identifier_es (typed_parameter (identifier_index_name) identifier_index_name (type (identifier_str) identifier_str )type )typed_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_mappings_terms_fn) identifier_mappings_terms_fn (string_"r") string_"r" )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_mappings_terms) identifier_mappings_terms (call (attribute (identifier_yaml) identifier_yaml (identifier_load) identifier_load )attribute (argument_list (identifier_f) identifier_f (keyword_argument (identifier_Loader) identifier_Loader (attribute (identifier_yaml) identifier_yaml (identifier_SafeLoader) identifier_SafeLoader )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )with_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_es) identifier_es (identifier_indices) identifier_indices )attribute (identifier_create) identifier_create )attribute (argument_list (keyword_argument (identifier_index) identifier_index (identifier_index_name) identifier_index_name )keyword_argument (keyword_argument (identifier_body) identifier_body (identifier_mappings_terms) identifier_mappings_terms )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_f"Could not create elasticsearch terms index: {e}") string_f"Could not create elasticsearch terms index: {e}" )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Create terms index
(module (function_definition (function_name__pycall_path_simple) function_name__pycall_path_simple (parameters (typed_parameter (identifier_x1) identifier_x1 (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_y1) identifier_y1 (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_x2) identifier_x2 (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_y2) identifier_y2 (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_handle) identifier_handle (type (identifier_Any) identifier_Any )type )typed_parameter )parameters (type (identifier_float) identifier_float )type (block (return_statement (call (call (attribute (identifier_ffi) identifier_ffi (identifier_from_handle) identifier_from_handle )attribute (argument_list (identifier_handle) identifier_handle )argument_list )call (argument_list (identifier_x1) identifier_x1 (identifier_y1) identifier_y1 (identifier_x2) identifier_x2 (identifier_y2) identifier_y2 )argument_list )call )return_statement )block )function_definition )module
Does less and should run faster, just calls the handle function.
(module (function_definition (function_name_migrate_secret_key) function_name_migrate_secret_key (parameters (identifier_old_key) identifier_old_key )parameters (block (if_statement (boolean_operator (comparison_operator (string_'SECRET_KEY') string_'SECRET_KEY' (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (subscript (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (string_'SECRET_KEY') string_'SECRET_KEY' )subscript (None) None )comparison_operator )boolean_operator (block (raise_statement (call (attribute (identifier_click) identifier_click (identifier_ClickException) identifier_ClickException )attribute (argument_list (string_'SECRET_KEY is not set in the configuration.') string_'SECRET_KEY is not set in the configuration.' )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_ep) identifier_ep (call (identifier_iter_entry_points) identifier_iter_entry_points (argument_list (string_'invenio_base.secret_key') string_'invenio_base.secret_key' )argument_list )call (block (try_statement (block (expression_statement (call (call (attribute (identifier_ep) identifier_ep (identifier_load) identifier_load )attribute (argument_list )argument_list )call (argument_list (keyword_argument (identifier_old_key) identifier_old_key (identifier_old_key) identifier_old_key )keyword_argument )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (attribute (identifier_current_app) identifier_current_app (identifier_logger) identifier_logger )attribute (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_'Failed to initialize entry point: {0}') string_'Failed to initialize entry point: {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_ep) identifier_ep )argument_list )call )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )for_statement (expression_statement (call (attribute (identifier_click) identifier_click (identifier_secho) identifier_secho )attribute (argument_list (string_'Successfully changed secret key.') string_'Successfully changed secret key.' (keyword_argument (identifier_fg) identifier_fg (string_'green') string_'green' )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Call entry points exposed for the SECRET_KEY change.
(module (function_definition (function_name_process) function_name_process (parameters (identifier_self) identifier_self (default_parameter (identifier_model) identifier_model (None) None )default_parameter (default_parameter (identifier_context) identifier_context (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_filter) identifier_filter )attribute (argument_list (identifier_model) identifier_model (identifier_context) identifier_context )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_validate) identifier_validate )attribute (argument_list (identifier_model) identifier_model (identifier_context) identifier_context )argument_list )call )return_statement )block )function_definition )module
Perform validation and filtering at the same time, return a validation result object. :param model: object or dict :param context: object, dict or None :return: shiftschema.result.Result
(module (function_definition (function_name_newer) function_name_newer (parameters (identifier_self) identifier_self (identifier_source) identifier_source (identifier_target) identifier_target )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_source) identifier_source )argument_list )call )not_operator (block (raise_statement (call (identifier_DistlibException) identifier_DistlibException (argument_list (binary_operator (string_"file '%r' does not exist") string_"file '%r' does not exist" (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_source) identifier_source )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_target) identifier_target )argument_list )call )not_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (comparison_operator (attribute (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_source) identifier_source )argument_list )call (identifier_st_mtime) identifier_st_mtime )attribute (attribute (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_target) identifier_target )argument_list )call (identifier_st_mtime) identifier_st_mtime )attribute )comparison_operator )return_statement )block )function_definition )module
Tell if the target is newer than the source. Returns true if 'source' exists and is more recently modified than 'target', or if 'source' exists and 'target' doesn't. Returns false if both exist and 'target' is the same age or younger than 'source'. Raise PackagingFileError if 'source' does not exist. Note that this test is not very accurate: files created in the same second will have the same "age".
(module (function_definition (function_name_add_menu) function_name_add_menu (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_link) identifier_link (None) None )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_menu_began) identifier_menu_began )attribute (block (if_statement (attribute (identifier_self) identifier_self (identifier_menu_separator_tag) identifier_menu_separator_tag )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_menu_separator_tag) identifier_menu_separator_tag )attribute )argument_list )call )expression_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (string_'<ul class="horizontal">') string_'<ul class="horizontal">' )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_menu_began) identifier_menu_began )attribute (True) True )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (string_'<li>') string_'<li>' )argument_list )call )expression_statement (if_statement (identifier_link) identifier_link (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (string_'<a href="{}">') string_'<a href="{}">' (call (attribute (identifier_self) identifier_self (identifier__rel) identifier__rel )attribute (argument_list (identifier_link) identifier_link )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement (if_statement (identifier_link) identifier_link (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (string_'</a>') string_'</a>' )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (string_'</li>') string_'</li>' )argument_list )call )expression_statement )block )function_definition )module
Adds a menu entry, will create it if it doesn't exist yet
(module (function_definition (function_name_end_stream) function_name_end_stream (parameters (identifier_self) identifier_self (identifier_stream_id) identifier_stream_id )parameters (block (with_statement (with_clause (with_item (parenthesized_expression (yield (attribute (call (attribute (identifier_self) identifier_self (identifier__get_stream) identifier__get_stream )attribute (argument_list (identifier_stream_id) identifier_stream_id )argument_list )call (identifier_wlock) identifier_wlock )attribute )yield )parenthesized_expression )with_item )with_clause (block (expression_statement (yield (call (attribute (attribute (identifier_self) identifier_self (identifier__resumed) identifier__resumed )attribute (identifier_wait) identifier_wait )attribute (argument_list )argument_list )call )yield )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__conn) identifier__conn )attribute (identifier_end_stream) identifier_end_stream )attribute (argument_list (identifier_stream_id) identifier_stream_id )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__flush) identifier__flush )attribute (argument_list )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Close the given stream locally. This may block until the underlying transport becomes writable, or other coroutines release the wlock on this stream. :param stream_id: Which stream to close.
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_self) identifier_self (identifier_session_id) identifier_session_id )parameters (block (expression_statement (assignment (identifier_session) identifier_session (call (attribute (attribute (identifier_self) identifier_self (identifier__items) identifier__items )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_session_id) identifier_session_id (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_session) identifier_session (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_session) identifier_session (identifier_promoted) identifier_promoted )attribute (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_on_delete) identifier_on_delete )attribute (argument_list (True) True )argument_list )call )expression_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__items) identifier__items )attribute (identifier_session_id) identifier_session_id )subscript )delete_statement (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Remove session object from the container `session_id` Session identifier
(module (function_definition (function_name_table) function_name_table (parameters (identifier_schema) identifier_schema (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_schema) identifier_schema (identifier_Schema) identifier_Schema )argument_list )call )not_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_schema) identifier_schema (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (identifier_schema) identifier_schema (call (attribute (identifier_Schema) identifier_Schema (identifier_from_dict) identifier_from_dict )attribute (argument_list (identifier_schema) identifier_schema )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_schema) identifier_schema (call (attribute (identifier_Schema) identifier_Schema (identifier_from_tuples) identifier_from_tuples )attribute (argument_list (identifier_schema) identifier_schema )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (expression_statement (assignment (identifier_node) identifier_node (call (attribute (identifier_ops) identifier_ops (identifier_UnboundTable) identifier_UnboundTable )attribute (argument_list (identifier_schema) identifier_schema (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_node) identifier_node (identifier_to_expr) identifier_to_expr )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Create an unbound Ibis table for creating expressions. Cannot be executed without being bound to some physical table. Useful for testing Parameters ---------- schema : ibis Schema name : string, default None Name for table Returns ------- table : TableExpr
(module (function_definition (function_name_entity_types) function_name_entity_types (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_fapi) identifier_fapi (identifier_get_entity_types) identifier_get_entity_types )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_namespace) identifier_namespace )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier_api_url) identifier_api_url )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fapi) identifier_fapi (identifier__check_response_code) identifier__check_response_code )attribute (argument_list (identifier_r) identifier_r (integer_200) integer_200 )argument_list )call )expression_statement (return_statement (call (attribute (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
List entity types in workspace.
(module (function_definition (function_name__sysv_enable) function_name__sysv_enable (parameters (identifier_name) identifier_name )parameters (block (if_statement (boolean_operator (not_operator (call (identifier__service_is_chkconfig) identifier__service_is_chkconfig (argument_list (identifier_name) identifier_name )argument_list )call )not_operator (not_operator (call (identifier__chkconfig_add) identifier__chkconfig_add (argument_list (identifier_name) identifier_name )argument_list )call )not_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (string_'/sbin/chkconfig {0} on') string_'/sbin/chkconfig {0} on' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (return_statement (not_operator (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.retcode') string_'cmd.retcode' )subscript (argument_list (identifier_cmd) identifier_cmd (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )not_operator )return_statement )block )function_definition )module
Enable the named sysv service to start at boot. The service will be enabled using chkconfig with default run-levels if the service is chkconfig compatible. If chkconfig is not available, then this will fail.
(module (function_definition (function_name__init_qualifier_decl) function_name__init_qualifier_decl (parameters (identifier_qualifier_decl) identifier_qualifier_decl (identifier_qual_repo) identifier_qual_repo )parameters (block (assert_statement (comparison_operator (attribute (identifier_qualifier_decl) identifier_qualifier_decl (identifier_name) identifier_name )attribute (identifier_qual_repo) identifier_qual_repo )comparison_operator )assert_statement (if_statement (comparison_operator (attribute (identifier_qualifier_decl) identifier_qualifier_decl (identifier_tosubclass) identifier_tosubclass )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_qualifier_decl) identifier_qualifier_decl (identifier_tosubclass) identifier_tosubclass )attribute (True) True )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_qualifier_decl) identifier_qualifier_decl (identifier_overridable) identifier_overridable )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_qualifier_decl) identifier_qualifier_decl (identifier_overridable) identifier_overridable )attribute (True) True )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_qualifier_decl) identifier_qualifier_decl (identifier_translatable) identifier_translatable )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_qualifier_decl) identifier_qualifier_decl (identifier_translatable) identifier_translatable )attribute (False) False )assignment )expression_statement )block )if_statement )block )function_definition )module
Initialize the flavors of a qualifier declaration if they are not already set.
(module (function_definition (function_name_use_gradient) function_name_use_gradient (parameters (identifier_grad_f) identifier_grad_f )parameters (block (expression_statement (assignment (identifier_grad_f_name) identifier_grad_f_name (call (identifier_register_to_random_name) identifier_register_to_random_name (argument_list (identifier_grad_f) identifier_grad_f )argument_list )call )assignment )expression_statement (function_definition (function_name_function_wrapper) function_name_function_wrapper (parameters (identifier_f) identifier_f )parameters (block (function_definition (function_name_inner) function_name_inner (parameters (list_splat_pattern (identifier_inputs) identifier_inputs )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_state) identifier_state (dictionary (pair (string_"out_value") string_"out_value" (None) None )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (call (identifier_f) identifier_f (argument_list (list_splat (identifier_inputs) identifier_inputs )list_splat )argument_list )call )assignment )expression_statement (function_definition (function_name_store_out) function_name_store_out (parameters (identifier_out_value) identifier_out_value )parameters (block (expression_statement (assignment (subscript (identifier_state) identifier_state (string_"out_value") string_"out_value" )subscript (identifier_out_value) identifier_out_value )assignment )expression_statement )block )function_definition (expression_statement (assignment (identifier_store_name) identifier_store_name (binary_operator (string_"store_") string_"store_" (attribute (identifier_f) identifier_f (identifier___name__) identifier___name__ )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_store) identifier_store (call (attribute (identifier_tf) identifier_tf (identifier_py_func) identifier_py_func )attribute (argument_list (identifier_store_out) identifier_store_out (list (identifier_out) identifier_out )list (tuple )tuple (keyword_argument (identifier_stateful) identifier_stateful (True) True )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_store_name) identifier_store_name )keyword_argument )argument_list )call )assignment )expression_statement (function_definition (function_name_mock_f) function_name_mock_f (parameters (list_splat_pattern (identifier_inputs) identifier_inputs )list_splat_pattern )parameters (block (return_statement (subscript (identifier_state) identifier_state (string_"out_value") string_"out_value" )subscript )return_statement )block )function_definition (with_statement (with_clause (with_item (call (attribute (identifier_tf) identifier_tf (identifier_control_dependencies) identifier_control_dependencies )attribute (argument_list (list (identifier_store) identifier_store )list )argument_list )call )with_item )with_clause (block (with_statement (with_clause (with_item (call (identifier_gradient_override_map) identifier_gradient_override_map (argument_list (dictionary (pair (string_"PyFunc") string_"PyFunc" (identifier_grad_f_name) identifier_grad_f_name )pair )dictionary )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_mock_name) identifier_mock_name (binary_operator (string_"mock_") string_"mock_" (attribute (identifier_f) identifier_f (identifier___name__) identifier___name__ )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_mock_out) identifier_mock_out (call (attribute (identifier_tf) identifier_tf (identifier_py_func) identifier_py_func )attribute (argument_list (identifier_mock_f) identifier_mock_f (identifier_inputs) identifier_inputs (attribute (identifier_out) identifier_out (identifier_dtype) identifier_dtype )attribute (keyword_argument (identifier_stateful) identifier_stateful (True) True )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_mock_name) identifier_mock_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_mock_out) identifier_mock_out (identifier_set_shape) identifier_set_shape )attribute (argument_list (call (attribute (identifier_out) identifier_out (identifier_get_shape) identifier_get_shape )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )with_statement (return_statement (identifier_mock_out) identifier_mock_out )return_statement )block )function_definition (return_statement (identifier_inner) identifier_inner )return_statement )block )function_definition (return_statement (identifier_function_wrapper) identifier_function_wrapper )return_statement )block )function_definition )module
Decorator for easily setting custom gradients for TensorFlow functions. * DO NOT use this function if you need to serialize your graph. * This function will cause the decorated function to run slower. Example: def _foo_grad(op, grad): ... @use_gradient(_foo_grad) def foo(x1, x2, x3): ... Args: grad_f: function to use as gradient. Returns: A decorator to apply to the function you wish to override the gradient of.
(module (function_definition (function_name_cancel) function_name_cancel (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_self) identifier_self (identifier__assert_open) identifier__assert_open )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier__try_activate_cursor) identifier__try_activate_cursor )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_cancel_if_pending) identifier_cancel_if_pending )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Cancel current statement
(module (function_definition (function_name_get_explanation_dict) function_name_get_explanation_dict (parameters (identifier_self) identifier_self (identifier_entry) identifier_entry )parameters (block (expression_statement (assignment (identifier_centry) identifier_centry (call (attribute (identifier_self) identifier_self (identifier_process_entry) identifier_process_entry )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_centry) identifier_centry (None) None )comparison_operator (block (expression_statement (assignment (identifier_uncorrected_energy) identifier_uncorrected_energy (attribute (identifier_entry) identifier_entry (identifier_uncorrected_energy) identifier_uncorrected_energy )attribute )assignment )expression_statement (expression_statement (assignment (identifier_corrected_energy) identifier_corrected_energy (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_uncorrected_energy) identifier_uncorrected_energy (attribute (identifier_centry) identifier_centry (identifier_uncorrected_energy) identifier_uncorrected_energy )attribute )assignment )expression_statement (expression_statement (assignment (identifier_corrected_energy) identifier_corrected_energy (attribute (identifier_centry) identifier_centry (identifier_energy) identifier_energy )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_d) identifier_d (dictionary (pair (string_"compatibility") string_"compatibility" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )pair (pair (string_"uncorrected_energy") string_"uncorrected_energy" (identifier_uncorrected_energy) identifier_uncorrected_energy )pair (pair (string_"corrected_energy") string_"corrected_energy" (identifier_corrected_energy) identifier_corrected_energy )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_corrections) identifier_corrections (list )list )assignment )expression_statement (expression_statement (assignment (identifier_corr_dict) identifier_corr_dict (call (attribute (identifier_self) identifier_self (identifier_get_corrections_dict) identifier_get_corrections_dict )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )assignment )expression_statement (for_statement (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_corrections) identifier_corrections )attribute (block (expression_statement (assignment (identifier_cd) identifier_cd (dictionary (pair (string_"name") string_"name" (call (identifier_str) identifier_str (argument_list (identifier_c) identifier_c )argument_list )call )pair (pair (string_"description") string_"description" (call (attribute (subscript (call (attribute (attribute (identifier_c) identifier_c (identifier___doc__) identifier___doc__ )attribute (identifier_split) identifier_split )attribute (argument_list (string_"Args") string_"Args" )argument_list )call (integer_0) integer_0 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )pair (pair (string_"value") string_"value" (call (attribute (identifier_corr_dict) identifier_corr_dict (identifier_get) identifier_get )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_c) identifier_c )argument_list )call (integer_0) integer_0 )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_corrections) identifier_corrections (identifier_append) identifier_append )attribute (argument_list (identifier_cd) identifier_cd )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (subscript (identifier_d) identifier_d (string_"corrections") string_"corrections" )subscript (identifier_corrections) identifier_corrections )assignment )expression_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Provides an explanation dict of the corrections that are being applied for a given compatibility scheme. Inspired by the "explain" methods in many database methodologies. Args: entry: A ComputedEntry. Returns: (dict) of the form {"Compatibility": "string", "Uncorrected_energy": float, "Corrected_energy": float, "Corrections": [{"Name of Correction": { "Value": float, "Explanation": "string"}]}
(module (function_definition (function_name_cp) function_name_cp (parameters (identifier_source) identifier_source (identifier_bucket) identifier_bucket (identifier_checksum) identifier_checksum (identifier_key_prefix) identifier_key_prefix )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_models) identifier_models )dotted_name )relative_import (dotted_name (identifier_Bucket) identifier_Bucket )dotted_name )import_from_statement (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_helpers) identifier_helpers )dotted_name )relative_import (dotted_name (identifier_populate_from_path) identifier_populate_from_path )dotted_name )import_from_statement (for_statement (identifier_object_version) identifier_object_version (call (identifier_populate_from_path) identifier_populate_from_path (argument_list (call (attribute (identifier_Bucket) identifier_Bucket (identifier_get) identifier_get )attribute (argument_list (identifier_bucket) identifier_bucket )argument_list )call (identifier_source) identifier_source (keyword_argument (identifier_checksum) identifier_checksum (identifier_checksum) identifier_checksum )keyword_argument (keyword_argument (identifier_key_prefix) identifier_key_prefix (identifier_key_prefix) identifier_key_prefix )keyword_argument )argument_list )call (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_secho) identifier_secho )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_object_version) identifier_object_version )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_db) identifier_db (identifier_session) identifier_session )attribute (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Create new bucket from all files in directory.
(module (function_definition (function_name_keypoint_vflip) function_name_keypoint_vflip (parameters (identifier_kp) identifier_kp (identifier_rows) identifier_rows (identifier_cols) identifier_cols )parameters (block (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y (identifier_angle) identifier_angle (identifier_scale) identifier_scale )pattern_list (identifier_kp) identifier_kp )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_math) identifier_math (identifier_cos) identifier_cos )attribute (argument_list (identifier_angle) identifier_angle )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_math) identifier_math (identifier_sin) identifier_sin )attribute (argument_list (identifier_angle) identifier_angle )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_angle) identifier_angle (call (attribute (identifier_math) identifier_math (identifier_atan2) identifier_atan2 )attribute (argument_list (unary_operator (identifier_s) identifier_s )unary_operator (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (return_statement (list (identifier_x) identifier_x (binary_operator (parenthesized_expression (binary_operator (identifier_rows) identifier_rows (integer_1) integer_1 )binary_operator )parenthesized_expression (identifier_y) identifier_y )binary_operator (identifier_angle) identifier_angle (identifier_scale) identifier_scale )list )return_statement )block )function_definition )module
Flip a keypoint vertically around the x-axis.
(module (function_definition (function_name_file) function_name_file (parameters (identifier_location) identifier_location (default_parameter (identifier_mime_type) identifier_mime_type (None) None )default_parameter (default_parameter (identifier_headers) identifier_headers (None) None )default_parameter (default_parameter (identifier__range) identifier__range (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_filename) identifier_filename (subscript (call (attribute (identifier_path) identifier_path (identifier_split) identifier_split )attribute (argument_list (identifier_location) identifier_location )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open_async) identifier_open_async (argument_list (identifier_location) identifier_location (keyword_argument (identifier_mode) identifier_mode (string_'rb') string_'rb' )keyword_argument )argument_list )call (as_pattern_target (identifier__file) identifier__file )as_pattern_target )as_pattern )with_item )with_clause (block (if_statement (identifier__range) identifier__range (block (expression_statement (await (call (attribute (identifier__file) identifier__file (identifier_seek) identifier_seek )attribute (argument_list (attribute (identifier__range) identifier__range (identifier_start) identifier_start )attribute )argument_list )call )await )expression_statement (expression_statement (assignment (identifier_out_stream) identifier_out_stream (await (call (attribute (identifier__file) identifier__file (identifier_read) identifier_read )attribute (argument_list (attribute (identifier__range) identifier__range (identifier_size) identifier_size )attribute )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (subscript (identifier_headers) identifier_headers (string_'Content-Range') string_'Content-Range' )subscript (binary_operator (string_'bytes %s-%s/%s') string_'bytes %s-%s/%s' (tuple (attribute (identifier__range) identifier__range (identifier_start) identifier_start )attribute (attribute (identifier__range) identifier__range (identifier_end) identifier_end )attribute (attribute (identifier__range) identifier__range (identifier_total) identifier_total )attribute )tuple )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_out_stream) identifier_out_stream (await (call (attribute (identifier__file) identifier__file (identifier_read) identifier_read )attribute (argument_list )argument_list )call )await )assignment )expression_statement )block )else_clause )if_statement )block )with_statement (expression_statement (assignment (identifier_mime_type) identifier_mime_type (boolean_operator (boolean_operator (identifier_mime_type) identifier_mime_type (subscript (call (identifier_guess_type) identifier_guess_type (argument_list (identifier_filename) identifier_filename )argument_list )call (integer_0) integer_0 )subscript )boolean_operator (string_'text/plain') string_'text/plain' )boolean_operator )assignment )expression_statement (return_statement (call (identifier_HTTPResponse) identifier_HTTPResponse (argument_list (keyword_argument (identifier_status) identifier_status (integer_200) integer_200 )keyword_argument (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_content_type) identifier_content_type (identifier_mime_type) identifier_mime_type )keyword_argument (keyword_argument (identifier_body_bytes) identifier_body_bytes (identifier_out_stream) identifier_out_stream )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a response object with file data. :param location: Location of file on system. :param mime_type: Specific mime_type. :param headers: Custom Headers. :param _range:
(module (function_definition (function_name_make) function_name_make (parameters (identifier_directory) identifier_directory )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (string_'Directory already exists') string_'Directory already exists' )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (string_'Path exists and is not a directory') string_'Path exists and is not a directory' )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_mkdir) identifier_mkdir )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_directory) identifier_directory (string_'jsons') string_'jsons' )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_copy_default_config) identifier_copy_default_config (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_directory) identifier_directory (string_'config.yaml') string_'config.yaml' )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Makes a RAS Machine directory
(module (function_definition (function_name_deriv2) function_name_deriv2 (parameters (identifier_self) identifier_self (identifier_p) identifier_p )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_self) identifier_self (identifier__clean) identifier__clean )attribute (argument_list (identifier_p) identifier_p )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fl) identifier_fl (call (attribute (identifier_np) identifier_np (identifier_log) identifier_log )attribute (argument_list (binary_operator (integer_1) integer_1 (identifier_p) identifier_p )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_d2) identifier_d2 (binary_operator (unary_operator (integer_1) integer_1 )unary_operator (parenthesized_expression (binary_operator (binary_operator (parenthesized_expression (binary_operator (integer_1) integer_1 (identifier_p) identifier_p )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator (identifier_fl) identifier_fl )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_d2) identifier_d2 (binary_operator (integer_1) integer_1 (binary_operator (integer_1) integer_1 (identifier_fl) identifier_fl )binary_operator )binary_operator )augmented_assignment )expression_statement (return_statement (identifier_d2) identifier_d2 )return_statement )block )function_definition )module
Second derivative of the C-Log-Log ink function Parameters ---------- p : array-like Mean parameters Returns ------- g''(p) : array The second derivative of the CLogLog link function
(module (function_definition (function_name_update_model_cache) function_name_update_model_cache (parameters (identifier_table_name) identifier_table_name )parameters (block (expression_statement (assignment (identifier_model_cache_info) identifier_model_cache_info (call (identifier_ModelCacheInfo) identifier_ModelCacheInfo (argument_list (identifier_table_name) identifier_table_name (attribute (call (attribute (identifier_uuid) identifier_uuid (identifier_uuid4) identifier_uuid4 )attribute (argument_list )argument_list )call (identifier_hex) identifier_hex )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_model_cache_backend) identifier_model_cache_backend (identifier_share_model_cache_info) identifier_share_model_cache_info )attribute (argument_list (identifier_model_cache_info) identifier_model_cache_info )argument_list )call )expression_statement )block )function_definition )module
Updates model cache by generating a new key for the model
(module (function_definition (function_name_from_event) function_name_from_event (parameters (identifier_cls) identifier_cls (identifier_event) identifier_event )parameters (block (expression_statement (assignment (identifier_source) identifier_source (call (identifier_Chatter) identifier_Chatter (argument_list (attribute (identifier_event) identifier_event (identifier_source) identifier_source )attribute )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_source) identifier_source (attribute (identifier_event) identifier_event (identifier_target) identifier_target )attribute (subscript (attribute (identifier_event) identifier_event (identifier_arguments) identifier_arguments )attribute (integer_0) integer_0 )subscript (attribute (identifier_event) identifier_event (identifier_tags) identifier_tags )attribute )argument_list )call )return_statement )block )function_definition )module
Create a message from an event :param event: the event that was received of type ``pubmsg`` or ``privmsg`` :type event: :class:`Event3` :returns: a message that resembles the event :rtype: :class:`Message3` :raises: None
(module (function_definition (function_name_handle_annotation_pattern) function_name_handle_annotation_pattern (parameters (identifier_self) identifier_self (typed_parameter (identifier_line) identifier_line (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_position) identifier_position (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_tokens) identifier_tokens (type (identifier_ParseResults) identifier_ParseResults )type )typed_parameter )parameters (type (identifier_ParseResults) identifier_ParseResults )type (block (expression_statement (assignment (identifier_annotation) identifier_annotation (subscript (identifier_tokens) identifier_tokens (string_'name') string_'name' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_raise_for_redefined_annotation) identifier_raise_for_redefined_annotation )attribute (argument_list (identifier_line) identifier_line (identifier_position) identifier_position (identifier_annotation) identifier_annotation )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_annotation_to_pattern) identifier_annotation_to_pattern )attribute (identifier_annotation) identifier_annotation )subscript (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (subscript (identifier_tokens) identifier_tokens (string_'value') string_'value' )subscript )argument_list )call )assignment )expression_statement (return_statement (identifier_tokens) identifier_tokens )return_statement )block )function_definition )module
Handle statements like ``DEFINE ANNOTATION X AS PATTERN "Y"``. :raises: RedefinedAnnotationError
(module (function_definition (function_name_read_hdf5_dict) function_name_read_hdf5_dict (parameters (identifier_h5f) identifier_h5f (default_parameter (identifier_names) identifier_names (None) None )default_parameter (default_parameter (identifier_path) identifier_path (None) None )default_parameter (default_parameter (identifier_on_missing) identifier_on_missing (string_'error') string_'error' )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (identifier_path) identifier_path (block (expression_statement (assignment (identifier_h5f) identifier_h5f (subscript (identifier_h5f) identifier_h5f (identifier_path) identifier_path )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_names) identifier_names (None) None )comparison_operator (block (expression_statement (assignment (identifier_names) identifier_names (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'flags') string_'flags' (None) None )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_names) identifier_names (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_names) identifier_names (call (identifier_find_flag_groups) identifier_find_flag_groups (argument_list (identifier_h5f) identifier_h5f (keyword_argument (identifier_strict) identifier_strict (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_names) identifier_names (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (not_operator (identifier_names) identifier_names )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"Failed to automatically parse available flag ") string_"Failed to automatically parse available flag " (string_"names from HDF5, please give a list of names ") string_"names from HDF5, please give a list of names " (string_"to read via the ``names=`` keyword") string_"to read via the ``names=`` keyword" )concatenated_string )argument_list )call )raise_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_out) identifier_out (call (identifier_DataQualityDict) identifier_DataQualityDict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_name) identifier_name (identifier_names) identifier_names (block (try_statement (block (expression_statement (assignment (subscript (identifier_out) identifier_out (identifier_name) identifier_name )subscript (call (identifier_read_hdf5_flag) identifier_read_hdf5_flag (argument_list (identifier_h5f) identifier_h5f (identifier_name) identifier_name (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_KeyError) identifier_KeyError (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (if_statement (comparison_operator (identifier_on_missing) identifier_on_missing (string_'ignore') string_'ignore' )comparison_operator (block (pass_statement )pass_statement )block (elif_clause (comparison_operator (identifier_on_missing) identifier_on_missing (string_'warn') string_'warn' )comparison_operator (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_exc) identifier_exc )argument_list )call )argument_list )call )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'no H5Group found for flag ') string_'no H5Group found for flag ' (string_'{0!r}') string_'{0!r}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Read a `DataQualityDict` from an HDF5 file
(module (function_definition (function_name_leb128_encode) function_name_leb128_encode (parameters (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (integer_0) integer_0 )comparison_operator (block (return_statement (string_b'\x00') string_b'\x00' )return_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (while_statement (comparison_operator (identifier_value) identifier_value (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_byte) identifier_byte (binary_operator (identifier_value) identifier_value (integer_0x7f) integer_0x7f )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_value) identifier_value (integer_7) integer_7 )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_value) identifier_value (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_byte) identifier_byte (integer_0x80) integer_0x80 )augmented_assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_byte) identifier_byte )argument_list )call )expression_statement )block )while_statement (return_statement (call (identifier_bytes) identifier_bytes (argument_list (identifier_result) identifier_result )argument_list )call )return_statement )block )function_definition )module
Encodes an integer using LEB128. :param int value: The value to encode. :return: The LEB128-encoded integer. :rtype: bytes
(module (function_definition (function_name_find_python) function_name_find_python (parameters )parameters (block (expression_statement (assignment (identifier_python) identifier_python (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (call (attribute (identifier__state) identifier__state (identifier_get) identifier_get )attribute (argument_list (string_"pythonExecutable") string_"pythonExecutable" )argument_list )call (call (identifier_next) identifier_next (argument_list (generator_expression (identifier_exe) identifier_exe (for_in_clause (identifier_exe) identifier_exe (call (attribute (call (attribute (identifier_os) identifier_os (identifier_getenv) identifier_getenv )attribute (argument_list (string_"PYBLISH_QML_PYTHON_EXECUTABLE") string_"PYBLISH_QML_PYTHON_EXECUTABLE" (string_"") string_"" )argument_list )call (identifier_split) identifier_split )attribute (argument_list (attribute (identifier_os) identifier_os (identifier_pathsep) identifier_pathsep )attribute )argument_list )call )for_in_clause (if_clause (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_exe) identifier_exe )argument_list )call )if_clause )generator_expression (None) None )argument_list )call )boolean_operator (call (identifier_which) identifier_which (argument_list (string_"python") string_"python" )argument_list )call )boolean_operator (call (identifier_which) identifier_which (argument_list (string_"python3") string_"python3" )argument_list )call )boolean_operator )parenthesized_expression )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_python) identifier_python )not_operator (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_python) identifier_python )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Could not locate Python executable.") string_"Could not locate Python executable." )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_python) identifier_python )return_statement )block )function_definition )module
Search for Python automatically
(module (function_definition (function_name_free) function_name_free (parameters (identifier_self) identifier_self (identifier_ptr) identifier_ptr )parameters (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (binary_operator (string_"%s not implemented for %s") string_"%s not implemented for %s" (tuple (attribute (attribute (attribute (identifier_self) identifier_self (identifier_free) identifier_free )attribute (identifier___func__) identifier___func__ )attribute (identifier___name__) identifier___name__ )attribute (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )function_definition )module
A somewhat faithful implementation of libc `free`. :param ptr: the location in memory to be freed
(module (function_definition (function_name_todate) function_name_todate (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_arr) identifier_arr (call (identifier_get_gregorian_date_from_julian_day) identifier_get_gregorian_date_from_julian_day (argument_list (call (attribute (identifier_self) identifier_self (identifier_tojulianday) identifier_tojulianday )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_datetime) identifier_datetime (identifier_date) identifier_date )attribute (argument_list (call (identifier_int) identifier_int (argument_list (subscript (identifier_arr) identifier_arr (integer_0) integer_0 )subscript )argument_list )call (call (identifier_int) identifier_int (argument_list (subscript (identifier_arr) identifier_arr (integer_1) integer_1 )subscript )argument_list )call (call (identifier_int) identifier_int (argument_list (subscript (identifier_arr) identifier_arr (integer_2) integer_2 )subscript )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Calculates the corresponding day in the gregorian calendar. this is the main use case of this library. :return: Corresponding date in gregorian calendar. :rtype: :py:class:`datetime.date`
(module (function_definition (function_name__get_all_forums) function_name__get_all_forums (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_all_forums') string_'_all_forums' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__all_forums) identifier__all_forums )attribute (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_Forum) identifier_Forum (identifier_objects) identifier_objects )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__all_forums) identifier__all_forums )attribute )return_statement )block )function_definition )module
Returns all forums.
(module (function_definition (function_name_filter_service_by_regex_name) function_name_filter_service_by_regex_name (parameters (identifier_regex) identifier_regex )parameters (block (expression_statement (assignment (identifier_host_re) identifier_host_re (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_regex) identifier_regex )argument_list )call )assignment )expression_statement (function_definition (function_name_inner_filter) function_name_inner_filter (parameters (identifier_items) identifier_items )parameters (block (expression_statement (assignment (identifier_service) identifier_service (subscript (identifier_items) identifier_items (string_"service") string_"service" )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_service) identifier_service (None) None )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (comparison_operator (call (attribute (identifier_host_re) identifier_host_re (identifier_match) identifier_match )attribute (argument_list (attribute (identifier_service) identifier_service (identifier_service_description) identifier_service_description )attribute )argument_list )call (None) None )comparison_operator )return_statement )block )function_definition (return_statement (identifier_inner_filter) identifier_inner_filter )return_statement )block )function_definition )module
Filter for service Filter on regex :param regex: regex to filter :type regex: str :return: Filter :rtype: bool
(module (function_definition (function_name_pick_free_port) function_name_pick_free_port (parameters (default_parameter (identifier_hostname) identifier_hostname (identifier_REDIRECT_HOST) identifier_REDIRECT_HOST )default_parameter (default_parameter (identifier_port) identifier_port (integer_0) integer_0 )default_parameter )parameters (block (import_statement (dotted_name (identifier_socket) identifier_socket )dotted_name )import_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_socket) identifier_socket (identifier_socket) identifier_socket )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute (attribute (identifier_socket) identifier_socket (identifier_SOCK_STREAM) identifier_SOCK_STREAM )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_s) identifier_s (identifier_bind) identifier_bind )attribute (argument_list (tuple (identifier_hostname) identifier_hostname (identifier_port) identifier_port )tuple )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_"Could not bind to %s:%s %s") string_"Could not bind to %s:%s %s" (identifier_hostname) identifier_hostname (identifier_port) identifier_port (identifier_e) identifier_e )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_port) identifier_port (integer_0) integer_0 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Unable to find an open port for authentication.') string_'Unable to find an open port for authentication.' )argument_list )call )expression_statement (raise_statement (call (identifier_AuthenticationException) identifier_AuthenticationException (argument_list (identifier_e) identifier_e )argument_list )call )raise_statement )block (else_clause (block (return_statement (call (identifier_pick_free_port) identifier_pick_free_port (argument_list (identifier_hostname) identifier_hostname (integer_0) integer_0 )argument_list )call )return_statement )block )else_clause )if_statement )block )except_clause )try_statement (expression_statement (assignment (pattern_list (identifier_addr) identifier_addr (identifier_port) identifier_port )pattern_list (call (attribute (identifier_s) identifier_s (identifier_getsockname) identifier_getsockname )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_s) identifier_s (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_port) identifier_port )return_statement )block )function_definition )module
Try to bind a port. Default=0 selects a free port.
(module (function_definition (function_name_get_feature_variable_integer) function_name_get_feature_variable_integer (parameters (identifier_self) identifier_self (identifier_feature_key) identifier_feature_key (identifier_variable_key) identifier_variable_key (identifier_user_id) identifier_user_id (default_parameter (identifier_attributes) identifier_attributes (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_variable_type) identifier_variable_type (attribute (attribute (attribute (identifier_entities) identifier_entities (identifier_Variable) identifier_Variable )attribute (identifier_Type) identifier_Type )attribute (identifier_INTEGER) identifier_INTEGER )attribute )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__get_feature_variable_for_type) identifier__get_feature_variable_for_type )attribute (argument_list (identifier_feature_key) identifier_feature_key (identifier_variable_key) identifier_variable_key (identifier_variable_type) identifier_variable_type (identifier_user_id) identifier_user_id (identifier_attributes) identifier_attributes )argument_list )call )return_statement )block )function_definition )module
Returns value for a certain integer variable attached to a feature flag. Args: feature_key: Key of the feature whose variable's value is being accessed. variable_key: Key of the variable whose value is to be accessed. user_id: ID for user. attributes: Dict representing user attributes. Returns: Integer value of the variable. None if: - Feature key is invalid. - Variable key is invalid. - Mismatch with type of variable.
(module (function_definition (function_name_get_default_envlist) function_name_get_default_envlist (parameters (identifier_version) identifier_version )parameters (block (if_statement (comparison_operator (identifier_version) identifier_version (list (string_'pypy') string_'pypy' (string_'pypy3') string_'pypy3' )list )comparison_operator (block (return_statement (identifier_version) identifier_version )return_statement )block )if_statement (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_r'^(\d)\.(\d)(?:\.\d+)?$') string_r'^(\d)\.(\d)(?:\.\d+)?$' (boolean_operator (identifier_version) identifier_version (string_'') string_'' )boolean_operator )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (expression_statement (assignment (pattern_list (identifier_major) identifier_major (identifier_minor) identifier_minor )pattern_list (call (attribute (identifier_match) identifier_match (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_'py{major}{minor}') string_'py{major}{minor}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_major) identifier_major (identifier_major) identifier_major )keyword_argument (keyword_argument (identifier_minor) identifier_minor (identifier_minor) identifier_minor )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_guess_python_env) identifier_guess_python_env (argument_list )argument_list )call )return_statement )block )function_definition )module
Parse a default tox env based on the version. The version comes from the ``TRAVIS_PYTHON_VERSION`` environment variable. If that isn't set or is invalid, then use sys.version_info to come up with a reasonable default.
(module (function_definition (function_name__parse_invite) function_name__parse_invite (parameters (identifier_client) identifier_client (identifier_command) identifier_command (identifier_actor) identifier_actor (identifier_args) identifier_args )parameters (block (expression_statement (assignment (pattern_list (identifier_target) identifier_target (identifier__) identifier__ (identifier_channel) identifier_channel )pattern_list (call (attribute (identifier_args) identifier_args (identifier_rpartition) identifier_rpartition )attribute (argument_list (string_" ") string_" " )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_client) identifier_client (identifier_dispatch_event) identifier_dispatch_event )attribute (argument_list (string_"INVITE") string_"INVITE" (identifier_actor) identifier_actor (identifier_target) identifier_target (call (attribute (identifier_channel) identifier_channel (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Parse an INVITE and dispatch an event.
(module (function_definition (function_name_get_empty_config) function_name_get_empty_config (parameters )parameters (block (expression_statement (assignment (identifier_empty_color_config) identifier_empty_color_config (call (identifier_get_empty_color_config) identifier_get_empty_color_config (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_Config) identifier_Config (argument_list (keyword_argument (identifier_examples_dir) identifier_examples_dir (None) None )keyword_argument (keyword_argument (identifier_custom_dir) identifier_custom_dir (None) None )keyword_argument (keyword_argument (identifier_color_config) identifier_color_config (identifier_empty_color_config) identifier_empty_color_config )keyword_argument (keyword_argument (identifier_use_color) identifier_use_color (None) None )keyword_argument (keyword_argument (identifier_pager_cmd) identifier_pager_cmd (None) None )keyword_argument (keyword_argument (identifier_editor_cmd) identifier_editor_cmd (None) None )keyword_argument (keyword_argument (identifier_squeeze) identifier_squeeze (None) None )keyword_argument (keyword_argument (identifier_subs) identifier_subs (None) None )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Return an empty Config object with no options set.
(module (function_definition (function_name_length) function_name_length (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_math) identifier_math (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier_X) identifier_X )attribute (attribute (identifier_self) identifier_self (identifier_X) identifier_X )attribute )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier_Y) identifier_Y )attribute (attribute (identifier_self) identifier_self (identifier_Y) identifier_Y )attribute )binary_operator )parenthesized_expression )binary_operator )argument_list )call )return_statement )block )function_definition )module
Gets the length of this Vector
(module (function_definition (function_name_put) function_name_put (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_value) identifier_value )parameters (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_DirectoryTreeDatastore) identifier_DirectoryTreeDatastore (identifier_self) identifier_self )argument_list )call (identifier_put) identifier_put )attribute (argument_list (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )expression_statement (expression_statement (assignment (identifier_str_key) identifier_str_key (call (identifier_str) identifier_str (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_str_key) identifier_str_key (string_'/') string_'/' )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_dir_key) identifier_dir_key (call (attribute (attribute (identifier_key) identifier_key (identifier_parent) identifier_parent )attribute (identifier_instance) identifier_instance )attribute (argument_list (string_'directory') string_'directory' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_directory) identifier_directory (call (attribute (identifier_self) identifier_self (identifier_directory) identifier_directory )attribute (argument_list (identifier_dir_key) identifier_dir_key )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_str_key) identifier_str_key (identifier_directory) identifier_directory )comparison_operator (block (expression_statement (call (attribute (identifier_directory) identifier_directory (identifier_append) identifier_append )attribute (argument_list (identifier_str_key) identifier_str_key )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_DirectoryTreeDatastore) identifier_DirectoryTreeDatastore (identifier_self) identifier_self )argument_list )call (identifier_put) identifier_put )attribute (argument_list (identifier_dir_key) identifier_dir_key (identifier_directory) identifier_directory )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Stores the object `value` named by `key`self. DirectoryTreeDatastore stores a directory entry.
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_is_closing) identifier_is_closing )attribute (argument_list )argument_list )call (block (return_statement )return_statement )block )if_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__write_buffer) identifier__write_buffer )attribute (identifier_data) identifier_data )augmented_assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__write_buffer) identifier__write_buffer )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier__output_buffer_limit_high) identifier__output_buffer_limit_high )attribute )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__protocol) identifier__protocol )attribute (identifier_pause_writing) identifier_pause_writing )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier__write_buffer) identifier__write_buffer )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__can_write) identifier__can_write )attribute (identifier_set) identifier_set )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Send `data` over the IBB. If `data` is larger than the block size is is chunked and sent in chunks. Chunks from one call of :meth:`write` will always be sent in series.
(module (function_definition (function_name__basic_return) function_name__basic_return (parameters (identifier_self) identifier_self (identifier_frame_in) identifier_frame_in )parameters (block (expression_statement (assignment (identifier_reply_text) identifier_reply_text (call (identifier_try_utf8_decode) identifier_try_utf8_decode (argument_list (attribute (identifier_frame_in) identifier_frame_in (identifier_reply_text) identifier_reply_text )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (parenthesized_expression (binary_operator (string_"Message not delivered: %s (%s) to queue '%s' from exchange '%s'") string_"Message not delivered: %s (%s) to queue '%s' from exchange '%s'" (tuple (identifier_reply_text) identifier_reply_text (attribute (identifier_frame_in) identifier_frame_in (identifier_reply_code) identifier_reply_code )attribute (attribute (identifier_frame_in) identifier_frame_in (identifier_routing_key) identifier_routing_key )attribute (attribute (identifier_frame_in) identifier_frame_in (identifier_exchange) identifier_exchange )attribute )tuple )binary_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_exception) identifier_exception (call (identifier_AMQPMessageError) identifier_AMQPMessageError (argument_list (identifier_message) identifier_message (keyword_argument (identifier_reply_code) identifier_reply_code (attribute (identifier_frame_in) identifier_frame_in (identifier_reply_code) identifier_reply_code )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_exceptions) identifier_exceptions )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_exception) identifier_exception )argument_list )call )expression_statement )block )function_definition )module
Handle a Basic Return Frame and treat it as an error. :param specification.Basic.Return frame_in: Amqp frame. :return:
(module (function_definition (function_name_raw) function_name_raw (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__raw) identifier__raw )attribute (block (return_statement (call (attribute (call (identifier_text_type) identifier_text_type (argument_list (attribute (identifier_self) identifier_self (identifier__raw) identifier__raw )attribute )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list (string_"\r\n") string_"\r\n" )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (call (identifier_text_type) identifier_text_type (argument_list (call (identifier_base64decode) identifier_base64decode (argument_list (attribute (identifier_self) identifier_self (identifier__b64encoded) identifier__b64encoded )attribute )argument_list )call )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list (string_"\r\n") string_"\r\n" )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Return raw key. returns: str: raw key
(module (function_definition (function_name_getMessage) function_name_getMessage (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_msg) identifier_msg (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier_msg) identifier_msg )attribute )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (identifier_msg) identifier_msg (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute )binary_operator )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (call (attribute (call (attribute (identifier_platform) identifier_platform (identifier_system) identifier_system )attribute (argument_list )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_'windows') string_'windows' )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_levelno) identifier_levelno )attribute (integer_10) integer_10 )comparison_operator )boolean_operator (block (return_statement (identifier_msg) identifier_msg )return_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_levelno) identifier_levelno )attribute (integer_50) integer_50 )comparison_operator (block (return_statement (call (attribute (identifier_utils) identifier_utils (identifier_return_colorized) identifier_return_colorized )attribute (argument_list (identifier_msg) identifier_msg (string_'critical') string_'critical' )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_levelno) identifier_levelno )attribute (integer_40) integer_40 )comparison_operator (block (return_statement (call (attribute (identifier_utils) identifier_utils (identifier_return_colorized) identifier_return_colorized )attribute (argument_list (identifier_msg) identifier_msg (string_'error') string_'error' )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_levelno) identifier_levelno )attribute (integer_30) integer_30 )comparison_operator (block (return_statement (call (attribute (identifier_utils) identifier_utils (identifier_return_colorized) identifier_return_colorized )attribute (argument_list (identifier_msg) identifier_msg (string_'warn') string_'warn' )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_levelno) identifier_levelno )attribute (integer_20) integer_20 )comparison_operator (block (return_statement (call (attribute (identifier_utils) identifier_utils (identifier_return_colorized) identifier_return_colorized )attribute (argument_list (identifier_msg) identifier_msg (string_'info') string_'info' )argument_list )call )return_statement )block )elif_clause (else_clause (block (return_statement (call (attribute (identifier_utils) identifier_utils (identifier_return_colorized) identifier_return_colorized )attribute (argument_list (identifier_msg) identifier_msg (string_'debug') string_'debug' )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns a colorized log message based on the log level. If the platform is windows the original message will be returned without colorization windows escape codes are crazy. :returns: ``str``
(module (function_definition (function_name_find_breaking_changes) function_name_find_breaking_changes (parameters (typed_parameter (identifier_old_schema) identifier_old_schema (type (identifier_GraphQLSchema) identifier_GraphQLSchema )type )typed_parameter (typed_parameter (identifier_new_schema) identifier_new_schema (type (identifier_GraphQLSchema) identifier_GraphQLSchema )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_BreakingChange) identifier_BreakingChange )type )type_parameter )generic_type )type (block (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 (call (identifier_find_removed_types) identifier_find_removed_types (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call (call (identifier_find_types_that_changed_kind) identifier_find_types_that_changed_kind (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator (call (identifier_find_fields_that_changed_type_on_object_or_interface_types) identifier_find_fields_that_changed_type_on_object_or_interface_types (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator (attribute (call (identifier_find_fields_that_changed_type_on_input_object_types) identifier_find_fields_that_changed_type_on_input_object_types (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call (identifier_breaking_changes) identifier_breaking_changes )attribute )binary_operator (call (identifier_find_types_removed_from_unions) identifier_find_types_removed_from_unions (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator (call (identifier_find_values_removed_from_enums) identifier_find_values_removed_from_enums (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator (attribute (call (identifier_find_arg_changes) identifier_find_arg_changes (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call (identifier_breaking_changes) identifier_breaking_changes )attribute )binary_operator (call (identifier_find_interfaces_removed_from_object_types) identifier_find_interfaces_removed_from_object_types (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator (call (identifier_find_removed_directives) identifier_find_removed_directives (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator (call (identifier_find_removed_directive_args) identifier_find_removed_directive_args (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator (call (identifier_find_added_non_null_directive_args) identifier_find_added_non_null_directive_args (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator (call (identifier_find_removed_directive_locations) identifier_find_removed_directive_locations (argument_list (identifier_old_schema) identifier_old_schema (identifier_new_schema) identifier_new_schema )argument_list )call )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
Find breaking changes. Given two schemas, returns a list containing descriptions of all the types of breaking changes covered by the other functions down below.
(module (function_definition (function_name_cleanup) function_name_cleanup (parameters (identifier_self) identifier_self )parameters (block (expression_statement (string_"Remove the directory containin the clone and virtual environment.") string_"Remove the directory containin the clone and virtual environment." )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'Removing temp dir %s') string_'Removing temp dir %s' (attribute (attribute (identifier_self) identifier_self (identifier__tempdir) identifier__tempdir )attribute (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__tempdir) identifier__tempdir )attribute (identifier_cleanup) identifier_cleanup )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Remove the directory containin the clone and virtual environment.
(module (function_definition (function_name_mat_to_numpy_arr) function_name_mat_to_numpy_arr (parameters (identifier_self) identifier_self )parameters (block (import_statement (aliased_import (dotted_name (identifier_numpy) identifier_numpy )dotted_name (identifier_np) identifier_np )aliased_import )import_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_dat) identifier_dat )attribute (string_'mat') string_'mat' )subscript (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_dat) identifier_dat )attribute (string_'mat') string_'mat' )subscript )argument_list )call )assignment )expression_statement )block )function_definition )module
convert list to numpy array - numpy arrays can not be saved as json
(module (function_definition (function_name_register_for_duty) function_name_register_for_duty (parameters (identifier_self) identifier_self (identifier_context) identifier_context )parameters (block (expression_statement (assignment (identifier_cctxt) identifier_cctxt (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_prepare) identifier_prepare )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_cctxt) identifier_cctxt (identifier_call) identifier_call )attribute (argument_list (identifier_context) identifier_context (string_'register_for_duty') string_'register_for_duty' (keyword_argument (identifier_host) identifier_host (attribute (identifier_self) identifier_self (identifier_host) identifier_host )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Report that a config agent is ready for duty.
(module (function_definition (function_name_generate_name) function_name_generate_name (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (attribute (identifier_self) identifier_self (identifier_RobotNamer) identifier_RobotNamer )attribute (identifier_generate) identifier_generate )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (call (attribute (identifier_name) identifier_name (identifier_replace) identifier_replace )attribute (argument_list (string_'-') string_'-' (string_'_') string_'_' )argument_list )call )assignment )expression_statement )block )function_definition )module
generate a Robot Name for the instance to use, if the user doesn't supply one.
(module (function_definition (function_name_argmax) function_name_argmax (parameters (identifier_attrs) identifier_attrs (identifier_inputs) identifier_inputs (identifier_proto_obj) identifier_proto_obj )parameters (block (expression_statement (assignment (identifier_axis) identifier_axis (call (attribute (identifier_attrs) identifier_attrs (identifier_get) identifier_get )attribute (argument_list (string_'axis') string_'axis' (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_keepdims) identifier_keepdims (call (attribute (identifier_attrs) identifier_attrs (identifier_get) identifier_get )attribute (argument_list (string_'keepdims') string_'keepdims' (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_argmax_op) identifier_argmax_op (call (attribute (identifier_symbol) identifier_symbol (identifier_argmax) identifier_argmax )attribute (argument_list (subscript (identifier_inputs) identifier_inputs (integer_0) integer_0 )subscript (keyword_argument (identifier_axis) identifier_axis (identifier_axis) identifier_axis )keyword_argument (keyword_argument (identifier_keepdims) identifier_keepdims (identifier_keepdims) identifier_keepdims )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cast_attrs) identifier_cast_attrs (dictionary (pair (string_'dtype') string_'dtype' (string_'int64') string_'int64' )pair )dictionary )assignment )expression_statement (return_statement (expression_list (string_'cast') string_'cast' (identifier_cast_attrs) identifier_cast_attrs (identifier_argmax_op) identifier_argmax_op )expression_list )return_statement )block )function_definition )module
Returns indices of the maximum values along an axis
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self (default_parameter (identifier_driver) identifier_driver (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_driver) identifier_driver (None) None )comparison_operator (block (assert_statement (comparison_operator (identifier_driver) identifier_driver (list (string_'alsa') string_'alsa' (string_'oss') string_'oss' (string_'jack') string_'jack' (string_'portaudio') string_'portaudio' (string_'sndmgr') string_'sndmgr' (string_'coreaudio') string_'coreaudio' (string_'Direct Sound') string_'Direct Sound' (string_'dsound') string_'dsound' (string_'pulseaudio') string_'pulseaudio' )list )comparison_operator )assert_statement (expression_statement (call (identifier_fluid_settings_setstr) identifier_fluid_settings_setstr (argument_list (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (string_'audio.driver') string_'audio.driver' (identifier_driver) identifier_driver )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_audio_driver) identifier_audio_driver )attribute (call (identifier_new_fluid_audio_driver) identifier_new_fluid_audio_driver (argument_list (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (attribute (identifier_self) identifier_self (identifier_synth) identifier_synth )attribute )argument_list )call )assignment )expression_statement )block )function_definition )module
Start audio output driver in separate background thread. Call this function any time after creating the Synth object. If you don't call this function, use get_samples() to generate samples. Optional keyword argument: driver: which audio driver to use for output Possible choices: 'alsa', 'oss', 'jack', 'portaudio' 'sndmgr', 'coreaudio', 'Direct Sound', 'dsound', 'pulseaudio' Not all drivers will be available for every platform, it depends on which drivers were compiled into FluidSynth for your platform.
(module (function_definition (function_name_email_generator) function_name_email_generator (parameters (default_parameter (identifier_names) identifier_names (None) None )default_parameter (default_parameter (identifier_domains) identifier_domains (None) None )default_parameter (default_parameter (identifier_unique) identifier_unique (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_names) identifier_names (None) None )comparison_operator (block (expression_statement (assignment (identifier_names) identifier_names (list_comprehension (call (attribute (call (attribute (call (attribute (identifier_name) identifier_name (identifier_encode) identifier_encode )attribute (argument_list (string_'ascii') string_'ascii' (string_'ignore') string_'ignore' )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_b' ') string_b' ' (string_b'') string_b'' )argument_list )call (for_in_clause (identifier_name) identifier_name (identifier_ENGLISH_MONARCHS) identifier_ENGLISH_MONARCHS )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_domains) identifier_domains (None) None )comparison_operator (block (expression_statement (assignment (identifier_domains) identifier_domains (identifier_DOMAINS) identifier_DOMAINS )assignment )expression_statement )block )if_statement (if_statement (identifier_unique) identifier_unique (block (expression_statement (assignment (identifier_uniquifyer) identifier_uniquifyer (lambda (call (identifier_str) identifier_str (argument_list (call (identifier_next) identifier_next (argument_list (identifier__unique_counter) identifier__unique_counter )argument_list )call )argument_list )call )lambda )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_uniquifyer) identifier_uniquifyer (lambda (string_'') string_'' )lambda )assignment )expression_statement )block )else_clause )if_statement (while_statement (True) True (block (expression_statement (yield (call (attribute (string_'{0}{1}@{2}') string_'{0}{1}@{2}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_random) identifier_random (identifier_choice) identifier_choice )attribute (argument_list (identifier_names) identifier_names )argument_list )call (call (identifier_uniquifyer) identifier_uniquifyer (argument_list )argument_list )call (call (attribute (identifier_random) identifier_random (identifier_choice) identifier_choice )attribute (argument_list (identifier_domains) identifier_domains )argument_list )call )argument_list )call )yield )expression_statement )block )while_statement )block )function_definition )module
Creates a generator for generating email addresses. :arg names: list of names to use; defaults to ENGLISH_MONARCHS lowercased, ascii-fied, and stripped of whitespace :arg domains: list of domains to use; defaults to DOMAINS :arg unique: True if you want the username part of the email addresses to be unique :returns: generator Example:: from eadred.helpers import email_generator gen = email_generator() for i in range(50): mymodel = SomeModel(email=gen.next()) mymodel.save() Example 2: >>> gen = email_generator() >>> gen.next() 'eadwig@example.net' >>> gen.next() 'henrybeauclerc@mail1.example.org' >>> gen.next() 'williamrufus@example.com'
(module (function_definition (function_name_get_all) function_name_get_all (parameters (default_parameter (identifier_rc_file) identifier_rc_file (string_'~/.odoorpcrc') string_'~/.odoorpcrc' )default_parameter )parameters (block (expression_statement (assignment (identifier_conf) identifier_conf (call (identifier_ConfigParser) identifier_ConfigParser (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_read) identifier_read )attribute (argument_list (list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_rc_file) identifier_rc_file )argument_list )call )list )argument_list )call )expression_statement (expression_statement (assignment (identifier_sessions) identifier_sessions (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_name) identifier_name (call (attribute (identifier_conf) identifier_conf (identifier_sections) identifier_sections )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_sessions) identifier_sessions (identifier_name) identifier_name )subscript (dictionary (pair (string_'type') string_'type' (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (string_'type') string_'type' )argument_list )call )pair (pair (string_'host') string_'host' (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (string_'host') string_'host' )argument_list )call )pair (pair (string_'protocol') string_'protocol' (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (string_'protocol') string_'protocol' )argument_list )call )pair (pair (string_'port') string_'port' (call (attribute (identifier_conf) identifier_conf (identifier_getint) identifier_getint )attribute (argument_list (identifier_name) identifier_name (string_'port') string_'port' )argument_list )call )pair (pair (string_'timeout') string_'timeout' (call (attribute (identifier_conf) identifier_conf (identifier_getfloat) identifier_getfloat )attribute (argument_list (identifier_name) identifier_name (string_'timeout') string_'timeout' )argument_list )call )pair (pair (string_'user') string_'user' (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (string_'user') string_'user' )argument_list )call )pair (pair (string_'passwd') string_'passwd' (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (string_'passwd') string_'passwd' )argument_list )call )pair (pair (string_'database') string_'database' (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (string_'database') string_'database' )argument_list )call )pair )dictionary )assignment )expression_statement )block )for_statement (return_statement (identifier_sessions) identifier_sessions )return_statement )block )function_definition )module
Return all session configurations from the `rc_file` file. >>> import odoorpc >>> from pprint import pprint as pp >>> pp(odoorpc.session.get_all()) # doctest: +SKIP {'foo': {'database': 'db_name', 'host': 'localhost', 'passwd': 'password', 'port': 8069, 'protocol': 'jsonrpc', 'timeout': 120, 'type': 'ODOO', 'user': 'admin'}, ...} .. doctest:: :hide: >>> import odoorpc >>> session = '%s_session' % DB >>> odoo.save(session) >>> data = odoorpc.session.get_all() >>> data[session]['host'] == HOST True >>> data[session]['protocol'] == PROTOCOL True >>> data[session]['port'] == int(PORT) True >>> data[session]['database'] == DB True >>> data[session]['user'] == USER True >>> data[session]['passwd'] == PWD True >>> data[session]['type'] == 'ODOO' True
(module (function_definition (function_name_list_all_python_programs) function_name_list_all_python_programs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_tot_lines) identifier_tot_lines )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_tot_bytes) identifier_tot_bytes )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_tot_files) identifier_tot_files )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_tot_loc) identifier_tot_loc )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_lstPrograms) identifier_lstPrograms )attribute (list )list )assignment )expression_statement (expression_statement (assignment (identifier_fl) identifier_fl (call (attribute (identifier_mod_fl) identifier_mod_fl (identifier_FileList) identifier_FileList )attribute (argument_list (list (attribute (identifier_self) identifier_self (identifier_fldr) identifier_fldr )attribute )list (list (string_'*.py') string_'*.py' )list (list (string_"__pycache__") string_"__pycache__" (string_"/venv/") string_"/venv/" (string_"/venv2/") string_"/venv2/" (string_".git") string_".git" )list )argument_list )call )assignment )expression_statement (for_statement (identifier_fip) identifier_fip (call (attribute (identifier_fl) identifier_fl (identifier_get_list) identifier_get_list )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (string_'__init__.py') string_'__init__.py' (identifier_fip) identifier_fip )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (identifier_fip) identifier_fip (string_'TODO - add comment') string_'TODO - add comment' )argument_list )call )expression_statement (expression_statement (assignment (identifier_f) identifier_f (call (attribute (identifier_mod_file) identifier_mod_file (identifier_TextFile) identifier_TextFile )attribute (argument_list (identifier_fip) identifier_fip )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_tot_lines) identifier_tot_lines )attribute (call (attribute (identifier_f) identifier_f (identifier_count_lines_in_file) identifier_count_lines_in_file )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_tot_loc) identifier_tot_loc )attribute (call (attribute (identifier_f) identifier_f (identifier_count_lines_of_code) identifier_count_lines_of_code )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_tot_bytes) identifier_tot_bytes )attribute (attribute (identifier_f) identifier_f (identifier_size) identifier_size )attribute )augmented_assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_tot_files) identifier_tot_files )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'All Python Program Statistics') string_'All Python Program Statistics' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Files = ') string_'Files = ' (attribute (identifier_self) identifier_self (identifier_tot_files) identifier_tot_files )attribute (string_' Bytes = ') string_' Bytes = ' (attribute (identifier_self) identifier_self (identifier_tot_bytes) identifier_tot_bytes )attribute (string_' Lines = ') string_' Lines = ' (attribute (identifier_self) identifier_self (identifier_tot_lines) identifier_tot_lines )attribute (string_' Lines of Code = ') string_' Lines of Code = ' (attribute (identifier_self) identifier_self (identifier_tot_loc) identifier_tot_loc )attribute )argument_list )call )expression_statement )block )function_definition )module
collects a filelist of all .py programs
(module (function_definition (function_name_Search) function_name_Search (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier_disk) identifier_disk (attribute (identifier_self) identifier_self (identifier_disks) identifier_disks )attribute (block (if_statement (comparison_operator (call (attribute (call (attribute (attribute (identifier_disk) identifier_disk (identifier_id) identifier_id )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_find) identifier_find )attribute (argument_list (call (attribute (identifier_key) identifier_key (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (identifier_disk) identifier_disk )argument_list )call )expression_statement )block (elif_clause (comparison_operator (call (attribute (identifier_key) identifier_key (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (attribute (identifier_disk) identifier_disk (identifier_partition_paths) identifier_partition_paths )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (identifier_disk) identifier_disk )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (parenthesized_expression (identifier_results) identifier_results )parenthesized_expression )return_statement )block )function_definition )module
Search disk list by partial mount point or ID
(module (function_definition (function_name_generate) function_name_generate (parameters (identifier_env) identifier_env )parameters (block (expression_statement (assignment (subscript (identifier_env) identifier_env (string_'MIDL') string_'MIDL' )subscript (string_'MIDL.EXE') string_'MIDL.EXE' )assignment )expression_statement (expression_statement (assignment (subscript (identifier_env) identifier_env (string_'MIDLFLAGS') string_'MIDLFLAGS' )subscript (call (attribute (attribute (identifier_SCons) identifier_SCons (identifier_Util) identifier_Util )attribute (identifier_CLVar) identifier_CLVar )attribute (argument_list (string_'/nologo') string_'/nologo' )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_env) identifier_env (string_'MIDLCOM') string_'MIDLCOM' )subscript (string_'$MIDL $MIDLFLAGS /tlb ${TARGETS[0]} /h ${TARGETS[1]} /iid ${TARGETS[2]} /proxy ${TARGETS[3]} /dlldata ${TARGETS[4]} $SOURCE 2> NUL') string_'$MIDL $MIDLFLAGS /tlb ${TARGETS[0]} /h ${TARGETS[1]} /iid ${TARGETS[2]} /proxy ${TARGETS[3]} /dlldata ${TARGETS[4]} $SOURCE 2> NUL' )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_env) identifier_env (string_'BUILDERS') string_'BUILDERS' )subscript (string_'TypeLibrary') string_'TypeLibrary' )subscript (identifier_midl_builder) identifier_midl_builder )assignment )expression_statement )block )function_definition )module
Add Builders and construction variables for midl to an Environment.
(module (function_definition (function_name_Binary) function_name_Binary (parameters (identifier_x) identifier_x )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_text_type) identifier_text_type )argument_list )call (not_operator (parenthesized_expression (boolean_operator (identifier_JYTHON) identifier_JYTHON (identifier_IRONPYTHON) identifier_IRONPYTHON )boolean_operator )parenthesized_expression )not_operator )boolean_operator (block (return_statement (call (attribute (identifier_x) identifier_x (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_bytes) identifier_bytes (argument_list (identifier_x) identifier_x )argument_list )call )return_statement )block )function_definition )module
Return x as a binary type.
(module (function_definition (function_name_changelog_cli) function_name_changelog_cli (parameters (identifier_ctx) identifier_ctx )parameters (block (if_statement (attribute (identifier_ctx) identifier_ctx (identifier_invoked_subcommand) identifier_invoked_subcommand )attribute (block (return_statement )return_statement )block )if_statement (import_from_statement (dotted_name (identifier_peltak) identifier_peltak (identifier_core) identifier_core )dotted_name (dotted_name (identifier_shell) identifier_shell )dotted_name )import_from_statement (import_from_statement (relative_import (import_prefix )import_prefix )relative_import (dotted_name (identifier_logic) identifier_logic )dotted_name )import_from_statement (expression_statement (call (attribute (identifier_shell) identifier_shell (identifier_cprint) identifier_cprint )attribute (argument_list (call (attribute (identifier_logic) identifier_logic (identifier_changelog) identifier_changelog )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Generate changelog from commit messages.
(module (function_definition (function_name_port) function_name_port (parameters (identifier_self) identifier_self (identifier_port) identifier_port )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_port) identifier_port (identifier_int) identifier_int )argument_list )call )not_operator (block (raise_statement (call (identifier_WebDriverException) identifier_WebDriverException (argument_list (string_"Port needs to be an integer") string_"Port needs to be an integer" )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_port) identifier_port (call (identifier_int) identifier_int (argument_list (identifier_port) identifier_port )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_port) identifier_port (integer_1) integer_1 )comparison_operator (comparison_operator (identifier_port) identifier_port (integer_65535) integer_65535 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_WebDriverException) identifier_WebDriverException (argument_list (string_"Port number must be in the range 1..65535") string_"Port number must be in the range 1..65535" )argument_list )call )raise_statement )block )if_statement )block (except_clause (tuple (identifier_ValueError) identifier_ValueError (identifier_TypeError) identifier_TypeError )tuple (block (raise_statement (call (identifier_WebDriverException) identifier_WebDriverException (argument_list (string_"Port needs to be an integer") string_"Port needs to be an integer" )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__port) identifier__port )attribute (identifier_port) identifier_port )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_preference) identifier_set_preference )attribute (argument_list (string_"webdriver_firefox_port") string_"webdriver_firefox_port" (attribute (identifier_self) identifier_self (identifier__port) identifier__port )attribute )argument_list )call )expression_statement )block )function_definition )module
Sets the port that WebDriver will be running on
(module (function_definition (function_name_CreateUnit) function_name_CreateUnit (parameters (identifier_self) identifier_self (default_parameter (identifier_parent) identifier_parent (None) None )default_parameter (default_parameter (identifier_value) identifier_value (None) None )default_parameter (default_parameter (identifier_bid_amount) identifier_bid_amount (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_unit) identifier_unit (dictionary (pair (string_'xsi_type') string_'xsi_type' (string_'ProductPartition') string_'ProductPartition' )pair (pair (string_'partitionType') string_'partitionType' (string_'UNIT') string_'UNIT' )pair )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_parent) identifier_parent (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_unit) identifier_unit (string_'parentCriterionId') string_'parentCriterionId' )subscript (subscript (identifier_parent) identifier_parent (string_'id') string_'id' )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_unit) identifier_unit (string_'caseValue') string_'caseValue' )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_bid_amount) identifier_bid_amount (None) None )comparison_operator (comparison_operator (identifier_bid_amount) identifier_bid_amount (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_bidding_strategy_configuration) identifier_bidding_strategy_configuration (dictionary (pair (string_'bids') string_'bids' (list (dictionary (pair (string_'xsi_type') string_'xsi_type' (string_'CpcBid') string_'CpcBid' )pair (pair (string_'bid') string_'bid' (dictionary (pair (string_'xsi_type') string_'xsi_type' (string_'Money') string_'Money' )pair (pair (string_'microAmount') string_'microAmount' (call (identifier_str) identifier_str (argument_list (identifier_bid_amount) identifier_bid_amount )argument_list )call )pair )dictionary )pair )dictionary )list )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_adgroup_criterion) identifier_adgroup_criterion (dictionary (pair (string_'xsi_type') string_'xsi_type' (string_'BiddableAdGroupCriterion') string_'BiddableAdGroupCriterion' )pair (pair (string_'biddingStrategyConfiguration') string_'biddingStrategyConfiguration' (identifier_bidding_strategy_configuration) identifier_bidding_strategy_configuration )pair )dictionary )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_adgroup_criterion) identifier_adgroup_criterion (dictionary (pair (string_'xsi_type') string_'xsi_type' (string_'NegativeAdGroupCriterion') string_'NegativeAdGroupCriterion' )pair )dictionary )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_adgroup_criterion) identifier_adgroup_criterion (string_'adGroupId') string_'adGroupId' )subscript (attribute (identifier_self) identifier_self (identifier_adgroup_id) identifier_adgroup_id )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_adgroup_criterion) identifier_adgroup_criterion (string_'criterion') string_'criterion' )subscript (identifier_unit) identifier_unit )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_CreateAddOperation) identifier_CreateAddOperation )attribute (argument_list (identifier_adgroup_criterion) identifier_adgroup_criterion )argument_list )call )expression_statement (return_statement (identifier_unit) identifier_unit )return_statement )block )function_definition )module
Creates a unit node. Args: parent: The node that should be this node's parent. value: The value being partitioned on. bid_amount: The amount to bid for matching products, in micros. Returns: A new unit node.
(module (function_definition (function_name_get_table_schema) function_name_get_table_schema (parameters (identifier_self) identifier_self (identifier_dataset) identifier_dataset (identifier_table) identifier_table (default_parameter (identifier_project_id) identifier_project_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_project_id) identifier_project_id (call (attribute (identifier_self) identifier_self (identifier__get_project_id) identifier__get_project_id )attribute (argument_list (identifier_project_id) identifier_project_id )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_bigquery) identifier_bigquery )attribute (identifier_tables) identifier_tables )attribute (argument_list )argument_list )call (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_projectId) identifier_projectId (identifier_project_id) identifier_project_id )keyword_argument (keyword_argument (identifier_tableId) identifier_tableId (identifier_table) identifier_table )keyword_argument (keyword_argument (identifier_datasetId) identifier_datasetId (identifier_dataset) identifier_dataset )keyword_argument )argument_list )call (identifier_execute) identifier_execute )attribute (argument_list (keyword_argument (identifier_num_retries) identifier_num_retries (attribute (identifier_self) identifier_self (identifier_num_retries) identifier_num_retries )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_HttpError) identifier_HttpError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (comparison_operator (call (identifier_int) identifier_int (argument_list (subscript (attribute (identifier_e) identifier_e (identifier_resp) identifier_resp )attribute (string_'status') string_'status' )subscript )argument_list )call (integer_404) integer_404 )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warn) identifier_warn )attribute (argument_list (string_'Table %s.%s does not exist') string_'Table %s.%s does not exist' (identifier_dataset) identifier_dataset (identifier_table) identifier_table )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (raise_statement )raise_statement )block )except_clause )try_statement (return_statement (subscript (subscript (identifier_result) identifier_result (string_'schema') string_'schema' )subscript (string_'fields') string_'fields' )subscript )return_statement )block )function_definition )module
Return the table schema. Parameters ---------- dataset : str The dataset containing the `table`. table : str The table to get the schema for project_id: str, optional The project of the dataset. Returns ------- list A ``list`` of ``dict`` objects that represent the table schema. If the table doesn't exist, None is returned.
(module (function_definition (function_name_is_valid_number_for_region) function_name_is_valid_number_for_region (parameters (identifier_numobj) identifier_numobj (identifier_region_code) identifier_region_code )parameters (block (expression_statement (assignment (identifier_country_code) identifier_country_code (attribute (identifier_numobj) identifier_numobj (identifier_country_code) identifier_country_code )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_region_code) identifier_region_code (None) None )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_metadata) identifier_metadata (call (attribute (identifier_PhoneMetadata) identifier_PhoneMetadata (identifier_metadata_for_region_or_calling_code) identifier_metadata_for_region_or_calling_code )attribute (argument_list (identifier_country_code) identifier_country_code (call (attribute (identifier_region_code) identifier_region_code (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (comparison_operator (identifier_metadata) identifier_metadata (None) None )comparison_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_region_code) identifier_region_code (identifier_REGION_CODE_FOR_NON_GEO_ENTITY) identifier_REGION_CODE_FOR_NON_GEO_ENTITY )comparison_operator (comparison_operator (identifier_country_code) identifier_country_code (call (identifier_country_code_for_valid_region) identifier_country_code_for_valid_region (argument_list (identifier_region_code) identifier_region_code )argument_list )call )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator )parenthesized_expression (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_nsn) identifier_nsn (call (identifier_national_significant_number) identifier_national_significant_number (argument_list (identifier_numobj) identifier_numobj )argument_list )call )assignment )expression_statement (return_statement (parenthesized_expression (comparison_operator (call (identifier__number_type_helper) identifier__number_type_helper (argument_list (identifier_nsn) identifier_nsn (identifier_metadata) identifier_metadata )argument_list )call (attribute (identifier_PhoneNumberType) identifier_PhoneNumberType (identifier_UNKNOWN) identifier_UNKNOWN )attribute )comparison_operator )parenthesized_expression )return_statement )block )function_definition )module
Tests whether a phone number is valid for a certain region. Note this doesn't verify the number is actually in use, which is impossible to tell by just looking at a number itself. If the country calling code is not the same as the country calling code for the region, this immediately exits with false. After this, the specific number pattern rules for the region are examined. This is useful for determining for example whether a particular number is valid for Canada, rather than just a valid NANPA number. Warning: In most cases, you want to use is_valid_number instead. For example, this method will mark numbers from British Crown dependencies such as the Isle of Man as invalid for the region "GB" (United Kingdom), since it has its own region code, "IM", which may be undesirable. Arguments: numobj -- The phone number object that we want to validate. region_code -- The region that we want to validate the phone number for. Returns a boolean that indicates whether the number is of a valid pattern.
(module (function_definition (function_name_set_cell) function_name_set_cell (parameters (identifier_self) identifier_self (identifier_i) identifier_i (identifier_j) identifier_j (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_bool_tests) identifier_bool_tests (list (comparison_operator (identifier_value) identifier_value (subscript (subscript (attribute (identifier_self) identifier_self (identifier__possibles) identifier__possibles )attribute (identifier_i) identifier_i )subscript (identifier_j) identifier_j )subscript )comparison_operator (comparison_operator (identifier_value) identifier_value (subscript (attribute (identifier_self) identifier_self (identifier__poss_rows) identifier__poss_rows )attribute (identifier_i) identifier_i )subscript )comparison_operator (comparison_operator (identifier_value) identifier_value (subscript (attribute (identifier_self) identifier_self (identifier__poss_cols) identifier__poss_cols )attribute (identifier_j) identifier_j )subscript )comparison_operator (comparison_operator (identifier_value) identifier_value (subscript (attribute (identifier_self) identifier_self (identifier__poss_box) identifier__poss_box )attribute (binary_operator (binary_operator (parenthesized_expression (binary_operator (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_order) identifier_order )attribute )binary_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_order) identifier_order )attribute )binary_operator (parenthesized_expression (binary_operator (identifier_j) identifier_j (attribute (identifier_self) identifier_self (identifier_order) identifier_order )attribute )binary_operator )parenthesized_expression )binary_operator )subscript )comparison_operator (comparison_operator (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier_row) identifier_row )attribute (argument_list (identifier_i) identifier_i )argument_list )call )comparison_operator (comparison_operator (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier_col) identifier_col )attribute (argument_list (identifier_j) identifier_j )argument_list )call )comparison_operator (comparison_operator (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier_box) identifier_box )attribute (argument_list (identifier_i) identifier_i (identifier_j) identifier_j )argument_list )call )comparison_operator )list )assignment )expression_statement (if_statement (call (identifier_all) identifier_all (argument_list (identifier_bool_tests) identifier_bool_tests )argument_list )call (block (expression_statement (assignment (subscript (subscript (identifier_self) identifier_self (identifier_i) identifier_i )subscript (identifier_j) identifier_j )subscript (identifier_value) identifier_value )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_SudokuHasNoSolutionError) identifier_SudokuHasNoSolutionError (argument_list (string_"This value cannot be set here!") string_"This value cannot be set here!" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Set a cell's value, with a series of safety checks :param i: The row number :type i: int :param j: The column number :type j: int :param value: The value to set :type value: int :raises: :py:class:`dlxsudoku.exceptions.SudokuHasNoSolutionError`