sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_free) function_name_free (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__ptr) identifier__ptr )attribute (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_Gauged) identifier_Gauged (identifier_map_free) identifier_map_free )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ptr) identifier_ptr )attribute )argument_list )call )expression_statement (expression_statement (augmented_assignment (attribute (identifier_SparseMap) identifier_SparseMap (identifier_ALLOCATIONS) identifier_ALLOCATIONS )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__ptr) identifier__ptr )attribute (None) None )assignment )expression_statement )block )function_definition )module
Free the map
(module (function_definition (function_name_filter_event) function_name_filter_event (parameters (identifier_tag) identifier_tag (identifier_data) identifier_data (identifier_defaults) identifier_defaults )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_keys) identifier_keys (list )list )assignment )expression_statement (expression_statement (assignment (identifier_use_defaults) identifier_use_defaults (True) True )assignment )expression_statement (for_statement (identifier_ktag) identifier_ktag (call (attribute (identifier___opts__) identifier___opts__ (identifier_get) identifier_get )attribute (argument_list (string_'filter_events') string_'filter_events' (dictionary )dictionary )argument_list )call (block (if_statement (comparison_operator (identifier_tag) identifier_tag (identifier_ktag) identifier_ktag )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_keys) identifier_keys (subscript (subscript (subscript (identifier___opts__) identifier___opts__ (string_'filter_events') string_'filter_events' )subscript (identifier_ktag) identifier_ktag )subscript (string_'keys') string_'keys' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_use_defaults) identifier_use_defaults (call (attribute (subscript (subscript (identifier___opts__) identifier___opts__ (string_'filter_events') string_'filter_events' )subscript (identifier_ktag) identifier_ktag )subscript (identifier_get) identifier_get )attribute (argument_list (string_'use_defaults') string_'use_defaults' (True) True )argument_list )call )assignment )expression_statement )block )for_statement (if_statement (comparison_operator (identifier_use_defaults) identifier_use_defaults (False) False )comparison_operator (block (expression_statement (assignment (identifier_defaults) identifier_defaults (list )list )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_defaults) identifier_defaults (identifier_list) identifier_list )argument_list )call )not_operator (block (expression_statement (assignment (identifier_defaults) identifier_defaults (call (identifier_list) identifier_list (argument_list (identifier_defaults) identifier_defaults )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_defaults) identifier_defaults (call (identifier_list) identifier_list (argument_list (call (identifier_set) identifier_set (argument_list (binary_operator (identifier_defaults) identifier_defaults (identifier_keys) identifier_keys )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_defaults) identifier_defaults (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_data) identifier_data )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_key) identifier_key )subscript (subscript (identifier_data) identifier_data (identifier_key) identifier_key )subscript )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Accept a tag, a dict and a list of default keys to return from the dict, and check them against the cloud configuration for that tag
(module (function_definition (function_name_get_events_for_object) function_name_get_events_for_object (parameters (identifier_self) identifier_self (identifier_content_object) identifier_content_object (default_parameter (identifier_distinction) identifier_distinction (string_'') string_'' )default_parameter (default_parameter (identifier_inherit) identifier_inherit (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_ct) identifier_ct (call (attribute (attribute (identifier_ContentType) identifier_ContentType (identifier_objects) identifier_objects )attribute (identifier_get_for_model) identifier_get_for_model )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_content_object) identifier_content_object )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_distinction) identifier_distinction (block (expression_statement (assignment (identifier_dist_q) identifier_dist_q (call (identifier_Q) identifier_Q (argument_list (keyword_argument (identifier_eventrelation__distinction) identifier_eventrelation__distinction (identifier_distinction) identifier_distinction )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cal_dist_q) identifier_cal_dist_q (call (identifier_Q) identifier_Q (argument_list (keyword_argument (identifier_calendar__calendarrelation__distinction) identifier_calendar__calendarrelation__distinction (identifier_distinction) identifier_distinction )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_dist_q) identifier_dist_q (call (identifier_Q) identifier_Q (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cal_dist_q) identifier_cal_dist_q (call (identifier_Q) identifier_Q (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_inherit) identifier_inherit (block (expression_statement (assignment (identifier_inherit_q) identifier_inherit_q (call (identifier_Q) identifier_Q (argument_list (identifier_cal_dist_q) identifier_cal_dist_q (keyword_argument (identifier_calendar__calendarrelation__content_type) identifier_calendar__calendarrelation__content_type (identifier_ct) identifier_ct )keyword_argument (keyword_argument (identifier_calendar__calendarrelation__object_id) identifier_calendar__calendarrelation__object_id (attribute (identifier_content_object) identifier_content_object (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_calendar__calendarrelation__inheritable) identifier_calendar__calendarrelation__inheritable (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_inherit_q) identifier_inherit_q (call (identifier_Q) identifier_Q (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_event_q) identifier_event_q (call (identifier_Q) identifier_Q (argument_list (identifier_dist_q) identifier_dist_q (keyword_argument (identifier_eventrelation__content_type) identifier_eventrelation__content_type (identifier_ct) identifier_ct )keyword_argument (keyword_argument (identifier_eventrelation__object_id) identifier_eventrelation__object_id (attribute (identifier_content_object) identifier_content_object (identifier_id) identifier_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_Event) identifier_Event (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (binary_operator (identifier_inherit_q) identifier_inherit_q (identifier_event_q) identifier_event_q )binary_operator )argument_list )call )return_statement )block )function_definition )module
returns a queryset full of events, that relate to the object through, the distinction If inherit is false it will not consider the calendars that the events belong to. If inherit is true it will inherit all of the relations and distinctions that any calendar that it belongs to has, as long as the relation has inheritable set to True. (See Calendar) >>> event = Event.objects.get(title='Test1') >>> user = User.objects.get(username = 'alice') >>> EventRelation.objects.get_events_for_object(user, 'owner', inherit=False) [<Event: Test1: Tuesday, Jan. 1, 2008-Friday, Jan. 11, 2008>] If a distinction is not declared it will not vet the relations based on distinction. >>> EventRelation.objects.get_events_for_object(user, inherit=False) [<Event: Test1: Tuesday, Jan. 1, 2008-Friday, Jan. 11, 2008>, <Event: Test2: Tuesday, Jan. 1, 2008-Friday, Jan. 11, 2008>] Now if there is a Calendar >>> calendar = Calendar(name = 'MyProject') >>> calendar.save() And an event that belongs to that calendar >>> event = Event.objects.get(title='Test2') >>> calendar.events.add(event) If we relate this calendar to some object with inheritable set to true, that relation will be inherited >>> user = User.objects.get(username='bob') >>> cr = calendar.create_relation(user, 'viewer', True) >>> EventRelation.objects.get_events_for_object(user, 'viewer') [<Event: Test1: Tuesday, Jan. 1, 2008-Friday, Jan. 11, 2008>, <Event: Test2: Tuesday, Jan. 1, 2008-Friday, Jan. 11, 2008>]
(module (function_definition (function_name__altair_hline_) function_name__altair_hline_ (parameters (identifier_self) identifier_self (identifier_xfield) identifier_xfield (identifier_yfield) identifier_yfield (identifier_opts) identifier_opts (identifier_style) identifier_style (identifier_encode) identifier_encode )parameters (block (try_statement (block (expression_statement (assignment (identifier_rawy) identifier_rawy (identifier_yfield) identifier_yfield )assignment )expression_statement (if_statement (comparison_operator (string_":") string_":" (identifier_yfield) identifier_yfield )comparison_operator (block (expression_statement (assignment (identifier_rawy) identifier_rawy (subscript (call (attribute (identifier_yfield) identifier_yfield (identifier_split) identifier_split )attribute (argument_list (string_":") string_":" )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_mean) identifier_mean (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (identifier_rawy) identifier_rawy )subscript (identifier_mean) identifier_mean )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_l) identifier_l (list )list )assignment )expression_statement (expression_statement (assignment (identifier_i) identifier_i (integer_0) integer_0 )assignment )expression_statement (while_statement (comparison_operator (identifier_i) identifier_i (call (identifier_len) identifier_len (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (identifier_rawy) identifier_rawy )subscript )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_l) identifier_l (identifier_append) identifier_append )attribute (argument_list (identifier_mean) identifier_mean )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_i) identifier_i (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (string_"Mean") string_"Mean" )subscript (identifier_l) identifier_l )assignment )expression_statement (expression_statement (assignment (identifier_chart) identifier_chart (call (attribute (call (attribute (call (attribute (call (identifier_Chart) identifier_Chart (argument_list (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute )argument_list )call (identifier_mark_line) identifier_mark_line )attribute (argument_list (dictionary_splat (identifier_style) identifier_style )dictionary_splat )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (keyword_argument (identifier_x) identifier_x (identifier_xfield) identifier_xfield )keyword_argument (line_continuation_\) line_continuation_\ (keyword_argument (identifier_y) identifier_y (string_"Mean") string_"Mean" )keyword_argument (dictionary_splat (identifier_encode) identifier_encode )dictionary_splat )argument_list )call (identifier_properties) identifier_properties )attribute (argument_list (dictionary_splat (identifier_opts) identifier_opts )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_drop) identifier_drop )attribute (argument_list (string_"Mean") string_"Mean" )argument_list )call )expression_statement (return_statement (identifier_chart) identifier_chart )return_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_self) identifier_self (identifier_err) identifier_err )attribute (argument_list (identifier_e) identifier_e (string_"Can not draw mean line chart") string_"Can not draw mean line chart" )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Get a mean line chart
(module (function_definition (function_name_get_value) function_name_get_value (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (for_statement (identifier_title) identifier_title (binary_operator (call (attribute (identifier__TITLES) identifier__TITLES (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (tuple )tuple )argument_list )call (tuple (identifier_key) identifier_key )tuple )binary_operator (block (try_statement (block (expression_statement (assignment (identifier_value) identifier_value (subscript (list_comprehension (subscript (subscript (identifier_entry) identifier_entry (string_'lastMeasurement') string_'lastMeasurement' )subscript (string_'value') string_'value' )subscript (for_in_clause (identifier_entry) identifier_entry (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (string_'sensors') string_'sensors' )subscript )for_in_clause (if_clause (comparison_operator (subscript (identifier_entry) identifier_entry (string_'title') string_'title' )subscript (identifier_title) identifier_title )comparison_operator )if_clause )list_comprehension (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (identifier_value) identifier_value )return_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Extract a value for a given key.
(module (function_definition (function_name_wave) function_name_wave (parameters (identifier_self) identifier_self (identifier_wavelength) identifier_wavelength )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_wavelength) identifier_wavelength (attribute (attribute (identifier_q) identifier_q (identifier_quantity) identifier_quantity )attribute (identifier_Quantity) identifier_Quantity )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Wavelength must be in length units.") string_"Wavelength must be in length units." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__wave) identifier__wave )attribute (identifier_wavelength) identifier_wavelength )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_wave_units) identifier_wave_units )attribute (attribute (identifier_wavelength) identifier_wavelength (identifier_unit) identifier_unit )attribute )assignment )expression_statement )block )function_definition )module
A setter for the wavelength Parameters ---------- wavelength: astropy.units.quantity.Quantity The array with units
(module (function_definition (function_name_list_resource_groups) function_name_list_resource_groups (parameters (identifier_access_token) identifier_access_token (identifier_subscription_id) identifier_subscription_id )parameters (block (expression_statement (assignment (identifier_endpoint) identifier_endpoint (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (list (call (identifier_get_rm_endpoint) identifier_get_rm_endpoint (argument_list )argument_list )call (string_'/subscriptions/') string_'/subscriptions/' (identifier_subscription_id) identifier_subscription_id (string_'/resourceGroups/') string_'/resourceGroups/' (string_'?api-version=') string_'?api-version=' (identifier_RESOURCE_API) identifier_RESOURCE_API )list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_do_get) identifier_do_get (argument_list (identifier_endpoint) identifier_endpoint (identifier_access_token) identifier_access_token )argument_list )call )return_statement )block )function_definition )module
List the resource groups in a subscription. Args: access_token (str): A valid Azure authentication token. subscription_id (str): Azure subscription id. Returns: HTTP response.
(module (function_definition (function_name__get_contigs_to_keep) function_name__get_contigs_to_keep (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename )parameters (block (if_statement (comparison_operator (identifier_filename) identifier_filename (None) None )comparison_operator (block (return_statement (call (identifier_set) identifier_set (argument_list )argument_list )call )return_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (set_comprehension (call (attribute (identifier_line) identifier_line (identifier_rstrip) identifier_rstrip )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (identifier_f) identifier_f )for_in_clause )set_comprehension )return_statement )block )with_statement )block )function_definition )module
Returns a set of names from file called filename. If filename is None, returns an empty set
(module (function_definition (function_name_read) function_name_read (parameters (identifier_cls) identifier_cls (identifier_node) identifier_node (identifier_block_device) identifier_block_device )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_node) identifier_node (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_system_id) identifier_system_id (identifier_node) identifier_node )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_node) identifier_node (identifier_Node) identifier_Node )argument_list )call (block (expression_statement (assignment (identifier_system_id) identifier_system_id (attribute (identifier_node) identifier_node (identifier_system_id) identifier_system_id )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_"node must be a Node or str, not %s") string_"node must be a Node or str, not %s" (attribute (call (identifier_type) identifier_type (argument_list (identifier_node) identifier_node )argument_list )call (identifier___name__) identifier___name__ )attribute )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_block_device) identifier_block_device (identifier_int) identifier_int )argument_list )call (block (expression_statement (assignment (identifier_block_device) identifier_block_device (identifier_block_device) identifier_block_device )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_block_device) identifier_block_device (identifier_BlockDevice) identifier_BlockDevice )argument_list )call (block (expression_statement (assignment (identifier_block_device) identifier_block_device (attribute (identifier_block_device) identifier_block_device (identifier_id) identifier_id )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_"node must be a Node or str, not %s") string_"node must be a Node or str, not %s" (attribute (call (identifier_type) identifier_type (argument_list (identifier_block_device) identifier_block_device )argument_list )call (identifier___name__) identifier___name__ )attribute )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_data) identifier_data (await (call (attribute (attribute (identifier_cls) identifier_cls (identifier__handler) identifier__handler )attribute (identifier_read) identifier_read )attribute (argument_list (keyword_argument (identifier_system_id) identifier_system_id (identifier_system_id) identifier_system_id )keyword_argument (keyword_argument (identifier_device_id) identifier_device_id (identifier_block_device) identifier_block_device )keyword_argument )argument_list )call )await )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (generator_expression (call (attribute (identifier_cls) identifier_cls (identifier__object) identifier__object )attribute (argument_list (identifier_item) identifier_item )argument_list )call (for_in_clause (identifier_item) identifier_item (identifier_data) identifier_data )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Get list of `Partitions`'s for `node` and `block_device`.
(module (function_definition (function_name__auto_unlock_key_position) function_name__auto_unlock_key_position (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_found_pos) identifier_found_pos (None) None )assignment )expression_statement (expression_statement (assignment (identifier_default_keyring_ids) identifier_default_keyring_ids (call (attribute (identifier_gkr) identifier_gkr (identifier_list_item_ids_sync) identifier_list_item_ids_sync )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_default_keyring) identifier_default_keyring )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_pos) identifier_pos (identifier_default_keyring_ids) identifier_default_keyring_ids (block (expression_statement (assignment (identifier_item_attrs) identifier_item_attrs (call (attribute (identifier_gkr) identifier_gkr (identifier_item_get_attributes_sync) identifier_item_get_attributes_sync )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_default_keyring) identifier_default_keyring )attribute (identifier_pos) identifier_pos )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_app) identifier_app (string_'application') string_'application' )assignment )expression_statement (if_statement (boolean_operator (call (attribute (identifier_item_attrs) identifier_item_attrs (identifier_has_key) identifier_has_key )attribute (argument_list (identifier_app) identifier_app )argument_list )call (comparison_operator (subscript (identifier_item_attrs) identifier_item_attrs (identifier_app) identifier_app )subscript (string_"opensesame") string_"opensesame" )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_found_pos) identifier_found_pos (identifier_pos) identifier_pos )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (return_statement (identifier_found_pos) identifier_found_pos )return_statement )block )function_definition )module
Find the open sesame password in the default keyring
(module (function_definition (function_name_set_cumulative) function_name_set_cumulative (parameters (identifier_self) identifier_self (identifier_cumulative) identifier_cumulative )parameters (block (if_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_get_cumulative_metadata) identifier_get_cumulative_metadata )attribute (argument_list )argument_list )call (identifier_is_read_only) identifier_is_read_only )attribute (argument_list )argument_list )call (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_NoAccess) identifier_NoAccess )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier__is_valid_boolean) identifier__is_valid_boolean )attribute (argument_list (identifier_cumulative) identifier_cumulative )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_InvalidArgument) identifier_InvalidArgument )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__my_map) identifier__my_map )attribute (string_'cumulative') string_'cumulative' )subscript (identifier_cumulative) identifier_cumulative )assignment )expression_statement )block )function_definition )module
Applies this rule to all previous assessment parts. arg: cumulative (boolean): ``true`` to apply to all previous assessment parts. ``false`` to apply to the immediate previous assessment part raise: InvalidArgument - ``cumulative`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_connect_s3_bucket_to_lambda) function_name_connect_s3_bucket_to_lambda (parameters (identifier_self) identifier_self (identifier_bucket) identifier_bucket (identifier_function_arn) identifier_function_arn (identifier_events) identifier_events (default_parameter (identifier_prefix) identifier_prefix (None) None )default_parameter (default_parameter (identifier_suffix) identifier_suffix (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_s3) identifier_s3 (call (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (argument_list (string_'s3') string_'s3' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_existing_config) identifier_existing_config (call (attribute (identifier_s3) identifier_s3 (identifier_get_bucket_notification_configuration) identifier_get_bucket_notification_configuration )attribute (argument_list (keyword_argument (identifier_Bucket) identifier_Bucket (identifier_bucket) identifier_bucket )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_existing_config) identifier_existing_config (identifier_pop) identifier_pop )attribute (argument_list (string_'ResponseMetadata') string_'ResponseMetadata' (None) None )argument_list )call )expression_statement (expression_statement (assignment (identifier_existing_lambda_config) identifier_existing_lambda_config (call (attribute (identifier_existing_config) identifier_existing_config (identifier_get) identifier_get )attribute (argument_list (string_'LambdaFunctionConfigurations') string_'LambdaFunctionConfigurations' (list )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_single_config) identifier_single_config (dictionary (pair (string_'LambdaFunctionArn') string_'LambdaFunctionArn' (identifier_function_arn) identifier_function_arn )pair (pair (string_'Events') string_'Events' (identifier_events) identifier_events )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_filter_rules) identifier_filter_rules (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_prefix) identifier_prefix (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_filter_rules) identifier_filter_rules (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'Name') string_'Name' (string_'Prefix') string_'Prefix' )pair (pair (string_'Value') string_'Value' (identifier_prefix) identifier_prefix )pair )dictionary )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_suffix) identifier_suffix (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_filter_rules) identifier_filter_rules (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'Name') string_'Name' (string_'Suffix') string_'Suffix' )pair (pair (string_'Value') string_'Value' (identifier_suffix) identifier_suffix )pair )dictionary )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_filter_rules) identifier_filter_rules (block (expression_statement (assignment (subscript (identifier_single_config) identifier_single_config (string_'Filter') string_'Filter' )subscript (dictionary (pair (string_'Key') string_'Key' (dictionary (pair (string_'FilterRules') string_'FilterRules' (identifier_filter_rules) identifier_filter_rules )pair )dictionary )pair )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_new_config) identifier_new_config (call (attribute (identifier_self) identifier_self (identifier__merge_s3_notification_config) identifier__merge_s3_notification_config )attribute (argument_list (identifier_existing_lambda_config) identifier_existing_lambda_config (identifier_single_config) identifier_single_config )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_existing_config) identifier_existing_config (string_'LambdaFunctionConfigurations') string_'LambdaFunctionConfigurations' )subscript (identifier_new_config) identifier_new_config )assignment )expression_statement (expression_statement (call (attribute (identifier_s3) identifier_s3 (identifier_put_bucket_notification_configuration) identifier_put_bucket_notification_configuration )attribute (argument_list (keyword_argument (identifier_Bucket) identifier_Bucket (identifier_bucket) identifier_bucket )keyword_argument (keyword_argument (identifier_NotificationConfiguration) identifier_NotificationConfiguration (identifier_existing_config) identifier_existing_config )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Configure S3 bucket to invoke a lambda function. The S3 bucket must already have permission to invoke the lambda function before you call this function, otherwise the service will return an error. You can add permissions by using the ``add_permission_for_s3_event`` below. The ``events`` param matches the event strings supported by the service. This method also only supports a single prefix/suffix for now, which is what's offered in the Lambda console.
(module (function_definition (function_name__buffer_decode) function_name__buffer_decode (parameters (identifier_self) identifier_self (identifier_input) identifier_input (identifier_errors) identifier_errors (identifier_final) identifier_final )parameters (block (expression_statement (assignment (identifier_decoded_segments) identifier_decoded_segments (list )list )assignment )expression_statement (expression_statement (assignment (identifier_position) identifier_position (integer_0) integer_0 )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (pattern_list (identifier_decoded) identifier_decoded (identifier_consumed) identifier_consumed )pattern_list (call (attribute (identifier_self) identifier_self (identifier__buffer_decode_step) identifier__buffer_decode_step )attribute (argument_list (subscript (identifier_input) identifier_input (slice (identifier_position) identifier_position (colon) colon )slice )subscript (identifier_errors) identifier_errors (identifier_final) identifier_final )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_consumed) identifier_consumed (integer_0) integer_0 )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (call (attribute (identifier_decoded_segments) identifier_decoded_segments (identifier_append) identifier_append )attribute (argument_list (identifier_decoded) identifier_decoded )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_position) identifier_position (identifier_consumed) identifier_consumed )augmented_assignment )expression_statement )block )while_statement (if_statement (identifier_final) identifier_final (block (assert_statement (comparison_operator (identifier_position) identifier_position (call (identifier_len) identifier_len (argument_list (identifier_input) identifier_input )argument_list )call )comparison_operator )assert_statement )block )if_statement (return_statement (expression_list (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_decoded_segments) identifier_decoded_segments )argument_list )call (identifier_position) identifier_position )expression_list )return_statement )block )function_definition )module
Decode bytes that may be arriving in a stream, following the Codecs API. `input` is the incoming sequence of bytes. `errors` tells us how to handle errors, though we delegate all error-handling cases to the real UTF-8 decoder to ensure correct behavior. `final` indicates whether this is the end of the sequence, in which case we should raise an error given incomplete input. Returns as much decoded text as possible, and the number of bytes consumed.
(module (function_definition (function_name_label_from_re) function_name_label_from_re (parameters (identifier_self) identifier_self (typed_parameter (identifier_pat) identifier_pat (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_full_path) identifier_full_path (type (identifier_bool) identifier_bool )type (False) False )typed_default_parameter (typed_default_parameter (identifier_label_cls) identifier_label_cls (type (identifier_Callable) identifier_Callable )type (None) None )typed_default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (type (string_'LabelList') string_'LabelList' )type (block (expression_statement (string_"Apply the re in `pat` to determine the label of every filename. If `full_path`, search in the full name.") string_"Apply the re in `pat` to determine the label of every filename. If `full_path`, search in the full name." )expression_statement (expression_statement (assignment (identifier_pat) identifier_pat (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_pat) identifier_pat )argument_list )call )assignment )expression_statement (function_definition (function_name__inner) function_name__inner (parameters (identifier_o) identifier_o )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier_str) identifier_str (argument_list (call (attribute (parenthesized_expression (conditional_expression (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (identifier_o) identifier_o )argument_list )call (identifier_full_path) identifier_full_path (identifier_o) identifier_o )conditional_expression )parenthesized_expression (identifier_as_posix) identifier_as_posix )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_pat) identifier_pat (identifier_search) identifier_search )attribute (argument_list (identifier_s) identifier_s )argument_list )call )assignment )expression_statement (assert_statement (identifier_res) identifier_res (string_f'Failed to find "{pat}" in "{s}"') string_f'Failed to find "{pat}" in "{s}"' )assert_statement (return_statement (call (attribute (identifier_res) identifier_res (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )return_statement )block )function_definition (return_statement (call (attribute (identifier_self) identifier_self (identifier_label_from_func) identifier_label_from_func )attribute (argument_list (identifier__inner) identifier__inner (keyword_argument (identifier_label_cls) identifier_label_cls (identifier_label_cls) identifier_label_cls )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Apply the re in `pat` to determine the label of every filename. If `full_path`, search in the full name.
(module (function_definition (function_name_group_device_names) function_name_group_device_names (parameters (identifier_devices) identifier_devices (identifier_group_size) identifier_group_size )parameters (block (expression_statement (assignment (identifier_num_devices) identifier_num_devices (call (identifier_len) identifier_len (argument_list (identifier_devices) identifier_devices )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_group_size) identifier_group_size (identifier_num_devices) identifier_num_devices )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"only %d devices, but group_size=%d") string_"only %d devices, but group_size=%d" (tuple (identifier_num_devices) identifier_num_devices (identifier_group_size) identifier_group_size )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_num_groups) identifier_num_groups (parenthesized_expression (binary_operator (binary_operator (identifier_num_devices) identifier_num_devices (identifier_group_size) identifier_group_size )binary_operator (parenthesized_expression (conditional_expression (integer_1) integer_1 (parenthesized_expression (comparison_operator (binary_operator (identifier_num_devices) identifier_num_devices (identifier_group_size) identifier_group_size )binary_operator (integer_0) integer_0 )comparison_operator )parenthesized_expression (integer_0) integer_0 )conditional_expression )parenthesized_expression )binary_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_groups) identifier_groups (list_comprehension (list )list (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_num_groups) identifier_num_groups )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (binary_operator (identifier_num_groups) identifier_num_groups (identifier_group_size) identifier_group_size )binary_operator )argument_list )call (block (expression_statement (call (attribute (subscript (identifier_groups) identifier_groups (binary_operator (identifier_i) identifier_i (identifier_num_groups) identifier_num_groups )binary_operator )subscript (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_devices) identifier_devices (binary_operator (identifier_i) identifier_i (identifier_num_devices) identifier_num_devices )binary_operator )subscript )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_groups) identifier_groups )return_statement )block )function_definition )module
Group device names into groups of group_size. Args: devices: list of strings naming devices. group_size: int >= 1 Returns: list of lists of devices, where each inner list is group_size long, and each device appears at least once in an inner list. If len(devices) % group_size = 0 then each device will appear exactly once. Raises: ValueError: group_size > len(devices)
(module (function_definition (function_name_get_email) function_name_get_email (parameters (identifier_self) identifier_self (identifier_token) identifier_token )parameters (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_emails_url) identifier_emails_url )attribute (keyword_argument (identifier_params) identifier_params (dictionary (pair (string_'access_token') string_'access_token' (attribute (identifier_token) identifier_token (identifier_token) identifier_token )attribute )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_emails) identifier_emails (call (attribute (call (attribute (identifier_resp) identifier_resp (identifier_json) identifier_json )attribute (argument_list )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'values') string_'values' (list )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_email) identifier_email (string_'') string_'' )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_email) identifier_email (call (attribute (subscript (identifier_emails) identifier_emails (integer_0) integer_0 )subscript (identifier_get) identifier_get )attribute (argument_list (string_'email') string_'email' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_primary_emails) identifier_primary_emails (list_comprehension (identifier_e) identifier_e (for_in_clause (identifier_e) identifier_e (identifier_emails) identifier_emails )for_in_clause (if_clause (call (attribute (identifier_e) identifier_e (identifier_get) identifier_get )attribute (argument_list (string_'is_primary') string_'is_primary' (False) False )argument_list )call )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_email) identifier_email (call (attribute (subscript (identifier_primary_emails) identifier_primary_emails (integer_0) integer_0 )subscript (identifier_get) identifier_get )attribute (argument_list (string_'email') string_'email' )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_IndexError) identifier_IndexError (identifier_TypeError) identifier_TypeError (identifier_KeyError) identifier_KeyError )tuple (block (return_statement (string_'') string_'' )return_statement )block )except_clause (finally_clause (block (return_statement (identifier_email) identifier_email )return_statement )block )finally_clause )try_statement )block )function_definition )module
Fetches email address from email API endpoint
(module (function_definition (function_name__random_ipv4_address_from_subnet) function_name__random_ipv4_address_from_subnet (parameters (identifier_self) identifier_self (identifier_subnet) identifier_subnet (default_parameter (identifier_network) identifier_network (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_address) identifier_address (call (identifier_str) identifier_str (argument_list (subscript (identifier_subnet) identifier_subnet (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_generator) identifier_generator )attribute (identifier_random) identifier_random )attribute (identifier_randint) identifier_randint )attribute (argument_list (integer_0) integer_0 (binary_operator (attribute (identifier_subnet) identifier_subnet (identifier_num_addresses) identifier_num_addresses )attribute (integer_1) integer_1 )binary_operator )argument_list )call )subscript )argument_list )call )assignment )expression_statement (if_statement (identifier_network) identifier_network (block (expression_statement (augmented_assignment (identifier_address) identifier_address (binary_operator (string_'/') string_'/' (call (identifier_str) identifier_str (argument_list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_generator) identifier_generator )attribute (identifier_random) identifier_random )attribute (identifier_randint) identifier_randint )attribute (argument_list (attribute (identifier_subnet) identifier_subnet (identifier_prefixlen) identifier_prefixlen )attribute (attribute (identifier_subnet) identifier_subnet (identifier_max_prefixlen) identifier_max_prefixlen )attribute )argument_list )call )argument_list )call )binary_operator )augmented_assignment )expression_statement (expression_statement (assignment (identifier_address) identifier_address (call (identifier_str) identifier_str (argument_list (call (identifier_ip_network) identifier_ip_network (argument_list (identifier_address) identifier_address (keyword_argument (identifier_strict) identifier_strict (False) False )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_address) identifier_address )return_statement )block )function_definition )module
Produces a random IPv4 address or network with a valid CIDR from within a given subnet. :param subnet: IPv4Network to choose from within :param network: Return a network address, and not an IP address
(module (function_definition (function_name_color_normalize) function_name_color_normalize (parameters (identifier_src) identifier_src (identifier_mean) identifier_mean (default_parameter (identifier_std) identifier_std (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_mean) identifier_mean (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_src) identifier_src (identifier_mean) identifier_mean )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_std) identifier_std (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_src) identifier_src (identifier_std) identifier_std )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_src) identifier_src )return_statement )block )function_definition )module
Normalize src with mean and std. Parameters ---------- src : NDArray Input image mean : NDArray RGB mean to be subtracted std : NDArray RGB standard deviation to be divided Returns ------- NDArray An `NDArray` containing the normalized image.
(module (function_definition (function_name_get_site_decorator) function_name_get_site_decorator (parameters (default_parameter (identifier_site_param) identifier_site_param (string_'site') string_'site' )default_parameter (default_parameter (identifier_obj_param) identifier_obj_param (string_'obj') string_'obj' )default_parameter (default_parameter (identifier_context_param) identifier_context_param (string_'context') string_'context' )default_parameter )parameters (block (function_definition (function_name_site_method) function_name_site_method (parameters (dictionary_splat_pattern (identifier_extra_params) identifier_extra_params )dictionary_splat_pattern )parameters (block (function_definition (function_name_decorator) function_name_decorator (parameters (identifier_fn) identifier_fn )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_fn) identifier_fn )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (identifier_request) identifier_request (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (assignment (identifier_site) identifier_site (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (identifier_site_param) identifier_site_param )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_"'%s' parameter must be passed to ") string_"'%s' parameter must be passed to " (string_"decorated view (%s)") string_"decorated view (%s)" )concatenated_string (tuple (identifier_site_param) identifier_site_param (identifier_fn) identifier_fn )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_extra_params) identifier_extra_params (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (identifier_key) identifier_key (subscript (identifier_extra_params) identifier_extra_params (identifier_key) identifier_key )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_params) identifier_params (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (identifier_key) identifier_key (identifier_value) identifier_value )pair )dictionary )argument_list )call )expression_statement )block )for_statement (try_statement (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_site) identifier_site (identifier_object_getter) identifier_object_getter )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_models) identifier_models (identifier_ObjectDoesNotExist) identifier_ObjectDoesNotExist )attribute (block (raise_statement (call (identifier_Http404) identifier_Http404 (argument_list (string_"Base object does not exist.") string_"Base object does not exist." )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_context) identifier_context (call (attribute (identifier_site) identifier_site (identifier_get_common_context) identifier_get_common_context )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_context_instance) identifier_context_instance (call (identifier_RequestContext) identifier_RequestContext (argument_list (identifier_request) identifier_request (identifier_context) identifier_context (keyword_argument (identifier_processors) identifier_processors (attribute (identifier_site) identifier_site (identifier_context_processors) identifier_context_processors )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_params) identifier_params (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (identifier_site_param) identifier_site_param (identifier_site) identifier_site )pair (pair (identifier_obj_param) identifier_obj_param (identifier_obj) identifier_obj )pair (pair (identifier_context_param) identifier_context_param (identifier_context_instance) identifier_context_instance )pair )dictionary )argument_list )call )expression_statement (return_statement (call (identifier_fn) identifier_fn (argument_list (identifier_request) identifier_request (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition (return_statement (identifier_decorator) identifier_decorator )return_statement )block )function_definition (return_statement (identifier_site_method) identifier_site_method )return_statement )block )function_definition )module
It is a function that returns decorator factory useful for PluggableSite views. This decorator factory returns decorator that do some boilerplate work and make writing PluggableSite views easier. It passes PluggableSite instance to decorated view, retreives and passes object that site is attached to and passes common context. It also passes and all the decorator factory's keyword arguments. For example usage please check photo_albums.views. Btw, this decorator seems frightening for me. It feels that "views as PluggableSite methods" approach can easily make this decorator obsolete. But for now it just works.
(module (function_definition (function_name_onEnable) function_name_onEnable (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (identifier_trace) identifier_trace (argument_list (string_'onEnable') string_'onEnable' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__disable) identifier__disable )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__aio_context) identifier__aio_context )attribute (identifier_submit) identifier_submit )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__aio_recv_block_list) identifier__aio_recv_block_list )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__real_onCanSend) identifier__real_onCanSend )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__enabled) identifier__enabled )attribute (True) True )assignment )expression_statement )block )function_definition )module
The configuration containing this function has been enabled by host. Endpoints become working files, so submit some read operations.
(module (function_definition (function_name_set_margins) function_name_set_margins (parameters (identifier_self) identifier_self (identifier_left) identifier_left (identifier_top) identifier_top (default_parameter (identifier_right) identifier_right (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (expression_statement (string_"Set left, top and right margins") string_"Set left, top and right margins" )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_l_margin) identifier_l_margin )attribute (identifier_left) identifier_left )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_t_margin) identifier_t_margin )attribute (identifier_top) identifier_top )assignment )expression_statement (if_statement (parenthesized_expression (comparison_operator (identifier_right) identifier_right (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_right) identifier_right (identifier_left) identifier_left )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_r_margin) identifier_r_margin )attribute (identifier_right) identifier_right )assignment )expression_statement )block )function_definition )module
Set left, top and right margins
(module (function_definition (function_name_write_header) function_name_write_header (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_properties) identifier_properties (call (attribute (attribute (identifier_self) identifier_self (identifier_header) identifier_header )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (subscript (identifier_properties) identifier_properties (string_'value') string_'value' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_offset_bytes) identifier_offset_bytes (call (identifier_int) identifier_int (argument_list (subscript (identifier_properties) identifier_properties (string_'offset') string_'offset' )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute (identifier_seek) identifier_seek )attribute (argument_list (identifier_offset_bytes) identifier_offset_bytes )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_value) identifier_value (identifier_tofile) identifier_tofile )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Write `header` to `file`. See Also -------- write_data
(module (function_definition (function_name_performance_view) function_name_performance_view (parameters (identifier_dstore) identifier_dstore )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_sorted) identifier_sorted (argument_list (subscript (identifier_dstore) identifier_dstore (string_'performance_data') string_'performance_data' )subscript (keyword_argument (identifier_key) identifier_key (call (attribute (identifier_operator) identifier_operator (identifier_itemgetter) identifier_itemgetter )attribute (argument_list (integer_0) integer_0 )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_operation) identifier_operation (identifier_group) identifier_group )pattern_list (call (attribute (identifier_itertools) identifier_itertools (identifier_groupby) identifier_groupby )attribute (argument_list (identifier_data) identifier_data (call (attribute (identifier_operator) identifier_operator (identifier_itemgetter) identifier_itemgetter )attribute (argument_list (integer_0) integer_0 )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_counts) identifier_counts (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_time) identifier_time (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_mem) identifier_mem (integer_0) integer_0 )assignment )expression_statement (for_statement (pattern_list (identifier__operation) identifier__operation (identifier_time_sec) identifier_time_sec (identifier_memory_mb) identifier_memory_mb (identifier_counts_) identifier_counts_ )pattern_list (identifier_group) identifier_group (block (expression_statement (augmented_assignment (identifier_counts) identifier_counts (identifier_counts_) identifier_counts_ )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_time) identifier_time (identifier_time_sec) identifier_time_sec )augmented_assignment )expression_statement (expression_statement (assignment (identifier_mem) identifier_mem (call (identifier_max) identifier_max (argument_list (identifier_mem) identifier_mem (identifier_memory_mb) identifier_memory_mb )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_operation) identifier_operation (identifier_time) identifier_time (identifier_mem) identifier_mem (identifier_counts) identifier_counts )tuple )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (call (attribute (identifier_operator) identifier_operator (identifier_itemgetter) identifier_itemgetter )attribute (argument_list (integer_1) integer_1 )argument_list )call )keyword_argument (keyword_argument (identifier_reverse) identifier_reverse (True) True )keyword_argument )argument_list )call )expression_statement (return_statement (call (attribute (identifier_numpy) identifier_numpy (identifier_array) identifier_array )attribute (argument_list (identifier_out) identifier_out (identifier_perf_dt) identifier_perf_dt )argument_list )call )return_statement )block )function_definition )module
Returns the performance view as a numpy array.
(module (function_definition (function_name_receive_message) function_name_receive_message (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (parenthesized_expression (boolean_operator (comparison_operator (string_'REQUEST_METHOD') string_'REQUEST_METHOD' (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (comparison_operator (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'REQUEST_METHOD') string_'REQUEST_METHOD' )subscript (string_'POST') string_'POST' )comparison_operator )boolean_operator )parenthesized_expression )not_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Status: 405 Method not Allowed; only POST is accepted") string_"Status: 405 Method not Allowed; only POST is accepted" )argument_list )call )expression_statement (expression_statement (call (identifier_exit) identifier_exit (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_content_length) identifier_content_length (call (identifier_int) identifier_int (argument_list (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'CONTENT_LENGTH') string_'CONTENT_LENGTH' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_request_json) identifier_request_json (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdin) identifier_stdin )attribute (identifier_read) identifier_read )attribute (argument_list (identifier_content_length) identifier_content_length )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_request_json) identifier_request_json (call (attribute (identifier_urlparse) identifier_urlparse (identifier_unquote) identifier_unquote )attribute (argument_list (identifier_request_json) identifier_request_json )argument_list )call )assignment )expression_statement (return_statement (expression_list (None) None (identifier_request_json) identifier_request_json )expression_list )return_statement )block )function_definition )module
Receive a message from the transport. Blocks until a message has been received. May return a context opaque to clients that should be passed to :py:func:`send_reply` to identify the client later on. :return: A tuple consisting of ``(context, message)``.
(module (function_definition (function_name_cartesian_square_centred_on_point) function_name_cartesian_square_centred_on_point (parameters (identifier_self) identifier_self (identifier_point) identifier_point (identifier_distance) identifier_distance (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_point_surface) identifier_point_surface (call (identifier_Point) identifier_Point (argument_list (attribute (identifier_point) identifier_point (identifier_longitude) identifier_longitude )attribute (attribute (identifier_point) identifier_point (identifier_latitude) identifier_latitude )attribute (float_0.) float_0. )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_north_point) identifier_north_point (call (attribute (identifier_point_surface) identifier_point_surface (identifier_point_at) identifier_point_at )attribute (argument_list (identifier_distance) identifier_distance (float_0.) float_0. (float_0.) float_0. )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_east_point) identifier_east_point (call (attribute (identifier_point_surface) identifier_point_surface (identifier_point_at) identifier_point_at )attribute (argument_list (identifier_distance) identifier_distance (float_0.) float_0. (float_90.) float_90. )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_south_point) identifier_south_point (call (attribute (identifier_point_surface) identifier_point_surface (identifier_point_at) identifier_point_at )attribute (argument_list (identifier_distance) identifier_distance (float_0.) float_0. (float_180.) float_180. )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_west_point) identifier_west_point (call (attribute (identifier_point_surface) identifier_point_surface (identifier_point_at) identifier_point_at )attribute (argument_list (identifier_distance) identifier_distance (float_0.) float_0. (float_270.) float_270. )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_is_long) identifier_is_long (call (attribute (identifier_np) identifier_np (identifier_logical_and) identifier_logical_and )attribute (argument_list (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_catalogue) identifier_catalogue )attribute (identifier_data) identifier_data )attribute (string_'longitude') string_'longitude' )subscript (attribute (identifier_west_point) identifier_west_point (identifier_longitude) identifier_longitude )attribute )comparison_operator (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_catalogue) identifier_catalogue )attribute (identifier_data) identifier_data )attribute (string_'longitude') string_'longitude' )subscript (attribute (identifier_east_point) identifier_east_point (identifier_longitude) identifier_longitude )attribute )comparison_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_is_surface) identifier_is_surface (call (attribute (identifier_np) identifier_np (identifier_logical_and) identifier_logical_and )attribute (argument_list (identifier_is_long) identifier_is_long (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_catalogue) identifier_catalogue )attribute (identifier_data) identifier_data )attribute (string_'latitude') string_'latitude' )subscript (attribute (identifier_south_point) identifier_south_point (identifier_latitude) identifier_latitude )attribute )comparison_operator (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_catalogue) identifier_catalogue )attribute (identifier_data) identifier_data )attribute (string_'latitude') string_'latitude' )subscript (attribute (identifier_north_point) identifier_north_point (identifier_latitude) identifier_latitude )attribute )comparison_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_upper_depth) identifier_upper_depth (identifier_lower_depth) identifier_lower_depth )pattern_list (call (identifier__check_depth_limits) identifier__check_depth_limits (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_is_valid) identifier_is_valid (call (attribute (identifier_np) identifier_np (identifier_logical_and) identifier_logical_and )attribute (argument_list (identifier_is_surface) identifier_is_surface (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_catalogue) identifier_catalogue )attribute (identifier_data) identifier_data )attribute (string_'depth') string_'depth' )subscript (identifier_upper_depth) identifier_upper_depth )comparison_operator (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_catalogue) identifier_catalogue )attribute (identifier_data) identifier_data )attribute (string_'depth') string_'depth' )subscript (identifier_lower_depth) identifier_lower_depth )comparison_operator )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_select_catalogue) identifier_select_catalogue )attribute (argument_list (identifier_is_valid) identifier_is_valid )argument_list )call )return_statement )block )function_definition )module
Select earthquakes from within a square centered on a point :param point: Centre point as instance of nhlib.geo.point.Point class :param distance: Distance (km) :returns: Instance of :class:`openquake.hmtk.seismicity.catalogue.Catalogue` class containing only selected events
(module (function_definition (function_name_get_token) function_name_get_token (parameters (typed_parameter (identifier_url) identifier_url (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_scopes) identifier_scopes (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_credentials_dir) identifier_credentials_dir (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_dict) identifier_dict )type (block (expression_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_configure) identifier_configure )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_dir) identifier_dir (identifier_credentials_dir) identifier_credentials_dir )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_manage) identifier_manage )attribute (argument_list (string_'lizzy') string_'lizzy' (list (identifier_scopes) identifier_scopes )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_get) identifier_get )attribute (argument_list (string_'lizzy') string_'lizzy' )argument_list )call )return_statement )block )function_definition )module
Get access token info.
(module (function_definition (function_name_link_label) function_name_link_label (parameters (identifier_link) identifier_link )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_link) identifier_link (string_'label') string_'label' )argument_list )call (block (expression_statement (assignment (identifier_label) identifier_label (attribute (identifier_link) identifier_link (identifier_label) identifier_label )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_label) identifier_label (call (identifier_str) identifier_str (argument_list (binary_operator (attribute (identifier_link) identifier_link (identifier_linknum) identifier_linknum )attribute (integer_1) integer_1 )binary_operator )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_label) identifier_label )return_statement )block )function_definition )module
return a link label as a string
(module (function_definition (function_name_generate_data_for_env_problem) function_name_generate_data_for_env_problem (parameters (identifier_problem_name) identifier_problem_name )parameters (block (assert_statement (comparison_operator (attribute (identifier_FLAGS) identifier_FLAGS (identifier_env_problem_max_env_steps) identifier_env_problem_max_env_steps )attribute (integer_0) integer_0 )comparison_operator (parenthesized_expression (concatenated_string (string_"--env_problem_max_env_steps ") string_"--env_problem_max_env_steps " (string_"should be greater than zero") string_"should be greater than zero" )concatenated_string )parenthesized_expression )assert_statement (assert_statement (comparison_operator (attribute (identifier_FLAGS) identifier_FLAGS (identifier_env_problem_batch_size) identifier_env_problem_batch_size )attribute (integer_0) integer_0 )comparison_operator (parenthesized_expression (concatenated_string (string_"--env_problem_batch_size should be") string_"--env_problem_batch_size should be" (string_" greather than zero") string_" greather than zero" )concatenated_string )parenthesized_expression )assert_statement (expression_statement (assignment (identifier_problem) identifier_problem (call (attribute (identifier_registry) identifier_registry (identifier_env_problem) identifier_env_problem )attribute (argument_list (identifier_problem_name) identifier_problem_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_task_id) identifier_task_id (conditional_expression (None) None (comparison_operator (attribute (identifier_FLAGS) identifier_FLAGS (identifier_task_id) identifier_task_id )attribute (integer_0) integer_0 )comparison_operator (attribute (identifier_FLAGS) identifier_FLAGS (identifier_task_id) identifier_task_id )attribute )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_data_dir) identifier_data_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (attribute (identifier_FLAGS) identifier_FLAGS (identifier_data_dir) identifier_data_dir )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tmp_dir) identifier_tmp_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (attribute (identifier_FLAGS) identifier_FLAGS (identifier_tmp_dir) identifier_tmp_dir )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_problem) identifier_problem (identifier_initialize) identifier_initialize )attribute (argument_list (keyword_argument (identifier_batch_size) identifier_batch_size (attribute (identifier_FLAGS) identifier_FLAGS (identifier_env_problem_batch_size) identifier_env_problem_batch_size )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_env_problem_utils) identifier_env_problem_utils (identifier_play_env_problem_randomly) identifier_play_env_problem_randomly )attribute (argument_list (identifier_problem) identifier_problem (keyword_argument (identifier_num_steps) identifier_num_steps (attribute (identifier_FLAGS) identifier_FLAGS (identifier_env_problem_max_env_steps) identifier_env_problem_max_env_steps )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_problem) identifier_problem (identifier_generate_data) identifier_generate_data )attribute (argument_list (keyword_argument (identifier_data_dir) identifier_data_dir (identifier_data_dir) identifier_data_dir )keyword_argument (keyword_argument (identifier_tmp_dir) identifier_tmp_dir (identifier_tmp_dir) identifier_tmp_dir )keyword_argument (keyword_argument (identifier_task_id) identifier_task_id (identifier_task_id) identifier_task_id )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Generate data for `EnvProblem`s.
(module (function_definition (function_name__merge_assets_key_collection) function_name__merge_assets_key_collection (parameters (identifier_saved_model_proto) identifier_saved_model_proto (identifier_path) identifier_path )parameters (block (for_statement (identifier_meta_graph) identifier_meta_graph (attribute (identifier_saved_model_proto) identifier_saved_model_proto (identifier_meta_graphs) identifier_meta_graphs )attribute (block (expression_statement (assignment (identifier_node_asset_map) identifier_node_asset_map (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (attribute (attribute (attribute (identifier_tf_v1) identifier_tf_v1 (identifier_saved_model) identifier_saved_model )attribute (identifier_constants) identifier_constants )attribute (identifier_ASSETS_KEY) identifier_ASSETS_KEY )attribute (attribute (identifier_meta_graph) identifier_meta_graph (identifier_collection_def) identifier_collection_def )attribute )comparison_operator (block (expression_statement (assignment (identifier_assets_any_proto) identifier_assets_any_proto (attribute (attribute (subscript (attribute (identifier_meta_graph) identifier_meta_graph (identifier_collection_def) identifier_collection_def )attribute (attribute (attribute (attribute (identifier_tf_v1) identifier_tf_v1 (identifier_saved_model) identifier_saved_model )attribute (identifier_constants) identifier_constants )attribute (identifier_ASSETS_KEY) identifier_ASSETS_KEY )attribute )subscript (identifier_any_list) identifier_any_list )attribute (identifier_value) identifier_value )attribute )assignment )expression_statement (for_statement (identifier_asset_any_proto) identifier_asset_any_proto (identifier_assets_any_proto) identifier_assets_any_proto (block (expression_statement (assignment (identifier_asset_proto) identifier_asset_proto (call (attribute (identifier_meta_graph_pb2) identifier_meta_graph_pb2 (identifier_AssetFileDef) identifier_AssetFileDef )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_asset_any_proto) identifier_asset_any_proto (identifier_Unpack) identifier_Unpack )attribute (argument_list (identifier_asset_proto) identifier_asset_proto )argument_list )call )expression_statement (expression_statement (assignment (identifier_asset_filename) identifier_asset_filename (call (identifier__get_asset_filename) identifier__get_asset_filename (argument_list (identifier_path) identifier_path (attribute (identifier_asset_proto) identifier_asset_proto (identifier_filename) identifier_filename )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_node_asset_map) identifier_node_asset_map (call (identifier__get_node_name_from_tensor) identifier__get_node_name_from_tensor (argument_list (attribute (attribute (identifier_asset_proto) identifier_asset_proto (identifier_tensor_info) identifier_tensor_info )attribute (identifier_name) identifier_name )attribute )argument_list )call )subscript (identifier_asset_filename) identifier_asset_filename )assignment )expression_statement )block )for_statement (delete_statement (subscript (attribute (identifier_meta_graph) identifier_meta_graph (identifier_collection_def) identifier_collection_def )attribute (attribute (attribute (attribute (identifier_tf_v1) identifier_tf_v1 (identifier_saved_model) identifier_saved_model )attribute (identifier_constants) identifier_constants )attribute (identifier_ASSETS_KEY) identifier_ASSETS_KEY )attribute )subscript )delete_statement )block )if_statement (for_statement (identifier_node) identifier_node (attribute (attribute (identifier_meta_graph) identifier_meta_graph (identifier_graph_def) identifier_graph_def )attribute (identifier_node) identifier_node )attribute (block (expression_statement (assignment (identifier_asset_filepath) identifier_asset_filepath (call (attribute (identifier_node_asset_map) identifier_node_asset_map (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_asset_filepath) identifier_asset_filepath (block (expression_statement (call (identifier__check_asset_node_def) identifier__check_asset_node_def (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (attribute (subscript (attribute (identifier_node) identifier_node (identifier_attr) identifier_attr )attribute (string_"value") string_"value" )subscript (identifier_tensor) identifier_tensor )attribute (identifier_string_val) identifier_string_val )attribute (integer_0) integer_0 )subscript (identifier_asset_filepath) identifier_asset_filepath )assignment )expression_statement )block )if_statement )block )for_statement )block )for_statement )block )function_definition )module
Merges the ASSETS_KEY collection into the GraphDefs in saved_model_proto. Removes the ASSETS_KEY collection from the GraphDefs in the SavedModel and modifies nodes with the assets filenames to point to the assets in `path`. After this transformation, the SavedModel GraphDefs can be used without feeding asset tensors. Args: saved_model_proto: SavedModel proto to be modified. path: path where the SavedModel is being loaded from.
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_package_name) identifier_package_name )parameters (block (if_statement (comparison_operator (identifier_package_name) identifier_package_name (identifier_packages) identifier_packages )comparison_operator (block (raise_statement (call (identifier_HolodeckException) identifier_HolodeckException (argument_list (binary_operator (string_"Unknown package name ") string_"Unknown package name " (identifier_package_name) identifier_package_name )binary_operator )argument_list )call )raise_statement )block )if_statement (for_statement (pattern_list (identifier_config) identifier_config (identifier_path) identifier_path )pattern_list (call (identifier__iter_packages) identifier__iter_packages (argument_list )argument_list )call (block (if_statement (comparison_operator (subscript (identifier_config) identifier_config (string_"name") string_"name" )subscript (identifier_package_name) identifier_package_name )comparison_operator (block (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_rmtree) identifier_rmtree )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Removes a holodeck package. Args: package_name (str): the name of the package to remove
(module (function_definition (function_name_date_parser) function_name_date_parser (parameters (identifier_items) identifier_items )parameters (block (try_statement (block (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_datetime) identifier_datetime (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_items) identifier_items (string_"%d/%m/%Y %H:%M:%S") string_"%d/%m/%Y %H:%M:%S" )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (try_statement (block (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_datetime) identifier_datetime (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_items) identifier_items (string_"%m/%d/%Y %H:%M:%S") string_"%m/%d/%Y %H:%M:%S" )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_ee) identifier_ee )as_pattern_target )as_pattern (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (string_"error parsing datetime string") string_"error parsing datetime string" (call (attribute (string_" {0}: \n{1}\n{2}") string_" {0}: \n{1}\n{2}" (identifier_format) identifier_format )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_items) identifier_items )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_ee) identifier_ee )argument_list )call )argument_list )call )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )except_clause )try_statement (return_statement (identifier_dt) identifier_dt )return_statement )block )function_definition )module
datetime parser to help load smp files Parameters ---------- items : iterable something or somethings to try to parse into datetimes Returns ------- dt : iterable the cast datetime things
(module (function_definition (function_name_processPhoneList) function_name_processPhoneList (parameters (default_parameter (identifier_platformNames) identifier_platformNames (list )list )default_parameter (default_parameter (identifier_numbers) identifier_numbers (list )list )default_parameter (default_parameter (identifier_excludePlatformNames) identifier_excludePlatformNames (list )list )default_parameter )parameters (block (expression_statement (assignment (identifier_platforms) identifier_platforms (call (attribute (identifier_platform_selection) identifier_platform_selection (identifier_getPlatformsByName) identifier_getPlatformsByName )attribute (argument_list (identifier_platformNames) identifier_platformNames (keyword_argument (identifier_mode) identifier_mode (string_"phonefy") string_"phonefy" )keyword_argument (keyword_argument (identifier_excludePlatformNames) identifier_excludePlatformNames (identifier_excludePlatformNames) identifier_excludePlatformNames )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier_num) identifier_num (identifier_numbers) identifier_numbers (block (for_statement (identifier_pla) identifier_pla (identifier_platforms) identifier_platforms (block (expression_statement (assignment (identifier_entities) identifier_entities (call (attribute (identifier_pla) identifier_pla (identifier_getInfo) identifier_getInfo )attribute (argument_list (keyword_argument (identifier_query) identifier_query (identifier_num) identifier_num )keyword_argument (keyword_argument (identifier_process) identifier_process (True) True )keyword_argument (keyword_argument (identifier_mode) identifier_mode (string_"phonefy") string_"phonefy" )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_entities) identifier_entities (dictionary )dictionary )comparison_operator (block (expression_statement (augmented_assignment (identifier_results) identifier_results (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_entities) identifier_entities )argument_list )call )augmented_assignment )expression_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Method to perform searchs on a series of numbers. Args: ----- platformNames: List of names of the platforms. numbers: List of numbers to be queried. excludePlatformNames: A list of platforms not to be searched. Return: ------- A list of verified emails.
(module (function_definition (function_name_is_not_from_subdomain) function_name_is_not_from_subdomain (parameters (identifier_self) identifier_self (identifier_response) identifier_response (identifier_site_dict) identifier_site_dict )parameters (block (expression_statement (assignment (identifier_root_url) identifier_root_url (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (identifier_re_url_root) identifier_re_url_root (string_'') string_'' (subscript (identifier_site_dict) identifier_site_dict (string_"url") string_"url" )subscript )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (call (attribute (identifier_UrlExtractor) identifier_UrlExtractor (identifier_get_allowed_domain) identifier_get_allowed_domain )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_url) identifier_url )attribute )argument_list )call (identifier_root_url) identifier_root_url )comparison_operator )return_statement )block )function_definition )module
Ensures the response's url isn't from a subdomain. :param obj response: The scrapy response :param dict site_dict: The site object from the JSON-File :return bool: Determines if the response's url is from a subdomain
(module (function_definition (function_name__on_write) function_name__on_write (parameters (identifier_self) identifier_self (identifier_sender) identifier_sender (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_on_write) identifier_on_write )attribute (argument_list (keyword_argument (identifier_data) identifier_data (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'data') string_'data' (None) None )argument_list )call )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Internal handler for writing to the device.
(module (function_definition (function_name_unicode2str) function_name_unicode2str (parameters (identifier_content) identifier_content )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_content) identifier_content (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (identifier_result) identifier_result (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (call (attribute (identifier_content) identifier_content (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_result) identifier_result (call (identifier_unicode2str) identifier_unicode2str (argument_list (identifier_key) identifier_key )argument_list )call )subscript (call (identifier_unicode2str) identifier_unicode2str (argument_list (subscript (identifier_content) identifier_content (identifier_key) identifier_key )subscript )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_content) identifier_content (identifier_list) identifier_list )argument_list )call (block (return_statement (list_comprehension (call (identifier_unicode2str) identifier_unicode2str (argument_list (identifier_element) identifier_element )argument_list )call (for_in_clause (identifier_element) identifier_element (identifier_content) identifier_content )for_in_clause )list_comprehension )return_statement )block )elif_clause (elif_clause (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_content) identifier_content (identifier_int) identifier_int )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_content) identifier_content (identifier_float) identifier_float )argument_list )call )boolean_operator (block (return_statement (identifier_content) identifier_content )return_statement )block )elif_clause (else_clause (block (return_statement (call (attribute (identifier_content) identifier_content (identifier_encode) identifier_encode )attribute (argument_list (string_"utf-8") string_"utf-8" )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Convert the unicode element of the content to str recursively.
(module (function_definition (function_name_exact) function_name_exact (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_compare) identifier_compare (call (identifier_Exact) identifier_Exact (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (identifier_compare) identifier_compare )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Compare attributes of pairs exactly. Shortcut of :class:`recordlinkage.compare.Exact`:: from recordlinkage.compare import Exact indexer = recordlinkage.Compare() indexer.add(Exact())
(module (function_definition (function_name__get) function_name__get (parameters (identifier_self) identifier_self (identifier_key) identifier_key (default_parameter (identifier_section) identifier_section (None) None )default_parameter (default_parameter (identifier_default) identifier_default (identifier__onion_dict_guard) identifier__onion_dict_guard )default_parameter )parameters (block (if_statement (comparison_operator (identifier_section) identifier_section (None) None )comparison_operator (block (expression_statement (assignment (identifier_section_dict) identifier_section_dict (call (attribute (attribute (identifier_self) identifier_self (identifier___sections) identifier___sections )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_section) identifier_section (dictionary )dictionary )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (identifier_section_dict) identifier_section_dict )comparison_operator (block (return_statement (subscript (identifier_section_dict) identifier_section_dict (identifier_key) identifier_key )subscript )return_statement )block )if_statement )block )if_statement (for_statement (identifier_d) identifier_d (attribute (identifier_self) identifier_self (identifier___dictionaries) identifier___dictionaries )attribute (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_d) identifier_d )comparison_operator (block (return_statement (subscript (identifier_d) identifier_d (identifier_key) identifier_key )subscript )return_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (identifier_default) identifier_default (identifier__onion_dict_guard) identifier__onion_dict_guard )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (identifier_key) identifier_key )argument_list )call )raise_statement )block (else_clause (block (return_statement (identifier_default) identifier_default )return_statement )block )else_clause )if_statement )block )function_definition )module
Try to get the key from each dict in turn. If you specify the optional section it looks there first.
(module (function_definition (function_name__bool_encode) function_name__bool_encode (parameters (identifier_self) identifier_self (identifier_d) identifier_d )parameters (block (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_d) identifier_d (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_v) identifier_v (identifier_bool) identifier_bool )argument_list )call (block (expression_statement (assignment (subscript (identifier_d) identifier_d (identifier_k) identifier_k )subscript (call (attribute (call (identifier_str) identifier_str (argument_list (identifier_v) identifier_v )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Converts bool values to lowercase strings
(module (function_definition (function_name_getlist) function_name_getlist (parameters (identifier_self) identifier_self (identifier_section) identifier_section (identifier_option) identifier_option (default_parameter (identifier_raw) identifier_raw (False) False )default_parameter (default_parameter (identifier_vars) identifier_vars (None) None )default_parameter (default_parameter (identifier_fallback) identifier_fallback (list )list )default_parameter (default_parameter (identifier_delimiters) identifier_delimiters (string_',') string_',' )default_parameter )parameters (block (expression_statement (assignment (identifier_v) identifier_v (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_section) identifier_section (identifier_option) identifier_option (keyword_argument (identifier_raw) identifier_raw (identifier_raw) identifier_raw )keyword_argument (keyword_argument (identifier_vars) identifier_vars (identifier_vars) identifier_vars )keyword_argument (keyword_argument (identifier_fallback) identifier_fallback (identifier_fallback) identifier_fallback )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__convert_to_list) identifier__convert_to_list )attribute (argument_list (identifier_v) identifier_v (keyword_argument (identifier_delimiters) identifier_delimiters (identifier_delimiters) identifier_delimiters )keyword_argument )argument_list )call )return_statement )block )function_definition )module
A convenience method which coerces the option in the specified section to a list of strings.
(module (function_definition (function_name_disposal_date) function_name_disposal_date (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_date_sampled) identifier_date_sampled (call (attribute (identifier_self) identifier_self (identifier_getDateSampled) identifier_getDateSampled )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_date_sampled) identifier_date_sampled )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_retention_period) identifier_retention_period (boolean_operator (call (attribute (call (attribute (identifier_self) identifier_self (identifier_getSampleType) identifier_getSampleType )attribute (argument_list )argument_list )call (identifier_getRetentionPeriod) identifier_getRetentionPeriod )attribute (argument_list )argument_list )call (dictionary )dictionary )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_retention_period_delta) identifier_retention_period_delta (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_days) identifier_days (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_retention_period) identifier_retention_period (identifier_get) identifier_get )attribute (argument_list (string_"days") string_"days" (integer_0) integer_0 )argument_list )call )argument_list )call )keyword_argument (keyword_argument (identifier_hours) identifier_hours (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_retention_period) identifier_retention_period (identifier_get) identifier_get )attribute (argument_list (string_"hours") string_"hours" (integer_0) integer_0 )argument_list )call )argument_list )call )keyword_argument (keyword_argument (identifier_minutes) identifier_minutes (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_retention_period) identifier_retention_period (identifier_get) identifier_get )attribute (argument_list (string_"minutes") string_"minutes" (integer_0) integer_0 )argument_list )call )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_dt2DT) identifier_dt2DT (argument_list (binary_operator (call (identifier_DT2dt) identifier_DT2dt (argument_list (identifier_date_sampled) identifier_date_sampled )argument_list )call (identifier_retention_period_delta) identifier_retention_period_delta )binary_operator )argument_list )call )return_statement )block )function_definition )module
Returns the date the retention period ends for this sample based on the retention period from the Sample Type. If the sample hasn't been collected yet, returns None
(module (function_definition (function_name_figures) function_name_figures (parameters (identifier_df) identifier_df (identifier_specs) identifier_specs (default_parameter (identifier_asList) identifier_asList (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_figs) identifier_figs (list )list )assignment )expression_statement (for_statement (identifier_spec) identifier_spec (identifier_specs) identifier_specs (block (expression_statement (call (attribute (identifier_figs) identifier_figs (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_df) identifier_df (identifier_figure) identifier_figure )attribute (argument_list (dictionary_splat (identifier_spec) identifier_spec )dictionary_splat )argument_list )call )argument_list )call )expression_statement )block )for_statement (if_statement (identifier_asList) identifier_asList (block (return_statement (identifier_figs) identifier_figs )return_statement )block (else_clause (block (return_statement (call (identifier_merge_figures) identifier_merge_figures (argument_list (identifier_figs) identifier_figs )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Generates multiple Plotly figures for a given DataFrame Parameters: ----------- df : DataFrame Pandas DataFrame specs : list(dict) List of dictionaries with the properties of each figure. All properties avaialbe can be seen with help(cufflinks.pd.DataFrame.iplot) asList : boolean If True, then a list of figures is returned. Otherwise a single (merged) figure is returned. Default : False
(module (function_definition (function_name_GetItemContainerInfo) function_name_GetItemContainerInfo (parameters (identifier_self_link) identifier_self_link (identifier_alt_content_path) identifier_alt_content_path (identifier_id_from_response) identifier_id_from_response )parameters (block (expression_statement (assignment (identifier_self_link) identifier_self_link (binary_operator (call (identifier_TrimBeginningAndEndingSlashes) identifier_TrimBeginningAndEndingSlashes (argument_list (identifier_self_link) identifier_self_link )argument_list )call (string_'/') string_'/' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (identifier_IndexOfNth) identifier_IndexOfNth (argument_list (identifier_self_link) identifier_self_link (string_'/') string_'/' (integer_4) integer_4 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_index) identifier_index (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (identifier_collection_id) identifier_collection_id (subscript (identifier_self_link) identifier_self_link (slice (integer_0) integer_0 (colon) colon (identifier_index) identifier_index )slice )subscript )assignment )expression_statement (if_statement (comparison_operator (string_'colls') string_'colls' (identifier_self_link) identifier_self_link )comparison_operator (block (expression_statement (assignment (identifier_index_second_slash) identifier_index_second_slash (call (identifier_IndexOfNth) identifier_IndexOfNth (argument_list (identifier_alt_content_path) identifier_alt_content_path (string_'/') string_'/' (integer_2) integer_2 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_index_second_slash) identifier_index_second_slash (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (identifier_collection_name) identifier_collection_name (binary_operator (binary_operator (identifier_alt_content_path) identifier_alt_content_path (string_'/colls/') string_'/colls/' )binary_operator (call (identifier_urllib_quote) identifier_urllib_quote (argument_list (identifier_id_from_response) identifier_id_from_response )argument_list )call )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_collection_id) identifier_collection_id (identifier_collection_name) identifier_collection_name )expression_list )return_statement )block (else_clause (block (expression_statement (assignment (identifier_collection_name) identifier_collection_name (identifier_alt_content_path) identifier_alt_content_path )assignment )expression_statement (return_statement (expression_list (identifier_collection_id) identifier_collection_id (identifier_collection_name) identifier_collection_name )expression_list )return_statement )block )else_clause )if_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'Response Not from Server Partition, self_link: {0}, alt_content_path: {1}, id: {2}') string_'Response Not from Server Partition, self_link: {0}, alt_content_path: {1}, id: {2}' (identifier_format) identifier_format )attribute (argument_list (identifier_self_link) identifier_self_link (identifier_alt_content_path) identifier_alt_content_path (identifier_id_from_response) identifier_id_from_response )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Unable to parse document collection link from ') string_'Unable to parse document collection link from ' (identifier_self_link) identifier_self_link )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Given the self link and alt_content_path from the reponse header and result extract the collection name and collection id Ever response header has alt-content-path that is the owner's path in ascii. For document create / update requests, this can be used to get the collection name, but for collection create response, we can't use it. So we also rely on :param str self_link: Self link of the resource, as obtained from response result. :param str alt_content_path: Owner path of the resource, as obtained from response header. :param str resource_id: 'id' as returned from the response result. This is only used if it is deduced that the request was to create a collection. :return: tuple of (collection rid, collection name) :rtype: tuple
(module (function_definition (function_name_set_process) function_name_set_process (parameters (identifier_self) identifier_self (default_parameter (identifier_process) identifier_process (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_process) identifier_process (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_dwProcessId) identifier_dwProcessId )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___process) identifier___process )attribute (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___load_Process_class) identifier___load_Process_class )attribute (argument_list )argument_list )call )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_process) identifier_process (identifier_Process) identifier_Process )argument_list )call )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_"Parent process must be a Process instance, ") string_"Parent process must be a Process instance, " )assignment )expression_statement (expression_statement (augmented_assignment (identifier_msg) identifier_msg (binary_operator (string_"got %s instead") string_"got %s instead" (call (identifier_type) identifier_type (argument_list (identifier_process) identifier_process )argument_list )call )binary_operator )augmented_assignment )expression_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_dwProcessId) identifier_dwProcessId )attribute (call (attribute (identifier_process) identifier_process (identifier_get_pid) identifier_get_pid )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___process) identifier___process )attribute (identifier_process) identifier_process )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Manually set the parent Process object. Use with care! @type process: L{Process} @param process: (Optional) Process object. Use C{None} for no process.
(module (function_definition (function_name_add_grant) function_name_add_grant (parameters (identifier_self) identifier_self (identifier_grant) identifier_grant )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_grant) identifier_grant (string_"expires_in") string_"expires_in" )argument_list )call (block (expression_statement (assignment (subscript (attribute (attribute (identifier_self) identifier_self (identifier_token_generator) identifier_token_generator )attribute (identifier_expires_in) identifier_expires_in )attribute (attribute (identifier_grant) identifier_grant (identifier_grant_type) identifier_grant_type )attribute )subscript (attribute (identifier_grant) identifier_grant (identifier_expires_in) identifier_expires_in )attribute )assignment )expression_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_grant) identifier_grant (string_"refresh_expires_in") string_"refresh_expires_in" )argument_list )call (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_token_generator) identifier_token_generator )attribute (identifier_refresh_expires_in) identifier_refresh_expires_in )attribute (attribute (identifier_grant) identifier_grant (identifier_refresh_expires_in) identifier_refresh_expires_in )attribute )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_grant_types) identifier_grant_types )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_grant) identifier_grant )argument_list )call )expression_statement )block )function_definition )module
Adds a Grant that the provider should support. :param grant: An instance of a class that extends :class:`oauth2.grant.GrantHandlerFactory` :type grant: oauth2.grant.GrantHandlerFactory
(module (function_definition (function_name_estimate) function_name_estimate (parameters (identifier_self) identifier_self (default_parameter (identifier_maxiter) identifier_maxiter (integer_250) integer_250 )default_parameter (default_parameter (identifier_convergence) identifier_convergence (float_1e-7) float_1e-7 )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (identifier_maxiter) identifier_maxiter )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_iter) identifier_iter (integer_0) integer_0 )assignment )expression_statement (while_statement (comparison_operator (identifier_iter) identifier_iter (identifier_maxiter) identifier_maxiter )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (identifier_iter) identifier_iter )subscript (call (attribute (identifier_self) identifier_self (identifier_E_step) identifier_E_step )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_np) identifier_np (identifier_isnan) identifier_isnan )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (identifier_iter) identifier_iter )subscript )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"undefined log-likelihood") string_"undefined log-likelihood" )argument_list )call )expression_statement (break_statement )break_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_M_step) identifier_M_step )attribute (argument_list )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (identifier_iter) identifier_iter )subscript (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (binary_operator (identifier_iter) identifier_iter (integer_1) integer_1 )binary_operator )subscript )binary_operator (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_iter) identifier_iter (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"log-likelihood decreased by %f at iteration %d") string_"log-likelihood decreased by %f at iteration %d" (tuple (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (identifier_iter) identifier_iter )subscript (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (binary_operator (identifier_iter) identifier_iter (integer_1) integer_1 )binary_operator )subscript )binary_operator (identifier_iter) identifier_iter )tuple )binary_operator )argument_list )call )expression_statement )block (elif_clause (boolean_operator (comparison_operator (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (identifier_iter) identifier_iter )subscript (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (binary_operator (identifier_iter) identifier_iter (integer_1) integer_1 )binary_operator )subscript )binary_operator (identifier_convergence) identifier_convergence )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (identifier_iter) identifier_iter (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"convergence at iteration %d, loglik = %f") string_"convergence at iteration %d, loglik = %f" (tuple (identifier_iter) identifier_iter (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (identifier_iter) identifier_iter )subscript )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (subscript (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (comparison_operator (attribute (identifier_self) identifier_self (identifier_loglik) identifier_loglik )attribute (integer_0) integer_0 )comparison_operator )subscript )assignment )expression_statement (break_statement )break_statement )block )elif_clause )if_statement (expression_statement (augmented_assignment (identifier_iter) identifier_iter (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement )block )function_definition )module
run EM algorithm until convergence, or until maxiter reached
(module (function_definition (function_name_get_periodic_soap_locals) function_name_get_periodic_soap_locals (parameters (identifier_obj) identifier_obj (identifier_Hpos) identifier_Hpos (identifier_alp) identifier_alp (identifier_bet) identifier_bet (default_parameter (identifier_rCut) identifier_rCut (float_5.0) float_5.0 )default_parameter (default_parameter (identifier_nMax) identifier_nMax (integer_5) integer_5 )default_parameter (default_parameter (identifier_Lmax) identifier_Lmax (integer_5) integer_5 )default_parameter (default_parameter (identifier_crossOver) identifier_crossOver (True) True )default_parameter (default_parameter (identifier_all_atomtypes) identifier_all_atomtypes (None) None )default_parameter (default_parameter (identifier_eta) identifier_eta (float_1.0) float_1.0 )default_parameter )parameters (block (expression_statement (assignment (identifier_suce) identifier_suce (call (identifier__get_supercell) identifier__get_supercell (argument_list (identifier_obj) identifier_obj (identifier_rCut) identifier_rCut )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_arrsoap) identifier_arrsoap (call (identifier_get_soap_locals) identifier_get_soap_locals (argument_list (identifier_suce) identifier_suce (identifier_Hpos) identifier_Hpos (identifier_alp) identifier_alp (identifier_bet) identifier_bet (identifier_rCut) identifier_rCut (keyword_argument (identifier_nMax) identifier_nMax (identifier_nMax) identifier_nMax )keyword_argument (keyword_argument (identifier_Lmax) identifier_Lmax (identifier_Lmax) identifier_Lmax )keyword_argument (keyword_argument (identifier_crossOver) identifier_crossOver (identifier_crossOver) identifier_crossOver )keyword_argument (keyword_argument (identifier_all_atomtypes) identifier_all_atomtypes (identifier_all_atomtypes) identifier_all_atomtypes )keyword_argument (keyword_argument (identifier_eta) identifier_eta (identifier_eta) identifier_eta )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_arrsoap) identifier_arrsoap )return_statement )block )function_definition )module
Get the RBF basis SOAP output for the given position in a periodic system. Args: obj(ase.Atoms): Atomic structure for which the SOAP output is calculated. alp: Alphas bet: Betas rCut: Radial cutoff. nMax: Maximum nmber of radial basis functions Lmax: Maximum spherical harmonics degree crossOver: all_atomtypes: Can be used to specify the atomic elements for which to calculate the output. If given the output is calculated only for the given species. eta: The gaussian smearing width. Returns: np.ndarray: SOAP output for the given position.
(module (function_definition (function_name_get_network_versions) function_name_get_network_versions (parameters (identifier_self) identifier_self (typed_parameter (identifier_name) identifier_name (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (generic_type (identifier_Set) identifier_Set (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (return_statement (set_comprehension (identifier_version) identifier_version (for_in_clause (pattern_list (identifier_version) identifier_version )pattern_list (call (attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_query) identifier_query )attribute (argument_list (attribute (identifier_Network) identifier_Network (identifier_version) identifier_version )attribute )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (comparison_operator (attribute (identifier_Network) identifier_Network (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator )argument_list )call (identifier_all) identifier_all )attribute (argument_list )argument_list )call )for_in_clause )set_comprehension )return_statement )block )function_definition )module
Return all of the versions of a network with the given name.
(module (function_definition (function_name_rescale_around1) function_name_rescale_around1 (parameters (identifier_self) identifier_self (identifier_times) identifier_times )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__unit) identifier__unit )attribute (attribute (identifier_self) identifier_self (identifier__UNIT_STEP) identifier__UNIT_STEP )attribute )comparison_operator (block (return_statement (expression_list (identifier_times) identifier_times (string_'step') string_'step' )expression_list )return_statement )block )if_statement (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_np) identifier_np (identifier_mean) identifier_mean )attribute (argument_list (identifier_times) identifier_times )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mult) identifier_mult (float_1.0) float_1.0 )assignment )expression_statement (expression_statement (assignment (identifier_cur_unit) identifier_cur_unit (attribute (identifier_self) identifier_self (identifier__unit) identifier__unit )attribute )assignment )expression_statement (if_statement (parenthesized_expression (comparison_operator (identifier_m) identifier_m (float_0.001) float_0.001 )comparison_operator )parenthesized_expression (block (while_statement (boolean_operator (comparison_operator (binary_operator (identifier_mult) identifier_mult (identifier_m) identifier_m )binary_operator (float_0.001) float_0.001 )comparison_operator (comparison_operator (identifier_cur_unit) identifier_cur_unit (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_mult) identifier_mult (integer_1000) integer_1000 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_cur_unit) identifier_cur_unit (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (return_statement (expression_list (binary_operator (identifier_mult) identifier_mult (identifier_times) identifier_times )binary_operator (subscript (attribute (identifier_self) identifier_self (identifier__unit_names) identifier__unit_names )attribute (identifier_cur_unit) identifier_cur_unit )subscript )expression_list )return_statement )block )if_statement (if_statement (parenthesized_expression (comparison_operator (identifier_m) identifier_m (integer_1000) integer_1000 )comparison_operator )parenthesized_expression (block (while_statement (boolean_operator (comparison_operator (binary_operator (identifier_mult) identifier_mult (identifier_m) identifier_m )binary_operator (integer_1000) integer_1000 )comparison_operator (comparison_operator (identifier_cur_unit) identifier_cur_unit (integer_5) integer_5 )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_mult) identifier_mult (integer_1000) integer_1000 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_cur_unit) identifier_cur_unit (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (return_statement (expression_list (binary_operator (identifier_mult) identifier_mult (identifier_times) identifier_times )binary_operator (subscript (attribute (identifier_self) identifier_self (identifier__unit_names) identifier__unit_names )attribute (identifier_cur_unit) identifier_cur_unit )subscript )expression_list )return_statement )block )if_statement (return_statement (expression_list (identifier_times) identifier_times (attribute (identifier_self) identifier_self (identifier__unit) identifier__unit )attribute )expression_list )return_statement )block )function_definition )module
Suggests a rescaling factor and new physical time unit to balance the given time multiples around 1. Parameters ---------- times : float array array of times in multiple of the present elementary unit
(module (function_definition (function_name_gt) function_name_gt (parameters (identifier_name) identifier_name (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'result') string_'result' (False) False )pair (pair (string_'comment') string_'comment' (string_'') string_'' )pair (pair (string_'changes') string_'changes' (dictionary )dictionary )pair )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (identifier___reg__) identifier___reg__ )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (string_'Value {0} not in register') string_'Value {0} not in register' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )if_statement (if_statement (comparison_operator (subscript (subscript (identifier___reg__) identifier___reg__ (identifier_name) identifier_name )subscript (string_'val') string_'val' )subscript (identifier_value) identifier_value )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (True) True )assignment )expression_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Only succeed if the value in the given register location is greater than the given value USAGE: .. code-block:: yaml foo: check.gt: - value: 42 run_remote_ex: local.cmd: - tgt: '*' - func: test.ping - require: - check: foo
(module (function_definition (function_name_handle_collect) function_name_handle_collect (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg )parameters (block (expression_statement (assignment (tuple_pattern (identifier_success) identifier_success (identifier_sequence_number) identifier_sequence_number (identifier_comment) identifier_comment )tuple_pattern (call (attribute (identifier_self) identifier_self (identifier__handle_collect) identifier__handle_collect )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_collector) identifier_collector )attribute (identifier_send_multipart) identifier_send_multipart )attribute (argument_list (call (attribute (call (attribute (call (attribute (call (attribute (call (attribute (identifier_msgs) identifier_msgs (identifier_MessageWriter) identifier_MessageWriter )attribute (argument_list )argument_list )call (identifier_bool) identifier_bool )attribute (argument_list (identifier_success) identifier_success )argument_list )call (identifier_uint64) identifier_uint64 )attribute (argument_list (identifier_sequence_number) identifier_sequence_number )argument_list )call (identifier_string) identifier_string )attribute (argument_list (identifier_comment) identifier_comment )argument_list )call (identifier_get) identifier_get )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
handle an incoming message
(module (function_definition (function_name_eliminate) function_name_eliminate (parameters (identifier_self) identifier_self (identifier_node) identifier_node (identifier_data) identifier_data )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_eliminated) identifier_eliminated )attribute (identifier_node) identifier_node )subscript (identifier_data) identifier_data )assignment )expression_statement (expression_statement (assignment (identifier_others) identifier_others (subscript (attribute (identifier_self) identifier_self (identifier_checks) identifier_checks )attribute (identifier_node) identifier_node )subscript )assignment )expression_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_checks) identifier_checks )attribute (identifier_node) identifier_node )subscript )delete_statement (for_statement (identifier_check) identifier_check (identifier_others) identifier_others (block (expression_statement (augmented_assignment (attribute (identifier_check) identifier_check (identifier_check) identifier_check )attribute (identifier_data) identifier_data )augmented_assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_check) identifier_check (identifier_src_nodes) identifier_src_nodes )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_check) identifier_check (identifier_src_nodes) identifier_src_nodes )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (yield (tuple (call (identifier_next) identifier_next (argument_list (call (identifier_iter) identifier_iter (argument_list (attribute (identifier_check) identifier_check (identifier_src_nodes) identifier_src_nodes )attribute )argument_list )call )argument_list )call (attribute (identifier_check) identifier_check (identifier_check) identifier_check )attribute )tuple )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Resolves a source node, passing the message to all associated checks
(module (function_definition (function_name_result) function_name_result (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_final_result) identifier_final_result (dictionary (pair (string_'epoch_idx') string_'epoch_idx' (attribute (identifier_self) identifier_self (identifier_global_epoch_idx) identifier_global_epoch_idx )attribute )pair )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_frozen_results) identifier_frozen_results )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_final_result) identifier_final_result (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement (return_statement (identifier_final_result) identifier_final_result )return_statement )block )function_definition )module
Return the epoch result
(module (function_definition (function_name_load_json) function_name_load_json (parameters (identifier_cls) identifier_cls (identifier_data) identifier_data (default_parameter (identifier_default_rule) identifier_default_rule (None) None )default_parameter (default_parameter (identifier_raise_error) identifier_raise_error (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_rules) identifier_rules (dictionary_comprehension (pair (identifier_k) identifier_k (call (attribute (identifier__parser) identifier__parser (identifier_parse_rule) identifier_parse_rule )attribute (argument_list (identifier_v) identifier_v (identifier_raise_error) identifier_raise_error )argument_list )call )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_data) identifier_data )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_rules) identifier_rules (identifier_default_rule) identifier_default_rule )argument_list )call )return_statement )block )function_definition )module
Allow loading of JSON rule data.
(module (function_definition (function_name_from_section) function_name_from_section (parameters (identifier_cls) identifier_cls (identifier_stream) identifier_stream (default_parameter (identifier_section_name) identifier_section_name (string_'.pic') string_'.pic' )default_parameter )parameters (block (expression_statement (assignment (identifier_binary) identifier_binary (call (identifier_Executable) identifier_Executable (argument_list (identifier_stream) identifier_stream )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_section_data) identifier_section_data (call (attribute (identifier_binary) identifier_binary (identifier_get_section_data) identifier_get_section_data )attribute (argument_list (identifier_section_name) identifier_section_name )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_section_data) identifier_section_data (attribute (identifier_binary) identifier_binary (identifier_system) identifier_system )attribute )argument_list )call )return_statement )block )function_definition )module
Construct a Converter object from the specified section of the specified binary stream.
(module (function_definition (function_name_inMicrolensRegion) function_name_inMicrolensRegion (parameters (identifier_ra_deg) identifier_ra_deg (identifier_dec_deg) identifier_dec_deg (default_parameter (identifier_padding) identifier_padding (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_fov) identifier_fov (call (identifier_getKeplerFov) identifier_getKeplerFov (argument_list (integer_9) integer_9 )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (pattern_list (identifier_ch) identifier_ch (identifier_col) identifier_col (identifier_row) identifier_row )pattern_list (call (attribute (identifier_fov) identifier_fov (identifier_getChannelColRow) identifier_getChannelColRow )attribute (argument_list (identifier_ra_deg) identifier_ra_deg (identifier_dec_deg) identifier_dec_deg (keyword_argument (identifier_allowIllegalReturnValues) identifier_allowIllegalReturnValues (False) False )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_maskInMicrolensRegion) identifier_maskInMicrolensRegion (argument_list (identifier_ch) identifier_ch (identifier_col) identifier_col (identifier_row) identifier_row (keyword_argument (identifier_padding) identifier_padding (identifier_padding) identifier_padding )keyword_argument )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (False) False )return_statement )block )except_clause )try_statement )block )function_definition )module
Returns `True` if the given sky oordinate falls on the K2C9 superstamp. Parameters ---------- ra_deg : float Right Ascension (J2000) in decimal degrees. dec_deg : float Declination (J2000) in decimal degrees. padding : float Target must be at least `padding` pixels away from the edge of the superstamp. (Note that CCD boundaries are not considered as edges in this case.) Returns ------- onMicrolensRegion : bool `True` if the given coordinate is within the K2C9 microlens superstamp.
(module (function_definition (function_name_import_class) function_name_import_class (parameters (identifier_klass) identifier_klass )parameters (block (expression_statement (assignment (identifier_mod) identifier_mod (call (identifier___import__) identifier___import__ (argument_list (subscript (call (attribute (identifier_klass) identifier_klass (identifier_rpartition) identifier_rpartition )attribute (argument_list (string_'.') string_'.' )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (for_statement (identifier_segment) identifier_segment (subscript (call (attribute (identifier_klass) identifier_klass (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (block (expression_statement (assignment (identifier_mod) identifier_mod (call (identifier_getattr) identifier_getattr (argument_list (identifier_mod) identifier_mod (identifier_segment) identifier_segment )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier_mod) identifier_mod (subscript (call (attribute (identifier_klass) identifier_klass (identifier_rpartition) identifier_rpartition )attribute (argument_list (string_'.') string_'.' )argument_list )call (integer_2) integer_2 )subscript )argument_list )call )return_statement )block )function_definition )module
Import the named class and return that class
(module (function_definition (function_name_get_organization) function_name_get_organization (parameters (identifier_self) identifier_self (identifier_organization_id) identifier_organization_id )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_'rest/servicedeskapi/organization/{}') string_'rest/servicedeskapi/organization/{}' (identifier_format) identifier_format )attribute (argument_list (identifier_organization_id) identifier_organization_id )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier_experimental_headers) identifier_experimental_headers )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get an organization for a given organization ID :param organization_id: str :return: Organization
(module (function_definition (function_name_set_scope) function_name_set_scope (parameters (identifier_self) identifier_self (identifier_http_method) identifier_http_method (identifier_scope) identifier_scope )parameters (block (for_statement (identifier_con) identifier_con (attribute (identifier_self) identifier_self (identifier_conditions) identifier_conditions )attribute (block (if_statement (comparison_operator (identifier_http_method) identifier_http_method (subscript (identifier_con) identifier_con (string_'httpMethods') string_'httpMethods' )subscript )comparison_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_scope) identifier_scope (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_con) identifier_con (string_'scopes') string_'scopes' )subscript (identifier_scope) identifier_scope )assignment )expression_statement )block (elif_clause (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_scope) identifier_scope (identifier_str) identifier_str )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_scope) identifier_scope (identifier_unicode) identifier_unicode )argument_list )call )boolean_operator (block (expression_statement (call (attribute (subscript (identifier_con) identifier_con (string_'scopes') string_'scopes' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_scope) identifier_scope )argument_list )call )expression_statement )block )elif_clause )if_statement (return_statement )return_statement )block )if_statement )block )for_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_scope) identifier_scope (identifier_list) identifier_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conditions) identifier_conditions )attribute (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'httpMethods') string_'httpMethods' (list (identifier_http_method) identifier_http_method )list )pair (pair (string_'scopes') string_'scopes' (identifier_scope) identifier_scope )pair )dictionary )argument_list )call )expression_statement )block (elif_clause (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_scope) identifier_scope (identifier_str) identifier_str )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_scope) identifier_scope (identifier_unicode) identifier_unicode )argument_list )call )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conditions) identifier_conditions )attribute (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'httpMethods') string_'httpMethods' (list (identifier_http_method) identifier_http_method )list )pair (pair (string_'scopes') string_'scopes' (list (identifier_scope) identifier_scope )list )pair )dictionary )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Set a scope condition for the resource for a http_method Parameters: * **http_method (str):** HTTP method like GET, POST, PUT, DELETE * **scope (str, list):** the scope of access control as str if single, or as a list of strings if multiple scopes are to be set
(module (function_definition (function_name_where) function_name_where (parameters (identifier_cls) identifier_cls (identifier_session) identifier_session (default_parameter (identifier_include) identifier_include (None) None )default_parameter (default_parameter (identifier_metadata) identifier_metadata (None) None )default_parameter (default_parameter (identifier_filter) identifier_filter (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_session) identifier_session (identifier__build_url) identifier__build_url )attribute (argument_list (call (attribute (identifier_cls) identifier_cls (identifier__resource_path) identifier__resource_path )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (call (identifier_build_request_include) identifier_build_request_include (argument_list (identifier_include) identifier_include (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_metadata) identifier_metadata (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'filter[metadata]') string_'filter[metadata]' )subscript (call (identifier_to_json) identifier_to_json (argument_list (identifier_metadata) identifier_metadata )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_process) identifier_process (call (attribute (identifier_cls) identifier_cls (identifier__mk_many) identifier__mk_many )attribute (argument_list (identifier_session) identifier_session (keyword_argument (identifier_include) identifier_include (identifier_include) identifier_include )keyword_argument (keyword_argument (identifier_filter) identifier_filter (identifier_filter) identifier_filter )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_session) identifier_session (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (call (attribute (identifier_CB) identifier_CB (identifier_json) identifier_json )attribute (argument_list (integer_200) integer_200 (identifier_process) identifier_process )argument_list )call (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get filtered resources of the given resource class. This should be called on sub-classes only. The include argument allows relationship fetches to be optimized by including the target resources in the request of the containing resource. For example:: .. code-block:: python org = Organization.singleton(session, include=[Sensor]) org.sensors(use_included=True) Will fetch the sensors for the authorized organization as part of retrieving the organization. The ``use_included`` forces the use of included resources and avoids making a separate request to get the sensors for the organization. The metadata argument enables filtering on resources that support metadata filters. For example:: .. code-block:: python sensors = Sensor.where(session, metadata={ 'asset_id': '23456' }) Will fetch all sensors that match the given metadata attribute. The filter argument enables filtering the resulting resources based on a passed in function. For example:: .. code-block::python sensors = Sensor.where(session, filter=lambda s: s.name.startswith("a")) Will fetch all sensors and apply the given filter to only return sensors who's name start with the given string. Args: session(Session): The session to look up the resources in Keyword Args: incldue(list): The resource classes to include in the request. metadata(dict or list): The metadata filter to apply Returns: iterable(Resource): An iterator over all found resources of this type
(module (function_definition (function_name_prepareToSolve) function_name_prepareToSolve (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setAndUpdateValues) identifier_setAndUpdateValues )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_solution_next) identifier_solution_next )attribute (attribute (identifier_self) identifier_self (identifier_IncomeDstn) identifier_IncomeDstn )attribute (attribute (identifier_self) identifier_self (identifier_LivPrb) identifier_LivPrb )attribute (attribute (identifier_self) identifier_self (identifier_DiscFac) identifier_DiscFac )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_defBoroCnst) identifier_defBoroCnst )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_BoroCnstArt) identifier_BoroCnstArt )attribute )argument_list )call )expression_statement )block )function_definition )module
Perform preparatory work before calculating the unconstrained consumption function. Parameters ---------- none Returns ------- none
(module (function_definition (function_name_check_aggregations_privacy) function_name_check_aggregations_privacy (parameters (identifier_self) identifier_self (identifier_aggregations_params) identifier_aggregations_params )parameters (block (expression_statement (assignment (identifier_fields) identifier_fields (call (attribute (identifier_self) identifier_self (identifier_get_aggregations_fields) identifier_get_aggregations_fields )attribute (argument_list (identifier_aggregations_params) identifier_aggregations_params )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fields_dict) identifier_fields_dict (call (attribute (identifier_dictset) identifier_dictset (identifier_fromkeys) identifier_fromkeys )attribute (argument_list (identifier_fields) identifier_fields )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_fields_dict) identifier_fields_dict (string_'_type') string_'_type' )subscript (attribute (attribute (attribute (identifier_self) identifier_self (identifier_view) identifier_view )attribute (identifier_Model) identifier_Model )attribute (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (try_statement (block (expression_statement (call (identifier_validate_data_privacy) identifier_validate_data_privacy (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_view) identifier_view )attribute (identifier_request) identifier_request )attribute (identifier_fields_dict) identifier_fields_dict )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_wrappers) identifier_wrappers (identifier_ValidationError) identifier_ValidationError )attribute (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (raise_statement (call (identifier_JHTTPForbidden) identifier_JHTTPForbidden (argument_list (call (attribute (concatenated_string (string_'Not enough permissions to aggregate on ') string_'Not enough permissions to aggregate on ' (string_'fields: {}') string_'fields: {}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Check per-field privacy rules in aggregations. Privacy is checked by making sure user has access to the fields used in aggregations.
(module (function_definition (function_name_get_handler) function_name_get_handler (parameters (identifier_self) identifier_self (identifier_handler_input) identifier_handler_input (identifier_exception) identifier_exception )parameters (block (for_statement (identifier_handler) identifier_handler (attribute (identifier_self) identifier_self (identifier_exception_handlers) identifier_exception_handlers )attribute (block (if_statement (call (attribute (identifier_handler) identifier_handler (identifier_can_handle) identifier_can_handle )attribute (argument_list (keyword_argument (identifier_handler_input) identifier_handler_input (identifier_handler_input) identifier_handler_input )keyword_argument (keyword_argument (identifier_exception) identifier_exception (identifier_exception) identifier_exception )keyword_argument )argument_list )call (block (return_statement (identifier_handler) identifier_handler )return_statement )block )if_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Get the exception handler that can handle the input and exception. :param handler_input: Generic input passed to the dispatcher. :type handler_input: Input :param exception: Exception thrown by :py:class:`ask_sdk_runtime.dispatch.GenericRequestDispatcher` dispatch method. :type exception: Exception :return: Exception Handler that can handle the input or None. :rtype: Union[None, ask_sdk_runtime.dispatch_components.exception_components.AbstractExceptionHandler]
(module (function_definition (function_name___select_text_under_cursor_blocks) function_name___select_text_under_cursor_blocks (parameters (identifier_self) identifier_self (identifier_cursor) identifier_cursor )parameters (block (expression_statement (assignment (identifier_start_block) identifier_start_block (call (attribute (call (attribute (call (attribute (identifier_self) identifier_self (identifier_document) identifier_document )attribute (argument_list )argument_list )call (identifier_findBlock) identifier_findBlock )attribute (argument_list (call (attribute (identifier_cursor) identifier_cursor (identifier_selectionStart) identifier_selectionStart )attribute (argument_list )argument_list )call )argument_list )call (identifier_firstLineNumber) identifier_firstLineNumber )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end_block) identifier_end_block (call (attribute (call (attribute (call (attribute (identifier_self) identifier_self (identifier_document) identifier_document )attribute (argument_list )argument_list )call (identifier_findBlock) identifier_findBlock )attribute (argument_list (call (attribute (identifier_cursor) identifier_cursor (identifier_selectionEnd) identifier_selectionEnd )attribute (argument_list )argument_list )call )argument_list )call (identifier_firstLineNumber) identifier_firstLineNumber )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_setPosition) identifier_setPosition )attribute (argument_list (call (attribute (call (attribute (call (attribute (identifier_self) identifier_self (identifier_document) identifier_document )attribute (argument_list )argument_list )call (identifier_findBlockByLineNumber) identifier_findBlockByLineNumber )attribute (argument_list (identifier_start_block) identifier_start_block )argument_list )call (identifier_position) identifier_position )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_movePosition) identifier_movePosition )attribute (argument_list (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_StartOfLine) identifier_StartOfLine )attribute (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_MoveAnchor) identifier_MoveAnchor )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_movePosition) identifier_movePosition )attribute (argument_list (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_Down) identifier_Down )attribute (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_KeepAnchor) identifier_KeepAnchor )attribute (binary_operator (identifier_end_block) identifier_end_block (identifier_start_block) identifier_start_block )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_movePosition) identifier_movePosition )attribute (argument_list (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_EndOfLine) identifier_EndOfLine )attribute (attribute (identifier_QTextCursor) identifier_QTextCursor (identifier_KeepAnchor) identifier_KeepAnchor )attribute )argument_list )call )expression_statement )block )function_definition )module
Selects the document text under cursor blocks. :param cursor: Cursor. :type cursor: QTextCursor
(module (function_definition (function_name__parse_data_desc) function_name__parse_data_desc (parameters (identifier_data_names) identifier_data_names (identifier_label_names) identifier_label_names (identifier_data_shapes) identifier_data_shapes (identifier_label_shapes) identifier_label_shapes )parameters (block (expression_statement (assignment (identifier_data_shapes) identifier_data_shapes (list_comprehension (conditional_expression (identifier_x) identifier_x (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_DataDesc) identifier_DataDesc )argument_list )call (call (identifier_DataDesc) identifier_DataDesc (argument_list (list_splat (identifier_x) identifier_x )list_splat )argument_list )call )conditional_expression (for_in_clause (identifier_x) identifier_x (identifier_data_shapes) identifier_data_shapes )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (identifier__check_names_match) identifier__check_names_match (argument_list (identifier_data_names) identifier_data_names (identifier_data_shapes) identifier_data_shapes (string_'data') string_'data' (True) True )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_label_shapes) identifier_label_shapes (None) None )comparison_operator (block (expression_statement (assignment (identifier_label_shapes) identifier_label_shapes (list_comprehension (conditional_expression (identifier_x) identifier_x (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_DataDesc) identifier_DataDesc )argument_list )call (call (identifier_DataDesc) identifier_DataDesc (argument_list (list_splat (identifier_x) identifier_x )list_splat )argument_list )call )conditional_expression (for_in_clause (identifier_x) identifier_x (identifier_label_shapes) identifier_label_shapes )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (identifier__check_names_match) identifier__check_names_match (argument_list (identifier_label_names) identifier_label_names (identifier_label_shapes) identifier_label_shapes (string_'label') string_'label' (False) False )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier__check_names_match) identifier__check_names_match (argument_list (identifier_label_names) identifier_label_names (list )list (string_'label') string_'label' (False) False )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_data_shapes) identifier_data_shapes (identifier_label_shapes) identifier_label_shapes )expression_list )return_statement )block )function_definition )module
parse data_attrs into DataDesc format and check that names match
(module (function_definition (function_name_maps) function_name_maps (parameters (default_parameter (identifier_map_id) identifier_map_id (None) None )default_parameter (default_parameter (identifier_lang) identifier_lang (string_"en") string_"en" )default_parameter )parameters (block (if_statement (identifier_map_id) identifier_map_id (block (expression_statement (assignment (identifier_cache_name) identifier_cache_name (binary_operator (string_"maps.%s.%s.json") string_"maps.%s.%s.json" (tuple (identifier_map_id) identifier_map_id (identifier_lang) identifier_lang )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"map_id") string_"map_id" (identifier_map_id) identifier_map_id )pair (pair (string_"lang") string_"lang" (identifier_lang) identifier_lang )pair )dictionary )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_cache_name) identifier_cache_name (binary_operator (string_"maps.%s.json") string_"maps.%s.json" (identifier_lang) identifier_lang )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"lang") string_"lang" (identifier_lang) identifier_lang )pair )dictionary )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (call (identifier_get_cached) identifier_get_cached (argument_list (string_"maps.json") string_"maps.json" (identifier_cache_name) identifier_cache_name (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_"maps") string_"maps" )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (call (attribute (identifier_data) identifier_data (identifier_get) identifier_get )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_map_id) identifier_map_id )argument_list )call )argument_list )call (identifier_map_id) identifier_map_id (identifier_data) identifier_data )conditional_expression )return_statement )block )function_definition )module
This resource returns details about maps in the game, including details about floor and translation data on how to translate between world coordinates and map coordinates. :param map_id: Only list this map. :param lang: Show localized texts in the specified language. The response is a dictionary where the key is the map id and the value is a dictionary containing the following properties: map_name (string) The map name. min_level (number) The minimal level of this map. max_level (number) The maximum level of this map. default_floor (number) The default floor of this map. floors (list) A list of available floors for this map. region_id (number) The id of the region this map belongs to. region_name (string) The name of the region this map belongs to. continent_id (number) The id of the continent this map belongs to. continent_name (string) The name of the continent this map belongs to. map_rect (rect) The dimensions of the map. continent_rect (rect) The dimensions of the map within the continent coordinate system. If a map_id is given, only the values for that map are returned.
(module (function_definition (function_name_sample) function_name_sample (parameters (identifier_self) identifier_self (default_parameter (identifier_size) identifier_size (tuple )tuple )default_parameter (default_parameter (identifier_rule) identifier_rule (string_"R") string_"R" )default_parameter (default_parameter (identifier_antithetic) identifier_antithetic (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_size_) identifier_size_ (call (attribute (identifier_numpy) identifier_numpy (identifier_prod) identifier_prod )attribute (argument_list (identifier_size) identifier_size (keyword_argument (identifier_dtype) identifier_dtype (identifier_int) identifier_int )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dim) identifier_dim (call (identifier_len) identifier_len (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_dim) identifier_dim (integer_1) integer_1 )comparison_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_size) identifier_size (tuple (identifier_tuple) identifier_tuple (identifier_list) identifier_list (attribute (identifier_numpy) identifier_numpy (identifier_ndarray) identifier_ndarray )attribute )tuple )argument_list )call (block (expression_statement (assignment (identifier_shape) identifier_shape (binary_operator (tuple (identifier_dim) identifier_dim )tuple (call (identifier_tuple) identifier_tuple (argument_list (identifier_size) identifier_size )argument_list )call )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_shape) identifier_shape (tuple (identifier_dim) identifier_dim (identifier_size) identifier_size )tuple )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_shape) identifier_shape (identifier_size) identifier_size )assignment )expression_statement )block )else_clause )if_statement (import_from_statement (relative_import (import_prefix )import_prefix )relative_import (dotted_name (identifier_sampler) identifier_sampler )dotted_name )import_from_statement (expression_statement (assignment (identifier_out) identifier_out (call (attribute (attribute (identifier_sampler) identifier_sampler (identifier_generator) identifier_generator )attribute (identifier_generate_samples) identifier_generate_samples )attribute (argument_list (keyword_argument (identifier_order) identifier_order (identifier_size_) identifier_size_ )keyword_argument (keyword_argument (identifier_domain) identifier_domain (identifier_self) identifier_self )keyword_argument (keyword_argument (identifier_rule) identifier_rule (identifier_rule) identifier_rule )keyword_argument (keyword_argument (identifier_antithetic) identifier_antithetic (identifier_antithetic) identifier_antithetic )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_out) identifier_out (call (attribute (identifier_out) identifier_out (identifier_reshape) identifier_reshape )attribute (argument_list (identifier_shape) identifier_shape )argument_list )call )assignment )expression_statement )block (except_clause (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_self) identifier_self )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_out) identifier_out (call (attribute (identifier_out) identifier_out (identifier_flatten) identifier_flatten )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_out) identifier_out (call (attribute (identifier_out) identifier_out (identifier_reshape) identifier_reshape )attribute (argument_list (identifier_dim) identifier_dim (call (identifier_int) identifier_int (argument_list (binary_operator (attribute (identifier_out) identifier_out (identifier_size) identifier_size )attribute (identifier_dim) identifier_dim )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )except_clause )try_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Create pseudo-random generated samples. By default, the samples are created using standard (pseudo-)random samples. However, if needed, the samples can also be created by either low-discrepancy sequences, and/or variance reduction techniques. Changing the sampling scheme, use the following ``rule`` flag: +-------+-------------------------------------------------+ | key | Description | +=======+=================================================+ | ``C`` | Roots of the first order Chebyshev polynomials. | +-------+-------------------------------------------------+ | ``NC``| Chebyshev nodes adjusted to ensure nested. | +-------+-------------------------------------------------+ | ``K`` | Korobov lattice. | +-------+-------------------------------------------------+ | ``R`` | Classical (Pseudo-)Random samples. | +-------+-------------------------------------------------+ | ``RG``| Regular spaced grid. | +-------+-------------------------------------------------+ | ``NG``| Nested regular spaced grid. | +-------+-------------------------------------------------+ | ``L`` | Latin hypercube samples. | +-------+-------------------------------------------------+ | ``S`` | Sobol low-discrepancy sequence. | +-------+-------------------------------------------------+ | ``H`` | Halton low-discrepancy sequence. | +-------+-------------------------------------------------+ | ``M`` | Hammersley low-discrepancy sequence. | +-------+-------------------------------------------------+ All samples are created on the ``[0, 1]``-hypercube, which then is mapped into the domain of the distribution using the inverse Rosenblatt transformation. Args: size (numpy.ndarray): The size of the samples to generate. rule (str): Indicator defining the sampling scheme. antithetic (bool, numpy.ndarray): If provided, will be used to setup antithetic variables. If array, defines the axes to mirror. Returns: (numpy.ndarray): Random samples with shape ``(len(self),)+self.shape``.
(module (function_definition (function_name_done) function_name_done (parameters (identifier_p_queue) identifier_p_queue (default_parameter (identifier_host) identifier_host (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_host) identifier_host (None) None )comparison_operator (block (return_statement (call (identifier__path) identifier__path (argument_list (attribute (identifier__c) identifier__c (identifier_FSQ_DONE) identifier_FSQ_DONE )attribute (keyword_argument (identifier_root) identifier_root (call (identifier__path) identifier__path (argument_list (identifier_host) identifier_host (keyword_argument (identifier_root) identifier_root (call (identifier_hosts) identifier_hosts (argument_list (identifier_p_queue) identifier_p_queue )argument_list )call )keyword_argument )argument_list )call )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier__path) identifier__path (argument_list (identifier_p_queue) identifier_p_queue (attribute (identifier__c) identifier__c (identifier_FSQ_DONE) identifier_FSQ_DONE )attribute )argument_list )call )return_statement )block )function_definition )module
Construct a path to the done dir for a queue
(module (function_definition (function_name_populate) function_name_populate (parameters (identifier_self) identifier_self (default_parameter (identifier_fields) identifier_fields (None) None )default_parameter (dictionary_splat_pattern (identifier_fields_kwargs) identifier_fields_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_pop_fields) identifier_pop_fields (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_fields) identifier_fields (call (attribute (identifier_self) identifier_self (identifier_make_dict) identifier_make_dict )attribute (argument_list (identifier_fields) identifier_fields (identifier_fields_kwargs) identifier_fields_kwargs )argument_list )call )assignment )expression_statement (for_statement (identifier_k) identifier_k (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_schema) identifier_schema )attribute (identifier_fields) identifier_fields )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_pop_fields) identifier_pop_fields (identifier_k) identifier_k )subscript (call (attribute (identifier_fields) identifier_fields (identifier_get) identifier_get )attribute (argument_list (identifier_k) identifier_k (None) None )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__populate) identifier__populate )attribute (argument_list (identifier_pop_fields) identifier_pop_fields )argument_list )call )expression_statement )block )function_definition )module
take the passed in fields, combine them with missing fields that should be there and then run all those through appropriate methods to hydrate this orm. The method replaces cls.hydrate() since it was becoming hard to understand what was going on with all these methods that did things just a little bit different. This is used to completely set all the fields of self. If you just want to set certain fields, you can use the submethod _populate :param fields: dict, the fields in a dict :param **fields_kwargs: dict, if you would like to pass the fields as key=val this picks those up and combines them with fields
(module (function_definition (function_name_iterkeys) function_name_iterkeys (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_stack) identifier_stack (call (attribute (identifier_collections) identifier_collections (identifier_deque) identifier_deque )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__hives) identifier__hives )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_stack) identifier_stack (identifier_reverse) identifier_reverse )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___iterate) identifier___iterate )attribute (argument_list (identifier_stack) identifier_stack )argument_list )call )return_statement )block )function_definition )module
Returns an iterator that crawls the entire Windows Registry.
(module (function_definition (function_name_get_subdomain_iterator) function_name_get_subdomain_iterator (parameters (identifier_self) identifier_self (identifier_domain) identifier_domain (default_parameter (identifier_limit) identifier_limit (None) None )default_parameter (default_parameter (identifier_offset) identifier_offset (None) None )default_parameter )parameters (block (return_statement (call (identifier_SubdomainResultsIterator) identifier_SubdomainResultsIterator (argument_list (attribute (identifier_self) identifier_self (identifier__manager) identifier__manager )attribute (keyword_argument (identifier_domain) identifier_domain (identifier_domain) identifier_domain )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns an iterator that will return each available subdomain for the specified domain. If there are more than the limit of 100 subdomains, the iterator will continue to fetch subdomains from the API until all subdomains have been returned.
(module (function_definition (function_name_evolve) function_name_evolve (parameters (identifier_self) identifier_self (typed_parameter (identifier_rho) identifier_rho (type (identifier_Density) identifier_Density )type )typed_parameter )parameters (type (identifier_Density) identifier_Density )type (block (expression_statement (assignment (identifier_N) identifier_N (attribute (identifier_rho) identifier_rho (identifier_qubit_nb) identifier_qubit_nb )attribute )assignment )expression_statement (expression_statement (assignment (identifier_qubits) identifier_qubits (attribute (identifier_rho) identifier_rho (identifier_qubits) identifier_qubits )attribute )assignment )expression_statement (expression_statement (assignment (identifier_indices) identifier_indices (binary_operator (call (identifier_list) identifier_list (argument_list (list_comprehension (call (attribute (identifier_qubits) identifier_qubits (identifier_index) identifier_index )attribute (argument_list (identifier_q) identifier_q )argument_list )call (for_in_clause (identifier_q) identifier_q (attribute (identifier_self) identifier_self (identifier_qubits) identifier_qubits )attribute )for_in_clause )list_comprehension )argument_list )call (line_continuation_\) line_continuation_\ (call (identifier_list) identifier_list (argument_list (list_comprehension (binary_operator (call (attribute (identifier_qubits) identifier_qubits (identifier_index) identifier_index )attribute (argument_list (identifier_q) identifier_q )argument_list )call (identifier_N) identifier_N )binary_operator (for_in_clause (identifier_q) identifier_q (attribute (identifier_self) identifier_self (identifier_qubits) identifier_qubits )attribute )for_in_clause )list_comprehension )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_tensor) identifier_tensor (call (attribute (identifier_bk) identifier_bk (identifier_tensormul) identifier_tensormul )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_tensor) identifier_tensor )attribute (attribute (identifier_rho) identifier_rho (identifier_tensor) identifier_tensor )attribute (identifier_indices) identifier_indices )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Density) identifier_Density (argument_list (identifier_tensor) identifier_tensor (identifier_qubits) identifier_qubits (attribute (identifier_rho) identifier_rho (identifier_memory) identifier_memory )attribute )argument_list )call )return_statement )block )function_definition )module
Apply the action of this channel upon a density
(module (function_definition (function_name_today) function_name_today (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_today) identifier_today (call (attribute (call (attribute (identifier_timezone) identifier_timezone (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_date) identifier_date )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (call (attribute (attribute (identifier_Day) identifier_Day (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_date) identifier_date (identifier_today) identifier_today )keyword_argument )argument_list )call )return_statement )block (except_clause (attribute (identifier_Day) identifier_Day (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition )module
Return the Day for the current day
(module (function_definition (function_name_stop) function_name_stop (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__clean_prior) identifier__clean_prior )attribute (argument_list )argument_list )call )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__loaded) identifier__loaded )attribute )not_operator (block (raise_statement (attribute (identifier_errors) identifier_errors (identifier_NoActiveTask) identifier_NoActiveTask )attribute )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__clean) identifier__clean )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Stops the current task and cleans up, including removing active task config file. * Raises ``NoActiveTask`` exception if no active task found.
(module (function_definition (function_name_load_file) function_name_load_file (parameters (identifier_self) identifier_self (identifier_filepath) identifier_filepath (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_setLevel) identifier_setLevel )attribute (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"log_level") string_"log_level" (attribute (identifier_self) identifier_self (identifier_log_level) identifier_log_level )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_filename) identifier_filename (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_filename) identifier_filename (attribute (identifier_self) identifier_self (identifier_loaded) identifier_loaded )attribute )comparison_operator (block (if_statement (comparison_operator (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_loaded_times) identifier_loaded_times )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_filename) identifier_filename (call (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (argument_list (integer_2001) integer_2001 (integer_1) integer_1 (integer_1) integer_1 )argument_list )call )argument_list )call (identifier_timestamp) identifier_timestamp )attribute (argument_list )argument_list )call (line_continuation_\) line_continuation_\ (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getmtime) identifier_getmtime )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_drop_file) identifier_drop_file )attribute (argument_list (identifier_filename) identifier_filename (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block (else_clause (block (return_statement )return_statement )block )else_clause )if_statement )block )if_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_self) identifier_self (identifier___get_conn__) identifier___get_conn__ )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_load_data) identifier_load_data )attribute (argument_list (keyword_argument (identifier_graph) identifier_graph (attribute (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier___NSM__) identifier___NSM__ (identifier_kdr) identifier_kdr )attribute (identifier_filename) identifier_filename )argument_list )call (identifier_clean_uri) identifier_clean_uri )attribute )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_filepath) identifier_filepath )keyword_argument (keyword_argument (identifier_is_file) identifier_is_file (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___update_time__) identifier___update_time__ )attribute (argument_list (identifier_filename) identifier_filename (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_"\n\tfile: '%s' loaded\n\tconn: '%s'\n\tpath: %s") string_"\n\tfile: '%s' loaded\n\tconn: '%s'\n\tpath: %s" (identifier_filename) identifier_filename (identifier_conn) identifier_conn (identifier_filepath) identifier_filepath )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_loaded) identifier_loaded )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )function_definition )module
loads a file into the defintion triplestore args: filepath: the path to the file
(module (function_definition (function_name_ratio_split) function_name_ratio_split (parameters (identifier_amount) identifier_amount (identifier_ratios) identifier_ratios )parameters (block (expression_statement (assignment (identifier_ratio_total) identifier_ratio_total (call (identifier_sum) identifier_sum (argument_list (identifier_ratios) identifier_ratios )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_divided_value) identifier_divided_value (binary_operator (identifier_amount) identifier_amount (identifier_ratio_total) identifier_ratio_total )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_values) identifier_values (list )list )assignment )expression_statement (for_statement (identifier_ratio) identifier_ratio (identifier_ratios) identifier_ratios (block (expression_statement (assignment (identifier_value) identifier_value (binary_operator (identifier_divided_value) identifier_divided_value (identifier_ratio) identifier_ratio )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_values) identifier_values (identifier_append) identifier_append )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_rounded) identifier_rounded (list_comprehension (call (attribute (identifier_v) identifier_v (identifier_quantize) identifier_quantize )attribute (argument_list (call (identifier_Decimal) identifier_Decimal (argument_list (string_"0.01") string_"0.01" )argument_list )call )argument_list )call (for_in_clause (identifier_v) identifier_v (identifier_values) identifier_values )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_remainders) identifier_remainders (list_comprehension (binary_operator (identifier_v) identifier_v (subscript (identifier_rounded) identifier_rounded (identifier_i) identifier_i )subscript )binary_operator (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_v) identifier_v )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_values) identifier_values )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_remainder) identifier_remainder (call (identifier_sum) identifier_sum (argument_list (identifier_remainders) identifier_remainders )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_rounded) identifier_rounded (unary_operator (integer_1) integer_1 )unary_operator )subscript (call (attribute (parenthesized_expression (binary_operator (subscript (identifier_rounded) identifier_rounded (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_remainder) identifier_remainder )binary_operator )parenthesized_expression (identifier_quantize) identifier_quantize )attribute (argument_list (call (identifier_Decimal) identifier_Decimal (argument_list (string_"0.01") string_"0.01" )argument_list )call )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_sum) identifier_sum (argument_list (identifier_rounded) identifier_rounded )argument_list )call (identifier_amount) identifier_amount )comparison_operator )assert_statement (return_statement (identifier_rounded) identifier_rounded )return_statement )block )function_definition )module
Split in_value according to the ratios specified in `ratios` This is special in that it ensures the returned values always sum to in_value (i.e. we avoid losses or gains due to rounding errors). As a result, this method returns a list of `Decimal` values with length equal to that of `ratios`. Examples: .. code-block:: python >>> from hordak.utilities.money import ratio_split >>> from decimal import Decimal >>> ratio_split(Decimal('10'), [Decimal('1'), Decimal('2')]) [Decimal('3.33'), Decimal('6.67')] Note the returned values sum to the original input of ``10``. If we were to do this calculation in a naive fashion then the returned values would likely be ``3.33`` and ``6.66``, which would sum to ``9.99``, thereby loosing ``0.01``. Args: amount (Decimal): The amount to be split ratios (list[Decimal]): The ratios that will determine the split Returns: list(Decimal)
(module (function_definition (function_name__raw_recv) function_name__raw_recv (parameters (identifier_self) identifier_self )parameters (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier_lock) identifier_lock )attribute )with_item )with_clause (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__buffer) identifier__buffer )attribute )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__mcon) identifier__mcon )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute (integer_199) integer_199 )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__resetbuffer) identifier__resetbuffer )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__mcon) identifier__mcon )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_msg) identifier_msg (subscript (attribute (identifier_self) identifier_self (identifier__buffer) identifier__buffer )attribute (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute )subscript )assignment )expression_statement (while_statement (call (attribute (identifier_self) identifier_self (identifier_find) identifier_find )attribute (argument_list (identifier_msg) identifier_msg (string_'PING :') string_'PING :' )argument_list )call (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_msg) identifier_msg (subscript (attribute (identifier_self) identifier_self (identifier__buffer) identifier__buffer )attribute (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute )subscript )assignment )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__mcon) identifier__mcon )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stepback) identifier_stepback )attribute (argument_list (keyword_argument (identifier_append) identifier_append (False) False )keyword_argument )argument_list )call )expression_statement )block )except_clause )try_statement )block )while_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (return_statement (identifier_msg) identifier_msg )return_statement )block )with_statement )block )function_definition )module
Return the next available IRC message in the buffer.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_cls) identifier_cls (identifier_tab_uuid) identifier_tab_uuid (identifier_tab_attachment_tab_id) identifier_tab_attachment_tab_id (default_parameter (identifier_custom_headers) identifier_custom_headers (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_custom_headers) identifier_custom_headers (None) None )comparison_operator (block (expression_statement (assignment (identifier_custom_headers) identifier_custom_headers (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_api_client) identifier_api_client (call (attribute (identifier_client) identifier_client (identifier_ApiClient) identifier_ApiClient )attribute (argument_list (call (attribute (identifier_cls) identifier_cls (identifier__get_api_context) identifier__get_api_context )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_endpoint_url) identifier_endpoint_url (call (attribute (attribute (identifier_cls) identifier_cls (identifier__ENDPOINT_URL_READ) identifier__ENDPOINT_URL_READ )attribute (identifier_format) identifier_format )attribute (argument_list (identifier_tab_uuid) identifier_tab_uuid (identifier_tab_attachment_tab_id) identifier_tab_attachment_tab_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response_raw) identifier_response_raw (call (attribute (identifier_api_client) identifier_api_client (identifier_get) identifier_get )attribute (argument_list (identifier_endpoint_url) identifier_endpoint_url (dictionary )dictionary (identifier_custom_headers) identifier_custom_headers )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_BunqResponseTabAttachmentTab) identifier_BunqResponseTabAttachmentTab (identifier_cast_from_bunq_response) identifier_cast_from_bunq_response )attribute (argument_list (call (attribute (identifier_cls) identifier_cls (identifier__from_json) identifier__from_json )attribute (argument_list (identifier_response_raw) identifier_response_raw (attribute (identifier_cls) identifier_cls (identifier__OBJECT_TYPE_GET) identifier__OBJECT_TYPE_GET )attribute )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get a specific attachment. The header of the response contains the content-type of the attachment. :type api_context: context.ApiContext :type tab_uuid: str :type tab_attachment_tab_id: int :type custom_headers: dict[str, str]|None :rtype: BunqResponseTabAttachmentTab
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (argument_list (binary_operator (string_'%s') string_'%s' (parenthesized_expression (identifier_id) identifier_id )parenthesized_expression )binary_operator )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
Retrieves custom domain. See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/get_custom_domains_by_id
(module (function_definition (function_name_epilogue) function_name_epilogue (parameters (identifier_app_name) identifier_app_name )parameters (block (expression_statement (assignment (identifier_app_name) identifier_app_name (call (attribute (identifier_clr) identifier_clr (identifier_stringc) identifier_stringc )attribute (argument_list (identifier_app_name) identifier_app_name (string_"bright blue") string_"bright blue" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_command) identifier_command (call (attribute (identifier_clr) identifier_clr (identifier_stringc) identifier_stringc )attribute (argument_list (string_"command") string_"command" (string_"cyan") string_"cyan" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_help) identifier_help (call (attribute (identifier_clr) identifier_clr (identifier_stringc) identifier_stringc )attribute (argument_list (string_"--help") string_"--help" (string_"green") string_"green" )argument_list )call )assignment )expression_statement (return_statement (binary_operator (string_"\n%s %s %s for more info on a command\n") string_"\n%s %s %s for more info on a command\n" (tuple (identifier_app_name) identifier_app_name (identifier_command) identifier_command (identifier_help) identifier_help )tuple )binary_operator )return_statement )block )function_definition )module
Return the epilogue for the help command.
(module (function_definition (function_name_cache_it) function_name_cache_it (parameters (identifier_self) identifier_self (identifier_url) identifier_url )parameters (block (expression_statement (assignment (identifier_cached) identifier_cached (call (attribute (identifier_self) identifier_self (identifier__cache_it) identifier__cache_it )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_isfile) identifier_isfile (argument_list (attribute (identifier_cached) identifier_cached (identifier_name) identifier_name )attribute )argument_list )call )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__cache_it) identifier__cache_it )attribute (identifier_cache_clear) identifier_cache_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_cached) identifier_cached (call (attribute (identifier_self) identifier_self (identifier__cache_it) identifier__cache_it )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_cached) identifier_cached (identifier_name) identifier_name )attribute )return_statement )block )function_definition )module
Take an url which deliver a plain document and convert it to a temporary file, this document is an xslt file expecting contains all xslt definitions, then the cache process is recursive. :param url: document origin url :type url: str :return file_path: local new absolute path :rtype file_path: str
(module (function_definition (function_name_datasets_org_count) function_name_datasets_org_count (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_udata) identifier_udata (identifier_models) identifier_models )dotted_name (dotted_name (identifier_Dataset) identifier_Dataset )dotted_name )import_from_statement (return_statement (call (identifier_sum) identifier_sum (generator_expression (call (attribute (call (attribute (call (attribute (identifier_Dataset) identifier_Dataset (identifier_objects) identifier_objects )attribute (argument_list (keyword_argument (identifier_organization) identifier_organization (identifier_org) identifier_org )keyword_argument )argument_list )call (identifier_visible) identifier_visible )attribute (argument_list )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call (for_in_clause (identifier_org) identifier_org (attribute (identifier_self) identifier_self (identifier_organizations) identifier_organizations )attribute )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Return the number of datasets of user's organizations.
(module (function_definition (function_name_exporter) function_name_exporter (parameters (identifier_directory) identifier_directory (identifier_method) identifier_method (identifier_datasets) identifier_datasets )parameters (block (if_statement (comparison_operator (call (attribute (identifier_method) identifier_method (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_'json') string_'json' )comparison_operator (block (expression_statement (assignment (identifier_json_string) identifier_json_string (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_datasets) identifier_datasets (keyword_argument (identifier_indent) identifier_indent (integer_4) integer_4 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_savefile) identifier_savefile (call (identifier_open) identifier_open (argument_list (call (attribute (string_'{}/exported.json') string_'{}/exported.json' (identifier_format) identifier_format )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call (string_'w+') string_'w+' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_savefile) identifier_savefile (identifier_write) identifier_write )attribute (argument_list (identifier_json_string) identifier_json_string )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_savefile) identifier_savefile (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (call (attribute (identifier_method) identifier_method (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_'csv') string_'csv' )comparison_operator (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (attribute (string_'{}/exported.csv') string_'{}/exported.csv' (identifier_format) identifier_format )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call (string_'w+') string_'w+' )argument_list )call (as_pattern_target (identifier_csvfile) identifier_csvfile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_csv_writer) identifier_csv_writer (call (attribute (identifier_csv) identifier_csv (identifier_writer) identifier_writer )attribute (argument_list (identifier_csvfile) identifier_csvfile (keyword_argument (identifier_delimiter) identifier_delimiter (string_',') string_',' )keyword_argument (keyword_argument (identifier_quoting) identifier_quoting (attribute (identifier_csv) identifier_csv (identifier_QUOTE_MINIMAL) identifier_QUOTE_MINIMAL )attribute )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_values) identifier_values )pattern_list (call (attribute (identifier_datasets) identifier_datasets (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_values) identifier_values (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_csv_writer) identifier_csv_writer (identifier_writerow) identifier_writerow )attribute (argument_list (list (identifier_key) identifier_key )list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_csv_writer) identifier_csv_writer (identifier_writerow) identifier_writerow )attribute (argument_list (binary_operator (list (identifier_key) identifier_key )list (identifier_values) identifier_values )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )with_statement (expression_statement (call (attribute (identifier_csvfile) identifier_csvfile (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Export the results.
(module (function_definition (function_name_get_artifact_url) function_name_get_artifact_url (parameters (identifier_context) identifier_context (identifier_task_id) identifier_task_id (identifier_path) identifier_path )parameters (block (if_statement (call (attribute (identifier_path) identifier_path (identifier_startswith) identifier_startswith )attribute (argument_list (string_"public/") string_"public/" )argument_list )call (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (attribute (identifier_context) identifier_context (identifier_queue) identifier_queue )attribute (identifier_buildUrl) identifier_buildUrl )attribute (argument_list (string_'getLatestArtifact') string_'getLatestArtifact' (identifier_task_id) identifier_task_id (identifier_path) identifier_path )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (attribute (identifier_context) identifier_context (identifier_queue) identifier_queue )attribute (identifier_buildSignedUrl) identifier_buildSignedUrl )attribute (argument_list (string_'getLatestArtifact') string_'getLatestArtifact' (identifier_task_id) identifier_task_id (identifier_path) identifier_path )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_url) identifier_url )return_statement )block )function_definition )module
Get a TaskCluster artifact url. Args: context (scriptworker.context.Context): the scriptworker context task_id (str): the task id of the task that published the artifact path (str): the relative path of the artifact Returns: str: the artifact url Raises: TaskClusterFailure: on failure.
(module (function_definition (function_name___format_occurence) function_name___format_occurence (parameters (identifier_self) identifier_self (identifier_occurence) identifier_occurence )parameters (block (expression_statement (assignment (identifier_color) identifier_color (string_"rgb({0}, {1}, {2})") string_"rgb({0}, {1}, {2})" )assignment )expression_statement (expression_statement (assignment (identifier_span_format) identifier_span_format (call (attribute (string_"<span style=\"color: {0};\">{{0}}</span>") string_"<span style=\"color: {0};\">{{0}}</span>" (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_color) identifier_color (identifier_format) identifier_format )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier___default_line_color) identifier___default_line_color )attribute (identifier_red) identifier_red )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier___default_line_color) identifier___default_line_color )attribute (identifier_green) identifier_green )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier___default_line_color) identifier___default_line_color )attribute (identifier_blue) identifier_blue )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_line) identifier_line (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_strings) identifier_strings )attribute (identifier_to_string) identifier_to_string )attribute (argument_list (attribute (identifier_occurence) identifier_occurence (identifier_text) identifier_text )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start) identifier_start (call (attribute (identifier_span_format) identifier_span_format (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_line) identifier_line (slice (colon) colon (attribute (identifier_occurence) identifier_occurence (identifier_column) identifier_column )attribute )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pattern) identifier_pattern (call (attribute (string_"<b>{0}</b>") string_"<b>{0}</b>" (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_line) identifier_line (slice (attribute (identifier_occurence) identifier_occurence (identifier_column) identifier_column )attribute (colon) colon (binary_operator (attribute (identifier_occurence) identifier_occurence (identifier_column) identifier_column )attribute (attribute (identifier_occurence) identifier_occurence (identifier_length) identifier_length )attribute )binary_operator )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (call (attribute (identifier_span_format) identifier_span_format (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_line) identifier_line (slice (binary_operator (attribute (identifier_occurence) identifier_occurence (identifier_column) identifier_column )attribute (attribute (identifier_occurence) identifier_occurence (identifier_length) identifier_length )attribute )binary_operator (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (tuple (identifier_start) identifier_start (identifier_pattern) identifier_pattern (identifier_end) identifier_end )tuple )argument_list )call )return_statement )block )function_definition )module
Formats the given occurence and returns the matching rich html text. :param occurence: Occurence to format. :type occurence: Occurence :return: Rich text. :rtype: unicode
(module (function_definition (function_name_get_neutral) function_name_get_neutral (parameters (identifier_array_list) identifier_array_list )parameters (block (expression_statement (assignment (identifier_res) identifier_res (list )list )assignment )expression_statement (for_statement (identifier_x) identifier_x (identifier_array_list) identifier_array_list (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_zeros_like) identifier_zeros_like )attribute (argument_list (identifier_x) identifier_x )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Get list of zero-valued numpy arrays for specified list of numpy arrays :param array_list: list of numpy arrays :return: list of zeros of same shape as input
(module (function_definition (function_name__style) function_name__style (parameters (identifier_self) identifier_self (identifier_retval) identifier_retval )parameters (block (expression_statement (string_"Applies custom option tree to values return by the callback.") string_"Applies custom option tree to values return by the callback." )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute (call (attribute (identifier_Store) identifier_Store (identifier_custom_options) identifier_custom_options )attribute (argument_list )argument_list )call )comparison_operator (block (return_statement (identifier_retval) identifier_retval )return_statement )block )if_statement (expression_statement (assignment (identifier_spec) identifier_spec (call (attribute (identifier_StoreOptions) identifier_StoreOptions (identifier_tree_to_dict) identifier_tree_to_dict )attribute (argument_list (subscript (call (attribute (identifier_Store) identifier_Store (identifier_custom_options) identifier_custom_options )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )subscript )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_retval) identifier_retval (identifier_opts) identifier_opts )attribute (argument_list (identifier_spec) identifier_spec )argument_list )call )return_statement )block )function_definition )module
Applies custom option tree to values return by the callback.
(module (function_definition (function_name_intersect) function_name_intersect (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_end_point) identifier_end_point (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'end_point') string_'end_point' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_depth) identifier_depth (call (attribute (identifier_self) identifier_self (identifier_get_depth) identifier_get_depth )attribute (argument_list (keyword_argument (identifier_location) identifier_location (identifier_end_point) identifier_end_point )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_depth) identifier_depth (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_depth) identifier_depth (attribute (identifier_end_point) identifier_end_point (identifier_depth) identifier_depth )attribute )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_inter) identifier_inter (True) True )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_inter) identifier_inter (False) False )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_inter) identifier_inter )return_statement )block )function_definition )module
Intersect Point and Bathymetry returns bool
(module (function_definition (function_name_cpp_spec) function_name_cpp_spec (parameters )parameters (block (return_statement (dictionary (pair (identifier_INDENTATION) identifier_INDENTATION (string_'\t') string_'\t' )pair (pair (identifier_BEG_BLOCK) identifier_BEG_BLOCK (string_'{') string_'{' )pair (pair (identifier_END_BLOCK) identifier_END_BLOCK (string_'}') string_'}' )pair (pair (identifier_BEG_LINE) identifier_BEG_LINE (string_'') string_'' )pair (pair (identifier_END_LINE) identifier_END_LINE (string_'\n') string_'\n' )pair (pair (identifier_BEG_ACTION) identifier_BEG_ACTION (string_'') string_'' )pair (pair (identifier_END_ACTION) identifier_END_ACTION (string_';') string_';' )pair (pair (identifier_BEG_CONDITION) identifier_BEG_CONDITION (string_'if(') string_'if(' )pair (pair (identifier_END_CONDITION) identifier_END_CONDITION (string_')') string_')' )pair (pair (identifier_LOGICAL_AND) identifier_LOGICAL_AND (string_' && ') string_' && ' )pair (pair (identifier_LOGICAL_OR) identifier_LOGICAL_OR (string_' || ') string_' || ' )pair )dictionary )return_statement )block )function_definition )module
C++ specification, provided for example, and java compatible.
(module (function_definition (function_name_get_languages_from_application) function_name_get_languages_from_application (parameters (identifier_app_label) identifier_app_label )parameters (block (try_statement (block (expression_statement (assignment (identifier_mod_lan) identifier_mod_lan (call (attribute (call (attribute (attribute (identifier_TransApplicationLanguage) identifier_TransApplicationLanguage (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_application) identifier_application (identifier_app_label) identifier_app_label )keyword_argument )argument_list )call (identifier_get) identifier_get )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_languages) identifier_languages (list_comprehension (attribute (identifier_lang) identifier_lang (identifier_code) identifier_code )attribute (for_in_clause (identifier_lang) identifier_lang (call (attribute (attribute (identifier_mod_lan) identifier_mod_lan (identifier_languages) identifier_languages )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_languages) identifier_languages )return_statement )block (except_clause (attribute (identifier_TransApplicationLanguage) identifier_TransApplicationLanguage (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (return_statement (list )list )return_statement )block )except_clause )try_statement )block )function_definition )module
Get the languages configured for the current application :param app_label: :return:
(module (function_definition (function_name_unsubscribe) function_name_unsubscribe (parameters (identifier_self) identifier_self (identifier_subscription) identifier_subscription )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'ContentType') string_'ContentType' (string_'JSON') string_'JSON' )pair (pair (string_'SubscriptionArn') string_'SubscriptionArn' (identifier_subscription) identifier_subscription )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_make_request) identifier_make_request )attribute (argument_list (string_'Unsubscribe') string_'Unsubscribe' (identifier_params) identifier_params (string_'/') string_'/' (string_'GET') string_'GET' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_body) identifier_body (call (attribute (identifier_response) identifier_response (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute (integer_200) integer_200 )comparison_operator (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_body) identifier_body )argument_list )call )return_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_boto) identifier_boto (identifier_log) identifier_log )attribute (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_'%s %s') string_'%s %s' (tuple (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute (attribute (identifier_response) identifier_response (identifier_reason) identifier_reason )attribute )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_boto) identifier_boto (identifier_log) identifier_log )attribute (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_'%s') string_'%s' (identifier_body) identifier_body )binary_operator )argument_list )call )expression_statement (raise_statement (call (attribute (identifier_self) identifier_self (identifier_ResponseError) identifier_ResponseError )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute (attribute (identifier_response) identifier_response (identifier_reason) identifier_reason )attribute (identifier_body) identifier_body )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Allows endpoint owner to delete subscription. Confirmation message will be delivered. :type subscription: string :param subscription: The ARN of the subscription to be deleted.
(module (function_definition (function_name_bounding_box) function_name_bounding_box (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_world_coords) identifier_world_coords )attribute (block (return_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_world_obj) identifier_world_obj )attribute (identifier_findSolid) identifier_findSolid )attribute (argument_list )argument_list )call (identifier_BoundingBox) identifier_BoundingBox )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_local_obj) identifier_local_obj )attribute (identifier_findSolid) identifier_findSolid )attribute (argument_list )argument_list )call (identifier_BoundingBox) identifier_BoundingBox )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Generate a bounding box based on the full complexity part. :return: bounding box of part :rtype: cadquery.BoundBox
(module (function_definition (function_name_set_stream_class_lists_url) function_name_set_stream_class_lists_url (parameters (identifier_self) identifier_self (identifier_session_id) identifier_session_id )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_api_url) identifier_api_url )attribute (string_'/v2/project/') string_'/v2/project/' )binary_operator (attribute (identifier_self) identifier_self (identifier_api_key) identifier_api_key )attribute )binary_operator (string_'/session/') string_'/session/' )binary_operator (identifier_session_id) identifier_session_id )binary_operator (string_'/stream') string_'/stream' )binary_operator )assignment )expression_statement (return_statement (identifier_url) identifier_url )return_statement )block )function_definition )module
this method returns the url to set the stream class list
(module (function_definition (function_name_get_percent_identity) function_name_get_percent_identity (parameters (identifier_a_aln_seq) identifier_a_aln_seq (identifier_b_aln_seq) identifier_b_aln_seq )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_a_aln_seq) identifier_a_aln_seq )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_b_aln_seq) identifier_b_aln_seq )argument_list )call )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Sequence lengths not equal - was an alignment run?') string_'Sequence lengths not equal - was an alignment run?' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_count) identifier_count (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_gaps) identifier_gaps (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_n) identifier_n (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_a_aln_seq) identifier_a_aln_seq )argument_list )call )argument_list )call (block (if_statement (comparison_operator (subscript (identifier_a_aln_seq) identifier_a_aln_seq (identifier_n) identifier_n )subscript (subscript (identifier_b_aln_seq) identifier_b_aln_seq (identifier_n) identifier_n )subscript )comparison_operator (block (if_statement (comparison_operator (subscript (identifier_a_aln_seq) identifier_a_aln_seq (identifier_n) identifier_n )subscript (string_"-") string_"-" )comparison_operator (block (expression_statement (augmented_assignment (identifier_count) identifier_count (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_gaps) identifier_gaps (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (return_statement (binary_operator (identifier_count) identifier_count (call (identifier_float) identifier_float (argument_list (parenthesized_expression (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_a_aln_seq) identifier_a_aln_seq )argument_list )call (identifier_gaps) identifier_gaps )binary_operator )parenthesized_expression )argument_list )call )binary_operator )return_statement )block )function_definition )module
Get the percent identity between two alignment strings
(module (function_definition (function_name_authenticated_users) function_name_authenticated_users (parameters (identifier_func) identifier_func )parameters (block (expression_statement (assignment (identifier_is_object_permission) identifier_is_object_permission (comparison_operator (string_"has_object") string_"has_object" (attribute (identifier_func) identifier_func (identifier___name__) identifier___name__ )attribute )comparison_operator )assignment )expression_statement (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_func_wrapper) function_name_func_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_request) identifier_request (subscript (identifier_args) identifier_args (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (identifier_is_object_permission) identifier_is_object_permission (block (expression_statement (assignment (identifier_request) identifier_request (subscript (identifier_args) identifier_args (integer_1) integer_1 )subscript )assignment )expression_statement )block )if_statement (if_statement (not_operator (parenthesized_expression (boolean_operator (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute (attribute (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute (identifier_is_authenticated) identifier_is_authenticated )attribute )boolean_operator )parenthesized_expression )not_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (call (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )decorated_definition (return_statement (identifier_func_wrapper) identifier_func_wrapper )return_statement )block )function_definition )module
This decorator is used to abstract common authentication checking functionality out of permission checks. It determines which parameter is the request based on name.
(module (function_definition (function_name_gamma_humic_acid_to_coag) function_name_gamma_humic_acid_to_coag (parameters (identifier_ConcAl) identifier_ConcAl (identifier_ConcNatOrgMat) identifier_ConcNatOrgMat (identifier_NatOrgMat) identifier_NatOrgMat (identifier_coag) identifier_coag )parameters (block (return_statement (call (identifier_min) identifier_min (argument_list (parenthesized_expression (binary_operator (binary_operator (parenthesized_expression (binary_operator (identifier_ConcNatOrgMat) identifier_ConcNatOrgMat (attribute (call (identifier_conc_precipitate) identifier_conc_precipitate (argument_list (identifier_ConcAl) identifier_ConcAl (identifier_coag) identifier_coag )argument_list )call (identifier_magnitude) identifier_magnitude )attribute )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (attribute (identifier_coag) identifier_coag (identifier_Density) identifier_Density )attribute (attribute (identifier_NatOrgMat) identifier_NatOrgMat (identifier_Density) identifier_Density )attribute )binary_operator )parenthesized_expression )binary_operator (parenthesized_expression (binary_operator (attribute (identifier_coag) identifier_coag (identifier_Diameter) identifier_Diameter )attribute (parenthesized_expression (binary_operator (integer_4) integer_4 (attribute (identifier_NatOrgMat) identifier_NatOrgMat (identifier_Diameter) identifier_Diameter )attribute )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression (integer_1) integer_1 )argument_list )call )return_statement )block )function_definition )module
Return the fraction of the coagulant that is coated with humic acid. :param ConcAl: Concentration of alumninum in solution :type ConcAl: float :param ConcNatOrgMat: Concentration of natural organic matter in solution :type ConcNatOrgMat: float :param NatOrgMat: type of natural organic matter, e.g. floc_model.HumicAcid :type NatOrgMat: floc_model.Material :param coag: Type of coagulant in solution, e.g. floc_model.PACl :type coag: floc_model.Material :return: fraction of the coagulant that is coated with humic acid :rtype: float
(module (function_definition (function_name_get_wifi_state) function_name_get_wifi_state (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_"getting wifi state...") string_"getting wifi state..." )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_cmd) identifier_cmd (identifier_url) identifier_url )pattern_list (subscript (identifier_DEVICE_URLS) identifier_DEVICE_URLS (string_"get_wifi_state") string_"get_wifi_state" )subscript )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__exec) identifier__exec )attribute (argument_list (identifier_cmd) identifier_cmd (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
returns the current Wi-Fi state the device is connected to
(module (function_definition (function_name_grad) function_name_grad (parameters (identifier_self) identifier_self (identifier_xs) identifier_xs (identifier_ys) identifier_ys )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sess) identifier_sess )attribute (identifier_run) identifier_run )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_cross_entropy_grads) identifier_cross_entropy_grads )attribute (keyword_argument (identifier_feed_dict) identifier_feed_dict (dictionary (pair (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute (identifier_xs) identifier_xs )pair (pair (attribute (identifier_self) identifier_self (identifier_y_) identifier_y_ )attribute (identifier_ys) identifier_ys )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Computes the gradients of the network.
(module (function_definition (function_name_toggleAttributesDOM) function_name_toggleAttributesDOM (parameters (identifier_isEnabled) identifier_isEnabled )parameters (block (if_statement (identifier_isEnabled) identifier_isEnabled (block (expression_statement (assignment (attribute (identifier_AdvancedTag) identifier_AdvancedTag (identifier_attributes) identifier_attributes )attribute (attribute (identifier_AdvancedTag) identifier_AdvancedTag (identifier_attributesDOM) identifier_attributesDOM )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_AdvancedTag) identifier_AdvancedTag (identifier_attributes) identifier_attributes )attribute (attribute (identifier_AdvancedTag) identifier_AdvancedTag (identifier_attributesDict) identifier_attributesDict )attribute )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
toggleAttributesDOM - Toggle if the old DOM tag.attributes NamedNodeMap model should be used for the .attributes method, versus a more sane direct dict implementation. The DOM version is always accessable as AdvancedTag.attributesDOM The dict version is always accessable as AdvancedTag.attributesDict Default for AdvancedTag.attributes is to be attributesDict implementation. @param isEnabled <bool> - If True, .attributes will be changed to use the DOM-provider. Otherwise, it will use the dict provider.
(module (function_definition (function_name_group) function_name_group (parameters (identifier_self) identifier_self )parameters (block (expression_statement (string_"Group inherited from main element") string_"Group inherited from main element" )expression_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_main) identifier_main )attribute (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_main) identifier_main )attribute (identifier_group) identifier_group )attribute (attribute (call (identifier_type) identifier_type (argument_list (attribute (identifier_self) identifier_self (identifier_main) identifier_main )attribute )argument_list )call (identifier___name__) identifier___name__ )attribute )comparison_operator )boolean_operator (block (return_statement (attribute (attribute (identifier_self) identifier_self (identifier_main) identifier_main )attribute (identifier_group) identifier_group )attribute )return_statement )block (else_clause (block (return_statement (string_'AdjointLayout') string_'AdjointLayout' )return_statement )block )else_clause )if_statement )block )function_definition )module
Group inherited from main element
(module (function_definition (function_name___check_field) function_name___check_field (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier__props) identifier__props )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )not_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_'The field "%s" does not exist on "%s"') string_'The field "%s" does not exist on "%s"' (tuple (identifier_key) identifier_key (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 )if_statement )block )function_definition )module
Raises a KeyError if the field doesn't exist.