sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clean) identifier_clean )attribute (argument_list )argument_list )call )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_schema_zip_file) identifier_schema_zip_file )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_schema_zip_file) identifier_schema_zip_file )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_schema_root_dir) identifier_schema_root_dir )attribute )argument_list )call (line_continuation_\) line_continuation_\ (comparison_operator (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_schema_root_dir) identifier_schema_root_dir )attribute )argument_list )call (list )list )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_rmdir) identifier_rmdir )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_schema_root_dir) identifier_schema_root_dir )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
The `schema_mof_dir` directory is removed if it esists and the `schema_zip_file` is removed if it exists. If the `schema_root_dir` is empty after these removals that directory is removed.
(module (function_definition (function_name_earth_gyro) function_name_earth_gyro (parameters (identifier_RAW_IMU) identifier_RAW_IMU (identifier_ATTITUDE) identifier_ATTITUDE )parameters (block (expression_statement (assignment (identifier_r) identifier_r (call (identifier_rotation) identifier_rotation (argument_list (identifier_ATTITUDE) identifier_ATTITUDE )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_accel) identifier_accel (binary_operator (call (identifier_Vector3) identifier_Vector3 (argument_list (call (identifier_degrees) identifier_degrees (argument_list (attribute (identifier_RAW_IMU) identifier_RAW_IMU (identifier_xgyro) identifier_xgyro )attribute )argument_list )call (call (identifier_degrees) identifier_degrees (argument_list (attribute (identifier_RAW_IMU) identifier_RAW_IMU (identifier_ygyro) identifier_ygyro )attribute )argument_list )call (call (identifier_degrees) identifier_degrees (argument_list (attribute (identifier_RAW_IMU) identifier_RAW_IMU (identifier_zgyro) identifier_zgyro )attribute )argument_list )call )argument_list )call (float_0.001) float_0.001 )binary_operator )assignment )expression_statement (return_statement (binary_operator (identifier_r) identifier_r (identifier_accel) identifier_accel )binary_operator )return_statement )block )function_definition )module
return earth frame gyro vector
(module (function_definition (function_name__read_hopopt_options) function_name__read_hopopt_options (parameters (identifier_self) identifier_self (identifier_length) identifier_length )parameters (block (expression_statement (assignment (identifier_counter) identifier_counter (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_optkind) identifier_optkind (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_options) identifier_options (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (identifier_counter) identifier_counter (identifier_length) identifier_length )comparison_operator (block (expression_statement (assignment (identifier_code) identifier_code (call (attribute (identifier_self) identifier_self (identifier__read_unpack) identifier__read_unpack )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_code) identifier_code )not_operator (block (break_statement )break_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_abbr) identifier_abbr (identifier_desc) identifier_desc )pattern_list (call (attribute (identifier__HOPOPT_OPT) identifier__HOPOPT_OPT (identifier_get) identifier_get )attribute (argument_list (identifier_code) identifier_code (tuple (string_'none') string_'none' (string_'Unassigned') string_'Unassigned' )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (call (identifier__HOPOPT_PROC) identifier__HOPOPT_PROC (argument_list (identifier_abbr) identifier_abbr )argument_list )call (argument_list (identifier_self) identifier_self (identifier_code) identifier_code (keyword_argument (identifier_desc) identifier_desc (identifier_desc) identifier_desc )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_enum) identifier_enum (call (attribute (identifier__OPT_TYPE) identifier__OPT_TYPE (identifier_get) identifier_get )attribute (argument_list (identifier_code) identifier_code )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_counter) identifier_counter (subscript (identifier_data) identifier_data (string_'length') string_'length' )subscript )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_enum) identifier_enum (identifier_optkind) identifier_optkind )comparison_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_options) identifier_options (identifier_abbr) identifier_abbr )subscript (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (augmented_assignment (subscript (identifier_options) identifier_options (identifier_abbr) identifier_abbr )subscript (tuple (call (identifier_Info) identifier_Info (argument_list (identifier_data) identifier_data )argument_list )call )tuple )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_options) identifier_options (identifier_abbr) identifier_abbr )subscript (tuple (call (identifier_Info) identifier_Info (argument_list (subscript (identifier_options) identifier_options (identifier_abbr) identifier_abbr )subscript )argument_list )call (call (identifier_Info) identifier_Info (argument_list (identifier_data) identifier_data )argument_list )call )tuple )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_optkind) identifier_optkind (identifier_append) identifier_append )attribute (argument_list (identifier_enum) identifier_enum )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_options) identifier_options (identifier_abbr) identifier_abbr )subscript (identifier_data) identifier_data )assignment )expression_statement )block )else_clause )if_statement )block )while_statement (if_statement (comparison_operator (identifier_counter) identifier_counter (identifier_length) identifier_length )comparison_operator (block (raise_statement (call (identifier_ProtocolError) identifier_ProtocolError (argument_list (string_f'{self.alias}: invalid format') string_f'{self.alias}: invalid format' )argument_list )call )raise_statement )block )if_statement (return_statement (expression_list (call (identifier_tuple) identifier_tuple (argument_list (identifier_optkind) identifier_optkind )argument_list )call (identifier_options) identifier_options )expression_list )return_statement )block )function_definition )module
Read HOPOPT options. Positional arguments: * length -- int, length of options Returns: * dict -- extracted HOPOPT options
(module (function_definition (function_name__update_metadata_for_video) function_name__update_metadata_for_video (parameters (identifier_self) identifier_self (identifier_metadata_href) identifier_metadata_href (identifier_video) identifier_video )parameters (block (expression_statement (assignment (identifier_current_metadata) identifier_current_metadata (call (attribute (attribute (identifier_self) identifier_self (identifier_clarify_client) identifier_clarify_client )attribute (identifier_get_metadata) identifier_get_metadata )attribute (argument_list (identifier_metadata_href) identifier_metadata_href )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cur_data) identifier_cur_data (call (attribute (identifier_current_metadata) identifier_current_metadata (identifier_get) identifier_get )attribute (argument_list (string_'data') string_'data' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_cur_data) identifier_cur_data (identifier_get) identifier_get )attribute (argument_list (string_'updated_at') string_'updated_at' )argument_list )call (subscript (identifier_video) identifier_video (string_'updated_at') string_'updated_at' )subscript )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (call (attribute (string_'Updating metadata for video {0}') string_'Updating metadata for video {0}' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_video) identifier_video (string_'id') string_'id' )subscript )argument_list )call )argument_list )call )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_dry_run) identifier_dry_run )attribute )not_operator (block (expression_statement (assignment (identifier_metadata) identifier_metadata (call (attribute (identifier_self) identifier_self (identifier__metadata_from_video) identifier__metadata_from_video )attribute (argument_list (identifier_video) identifier_video )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_clarify_client) identifier_clarify_client )attribute (identifier_update_metadata) identifier_update_metadata )attribute (argument_list (identifier_metadata_href) identifier_metadata_href (keyword_argument (identifier_metadata) identifier_metadata (identifier_metadata) identifier_metadata )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (augmented_assignment (subscript (attribute (identifier_self) identifier_self (identifier_sync_stats) identifier_sync_stats )attribute (string_'updated') string_'updated' )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement )block )function_definition )module
Update the metadata for the video if video has been updated in Brightcove since the bundle metadata was last updated.
(module (function_definition (function_name__pipeline_cell) function_name__pipeline_cell (parameters (identifier_args) identifier_args (identifier_cell_body) identifier_cell_body )parameters (block (if_statement (comparison_operator (subscript (identifier_args) identifier_args (string_'action') string_'action' )subscript (string_'deploy') string_'deploy' )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'Deploying a pipeline is not yet supported') string_'Deploying a pipeline is not yet supported' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_env) identifier_env (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (call (attribute (attribute (attribute (identifier_datalab) identifier_datalab (identifier_utils) identifier_utils )attribute (identifier_commands) identifier_commands )attribute (identifier_notebook_environment) identifier_notebook_environment )attribute (argument_list )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (attribute (attribute (attribute (identifier_datalab) identifier_datalab (identifier_bigquery) identifier_bigquery )attribute (identifier__udf) identifier__udf )attribute (identifier_UDF) identifier_UDF )attribute )argument_list )call (block (expression_statement (assignment (subscript (identifier_env) identifier_env (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_query) identifier_query (call (identifier__get_query_argument) identifier__get_query_argument (argument_list (identifier_args) identifier_args (identifier_cell_body) identifier_cell_body (identifier_env) identifier_env )argument_list )call )assignment )expression_statement (if_statement (subscript (identifier_args) identifier_args (string_'verbose') string_'verbose' )subscript (block (expression_statement (call (identifier_print) identifier_print (argument_list (attribute (identifier_query) identifier_query (identifier_sql) identifier_sql )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_args) identifier_args (string_'action') string_'action' )subscript (string_'dryrun') string_'dryrun' )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (attribute (identifier_query) identifier_query (identifier_sql) identifier_sql )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_query) identifier_query (identifier_execute_dry_run) identifier_execute_dry_run )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (attribute (identifier_datalab) identifier_datalab (identifier_bigquery) identifier_bigquery )attribute (identifier__query_stats) identifier__query_stats )attribute (identifier_QueryStats) identifier_QueryStats )attribute (argument_list (keyword_argument (identifier_total_bytes) identifier_total_bytes (subscript (identifier_result) identifier_result (string_'totalBytesProcessed') string_'totalBytesProcessed' )subscript )keyword_argument (keyword_argument (identifier_is_cached) identifier_is_cached (subscript (identifier_result) identifier_result (string_'cacheHit') string_'cacheHit' )subscript )keyword_argument )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_args) identifier_args (string_'action') string_'action' )subscript (string_'run') string_'run' )comparison_operator (block (return_statement (attribute (call (attribute (identifier_query) identifier_query (identifier_execute) identifier_execute )attribute (argument_list (subscript (identifier_args) identifier_args (string_'target') string_'target' )subscript (keyword_argument (identifier_table_mode) identifier_table_mode (subscript (identifier_args) identifier_args (string_'mode') string_'mode' )subscript )keyword_argument (keyword_argument (identifier_use_cache) identifier_use_cache (not_operator (subscript (identifier_args) identifier_args (string_'nocache') string_'nocache' )subscript )not_operator )keyword_argument (keyword_argument (identifier_allow_large_results) identifier_allow_large_results (subscript (identifier_args) identifier_args (string_'large') string_'large' )subscript )keyword_argument (keyword_argument (identifier_dialect) identifier_dialect (subscript (identifier_args) identifier_args (string_'dialect') string_'dialect' )subscript )keyword_argument (keyword_argument (identifier_billing_tier) identifier_billing_tier (subscript (identifier_args) identifier_args (string_'billing') string_'billing' )subscript )keyword_argument )argument_list )call (identifier_results) identifier_results )attribute )return_statement )block )if_statement )block )function_definition )module
Implements the BigQuery cell magic used to validate, execute or deploy BQ pipelines. The supported syntax is: %%bigquery pipeline [-q|--sql <query identifier>] <other args> <action> [<YAML or JSON cell_body or inline SQL>] Args: args: the arguments following '%bigquery pipeline'. cell_body: optional contents of the cell interpreted as YAML or JSON. Returns: The QueryResultsTable
(module (function_definition (function_name_THUMBNAIL_OPTIONS) function_name_THUMBNAIL_OPTIONS (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_core) identifier_core (identifier_exceptions) identifier_exceptions )dotted_name (dotted_name (identifier_ImproperlyConfigured) identifier_ImproperlyConfigured )dotted_name )import_from_statement (expression_statement (assignment (identifier_size) identifier_size (call (attribute (identifier_self) identifier_self (identifier__setting) identifier__setting )attribute (argument_list (string_'DJNG_THUMBNAIL_SIZE') string_'DJNG_THUMBNAIL_SIZE' (tuple (integer_200) integer_200 (integer_200) integer_200 )tuple )argument_list )call )assignment )expression_statement (if_statement (not_operator (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_size) identifier_size (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_size) identifier_size )argument_list )call (integer_2) integer_2 )comparison_operator )boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_size) identifier_size (integer_0) integer_0 )subscript (identifier_int) identifier_int )argument_list )call )boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_size) identifier_size (integer_1) integer_1 )subscript (identifier_int) identifier_int )argument_list )call )boolean_operator )parenthesized_expression )not_operator (block (raise_statement (call (identifier_ImproperlyConfigured) identifier_ImproperlyConfigured (argument_list (string_"'DJNG_THUMBNAIL_SIZE' must be a 2-tuple of integers.") string_"'DJNG_THUMBNAIL_SIZE' must be a 2-tuple of integers." )argument_list )call )raise_statement )block )if_statement (return_statement (dictionary (pair (string_'crop') string_'crop' (True) True )pair (pair (string_'size') string_'size' (identifier_size) identifier_size )pair )dictionary )return_statement )block )function_definition )module
Set the size as a 2-tuple for thumbnailed images after uploading them.
(module (function_definition (function_name_generic_stitch) function_name_generic_stitch (parameters (identifier_cube) identifier_cube (identifier_arrays) identifier_arrays )parameters (block (for_statement (pattern_list (identifier_name) identifier_name (identifier_ary) identifier_ary )pattern_list (call (attribute (identifier_arrays) identifier_arrays (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_name) identifier_name (attribute (call (identifier_type) identifier_type (argument_list (identifier_cube) identifier_cube )argument_list )call (identifier___dict__) identifier___dict__ )attribute )comparison_operator (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (call (identifier_type) identifier_type (argument_list (identifier_cube) identifier_cube )argument_list )call (identifier_name) identifier_name (call (identifier_ArrayDescriptor) identifier_ArrayDescriptor (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_cube) identifier_cube (identifier_name) identifier_name (identifier_ary) identifier_ary )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Creates descriptors associated with array name and then sets the array as a member variable
(module (function_definition (function_name_get_public_inline_preview_url) function_name_get_public_inline_preview_url (parameters (identifier_self) identifier_self (identifier_id) identifier_id (default_parameter (identifier_submission_id) identifier_submission_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_path) identifier_path (string_"id") string_"id" )subscript (identifier_id) identifier_id )assignment )expression_statement (if_statement (comparison_operator (identifier_submission_id) identifier_submission_id (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_"submission_id") string_"submission_id" )subscript (identifier_submission_id) identifier_submission_id )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"GET /api/v1/files/{id}/public_url with query params: {params} and form data: {data}") string_"GET /api/v1/files/{id}/public_url with query params: {params} and form data: {data}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (dictionary_splat (identifier_path) identifier_path )dictionary_splat )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_generic_request) identifier_generic_request )attribute (argument_list (string_"GET") string_"GET" (call (attribute (string_"/api/v1/files/{id}/public_url") string_"/api/v1/files/{id}/public_url" (identifier_format) identifier_format )attribute (argument_list (dictionary_splat (identifier_path) identifier_path )dictionary_splat )argument_list )call (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_no_data) identifier_no_data (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get public inline preview url. Determine the URL that should be used for inline preview of the file.
(module (function_definition (function_name__check_type) function_name__check_type (parameters (identifier_self) identifier_self (identifier_check_type) identifier_check_type (identifier_properties) identifier_properties )parameters (block (if_statement (comparison_operator (string_'PrimitiveType') string_'PrimitiveType' (identifier_properties) identifier_properties )comparison_operator (block (return_statement (comparison_operator (subscript (identifier_properties) identifier_properties (string_'PrimitiveType') string_'PrimitiveType' )subscript (identifier_check_type) identifier_check_type )comparison_operator )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_properties) identifier_properties (string_'Type') string_'Type' )subscript (string_'List') string_'List' )comparison_operator (block (if_statement (comparison_operator (string_'ItemType') string_'ItemType' (identifier_properties) identifier_properties )comparison_operator (block (return_statement (comparison_operator (subscript (identifier_properties) identifier_properties (string_'ItemType') string_'ItemType' )subscript (identifier_check_type) identifier_check_type )comparison_operator )return_statement )block (else_clause (block (return_statement (comparison_operator (subscript (identifier_properties) identifier_properties (string_'PrimitiveItemType') string_'PrimitiveItemType' )subscript (identifier_check_type) identifier_check_type )comparison_operator )return_statement )block )else_clause )if_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Decode a properties type looking for a specific type.
(module (function_definition (function_name_do_add_item) function_name_do_add_item (parameters (identifier_self) identifier_self (identifier_args) identifier_args )parameters (block (if_statement (attribute (identifier_args) identifier_args (identifier_food) identifier_food )attribute (block (expression_statement (assignment (identifier_add_item) identifier_add_item (attribute (identifier_args) identifier_args (identifier_food) identifier_food )attribute )assignment )expression_statement )block (elif_clause (attribute (identifier_args) identifier_args (identifier_sport) identifier_sport )attribute (block (expression_statement (assignment (identifier_add_item) identifier_add_item (attribute (identifier_args) identifier_args (identifier_sport) identifier_sport )attribute )assignment )expression_statement )block )elif_clause (elif_clause (attribute (identifier_args) identifier_args (identifier_other) identifier_other )attribute (block (expression_statement (assignment (identifier_add_item) identifier_add_item (attribute (identifier_args) identifier_args (identifier_other) identifier_other )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_add_item) identifier_add_item (string_'no items') string_'no items' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_poutput) identifier_poutput )attribute (argument_list (call (attribute (string_"You added {}") string_"You added {}" (identifier_format) identifier_format )attribute (argument_list (identifier_add_item) identifier_add_item )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Add item command help
(module (function_definition (function_name__close) function_name__close (parameters (identifier_self) identifier_self (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_connection) identifier_connection (subscript (attribute (identifier_self) identifier_self (identifier_connections) identifier_connections )attribute (identifier_id) identifier_id )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_connection) identifier_connection (identifier_connectionLost) identifier_connectionLost )attribute (argument_list (call (identifier_Failure) identifier_Failure (argument_list (identifier_CONNECTION_DONE) identifier_CONNECTION_DONE )argument_list )call )argument_list )call )expression_statement (return_statement (dictionary )dictionary )return_statement )block )function_definition )module
Respond to a CLOSE command, dumping some data onto the stream. As with WRITE, this returns an empty acknowledgement. An occurrence of I{Close} on the wire, together with the response generated by this method, might have this apperance:: C: -Command: Close C: -Ask: 1 C: Id: glyph@divmod.com->radix@twistedmatrix.com:q2q-example:0 C: S: -Answer: 1 S:
(module (function_definition (function_name_get_message_content) function_name_get_message_content (parameters (identifier_self) identifier_self (identifier_message_id) identifier_message_id (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (call (attribute (string_'/v2/bot/message/{message_id}/content') string_'/v2/bot/message/{message_id}/content' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_message_id) identifier_message_id (identifier_message_id) identifier_message_id )keyword_argument )argument_list )call (keyword_argument (identifier_stream) identifier_stream (True) True )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Content) identifier_Content (argument_list (identifier_response) identifier_response )argument_list )call )return_statement )block )function_definition )module
Call get content API. https://devdocs.line.me/en/#get-content Retrieve image, video, and audio data sent by users. :param str message_id: Message ID :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a (connect timeout, read timeout) float tuple. Default is self.http_client.timeout :type timeout: float | tuple(float, float) :rtype: :py:class:`linebot.models.responses.Content` :return: Content instance
(module (function_definition (function_name_subscriptions) function_name_subscriptions (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_subscriptions') string_'_subscriptions' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_subscriptions_resource) identifier_subscriptions_resource (attribute (attribute (identifier_self) identifier_self (identifier_resource) identifier_resource )attribute (identifier_subscriptions) identifier_subscriptions )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__subscriptions) identifier__subscriptions )attribute (call (identifier_Subscriptions) identifier_Subscriptions (argument_list (identifier_subscriptions_resource) identifier_subscriptions_resource (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__subscriptions) identifier__subscriptions )attribute )return_statement )block )function_definition )module
Fetch and return Subscriptions associated with this user.
(module (function_definition (function_name_draw_str) function_name_draw_str (parameters (identifier_self) identifier_self (identifier_x) identifier_x (identifier_y) identifier_y (identifier_string) identifier_string (default_parameter (identifier_fg) identifier_fg (identifier_Ellipsis) identifier_Ellipsis )default_parameter (default_parameter (identifier_bg) identifier_bg (identifier_Ellipsis) identifier_Ellipsis )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (call (attribute (identifier_self) identifier_self (identifier__normalizePoint) identifier__normalizePoint )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_fg) identifier_fg (identifier_bg) identifier_bg )pattern_list (expression_list (call (identifier__format_color) identifier__format_color (argument_list (identifier_fg) identifier_fg (attribute (identifier_self) identifier_self (identifier__fg) identifier__fg )attribute )argument_list )call (call (identifier__format_color) identifier__format_color (argument_list (identifier_bg) identifier_bg (attribute (identifier_self) identifier_self (identifier__bg) identifier__bg )attribute )argument_list )call )expression_list )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_width) identifier_width (identifier_height) identifier_height )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_size) identifier_get_size )attribute (argument_list )argument_list )call )assignment )expression_statement (function_definition (function_name__drawStrGen) function_name__drawStrGen (parameters (default_parameter (identifier_x) identifier_x (identifier_x) identifier_x )default_parameter (default_parameter (identifier_y) identifier_y (identifier_y) identifier_y )default_parameter (default_parameter (identifier_string) identifier_string (identifier_string) identifier_string )default_parameter (default_parameter (identifier_width) identifier_width (identifier_width) identifier_width )default_parameter (default_parameter (identifier_height) identifier_height (identifier_height) identifier_height )default_parameter )parameters (block (for_statement (identifier_char) identifier_char (call (identifier__format_str) identifier__format_str (argument_list (identifier_string) identifier_string )argument_list )call (block (if_statement (comparison_operator (identifier_y) identifier_y (identifier_height) identifier_height )comparison_operator (block (raise_statement (call (identifier_TDLError) identifier_TDLError (argument_list (string_'End of console reached.') string_'End of console reached.' )argument_list )call )raise_statement )block )if_statement (expression_statement (yield (tuple (tuple (identifier_x) identifier_x (identifier_y) identifier_y )tuple (identifier_char) identifier_char )tuple )yield )expression_statement (expression_statement (augmented_assignment (identifier_x) identifier_x (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_x) identifier_x (identifier_width) identifier_width )comparison_operator (block (expression_statement (assignment (identifier_x) identifier_x (integer_0) integer_0 )assignment )expression_statement (expression_statement (augmented_assignment (identifier_y) identifier_y (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_batch) identifier__set_batch )attribute (argument_list (call (identifier__drawStrGen) identifier__drawStrGen (argument_list )argument_list )call (identifier_fg) identifier_fg (identifier_bg) identifier_bg )argument_list )call )expression_statement )block )function_definition )module
Draws a string starting at x and y. A string that goes past the right side will wrap around. A string wrapping to below the console will raise :any:`tdl.TDLError` but will still be written out. This means you can safely ignore the errors with a try..except block if you're fine with partially written strings. \\r and \\n are drawn on the console as normal character tiles. No special encoding is done and any string will translate to the character table as is. For a string drawing operation that respects special characters see :any:`print_str`. Args: x (int): x-coordinate to start at. y (int): y-coordinate to start at. string (Union[Text, Iterable[int]]): A string or an iterable of numbers. Special characters are ignored and rendered as any other character. fg (Optional[Union[Tuple[int, int, int], int, Ellipsis]]) bg (Optional[Union[Tuple[int, int, int], int, Ellipsis]]) Raises: AssertionError: Having x or y values that can't be placed inside of the console will raise an AssertionError. You can use always use ``((x, y) in console)`` to check if a tile is drawable. .. seealso:: :any:`print_str`
(module (function_definition (function_name__precesion) function_name__precesion (parameters (identifier_date) identifier_date )parameters (block (expression_statement (assignment (identifier_t) identifier_t (attribute (call (attribute (identifier_date) identifier_date (identifier_change_scale) identifier_change_scale )attribute (argument_list (string_'TT') string_'TT' )argument_list )call (identifier_julian_century) identifier_julian_century )attribute )assignment )expression_statement (expression_statement (assignment (identifier_zeta) identifier_zeta (binary_operator (parenthesized_expression (binary_operator (binary_operator (binary_operator (float_2306.2181) float_2306.2181 (identifier_t) identifier_t )binary_operator (binary_operator (float_0.30188) float_0.30188 (binary_operator (identifier_t) identifier_t (integer_2) integer_2 )binary_operator )binary_operator )binary_operator (binary_operator (float_0.017998) float_0.017998 (binary_operator (identifier_t) identifier_t (integer_3) integer_3 )binary_operator )binary_operator )binary_operator )parenthesized_expression (float_3600.) float_3600. )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_theta) identifier_theta (binary_operator (parenthesized_expression (binary_operator (binary_operator (binary_operator (float_2004.3109) float_2004.3109 (identifier_t) identifier_t )binary_operator (binary_operator (float_0.42665) float_0.42665 (binary_operator (identifier_t) identifier_t (integer_2) integer_2 )binary_operator )binary_operator )binary_operator (binary_operator (float_0.041833) float_0.041833 (binary_operator (identifier_t) identifier_t (integer_3) integer_3 )binary_operator )binary_operator )binary_operator )parenthesized_expression (float_3600.) float_3600. )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_z) identifier_z (binary_operator (parenthesized_expression (binary_operator (binary_operator (binary_operator (float_2306.2181) float_2306.2181 (identifier_t) identifier_t )binary_operator (binary_operator (float_1.09468) float_1.09468 (binary_operator (identifier_t) identifier_t (integer_2) integer_2 )binary_operator )binary_operator )binary_operator (binary_operator (float_0.018203) float_0.018203 (binary_operator (identifier_t) identifier_t (integer_3) integer_3 )binary_operator )binary_operator )binary_operator )parenthesized_expression (float_3600.) float_3600. )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_zeta) identifier_zeta (identifier_theta) identifier_theta (identifier_z) identifier_z )expression_list )return_statement )block )function_definition )module
Precession in degrees
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (default_parameter (identifier_callback) identifier_callback (None) None )default_parameter (default_parameter (identifier_errback) identifier_errback (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )not_operator (block (raise_statement (call (identifier_MonitorException) identifier_MonitorException (argument_list (string_'monitor not loaded') string_'monitor not loaded' )argument_list )call )raise_statement )block )if_statement (function_definition (function_name_success) function_name_success (parameters (identifier_result) identifier_result (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_result) identifier_result )assignment )expression_statement (if_statement (identifier_callback) identifier_callback (block (return_statement (call (identifier_callback) identifier_callback (argument_list (identifier_self) identifier_self )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_self) identifier_self )return_statement )block )else_clause )if_statement )block )function_definition (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__rest) identifier__rest )attribute (identifier_update) identifier_update )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (string_'id') string_'id' )subscript (dictionary )dictionary (keyword_argument (identifier_callback) identifier_callback (identifier_success) identifier_success )keyword_argument (keyword_argument (identifier_errback) identifier_errback (identifier_errback) identifier_errback )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Update monitor configuration. Pass a list of keywords and their values to update.
(module (function_definition (function_name_run_kernel) function_name_run_kernel (parameters (identifier_self) identifier_self (identifier_func) identifier_func (identifier_gpu_args) identifier_gpu_args (identifier_threads) identifier_threads (identifier_grid) identifier_grid )parameters (block (expression_statement (assignment (identifier_global_size) identifier_global_size (tuple (binary_operator (subscript (identifier_grid) identifier_grid (integer_0) integer_0 )subscript (subscript (identifier_threads) identifier_threads (integer_0) integer_0 )subscript )binary_operator (binary_operator (subscript (identifier_grid) identifier_grid (integer_1) integer_1 )subscript (subscript (identifier_threads) identifier_threads (integer_1) integer_1 )subscript )binary_operator (binary_operator (subscript (identifier_grid) identifier_grid (integer_2) integer_2 )subscript (subscript (identifier_threads) identifier_threads (integer_2) integer_2 )subscript )binary_operator )tuple )assignment )expression_statement (expression_statement (assignment (identifier_local_size) identifier_local_size (identifier_threads) identifier_threads )assignment )expression_statement (expression_statement (assignment (identifier_event) identifier_event (call (identifier_func) identifier_func (argument_list (attribute (identifier_self) identifier_self (identifier_queue) identifier_queue )attribute (identifier_global_size) identifier_global_size (identifier_local_size) identifier_local_size (list_splat (identifier_gpu_args) identifier_gpu_args )list_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_event) identifier_event (identifier_wait) identifier_wait )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
runs the OpenCL kernel passed as 'func' :param func: An OpenCL Kernel :type func: pyopencl.Kernel :param gpu_args: A list of arguments to the kernel, order should match the order in the code. Allowed values are either variables in global memory or single values passed by value. :type gpu_args: list( pyopencl.Buffer, numpy.int32, ...) :param threads: A tuple listing the number of work items in each dimension of the work group. :type threads: tuple(int, int, int) :param grid: A tuple listing the number of work groups in each dimension of the NDRange. :type grid: tuple(int, int)
(module (function_definition (function_name_execute) function_name_execute (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Starting Argos event loop...") string_"Starting Argos event loop..." )argument_list )call )expression_statement (expression_statement (assignment (identifier_exitCode) identifier_exitCode (call (attribute (attribute (identifier_self) identifier_self (identifier_qApplication) identifier_qApplication )attribute (identifier_exec_) identifier_exec_ )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Argos event loop finished with exit code: {}") string_"Argos event loop finished with exit code: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_exitCode) identifier_exitCode )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_exitCode) identifier_exitCode )return_statement )block )function_definition )module
Executes all main windows by starting the Qt main application
(module (function_definition (function_name_persist_booking) function_name_persist_booking (parameters (identifier_booking) identifier_booking (identifier_user) identifier_user )parameters (block (if_statement (comparison_operator (identifier_booking) identifier_booking (None) None )comparison_operator (block (expression_statement (assignment (identifier_existing_bookings) identifier_existing_bookings (call (attribute (call (attribute (attribute (identifier_Booking) identifier_Booking (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_booking_status__slug) identifier_booking_status__slug (string_'inprogress') string_'inprogress' )keyword_argument )argument_list )call (identifier_exclude) identifier_exclude )attribute (argument_list (keyword_argument (identifier_pk) identifier_pk (attribute (identifier_booking) identifier_booking (identifier_pk) identifier_pk )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_existing_bookings) identifier_existing_bookings (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_booking) identifier_booking (identifier_session) identifier_session )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_booking) identifier_booking (identifier_user) identifier_user )attribute (identifier_user) identifier_user )assignment )expression_statement (expression_statement (call (attribute (identifier_booking) identifier_booking (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Ties an in-progress booking from a session to a user when the user logs in. If we don't do this, the booking will be lost, because on a login, the old session will be deleted and a new one will be created. Since the booking has a FK to the session, it would be deleted as well when the user logs in. We assume that a user can only have one booking that is in-progress. Therefore we will delete any existing in-progress bookings of this user before tying the one from the session to the user. TODO: Find a more generic solution for this, as this assumes that there is a status called inprogress and that a user can only have one such booking. :param booking: The booking that should be tied to the user. :user: The user the booking should be tied to.
(module (function_definition (function_name_filter_objects) function_name_filter_objects (parameters (identifier_self) identifier_self (identifier_objects) identifier_objects (default_parameter (identifier_perm) identifier_perm (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_perm) identifier_perm (None) None )comparison_operator (block (expression_statement (assignment (identifier_perm) identifier_perm (call (identifier_build_permission_name) identifier_build_permission_name (argument_list (attribute (identifier_self) identifier_self (identifier_model_class) identifier_model_class )attribute (string_'view') string_'view' )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_o) identifier_o )lambda_parameters (call (attribute (attribute (identifier_self) identifier_self (identifier_user) identifier_user )attribute (identifier_has_perm) identifier_has_perm )attribute (argument_list (identifier_perm) identifier_perm (keyword_argument (identifier_obj) identifier_obj (identifier_o) identifier_o )keyword_argument )argument_list )call )lambda (identifier_objects) identifier_objects )argument_list )call )return_statement )block )function_definition )module
Return only objects with specified permission in objects list. If perm not specified, 'view' perm will be used.
(module (function_definition (function_name_setReferenceVoltage) function_name_setReferenceVoltage (parameters (identifier_self) identifier_self (identifier_caldb) identifier_caldb (identifier_calv) identifier_calv )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_caldb) identifier_caldb )attribute (identifier_caldb) identifier_caldb )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_calv) identifier_calv )attribute (identifier_calv) identifier_calv )assignment )expression_statement )block )function_definition )module
Sets the reference point to determine what outgoing voltage will produce what intensity, used to calculate the proper output amplitude of components :param caldb: calibration intensity in dbSPL :type caldb: float :param calv: calibration voltage that was used to record the intensity provided :type calv: float
(module (function_definition (function_name_list_projects) function_name_list_projects (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier__run) identifier__run )attribute (argument_list (keyword_argument (identifier_url_path) identifier_url_path (string_"projects/list") string_"projects/list" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_projects) identifier_projects (call (attribute (subscript (identifier_data) identifier_data (string_'result') string_'result' )subscript (identifier_get) identifier_get )attribute (argument_list (string_'projects') string_'projects' (list )list )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (call (attribute (identifier_self) identifier_self (identifier__project_formatter) identifier__project_formatter )attribute (argument_list (identifier_item) identifier_item )argument_list )call (for_in_clause (identifier_item) identifier_item (identifier_projects) identifier_projects )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Returns the list of projects owned by user.
(module (function_definition (function_name_get_monomials) function_name_get_monomials (parameters (identifier_variables) identifier_variables (identifier_degree) identifier_degree )parameters (block (if_statement (comparison_operator (identifier_degree) identifier_degree (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (return_statement (list )list )return_statement )block )if_statement (if_statement (not_operator (identifier_variables) identifier_variables )not_operator (block (return_statement (list (attribute (identifier_S) identifier_S (identifier_One) identifier_One )attribute )list )return_statement )block (else_clause (block (expression_statement (assignment (identifier__variables) identifier__variables (subscript (identifier_variables) identifier_variables (slice (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier__variables) identifier__variables (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (assignment (identifier_ncmonomials) identifier_ncmonomials (list (attribute (identifier_S) identifier_S (identifier_One) identifier_One )attribute )list )assignment )expression_statement (expression_statement (call (attribute (identifier_ncmonomials) identifier_ncmonomials (identifier_extend) identifier_extend )attribute (generator_expression (identifier_var) identifier_var (for_in_clause (identifier_var) identifier_var (identifier_variables) identifier_variables )for_in_clause )generator_expression )call )expression_statement (for_statement (identifier_var) identifier_var (identifier_variables) identifier_variables (block (if_statement (not_operator (call (identifier_is_hermitian) identifier_is_hermitian (argument_list (identifier_var) identifier_var )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_ncmonomials) identifier_ncmonomials (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_var) identifier_var (identifier_adjoint) identifier_adjoint )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (identifier_degree) identifier_degree )argument_list )call (block (expression_statement (assignment (identifier_temp) identifier_temp (list )list )assignment )expression_statement (for_statement (identifier_var) identifier_var (identifier__variables) identifier__variables (block (for_statement (identifier_new_var) identifier_new_var (identifier_ncmonomials) identifier_ncmonomials (block (expression_statement (call (attribute (identifier_temp) identifier_temp (identifier_append) identifier_append )attribute (argument_list (binary_operator (identifier_var) identifier_var (identifier_new_var) identifier_new_var )binary_operator )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_var) identifier_var (integer_1) integer_1 )comparison_operator (not_operator (call (identifier_is_hermitian) identifier_is_hermitian (argument_list (identifier_var) identifier_var )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_temp) identifier_temp (identifier_append) identifier_append )attribute (argument_list (binary_operator (call (attribute (identifier_var) identifier_var (identifier_adjoint) identifier_adjoint )attribute (argument_list )argument_list )call (identifier_new_var) identifier_new_var )binary_operator )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement (expression_statement (assignment (identifier_ncmonomials) identifier_ncmonomials (call (identifier_unique) identifier_unique (argument_list (subscript (identifier_temp) identifier_temp (slice (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_ncmonomials) identifier_ncmonomials )return_statement )block )else_clause )if_statement )block )function_definition )module
Generates all noncommutative monomials up to a degree :param variables: The noncommutative variables to generate monomials from :type variables: list of :class:`sympy.physics.quantum.operator.Operator` or :class:`sympy.physics.quantum.operator.HermitianOperator`. :param degree: The maximum degree. :type degree: int. :returns: list of monomials.
(module (function_definition (function_name_serialize) function_name_serialize (parameters (identifier_self) identifier_self )parameters (block (return_statement (dictionary (pair (string_'name') string_'name' (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )pair (pair (string_'weight') string_'weight' (attribute (identifier_self) identifier_self (identifier_weight) identifier_weight )attribute )pair (pair (string_'value') string_'value' (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute )pair (pair (string_'msgs') string_'msgs' (attribute (identifier_self) identifier_self (identifier_msgs) identifier_msgs )attribute )pair (pair (string_'children') string_'children' (list_comprehension (call (attribute (identifier_i) identifier_i (identifier_serialize) identifier_serialize )attribute (argument_list )argument_list )call (for_in_clause (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute )for_in_clause )list_comprehension )pair )dictionary )return_statement )block )function_definition )module
Returns a serializable dictionary that represents the result object
(module (function_definition (function_name_works) function_name_works (parameters (identifier_self) identifier_self (identifier_member_id) identifier_member_id )parameters (block (expression_statement (assignment (identifier_context) identifier_context (binary_operator (string_'%s/%s') string_'%s/%s' (tuple (attribute (identifier_self) identifier_self (identifier_ENDPOINT) identifier_ENDPOINT )attribute (call (identifier_str) identifier_str (argument_list (identifier_member_id) identifier_member_id )argument_list )call )tuple )binary_operator )assignment )expression_statement (return_statement (call (identifier_Works) identifier_Works (argument_list (keyword_argument (identifier_context) identifier_context (identifier_context) identifier_context )keyword_argument )argument_list )call )return_statement )block )function_definition )module
This method retrieve a iterable of Works of the given member. args: Member ID (Integer) return: Works()
(module (function_definition (function_name_SetDecodedStreamSize) function_name_SetDecodedStreamSize (parameters (identifier_self) identifier_self (identifier_decoded_stream_size) identifier_decoded_stream_size )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__is_open) identifier__is_open )attribute (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (string_'Already open.') string_'Already open.' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_decoded_stream_size) identifier_decoded_stream_size (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (parenthesized_expression (concatenated_string (string_'Invalid decoded stream size: {0:d} value out of ') string_'Invalid decoded stream size: {0:d} value out of ' (string_'bounds.') string_'bounds.' )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (identifier_decoded_stream_size) identifier_decoded_stream_size )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__decoded_stream_size) identifier__decoded_stream_size )attribute (identifier_decoded_stream_size) identifier_decoded_stream_size )assignment )expression_statement )block )function_definition )module
Sets the decoded stream size. This function is used to set the decoded stream size if it can be determined separately. Args: decoded_stream_size (int): size of the decoded stream in bytes. Raises: IOError: if the file-like object is already open. OSError: if the file-like object is already open. ValueError: if the decoded stream size is invalid.
(module (function_definition (function_name_ignore_further_calls_to_server) function_name_ignore_further_calls_to_server (parameters (identifier_self) identifier_self (identifier_server) identifier_server )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_u'ignoring further calls to {}') string_u'ignoring further calls to {}' (identifier_format) identifier_format )attribute (argument_list (identifier_server) identifier_server )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_api) identifier_api )attribute (identifier_servers) identifier_servers )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_server) identifier_server )argument_list )call )expression_statement )block )function_definition )module
Takes a server out of the list.
(module (function_definition (function_name_sample_tmatrix) function_name_sample_tmatrix (parameters (identifier_C) identifier_C (default_parameter (identifier_nsample) identifier_nsample (integer_1) integer_1 )default_parameter (default_parameter (identifier_nsteps) identifier_nsteps (None) None )default_parameter (default_parameter (identifier_reversible) identifier_reversible (False) False )default_parameter (default_parameter (identifier_mu) identifier_mu (None) None )default_parameter (default_parameter (identifier_T0) identifier_T0 (None) None )default_parameter (default_parameter (identifier_return_statdist) identifier_return_statdist (False) False )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (call (identifier_issparse) identifier_issparse (argument_list (identifier_C) identifier_C )argument_list )call (block (expression_statement (call (identifier__showSparseConversionWarning) identifier__showSparseConversionWarning (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_C) identifier_C (call (attribute (identifier_C) identifier_C (identifier_toarray) identifier_toarray )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_sampler) identifier_sampler (call (identifier_tmatrix_sampler) identifier_tmatrix_sampler (argument_list (identifier_C) identifier_C (keyword_argument (identifier_reversible) identifier_reversible (identifier_reversible) identifier_reversible )keyword_argument (keyword_argument (identifier_mu) identifier_mu (identifier_mu) identifier_mu )keyword_argument (keyword_argument (identifier_T0) identifier_T0 (identifier_T0) identifier_T0 )keyword_argument (keyword_argument (identifier_nsteps) identifier_nsteps (identifier_nsteps) identifier_nsteps )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_sampler) identifier_sampler (identifier_sample) identifier_sample )attribute (argument_list (keyword_argument (identifier_nsamples) identifier_nsamples (identifier_nsample) identifier_nsample )keyword_argument (keyword_argument (identifier_return_statdist) identifier_return_statdist (identifier_return_statdist) identifier_return_statdist )keyword_argument )argument_list )call )return_statement )block )function_definition )module
r"""samples transition matrices from the posterior distribution Parameters ---------- C : (M, M) ndarray or scipy.sparse matrix Count matrix nsample : int number of samples to be drawn nstep : int, default=None number of full Gibbs sampling sweeps internally done for each sample returned. This option is meant to ensure approximately uncorrelated samples for every call to sample(). If None, the number of steps will be automatically determined based on the other options and the matrix size. nstep>1 will only be used for reversible sampling, because nonreversible sampling generates statistically independent transition matrices every step. reversible : bool If true sample from the ensemble of transition matrices restricted to those obeying a detailed balance condition, else draw from the whole ensemble of stochastic matrices. mu : array_like A fixed stationary distribution. Transition matrices with that stationary distribution will be sampled T0 : ndarray, shape=(n, n) or scipy.sparse matrix Starting point of the MC chain of the sampling algorithm. Has to obey the required constraints. return_statdist : bool, optional, default = False if true, will also return the stationary distribution. Returns ------- P : ndarray(n,n) or array of ndarray(n,n) sampled transition matrix (or multiple matrices if nsample > 1) Notes ----- The transition matrix sampler generates transition matrices from the posterior distribution. The posterior distribution is given as a product of Dirichlet distributions .. math:: \mathbb{P}(T|C) \propto \prod_{i=1}^{M} \left( \prod_{j=1}^{M} p_{ij}^{c_{ij}} \right) See also -------- tmatrix_sampler
(module (function_definition (function_name_featured_event_query) function_name_featured_event_query (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (not_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'location') string_'location' )argument_list )call )not_operator (parenthesized_expression (boolean_operator (not_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'latitude') string_'latitude' )argument_list )call )not_operator (not_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'longitude') string_'longitude' )argument_list )call )not_operator )boolean_operator )parenthesized_expression )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'A valid location (parameter "location") or latitude/longitude combination ') string_'A valid location (parameter "location") or latitude/longitude combination ' (string_'(parameters "latitude" and "longitude") must be provided.') string_'(parameters "latitude" and "longitude") must be provided.' )concatenated_string )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__query) identifier__query )attribute (argument_list (identifier_FEATURED_EVENT_API_URL) identifier_FEATURED_EVENT_API_URL (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Query the Yelp Featured Event API. documentation: https://www.yelp.com/developers/documentation/v3/featured_event required parameters: * one of either: * location - text specifying a location to search for * latitude and longitude
(module (function_definition (function_name__check_valid_basic) function_name__check_valid_basic (parameters (identifier_self) identifier_self (identifier_get_params) identifier_get_params )parameters (block (try_statement (block (if_statement (call (identifier_get_params) identifier_get_params (argument_list (attribute (identifier_self) identifier_self (identifier_variable) identifier_variable )attribute )argument_list )call (block (return_statement (attribute (identifier_self) identifier_self (identifier_default) identifier_default )attribute )return_statement )block )if_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (not_operator (attribute (identifier_self) identifier_self (identifier_default) identifier_default )attribute )not_operator )return_statement )block )function_definition )module
Simple check that the variable is set
(module (function_definition (function_name_save_ds9) function_name_save_ds9 (parameters (identifier_output) identifier_output (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_ds9_file) identifier_ds9_file (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'wt') string_'wt' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ds9_file) identifier_ds9_file (identifier_write) identifier_write )attribute (argument_list (identifier_output) identifier_output )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ds9_file) identifier_ds9_file (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Save ds9 region output info filename. Parameters ---------- output : str String containing the full output to be exported as a ds9 region file. filename : str Output file name.
(module (function_definition (function_name_get_chatlist) function_name_get_chatlist (parameters (identifier_chatfile) identifier_chatfile )parameters (block (if_statement (not_operator (identifier_chatfile) identifier_chatfile )not_operator (block (return_statement (call (identifier_set) identifier_set (argument_list )argument_list )call )return_statement )block )if_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_chatfile) identifier_chatfile )argument_list )call (as_pattern_target (identifier_file_contents) identifier_file_contents )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (identifier_set) identifier_set (generator_expression (call (identifier_int) identifier_int (argument_list (identifier_chat) identifier_chat )argument_list )call (for_in_clause (identifier_chat) identifier_chat (identifier_file_contents) identifier_file_contents )for_in_clause )generator_expression )call )return_statement )block )with_statement )block (except_clause (as_pattern (tuple (identifier_OSError) identifier_OSError (identifier_IOError) identifier_IOError )tuple (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_error) identifier_error )attribute (argument_list (string_'could not load saved chats:\n%s') string_'could not load saved chats:\n%s' (identifier_exc) identifier_exc )argument_list )call )expression_statement (return_statement (call (identifier_set) identifier_set (argument_list )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Try reading ids of saved chats from file. If we fail, return empty set
(module (function_definition (function_name_add_include) function_name_add_include (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_included_scope) identifier_included_scope (identifier_module) identifier_module )parameters (block (assert_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_included_scopes) identifier_included_scopes )attribute )comparison_operator )assert_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_included_scopes) identifier_included_scopes )attribute (identifier_name) identifier_name )subscript (identifier_included_scope) identifier_included_scope )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_surface) identifier_add_surface )attribute (argument_list (identifier_name) identifier_name (identifier_module) identifier_module )argument_list )call )expression_statement )block )function_definition )module
Register an imported module into this scope. Raises ``ThriftCompilerError`` if the name has already been used.
(module (function_definition (function_name_attach_pipeline) function_name_attach_pipeline (parameters (identifier_self) identifier_self (identifier_pipeline) identifier_pipeline (identifier_name) identifier_name (default_parameter (identifier_chunks) identifier_chunks (None) None )default_parameter (default_parameter (identifier_eager) identifier_eager (True) True )default_parameter )parameters (block (if_statement (comparison_operator (identifier_chunks) identifier_chunks (None) None )comparison_operator (block (expression_statement (assignment (identifier_chunks) identifier_chunks (call (identifier_chain) identifier_chain (argument_list (list (integer_5) integer_5 )list (call (identifier_repeat) identifier_repeat (argument_list (integer_126) integer_126 )argument_list )call )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_chunks) identifier_chunks (identifier_int) identifier_int )argument_list )call (block (expression_statement (assignment (identifier_chunks) identifier_chunks (call (identifier_repeat) identifier_repeat (argument_list (identifier_chunks) identifier_chunks )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__pipelines) identifier__pipelines )attribute )comparison_operator (block (raise_statement (call (identifier_DuplicatePipelineName) identifier_DuplicatePipelineName (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__pipelines) identifier__pipelines )attribute (identifier_name) identifier_name )subscript (call (identifier_AttachedPipeline) identifier_AttachedPipeline (argument_list (identifier_pipeline) identifier_pipeline (call (identifier_iter) identifier_iter (argument_list (identifier_chunks) identifier_chunks )argument_list )call (identifier_eager) identifier_eager )argument_list )call )assignment )expression_statement (return_statement (identifier_pipeline) identifier_pipeline )return_statement )block )function_definition )module
Register a pipeline to be computed at the start of each day. Parameters ---------- pipeline : Pipeline The pipeline to have computed. name : str The name of the pipeline. chunks : int or iterator, optional The number of days to compute pipeline results for. Increasing this number will make it longer to get the first results but may improve the total runtime of the simulation. If an iterator is passed, we will run in chunks based on values of the iterator. Default is True. eager : bool, optional Whether or not to compute this pipeline prior to before_trading_start. Returns ------- pipeline : Pipeline Returns the pipeline that was attached unchanged. See Also -------- :func:`zipline.api.pipeline_output`
(module (function_definition (function_name_index_to_coords) function_name_index_to_coords (parameters (identifier_index) identifier_index (identifier_shape) identifier_shape )parameters (block (expression_statement (assignment (identifier_coords) identifier_coords (list )list )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (integer_1) integer_1 (call (identifier_len) identifier_len (argument_list (identifier_shape) identifier_shape )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_divisor) identifier_divisor (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_np) identifier_np (identifier_product) identifier_product )attribute (argument_list (subscript (identifier_shape) identifier_shape (slice (identifier_i) identifier_i (colon) colon )slice )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (binary_operator (identifier_index) identifier_index (identifier_divisor) identifier_divisor )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_coords) identifier_coords (identifier_append) identifier_append )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_index) identifier_index (binary_operator (identifier_value) identifier_value (identifier_divisor) identifier_divisor )binary_operator )augmented_assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_coords) identifier_coords (identifier_append) identifier_append )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list (identifier_coords) identifier_coords )argument_list )call )return_statement )block )function_definition )module
convert index to coordinates given the shape
(module (function_definition (function_name_remove_leading_zeros) function_name_remove_leading_zeros (parameters (typed_parameter (identifier_num) identifier_num (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (if_statement (not_operator (identifier_num) identifier_num )not_operator (block (return_statement (identifier_num) identifier_num )return_statement )block )if_statement (if_statement (call (attribute (identifier_num) identifier_num (identifier_startswith) identifier_startswith )attribute (argument_list (string_'M') string_'M' )argument_list )call (block (expression_statement (assignment (identifier_ret) identifier_ret (binary_operator (string_'M') string_'M' (call (attribute (subscript (identifier_num) identifier_num (slice (integer_1) integer_1 (colon) colon )slice )subscript (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'0') string_'0' )argument_list )call )binary_operator )assignment )expression_statement )block (elif_clause (call (attribute (identifier_num) identifier_num (identifier_startswith) identifier_startswith )attribute (argument_list (string_'-') string_'-' )argument_list )call (block (expression_statement (assignment (identifier_ret) identifier_ret (binary_operator (string_'-') string_'-' (call (attribute (subscript (identifier_num) identifier_num (slice (integer_1) integer_1 (colon) colon )slice )subscript (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'0') string_'0' )argument_list )call )binary_operator )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (identifier_num) identifier_num (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'0') string_'0' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (conditional_expression (string_'0') string_'0' (comparison_operator (identifier_ret) identifier_ret (tuple (string_'') string_'' (string_'M') string_'M' (string_'-') string_'-' )tuple )comparison_operator (identifier_ret) identifier_ret )conditional_expression )return_statement )block )function_definition )module
Strips zeros while handling -, M, and empty strings
(module (function_definition (function_name__assert_occurrence) function_name__assert_occurrence (parameters (identifier_probe) identifier_probe (identifier_target) identifier_target (default_parameter (identifier_amount) identifier_amount (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_occ) identifier_occ (call (identifier_len) identifier_len (argument_list (identifier_probe) identifier_probe )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_occ) identifier_occ (identifier_amount) identifier_amount )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_'more than') string_'more than' )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_occ) identifier_occ (identifier_amount) identifier_amount )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_'less than') string_'less than' )assignment )expression_statement )block )elif_clause (elif_clause (not_operator (identifier_occ) identifier_occ )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_'no') string_'no' )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_msg) identifier_msg (None) None )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_msg) identifier_msg (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (string_'Found {0} expected occurrences in "{1}" expression') string_'Found {0} expected occurrences in "{1}" expression' (identifier_format) identifier_format )attribute (argument_list (identifier_msg) identifier_msg (identifier_target) identifier_target )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_occ) identifier_occ )return_statement )block )function_definition )module
Raise an exception, if there are different amount of specified occurrences in src.
(module (function_definition (function_name_print_mhc_peptide) function_name_print_mhc_peptide (parameters (identifier_neoepitope_info) identifier_neoepitope_info (identifier_peptides) identifier_peptides (identifier_pepmap) identifier_pepmap (identifier_outfile) identifier_outfile (default_parameter (identifier_netmhc) identifier_netmhc (False) False )default_parameter )parameters (block (if_statement (identifier_netmhc) identifier_netmhc (block (expression_statement (assignment (identifier_peptide_names) identifier_peptide_names (list (attribute (identifier_neoepitope_info) identifier_neoepitope_info (identifier_peptide_name) identifier_peptide_name )attribute )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_peptide_names) identifier_peptide_names (list_comprehension (identifier_x) identifier_x (for_in_clause (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (call (attribute (identifier_peptides) identifier_peptides (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (attribute (identifier_neoepitope_info) identifier_neoepitope_info (identifier_pept) identifier_pept )attribute (identifier_y) identifier_y )comparison_operator )if_clause )list_comprehension )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_neoepitope_info) identifier_neoepitope_info (call (attribute (identifier_neoepitope_info) identifier_neoepitope_info (identifier__asdict) identifier__asdict )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_neoepitope_info) identifier_neoepitope_info (string_'normal_pept') string_'normal_pept' )subscript (binary_operator (string_'N') string_'N' (call (identifier_len) identifier_len (argument_list (subscript (identifier_neoepitope_info) identifier_neoepitope_info (string_'pept') string_'pept' )subscript )argument_list )call )binary_operator )comparison_operator (block (expression_statement (assignment (subscript (identifier_neoepitope_info) identifier_neoepitope_info (string_'normal_pept') string_'normal_pept' )subscript (assignment (subscript (identifier_neoepitope_info) identifier_neoepitope_info (string_'normal_pred') string_'normal_pred' )subscript (string_'NA') string_'NA' )assignment )assignment )expression_statement )block )if_statement (for_statement (identifier_peptide_name) identifier_peptide_name (identifier_peptide_names) identifier_peptide_names (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (concatenated_string (string_'{ni[allele]}\t') string_'{ni[allele]}\t' (string_'{ni[pept]}\t') string_'{ni[pept]}\t' (string_'{ni[normal_pept]}\t') string_'{ni[normal_pept]}\t' (string_'{pname}\t') string_'{pname}\t' (string_'{ni[core]}\t') string_'{ni[core]}\t' (string_'0\t') string_'0\t' (string_'{ni[tumor_pred]}\t') string_'{ni[tumor_pred]}\t' (string_'{ni[normal_pred]}\t') string_'{ni[normal_pred]}\t' (string_'{pmap}') string_'{pmap}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_ni) identifier_ni (identifier_neoepitope_info) identifier_neoepitope_info )keyword_argument (keyword_argument (identifier_pname) identifier_pname (identifier_peptide_name) identifier_peptide_name )keyword_argument (keyword_argument (identifier_pmap) identifier_pmap (subscript (identifier_pepmap) identifier_pepmap (identifier_peptide_name) identifier_peptide_name )subscript )keyword_argument )argument_list )call (keyword_argument (identifier_file) identifier_file (identifier_outfile) identifier_outfile )keyword_argument )argument_list )call )expression_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Accept data about one neoepitope from merge_mhc_peptide_calls and print it to outfile. This is a generic module to reduce code redundancy. :param pandas.core.frame neoepitope_info: object containing with allele, pept, pred, core, normal_pept, normal_pred :param dict peptides: Dict of pepname: pep sequence for all IARS considered :param dict pepmap: Dict containing teh contents from the peptide map file. :param file outfile: An open file descriptor to the output file :param bool netmhc: Does this record correspond to a netmhcIIpan record? These are processed differently.
(module (function_definition (function_name_parse_trailer) function_name_parse_trailer (parameters (identifier_header) identifier_header )parameters (block (expression_statement (assignment (identifier_pos) identifier_pos (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_names) identifier_names (list )list )assignment )expression_statement (while_statement (comparison_operator (identifier_pos) identifier_pos (call (identifier_len) identifier_len (argument_list (identifier_header) identifier_header )argument_list )call )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_name) identifier_name (identifier_pos) identifier_pos )pattern_list (call (identifier_expect_re) identifier_expect_re (argument_list (identifier_re_token) identifier_re_token (identifier_header) identifier_header (identifier_pos) identifier_pos )argument_list )call )assignment )expression_statement (if_statement (identifier_name) identifier_name (block (expression_statement (call (attribute (identifier_names) identifier_names (identifier_append) identifier_append )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_pos) identifier_pos )pattern_list (call (identifier_accept_ws) identifier_accept_ws (argument_list (identifier_header) identifier_header (identifier_pos) identifier_pos )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_pos) identifier_pos )pattern_list (call (identifier_expect_lit) identifier_expect_lit (argument_list (string_',') string_',' (identifier_header) identifier_header (identifier_pos) identifier_pos )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_pos) identifier_pos )pattern_list (call (identifier_accept_ws) identifier_accept_ws (argument_list (identifier_header) identifier_header (identifier_pos) identifier_pos )argument_list )call )assignment )expression_statement )block )while_statement (return_statement (identifier_names) identifier_names )return_statement )block )function_definition )module
Parse the "Trailer" header.
(module (function_definition (function_name_inspect) function_name_inspect (parameters (identifier_self) identifier_self (default_parameter (identifier_tab_width) identifier_tab_width (integer_2) integer_2 )default_parameter (default_parameter (identifier_ident_char) identifier_ident_char (string_'-') string_'-' )default_parameter )parameters (block (expression_statement (assignment (identifier_startpath) identifier_startpath (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (list )list )assignment )expression_statement (for_statement (tuple_pattern (identifier_root) identifier_root (identifier_dirs) identifier_dirs (identifier_files) identifier_files )tuple_pattern (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_startpath) identifier_startpath )argument_list )call (block (expression_statement (assignment (identifier_level) identifier_level (call (attribute (call (attribute (identifier_root) identifier_root (identifier_replace) identifier_replace )attribute (argument_list (identifier_startpath) identifier_startpath (string_'') string_'' )argument_list )call (identifier_count) identifier_count )attribute (argument_list (attribute (identifier_os) identifier_os (identifier_sep) identifier_sep )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_indent) identifier_indent (binary_operator (binary_operator (identifier_ident_char) identifier_ident_char (identifier_tab_width) identifier_tab_width )binary_operator (parenthesized_expression (identifier_level) identifier_level )parenthesized_expression )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_level) identifier_level (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_'{}{}/') string_'{}{}/' (identifier_format) identifier_format )attribute (argument_list (identifier_indent) identifier_indent (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_root) identifier_root )argument_list )call )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_'|{}{}/') string_'|{}{}/' (identifier_format) identifier_format )attribute (argument_list (identifier_indent) identifier_indent (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_root) identifier_root )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_subindent) identifier_subindent (binary_operator (binary_operator (identifier_ident_char) identifier_ident_char (identifier_tab_width) identifier_tab_width )binary_operator (parenthesized_expression (binary_operator (identifier_level) identifier_level (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (list_comprehension (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_'|{}{}') string_'|{}{}' (identifier_format) identifier_format )attribute (argument_list (identifier_subindent) identifier_subindent (identifier_f) identifier_f )argument_list )call )argument_list )call (for_in_clause (identifier_f) identifier_f (identifier_files) identifier_files )for_in_clause )list_comprehension )expression_statement )block )for_statement (return_statement (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (argument_list (identifier_output) identifier_output )argument_list )call )return_statement )block )function_definition )module
Inspects a project file structure based based on the instance folder property. :param tab_width: width size for subfolders and files. :param ident_char: char to be used to show identation level Returns A string containing the project structure.
(module (function_definition (function_name_delete_shade_from_scene) function_name_delete_shade_from_scene (parameters (identifier_self) identifier_self (identifier_shade_id) identifier_shade_id (identifier_scene_id) identifier_scene_id )parameters (block (return_statement (await (call (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_delete) identifier_delete )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__base_path) identifier__base_path )attribute (keyword_argument (identifier_params) identifier_params (dictionary (pair (identifier_ATTR_SCENE_ID) identifier_ATTR_SCENE_ID (identifier_scene_id) identifier_scene_id )pair (pair (identifier_ATTR_SHADE_ID) identifier_ATTR_SHADE_ID (identifier_shade_id) identifier_shade_id )pair )dictionary )keyword_argument )argument_list )call )await )return_statement )block )function_definition )module
Delete a shade from a scene.
(module (function_definition (function_name_SendSms) function_name_SendSms (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_TargetNumbers) identifier_TargetNumbers )list_splat_pattern (dictionary_splat_pattern (identifier_Properties) identifier_Properties )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_sms) identifier_sms (call (attribute (identifier_self) identifier_self (identifier_CreateSms) identifier_CreateSms )attribute (argument_list (identifier_smsMessageTypeOutgoing) identifier_smsMessageTypeOutgoing (list_splat (identifier_TargetNumbers) identifier_TargetNumbers )list_splat )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_value) identifier_value )pattern_list (call (attribute (identifier_Properties) identifier_Properties (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_sms) identifier_sms (identifier___class__) identifier___class__ )attribute (identifier_name) identifier_name (None) None )argument_list )call (identifier_property) identifier_property )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_sms) identifier_sms (identifier_name) identifier_name (identifier_value) identifier_value )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'Unknown property: %s') string_'Unknown property: %s' (identifier_prop) identifier_prop )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (expression_statement (call (attribute (identifier_sms) identifier_sms (identifier_Send) identifier_Send )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_sms) identifier_sms )return_statement )block )function_definition )module
Creates and sends an SMS message. :Parameters: TargetNumbers : str One or more target SMS numbers. Properties Message properties. Properties available are same as `SmsMessage` object properties. :return: An sms message object. The message is already sent at this point. :rtype: `SmsMessage`
(module (function_definition (function_name_inverted) function_name_inverted (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_out) identifier_out (call (attribute (identifier_self) identifier_self (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_setInverted) identifier_setInverted )attribute (argument_list (not_operator (call (attribute (identifier_self) identifier_self (identifier_isInverted) identifier_isInverted )attribute (argument_list )argument_list )call )not_operator )argument_list )call )expression_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Returns an inverted copy of this query. :return <orb.Query>
(module (function_definition (function_name_seek) function_name_seek (parameters (identifier_self) identifier_self (identifier_offset) identifier_offset (default_parameter (identifier_whence) identifier_whence (identifier_SEEK_SET) identifier_SEEK_SET )default_parameter )parameters (block (if_statement (comparison_operator (identifier_whence) identifier_whence (identifier_SEEK_SET) identifier_SEEK_SET )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___sf) identifier___sf )attribute (identifier_seek) identifier_seek )attribute (argument_list (identifier_offset) identifier_offset )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_whence) identifier_whence (identifier_SEEK_CUR) identifier_SEEK_CUR )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___sf) identifier___sf )attribute (identifier_seek) identifier_seek )attribute (argument_list (binary_operator (call (attribute (identifier_self) identifier_self (identifier_tell) identifier_tell )attribute (argument_list )argument_list )call (identifier_offset) identifier_offset )binary_operator )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_whence) identifier_whence (identifier_SEEK_END) identifier_SEEK_END )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___sf) identifier___sf )attribute (identifier_seek) identifier_seek )attribute (argument_list (binary_operator (attribute (attribute (identifier_self) identifier_self (identifier___sf) identifier___sf )attribute (identifier_filesize) identifier_filesize )attribute (identifier_offset) identifier_offset )binary_operator )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Reposition the file pointer.
(module (function_definition (function_name_from_request) function_name_from_request (parameters (identifier_cls) identifier_cls (identifier_header_data) identifier_header_data (default_parameter (identifier_ignore_bad_cookies) identifier_ignore_bad_cookies (False) False )default_parameter )parameters (block (expression_statement (string_"Construct a Cookies object from request header data.") string_"Construct a Cookies object from request header data." )expression_statement (expression_statement (assignment (identifier_cookies) identifier_cookies (call (identifier_cls) identifier_cls (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cookies) identifier_cookies (identifier_parse_request) identifier_parse_request )attribute (argument_list (identifier_header_data) identifier_header_data (keyword_argument (identifier_ignore_bad_cookies) identifier_ignore_bad_cookies (identifier_ignore_bad_cookies) identifier_ignore_bad_cookies )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_cookies) identifier_cookies )return_statement )block )function_definition )module
Construct a Cookies object from request header data.
(module (function_definition (function_name__from_dict) function_name__from_dict (parameters (identifier_cls) identifier_cls (identifier__dict) identifier__dict )parameters (block (expression_statement (assignment (identifier_args) identifier_args (dictionary )dictionary )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (string_'final') string_'final' (identifier__dict) identifier__dict )comparison_operator (comparison_operator (string_'final_results') string_'final_results' (identifier__dict) identifier__dict )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'final_results') string_'final_results' )subscript (boolean_operator (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'final') string_'final' )argument_list )call (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'final_results') string_'final_results' )argument_list )call )boolean_operator )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Required property \'final\' not present in SpeechRecognitionResult JSON') string_'Required property \'final\' not present in SpeechRecognitionResult JSON' )argument_list )call )raise_statement )block )else_clause )if_statement (if_statement (comparison_operator (string_'alternatives') string_'alternatives' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'alternatives') string_'alternatives' )subscript (list_comprehension (call (attribute (identifier_SpeechRecognitionAlternative) identifier_SpeechRecognitionAlternative (identifier__from_dict) identifier__from_dict )attribute (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (parenthesized_expression (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'alternatives') string_'alternatives' )argument_list )call )parenthesized_expression )for_in_clause )list_comprehension )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Required property \'alternatives\' not present in SpeechRecognitionResult JSON') string_'Required property \'alternatives\' not present in SpeechRecognitionResult JSON' )argument_list )call )raise_statement )block )else_clause )if_statement (if_statement (comparison_operator (string_'keywords_result') string_'keywords_result' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'keywords_result') string_'keywords_result' )subscript (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'keywords_result') string_'keywords_result' )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'word_alternatives') string_'word_alternatives' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'word_alternatives') string_'word_alternatives' )subscript (list_comprehension (call (attribute (identifier_WordAlternativeResults) identifier_WordAlternativeResults (identifier__from_dict) identifier__from_dict )attribute (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (parenthesized_expression (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'word_alternatives') string_'word_alternatives' )argument_list )call )parenthesized_expression )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (dictionary_splat (identifier_args) identifier_args )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Initialize a SpeechRecognitionResult object from a json dictionary.
(module (function_definition (function_name_vinet_v) function_name_vinet_v (parameters (identifier_p) identifier_p (identifier_v0) identifier_v0 (identifier_k0) identifier_k0 (identifier_k0p) identifier_k0p (default_parameter (identifier_min_strain) identifier_min_strain (float_0.01) float_0.01 )default_parameter )parameters (block (if_statement (call (identifier_isuncertainties) identifier_isuncertainties (argument_list (list (identifier_p) identifier_p (identifier_v0) identifier_v0 (identifier_k0) identifier_k0 (identifier_k0p) identifier_k0p )list )argument_list )call (block (expression_statement (assignment (identifier_f_u) identifier_f_u (call (attribute (identifier_np) identifier_np (identifier_vectorize) identifier_vectorize )attribute (argument_list (call (attribute (identifier_uct) identifier_uct (identifier_wrap) identifier_wrap )attribute (argument_list (identifier_vinet_v_single) identifier_vinet_v_single )argument_list )call (keyword_argument (identifier_excluded) identifier_excluded (list (integer_1) integer_1 (integer_2) integer_2 (integer_3) integer_3 (integer_4) integer_4 )list )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_f_u) identifier_f_u (argument_list (identifier_p) identifier_p (identifier_v0) identifier_v0 (identifier_k0) identifier_k0 (identifier_k0p) identifier_k0p (keyword_argument (identifier_min_strain) identifier_min_strain (identifier_min_strain) identifier_min_strain )keyword_argument )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (identifier_f_v) identifier_f_v (call (attribute (identifier_np) identifier_np (identifier_vectorize) identifier_vectorize )attribute (argument_list (identifier_vinet_v_single) identifier_vinet_v_single (keyword_argument (identifier_excluded) identifier_excluded (list (integer_1) integer_1 (integer_2) integer_2 (integer_3) integer_3 (integer_4) integer_4 )list )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_f_v) identifier_f_v (argument_list (identifier_p) identifier_p (identifier_v0) identifier_v0 (identifier_k0) identifier_k0 (identifier_k0p) identifier_k0p (keyword_argument (identifier_min_strain) identifier_min_strain (identifier_min_strain) identifier_min_strain )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
find volume at given pressure :param p: pressure in GPa :param v0: unit-cell volume in A^3 at 1 bar :param k0: bulk modulus at reference conditions :param k0p: pressure derivative of bulk modulus at reference conditions :param min_strain: defining minimum v/v0 value to search volume for :return: unit cell volume at high pressure in A^3 :note: wrapper function vetorizing vinet_v_single
(module (function_definition (function_name__set_key) function_name__set_key (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_roll) identifier_roll )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_date) identifier_date )attribute (call (attribute (identifier_time) identifier_time (identifier_strftime) identifier_strftime )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_date_format) identifier_date_format )attribute (call (attribute (identifier_time) identifier_time (identifier_gmtime) identifier_gmtime )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_start_time) identifier_start_time )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_final_key) identifier_final_key )attribute (call (attribute (string_'{}:{}') string_'{}:{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (attribute (identifier_self) identifier_self (identifier_date) identifier_date )attribute )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_final_key) identifier_final_key )attribute (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
sets the final key to be used currently
(module (function_definition (function_name_send_one_ping) function_name_send_one_ping (parameters (typed_parameter (identifier_sock) identifier_sock (type (identifier_socket) identifier_socket )type )typed_parameter (typed_parameter (identifier_dest_addr) identifier_dest_addr (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_icmp_id) identifier_icmp_id (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_seq) identifier_seq (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_size) identifier_size (type (identifier_int) identifier_int )type )typed_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_dest_addr) identifier_dest_addr (call (attribute (identifier_socket) identifier_socket (identifier_gethostbyname) identifier_gethostbyname )attribute (argument_list (identifier_dest_addr) identifier_dest_addr )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (identifier_socket) identifier_socket (identifier_gaierror) identifier_gaierror )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Cannot resolve {}: Unknown host") string_"Cannot resolve {}: Unknown host" (identifier_format) identifier_format )attribute (argument_list (identifier_dest_addr) identifier_dest_addr )argument_list )call )argument_list )call )expression_statement (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_HostUnknown) identifier_HostUnknown )attribute (argument_list (identifier_dest_addr) identifier_dest_addr )argument_list )call (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_pseudo_checksum) identifier_pseudo_checksum (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_icmp_header) identifier_icmp_header (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (identifier_ICMP_HEADER_FORMAT) identifier_ICMP_HEADER_FORMAT (attribute (identifier_IcmpType) identifier_IcmpType (identifier_ECHO_REQUEST) identifier_ECHO_REQUEST )attribute (identifier_ICMP_DEFAULT_CODE) identifier_ICMP_DEFAULT_CODE (identifier_pseudo_checksum) identifier_pseudo_checksum (identifier_icmp_id) identifier_icmp_id (identifier_seq) identifier_seq )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_padding) identifier_padding (binary_operator (parenthesized_expression (binary_operator (binary_operator (identifier_size) identifier_size (call (attribute (identifier_struct) identifier_struct (identifier_calcsize) identifier_calcsize )attribute (argument_list (identifier_ICMP_TIME_FORMAT) identifier_ICMP_TIME_FORMAT )argument_list )call )binary_operator (call (attribute (identifier_struct) identifier_struct (identifier_calcsize) identifier_calcsize )attribute (argument_list (identifier_ICMP_HEADER_FORMAT) identifier_ICMP_HEADER_FORMAT )argument_list )call )binary_operator )parenthesized_expression (string_"Q") string_"Q" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_icmp_payload) identifier_icmp_payload (binary_operator (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (identifier_ICMP_TIME_FORMAT) identifier_ICMP_TIME_FORMAT (call (identifier_default_timer) identifier_default_timer (argument_list )argument_list )call )argument_list )call (call (attribute (identifier_padding) identifier_padding (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_real_checksum) identifier_real_checksum (call (identifier_checksum) identifier_checksum (argument_list (binary_operator (identifier_icmp_header) identifier_icmp_header (identifier_icmp_payload) identifier_icmp_payload )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_icmp_header) identifier_icmp_header (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (identifier_ICMP_HEADER_FORMAT) identifier_ICMP_HEADER_FORMAT (attribute (identifier_IcmpType) identifier_IcmpType (identifier_ECHO_REQUEST) identifier_ECHO_REQUEST )attribute (identifier_ICMP_DEFAULT_CODE) identifier_ICMP_DEFAULT_CODE (call (attribute (identifier_socket) identifier_socket (identifier_htons) identifier_htons )attribute (argument_list (identifier_real_checksum) identifier_real_checksum )argument_list )call (identifier_icmp_id) identifier_icmp_id (identifier_seq) identifier_seq )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_packet) identifier_packet (binary_operator (identifier_icmp_header) identifier_icmp_header (identifier_icmp_payload) identifier_icmp_payload )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_sendto) identifier_sendto )attribute (argument_list (identifier_packet) identifier_packet (tuple (identifier_dest_addr) identifier_dest_addr (integer_0) integer_0 )tuple )argument_list )call )expression_statement )block )function_definition )module
Sends one ping to the given destination. ICMP Header (bits): type (8), code (8), checksum (16), id (16), sequence (16) ICMP Payload: time (double), data ICMP Wikipedia: https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol Args: sock: Socket. dest_addr: The destination address, can be an IP address or a domain name. Ex. "192.168.1.1"/"example.com" icmp_id: ICMP packet id, usually is same as pid. seq: ICMP packet sequence, usually increases from 0 in the same process. size: The ICMP packet payload size in bytes. Note this is only for the payload part. Raises: HostUnkown: If destination address is a domain name and cannot resolved.
(module (function_definition (function_name_nextpow2) function_name_nextpow2 (parameters (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (integer_1) integer_1 )comparison_operator (block (return_statement (binary_operator (integer_2) integer_2 (call (attribute (call (attribute (identifier_np) identifier_np (identifier_ceil) identifier_ceil )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_log2) identifier_log2 )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call (identifier_astype) identifier_astype )attribute (argument_list (identifier_int) identifier_int )argument_list )call )binary_operator )return_statement )block (elif_clause (comparison_operator (identifier_value) identifier_value (integer_0) integer_0 )comparison_operator (block (return_statement (integer_1) integer_1 )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_value) identifier_value (integer_0) integer_0 )comparison_operator (block (return_statement (integer_0) integer_0 )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Value must be positive') string_'Value must be positive' )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Compute the nearest power of two greater or equal to the input value
(module (function_definition (function_name__create_complete_graph) function_name__create_complete_graph (parameters (identifier_node_ids) identifier_node_ids )parameters (block (expression_statement (assignment (identifier_g) identifier_g (call (attribute (identifier_nx) identifier_nx (identifier_Graph) identifier_Graph )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_g) identifier_g (identifier_add_nodes_from) identifier_add_nodes_from )attribute (argument_list (identifier_node_ids) identifier_node_ids )argument_list )call )expression_statement (for_statement (tuple_pattern (identifier_i) identifier_i (identifier_j) identifier_j )tuple_pattern (call (identifier_combinations) identifier_combinations (argument_list (identifier_node_ids) identifier_node_ids (integer_2) integer_2 )argument_list )call (block (expression_statement (call (attribute (identifier_g) identifier_g (identifier_add_edge) identifier_add_edge )attribute (argument_list (identifier_i) identifier_i (identifier_j) identifier_j )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_g) identifier_g )return_statement )block )function_definition )module
Create a complete graph from the list of node ids. Args: node_ids: a list of node ids Returns: An undirected graph (as a networkx.Graph)
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (identifier_duration) identifier_duration )parameters (block (if_statement (comparison_operator (identifier_duration) identifier_duration (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_histogram) identifier_histogram )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_duration) identifier_duration )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_meter) identifier_meter )attribute (identifier_mark) identifier_mark )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Add a recorded duration.
(module (function_definition (function_name_c_time_locale) function_name_c_time_locale (parameters )parameters (block (expression_statement (assignment (identifier_old_time_locale) identifier_old_time_locale (call (attribute (identifier_locale) identifier_locale (identifier_getlocale) identifier_getlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_TIME) identifier_LC_TIME )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_TIME) identifier_LC_TIME )attribute (string_'C') string_'C' )argument_list )call )expression_statement (expression_statement (yield )yield )expression_statement (expression_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_TIME) identifier_LC_TIME )attribute (identifier_old_time_locale) identifier_old_time_locale )argument_list )call )expression_statement )block )function_definition )module
Context manager with C LC_TIME locale
(module (function_definition (function_name_read_scoring_scheme) function_name_read_scoring_scheme (parameters (identifier_f) identifier_f (identifier_gap_open) identifier_gap_open (identifier_gap_extend) identifier_gap_extend (default_parameter (identifier_gap1) identifier_gap1 (string_"-") string_"-" )default_parameter (default_parameter (identifier_gap2) identifier_gap2 (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_close_it) identifier_close_it (False) False )assignment )expression_statement (if_statement (parenthesized_expression (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_f) identifier_f )argument_list )call (identifier_str) identifier_str )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_f) identifier_f (call (identifier_file) identifier_file (argument_list (identifier_f) identifier_f (string_"rt") string_"rt" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_close_it) identifier_close_it (True) True )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_ss) identifier_ss (call (identifier_build_scoring_scheme) identifier_build_scoring_scheme (argument_list (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (list_comprehension (identifier_line) identifier_line (for_in_clause (identifier_line) identifier_line (identifier_f) identifier_f )for_in_clause )list_comprehension )argument_list )call (identifier_gap_open) identifier_gap_open (identifier_gap_extend) identifier_gap_extend (keyword_argument (identifier_gap1) identifier_gap1 (identifier_gap1) identifier_gap1 )keyword_argument (keyword_argument (identifier_gap2) identifier_gap2 (identifier_gap2) identifier_gap2 )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (identifier_close_it) identifier_close_it )parenthesized_expression (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_ss) identifier_ss )return_statement )block )function_definition )module
Initialize scoring scheme from a file containint a blastz style text blob. f can be either a file or the name of a file.
(module (function_definition (function_name_get_modifications) function_name_get_modifications (parameters (identifier_self) identifier_self )parameters (block (for_statement (pattern_list (identifier_modtype) identifier_modtype (identifier_modclass) identifier_modclass )pattern_list (call (attribute (identifier_modtype_to_modclass) identifier_modtype_to_modclass (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_modtype) identifier_modtype (string_'modification') string_'modification' )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_stmts) identifier_stmts (call (attribute (identifier_self) identifier_self (identifier__get_generic_modification) identifier__get_generic_modification )attribute (argument_list (identifier_modclass) identifier_modclass )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_statements) identifier_statements )attribute (identifier_stmts) identifier_stmts )augmented_assignment )expression_statement )block )for_statement )block )function_definition )module
Extract INDRA Modification Statements from the BioPAX model. To extract Modifications, this method reuses the structure of BioPAX Pattern's org.biopax.paxtools.pattern.PatternBox.constrolsStateChange pattern with additional constraints to specify the type of state change occurring (phosphorylation, deubiquitination, etc.).
(module (function_definition (function_name_check_column_existence) function_name_check_column_existence (parameters (identifier_col_name) identifier_col_name (identifier_df) identifier_df (default_parameter (identifier_presence) identifier_presence (True) True )default_parameter )parameters (block (if_statement (identifier_presence) identifier_presence (block (if_statement (comparison_operator (identifier_col_name) identifier_col_name (attribute (identifier_df) identifier_df (identifier_columns) identifier_columns )attribute )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_"Ensure that `{}` is in `df.columns`.") string_"Ensure that `{}` is in `df.columns`." )assignment )expression_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (identifier_msg) identifier_msg (identifier_format) identifier_format )attribute (argument_list (identifier_col_name) identifier_col_name )argument_list )call )argument_list )call )raise_statement )block )if_statement )block (else_clause (block (if_statement (comparison_operator (identifier_col_name) identifier_col_name (attribute (identifier_df) identifier_df (identifier_columns) identifier_columns )attribute )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_"Ensure that `{}` is not in `df.columns`.") string_"Ensure that `{}` is not in `df.columns`." )assignment )expression_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (identifier_msg) identifier_msg (identifier_format) identifier_format )attribute (argument_list (identifier_col_name) identifier_col_name )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )else_clause )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Checks whether or not `col_name` is in `df` and raises a helpful error msg if the desired condition is not met. Parameters ---------- col_name : str. Should represent a column whose presence in `df` is to be checked. df : pandas DataFrame. The dataframe that will be checked for the presence of `col_name`. presence : bool, optional. If True, then this function checks for the PRESENCE of `col_name` from `df`. If False, then this function checks for the ABSENCE of `col_name` in `df`. Default == True. Returns ------- None.
(module (function_definition (function_name__convert) function_name__convert (parameters (identifier_self) identifier_self (identifier_image) identifier_image (default_parameter (identifier_output) identifier_output (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_Image) identifier_Image (identifier_open) identifier_open )attribute (argument_list (identifier_image) identifier_image )argument_list )call (as_pattern_target (identifier_im) identifier_im )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (pattern_list (identifier_width) identifier_width (identifier_height) identifier_height )pattern_list (attribute (identifier_im) identifier_im (identifier_size) identifier_size )attribute )assignment )expression_statement (expression_statement (assignment (identifier_co) identifier_co (call (identifier_CanvasObjects) identifier_CanvasObjects (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_co) identifier_co (identifier_add) identifier_add )attribute (argument_list (call (identifier_CanvasImg) identifier_CanvasImg (argument_list (identifier_image) identifier_image (float_1.0) float_1.0 (keyword_argument (identifier_w) identifier_w (identifier_width) identifier_width )keyword_argument (keyword_argument (identifier_h) identifier_h (identifier_height) identifier_height )keyword_argument )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (call (identifier_WatermarkDraw) identifier_WatermarkDraw (argument_list (identifier_co) identifier_co (keyword_argument (identifier_tempdir) identifier_tempdir (attribute (identifier_self) identifier_self (identifier_tempdir) identifier_tempdir )attribute )keyword_argument (keyword_argument (identifier_pagesize) identifier_pagesize (tuple (identifier_width) identifier_width (identifier_height) identifier_height )tuple )keyword_argument )argument_list )call (identifier_write) identifier_write )attribute (argument_list (identifier_output) identifier_output )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Private method for converting a single PNG image to a PDF.
(module (function_definition (function_name_rdopkg_runner) function_name_rdopkg_runner (parameters )parameters (block (expression_statement (assignment (identifier_aman) identifier_aman (call (identifier_ActionManager) identifier_ActionManager (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_aman) identifier_aman (identifier_add_actions_modules) identifier_add_actions_modules )attribute (argument_list (identifier_actions) identifier_actions )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_aman) identifier_aman (identifier_fill_aliases) identifier_fill_aliases )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (identifier_ActionRunner) identifier_ActionRunner (argument_list (keyword_argument (identifier_action_manager) identifier_action_manager (identifier_aman) identifier_aman )keyword_argument )argument_list )call )return_statement )block )function_definition )module
default rdopkg action runner including rdopkg action modules
(module (function_definition (function_name_parse_create) function_name_parse_create (parameters (identifier_prs) identifier_prs (identifier_conn) identifier_conn )parameters (block (expression_statement (assignment (identifier_prs_create) identifier_prs_create (call (attribute (identifier_prs) identifier_prs (identifier_add_parser) identifier_add_parser )attribute (argument_list (string_'create') string_'create' (keyword_argument (identifier_help) identifier_help (string_'create record of specific zone') string_'create record of specific zone' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_set_option) identifier_set_option (argument_list (identifier_prs_create) identifier_prs_create (string_'domain') string_'domain' )argument_list )call )expression_statement (expression_statement (call (identifier_conn_options) identifier_conn_options (argument_list (identifier_prs_create) identifier_prs_create (identifier_conn) identifier_conn )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_prs_create) identifier_prs_create (identifier_set_defaults) identifier_set_defaults )attribute (argument_list (keyword_argument (identifier_func) identifier_func (identifier_create) identifier_create )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Create record. Arguments: prs: parser object of argparse conn: dictionary of connection information
(module (function_definition (function_name_create_logout_request) function_name_create_logout_request (parameters (identifier_self) identifier_self (identifier_destination) identifier_destination (identifier_issuer_entity_id) identifier_issuer_entity_id (default_parameter (identifier_subject_id) identifier_subject_id (None) None )default_parameter (default_parameter (identifier_name_id) identifier_name_id (None) None )default_parameter (default_parameter (identifier_reason) identifier_reason (None) None )default_parameter (default_parameter (identifier_expire) identifier_expire (None) None )default_parameter (default_parameter (identifier_message_id) identifier_message_id (integer_0) integer_0 )default_parameter (default_parameter (identifier_consent) identifier_consent (None) None )default_parameter (default_parameter (identifier_extensions) identifier_extensions (None) None )default_parameter (default_parameter (identifier_sign) identifier_sign (False) False )default_parameter (default_parameter (identifier_session_indexes) identifier_session_indexes (None) None )default_parameter (default_parameter (identifier_sign_alg) identifier_sign_alg (None) None )default_parameter (default_parameter (identifier_digest_alg) identifier_digest_alg (None) None )default_parameter )parameters (block (if_statement (identifier_subject_id) identifier_subject_id (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_entity_type) identifier_entity_type )attribute (string_"idp") string_"idp" )comparison_operator (block (expression_statement (assignment (identifier_name_id) identifier_name_id (call (identifier_NameID) identifier_NameID (argument_list (keyword_argument (identifier_text) identifier_text (call (attribute (attribute (identifier_self) identifier_self (identifier_users) identifier_users )attribute (identifier_get_entityid) identifier_get_entityid )attribute (argument_list (identifier_subject_id) identifier_subject_id (identifier_issuer_entity_id) identifier_issuer_entity_id (False) False )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_name_id) identifier_name_id (call (identifier_NameID) identifier_NameID (argument_list (keyword_argument (identifier_text) identifier_text (identifier_subject_id) identifier_subject_id )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (if_statement (not_operator (identifier_name_id) identifier_name_id )not_operator (block (raise_statement (call (identifier_SAMLError) identifier_SAMLError (argument_list (string_"Missing subject identification") string_"Missing subject identification" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_args) identifier_args (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_session_indexes) identifier_session_indexes (block (expression_statement (assignment (identifier_sis) identifier_sis (list )list )assignment )expression_statement (for_statement (identifier_si) identifier_si (identifier_session_indexes) identifier_session_indexes (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_si) identifier_si (identifier_SessionIndex) identifier_SessionIndex )argument_list )call (block (expression_statement (call (attribute (identifier_sis) identifier_sis (identifier_append) identifier_append )attribute (argument_list (identifier_si) identifier_si )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_sis) identifier_sis (identifier_append) identifier_append )attribute (argument_list (call (identifier_SessionIndex) identifier_SessionIndex (argument_list (keyword_argument (identifier_text) identifier_text (identifier_si) identifier_si )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (string_"session_index") string_"session_index" )subscript (identifier_sis) identifier_sis )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__message) identifier__message )attribute (argument_list (identifier_LogoutRequest) identifier_LogoutRequest (identifier_destination) identifier_destination (identifier_message_id) identifier_message_id (identifier_consent) identifier_consent (identifier_extensions) identifier_extensions (identifier_sign) identifier_sign (keyword_argument (identifier_name_id) identifier_name_id (identifier_name_id) identifier_name_id )keyword_argument (keyword_argument (identifier_reason) identifier_reason (identifier_reason) identifier_reason )keyword_argument (keyword_argument (identifier_not_on_or_after) identifier_not_on_or_after (identifier_expire) identifier_expire )keyword_argument (keyword_argument (identifier_issuer) identifier_issuer (call (attribute (identifier_self) identifier_self (identifier__issuer) identifier__issuer )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_sign_alg) identifier_sign_alg (identifier_sign_alg) identifier_sign_alg )keyword_argument (keyword_argument (identifier_digest_alg) identifier_digest_alg (identifier_digest_alg) identifier_digest_alg )keyword_argument (dictionary_splat (identifier_args) identifier_args )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Constructs a LogoutRequest :param destination: Destination of the request :param issuer_entity_id: The entity ID of the IdP the request is target at. :param subject_id: The identifier of the subject :param name_id: A NameID instance identifying the subject :param reason: An indication of the reason for the logout, in the form of a URI reference. :param expire: The time at which the request expires, after which the recipient may discard the message. :param message_id: Request identifier :param consent: Whether the principal have given her consent :param extensions: Possible extensions :param sign: Whether the query should be signed or not. :param session_indexes: SessionIndex instances or just values :return: A LogoutRequest instance
(module (function_definition (function_name__config) function_name__config (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_config) identifier_config (integer_0) integer_0 )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_mode) identifier_mode )attribute (identifier_MODE_NORMAL) identifier_MODE_NORMAL )comparison_operator (block (expression_statement (augmented_assignment (identifier_config) identifier_config (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier__t_standby) identifier__t_standby )attribute (integer_5) integer_5 )binary_operator )parenthesized_expression )augmented_assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier__iir_filter) identifier__iir_filter )attribute (block (expression_statement (augmented_assignment (identifier_config) identifier_config (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier__iir_filter) identifier__iir_filter )attribute (integer_2) integer_2 )binary_operator )parenthesized_expression )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_config) identifier_config )return_statement )block )function_definition )module
Value to be written to the device's config register
(module (function_definition (function_name_render_payment_form) function_name_render_payment_form (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (attribute (identifier_self) identifier_self (identifier_form_context_name) identifier_form_context_name )attribute )subscript (call (attribute (identifier_self) identifier_self (identifier_payment_form_cls) identifier_payment_form_cls )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_TemplateResponse) identifier_TemplateResponse (argument_list (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (attribute (identifier_self) identifier_self (identifier_payment_template) identifier_payment_template )attribute (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute )argument_list )call )return_statement )block )function_definition )module
Display the DirectPayment for entering payment information.
(module (function_definition (function_name_setup_runner) function_name_setup_runner (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_runner) identifier_runner (call (identifier_ApplicationRunner) identifier_ApplicationRunner (argument_list (keyword_argument (identifier_url) identifier_url (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'transport_host') string_'transport_host' )subscript )keyword_argument (keyword_argument (identifier_realm) identifier_realm (string_u'realm1') string_u'realm1' )keyword_argument (keyword_argument (identifier_extra) identifier_extra (dictionary (pair (string_'config') string_'config' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )pair (pair (string_'handlers') string_'handlers' (attribute (identifier_self) identifier_self (identifier_handlers) identifier_handlers )attribute )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_runner) identifier_runner )return_statement )block )function_definition )module
Setup instance of runner var
(module (function_definition (function_name_open_report_template_path) function_name_open_report_template_path (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_directory_name) identifier_directory_name (call (attribute (identifier_QFileDialog) identifier_QFileDialog (identifier_getExistingDirectory) identifier_getExistingDirectory )attribute (argument_list (identifier_self) identifier_self (call (attribute (identifier_self) identifier_self (identifier_tr) identifier_tr )attribute (argument_list (string_'Templates directory') string_'Templates directory' )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_leReportTemplatePath) identifier_leReportTemplatePath )attribute (identifier_text) identifier_text )attribute (argument_list )argument_list )call (attribute (identifier_QFileDialog) identifier_QFileDialog (identifier_ShowDirsOnly) identifier_ShowDirsOnly )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_directory_name) identifier_directory_name (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_leReportTemplatePath) identifier_leReportTemplatePath )attribute (identifier_setText) identifier_setText )attribute (argument_list (identifier_directory_name) identifier_directory_name )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Open File dialog to choose the report template path.
(module (function_definition (function_name_instance) function_name_instance (parameters (identifier_cls) identifier_cls (default_parameter (identifier_interval) identifier_interval (integer_5) integer_5 )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_cls) identifier_cls (identifier__instance) identifier__instance )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__instance) identifier__instance )attribute (call (identifier__Messenger) identifier__Messenger (argument_list (identifier_interval) identifier_interval )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_cls) identifier_cls (identifier__instance) identifier__instance )attribute )return_statement )block )function_definition )module
Returns existing instance of messenger. If one does not exist it will be created and returned. :param int interval: Number of miliseconds that represents interval when messages will be processed. Note that this parameter will be used only the first time when instance is requested, every other time it will be ignored because existing instance of :class:`._Messenger` is returned.
(module (function_definition (function_name__run_automation) function_name__run_automation (parameters (identifier_self) identifier_self (identifier_conf) identifier_conf )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__fill_form) identifier__fill_form )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__find_form) identifier__find_form )attribute (argument_list (identifier_conf) identifier_conf )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__run_scenario) identifier__run_scenario )attribute (argument_list (identifier_conf) identifier_conf )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__delay) identifier__delay )attribute (argument_list (identifier_conf) identifier_conf )argument_list )call )expression_statement )block )function_definition )module
1. Fill form. 2. Run scenario. 3. Delay.
(module (function_definition (function_name__initialize_trunk_interfaces_to_none) function_name__initialize_trunk_interfaces_to_none (parameters (identifier_self) identifier_self (identifier_switch_ip) identifier_switch_ip (default_parameter (identifier_replay) identifier_replay (True) True )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_switch_ifs) identifier_switch_ifs (call (attribute (attribute (identifier_self) identifier_self (identifier__mdriver) identifier__mdriver )attribute (identifier__get_switch_interfaces) identifier__get_switch_interfaces )attribute (argument_list (identifier_switch_ip) identifier_switch_ip (keyword_argument (identifier_cfg_only) identifier_cfg_only (parenthesized_expression (conditional_expression (False) False (identifier_replay) identifier_replay (True) True )conditional_expression )parenthesized_expression )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_switch_ifs) identifier_switch_ifs )not_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (concatenated_string (string_"Skipping switch %s which has no configured ") string_"Skipping switch %s which has no configured " (string_"interfaces") string_"interfaces" )concatenated_string (identifier_switch_ip) identifier_switch_ip )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__driver) identifier__driver )attribute (identifier_initialize_all_switch_interfaces) identifier_initialize_all_switch_interfaces )attribute (argument_list (identifier_switch_ifs) identifier_switch_ifs (identifier_switch_ip) identifier_switch_ip )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (with_statement (with_clause (with_item (call (attribute (identifier_excutils) identifier_excutils (identifier_save_and_reraise_exception) identifier_save_and_reraise_exception )attribute (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_"Unable to initialize interfaces to ") string_"Unable to initialize interfaces to " (string_"switch %(switch_ip)s") string_"switch %(switch_ip)s" )concatenated_string (dictionary (pair (string_'switch_ip') string_'switch_ip' (identifier_switch_ip) identifier_switch_ip )pair )dictionary )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__mdriver) identifier__mdriver )attribute (identifier_register_switch_as_inactive) identifier_register_switch_as_inactive )attribute (argument_list (identifier_switch_ip) identifier_switch_ip (string_'replay init_interface') string_'replay init_interface' )argument_list )call )expression_statement )block )with_statement )block )except_clause )try_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__mdriver) identifier__mdriver )attribute (identifier_is_replay_enabled) identifier_is_replay_enabled )attribute (argument_list )argument_list )call (block (return_statement )return_statement )block )if_statement )block )function_definition )module
Initialize all nexus interfaces to trunk allowed none.
(module (function_definition (function_name_begin_application) function_name_begin_application (parameters (identifier_self) identifier_self (identifier_req) identifier_req (identifier_res) identifier_res )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_loop) identifier_loop )attribute (identifier_create_task) identifier_create_task )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_http_application) identifier_http_application )attribute (identifier_handle_client_request) identifier_handle_client_request )attribute (argument_list (identifier_req) identifier_req (identifier_res) identifier_res )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Entry point for the application middleware chain for an asyncio event loop.
(module (function_definition (function_name_branch_rate) function_name_branch_rate (parameters (identifier_self) identifier_self (default_parameter (identifier_filename) identifier_filename (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_filename) identifier_filename (None) None )comparison_operator (block (expression_statement (assignment (identifier_el) identifier_el (attribute (identifier_self) identifier_self (identifier_xml) identifier_xml )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_el) identifier_el (call (attribute (identifier_self) identifier_self (identifier__get_class_element_by_filename) identifier__get_class_element_by_filename )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_float) identifier_float (argument_list (subscript (attribute (identifier_el) identifier_el (identifier_attrib) identifier_attrib )attribute (string_'branch-rate') string_'branch-rate' )subscript )argument_list )call )return_statement )block )function_definition )module
Return the global branch rate of the coverage report. If the `filename` file is given, return the branch rate of the file.
(module (function_definition (function_name_init) function_name_init (parameters (default_parameter (identifier_parser) identifier_parser (None) None )default_parameter )parameters (block (global_statement (identifier_p) identifier_p (identifier_subparsers) identifier_subparsers )global_statement (if_statement (comparison_operator (identifier_parser) identifier_parser (None) None )comparison_operator (block (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_argparse) identifier_argparse (identifier_ArgumentParser) identifier_ArgumentParser )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_p) identifier_p (identifier_parser) identifier_parser )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_arg) identifier_arg (attribute (identifier_p) identifier_p (identifier_add_argument) identifier_add_argument )attribute )assignment )expression_statement (expression_statement (assignment (identifier_subparsers) identifier_subparsers (call (attribute (identifier_p) identifier_p (identifier_add_subparsers) identifier_add_subparsers )attribute (argument_list )argument_list )call )assignment )expression_statement )block )function_definition )module
module needs to be initialized by 'init'. Can be called with parser to use a pre-built parser, otherwise a simple default parser is created
(module (function_definition (function_name_folder_created_message) function_name_folder_created_message (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_folder) identifier_folder )parameters (block (expression_statement (call (attribute (identifier_messages) identifier_messages (identifier_success) identifier_success )attribute (argument_list (identifier_request) identifier_request (call (identifier__) identifier__ (argument_list (call (attribute (string_"Folder {} was created") string_"Folder {} was created" (identifier_format) identifier_format )attribute (argument_list (identifier_folder) identifier_folder )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Send messages.success message after successful folder creation.
(module (function_definition (function_name_parse_view) function_name_parse_view (parameters (identifier_query) identifier_query )parameters (block (try_statement (block (expression_statement (assignment (identifier_idx) identifier_idx (call (attribute (call (attribute (identifier_query) identifier_query (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_index) identifier_index )attribute (argument_list (string_'where') string_'where' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (subscript (identifier_query) identifier_query (slice (colon) colon (identifier_idx) identifier_idx )slice )subscript )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement (if_statement (not_operator (call (attribute (identifier_query) identifier_query (identifier_endswith) identifier_endswith )attribute (argument_list (string_';') string_';' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_query) identifier_query (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_query) identifier_query (string_';') string_';' )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier__view_stmt) identifier__view_stmt (identifier_parseString) identifier_parseString )attribute (argument_list (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (return_statement (call (identifier_View) identifier_View (argument_list (identifier_result) identifier_result )argument_list )call )return_statement )block )function_definition )module
Parses asql query to view object. Args: query (str): asql query Returns: View instance: parsed view.
(module (function_definition (function_name_create_os_dummy_rtr) function_name_create_os_dummy_rtr (parameters (identifier_self) identifier_self (identifier_tenant_id) identifier_tenant_id (identifier_fw_dict) identifier_fw_dict (default_parameter (identifier_is_fw_virt) identifier_is_fw_virt (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_res) identifier_res (attribute (identifier_fw_const) identifier_fw_const (identifier_OS_DUMMY_RTR_CREATE_SUCCESS) identifier_OS_DUMMY_RTR_CREATE_SUCCESS )attribute )assignment )expression_statement (expression_statement (assignment (identifier_tenant_name) identifier_tenant_name (call (attribute (identifier_fw_dict) identifier_fw_dict (identifier_get) identifier_get )attribute (argument_list (string_'tenant_name') string_'tenant_name' )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_rtr_id) identifier_rtr_id (call (attribute (identifier_fw_dict) identifier_fw_dict (identifier_get) identifier_get )attribute (argument_list (string_'router_id') string_'router_id' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_rtr_id) identifier_rtr_id (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_"Invalid router id, attaching dummy interface") string_"Invalid router id, attaching dummy interface" (string_" failed") string_" failed" )concatenated_string )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (if_statement (identifier_is_fw_virt) identifier_is_fw_virt (block (expression_statement (assignment (identifier_net_id) identifier_net_id (assignment (identifier_subnet_id) identifier_subnet_id (None) None )assignment )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_net_id) identifier_net_id (identifier_subnet_id) identifier_subnet_id )pattern_list (parenthesized_expression (call (attribute (identifier_self) identifier_self (identifier__attach_dummy_intf_rtr) identifier__attach_dummy_intf_rtr )attribute (argument_list (identifier_tenant_id) identifier_tenant_id (identifier_tenant_name) identifier_tenant_name (identifier_rtr_id) identifier_rtr_id )argument_list )call )parenthesized_expression )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_net_id) identifier_net_id (None) None )comparison_operator (comparison_operator (identifier_subnet_id) identifier_subnet_id (None) None )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_"Invalid net_id or subnet_id, creating dummy") string_"Invalid net_id or subnet_id, creating dummy" (string_" interface failed") string_" interface failed" )concatenated_string )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement )block )else_clause )if_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_"Creation of Openstack Router failed ") string_"Creation of Openstack Router failed " (string_"tenant %(tenant)s, Exception %(exc)s") string_"tenant %(tenant)s, Exception %(exc)s" )concatenated_string (dictionary (pair (string_'tenant') string_'tenant' (identifier_tenant_id) identifier_tenant_id )pair (pair (string_'exc') string_'exc' (call (identifier_str) identifier_str (argument_list (identifier_exc) identifier_exc )argument_list )call )pair )dictionary )argument_list )call )expression_statement (expression_statement (assignment (identifier_res) identifier_res (attribute (identifier_fw_const) identifier_fw_const (identifier_OS_DUMMY_RTR_CREATE_FAIL) identifier_OS_DUMMY_RTR_CREATE_FAIL )attribute )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_store_fw_db_router) identifier_store_fw_db_router )attribute (argument_list (identifier_tenant_id) identifier_tenant_id (identifier_net_id) identifier_net_id (identifier_subnet_id) identifier_subnet_id (identifier_rtr_id) identifier_rtr_id (identifier_res) identifier_res )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Create the dummy interface and attach it to router. Attach the dummy interface to the Openstack router and store the info in DB.
(module (function_definition (function_name_close_pages_for_specific_sm_id) function_name_close_pages_for_specific_sm_id (parameters (identifier_self) identifier_self (identifier_sm_id) identifier_sm_id )parameters (block (expression_statement (assignment (identifier_states_to_be_closed) identifier_states_to_be_closed (list )list )assignment )expression_statement (for_statement (identifier_state_identifier) identifier_state_identifier (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (block (expression_statement (assignment (identifier_state_m) identifier_state_m (subscript (subscript (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (identifier_state_identifier) identifier_state_identifier )subscript (string_"state_m") string_"state_m" )subscript )assignment )expression_statement (if_statement (comparison_operator (attribute (call (attribute (attribute (identifier_state_m) identifier_state_m (identifier_state) identifier_state )attribute (identifier_get_state_machine) identifier_get_state_machine )attribute (argument_list )argument_list )call (identifier_state_machine_id) identifier_state_machine_id )attribute (identifier_sm_id) identifier_sm_id )comparison_operator (block (expression_statement (call (attribute (identifier_states_to_be_closed) identifier_states_to_be_closed (identifier_append) identifier_append )attribute (argument_list (identifier_state_identifier) identifier_state_identifier )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_state_identifier) identifier_state_identifier (identifier_states_to_be_closed) identifier_states_to_be_closed (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_close_page) identifier_close_page )attribute (argument_list (identifier_state_identifier) identifier_state_identifier (keyword_argument (identifier_delete) identifier_delete (False) False )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Closes all tabs of the states editor for a specific sm_id
(module (function_definition (function_name_root) function_name_root (parameters (identifier_self) identifier_self )parameters (type (string_"GameNode") string_"GameNode" )type (block (expression_statement (assignment (identifier_node) identifier_node (identifier_self) identifier_self )assignment )expression_statement (while_statement (attribute (identifier_node) identifier_node (identifier_parent) identifier_parent )attribute (block (expression_statement (assignment (identifier_node) identifier_node (attribute (identifier_node) identifier_node (identifier_parent) identifier_parent )attribute )assignment )expression_statement )block )while_statement (return_statement (identifier_node) identifier_node )return_statement )block )function_definition )module
Gets the root node, i.e., the game.
(module (function_definition (function_name_reference_year) function_name_reference_year (parameters (identifier_self) identifier_self (identifier_index) identifier_index )parameters (block (expression_statement (assignment (identifier_ref_date) identifier_ref_date (call (attribute (identifier_self) identifier_self (identifier_reference_date) identifier_reference_date )attribute (argument_list (identifier_index) identifier_index )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (attribute (call (identifier_parse) identifier_parse (argument_list (identifier_ref_date) identifier_ref_date )argument_list )call (identifier_year) identifier_year )attribute )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (identifier_matched) identifier_matched (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r"\d{4}") string_r"\d{4}" (identifier_ref_date) identifier_ref_date )argument_list )call )assignment )expression_statement (if_statement (identifier_matched) identifier_matched (block (return_statement (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_matched) identifier_matched (identifier_group) identifier_group )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (string_"") string_"" )return_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Return the reference publication year.
(module (function_definition (function_name_autocomplete) function_name_autocomplete (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_facet) identifier_facet )attribute (False) False )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_self) identifier_self (identifier_solr_params) identifier_solr_params )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"PARAMS=") string_"PARAMS=" (call (identifier_str) identifier_str (argument_list (identifier_params) identifier_params )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_results) identifier_results (call (attribute (attribute (identifier_self) identifier_self (identifier_solr) identifier_solr )attribute (identifier_search) identifier_search )attribute (argument_list (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Docs found: {}") string_"Docs found: {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_results) identifier_results (identifier_hits) identifier_hits )attribute )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__process_autocomplete_results) identifier__process_autocomplete_results )attribute (argument_list (identifier_results) identifier_results )argument_list )call )return_statement )block )function_definition )module
Execute solr autocomplete
(module (function_definition (function_name_file) function_name_file (parameters (default_parameter (identifier_mode) identifier_mode (string_'w+b') string_'w+b' )default_parameter (default_parameter (identifier_suffix) identifier_suffix (string_'') string_'' )default_parameter (default_parameter (identifier_prefix) identifier_prefix (string_'tmp') string_'tmp' )default_parameter (default_parameter (identifier_dir) identifier_dir (None) None )default_parameter (default_parameter (identifier_ignore_missing) identifier_ignore_missing (False) False )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_suffix) identifier_suffix (identifier_int) identifier_int )argument_list )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'Passed an integer as suffix. Did you want to ') string_'Passed an integer as suffix. Did you want to ' (string_'specify the deprecated parameter `bufsize`?') string_'specify the deprecated parameter `bufsize`?' )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_fp) identifier_fp (call (attribute (identifier_tempfile) identifier_tempfile (identifier_NamedTemporaryFile) identifier_NamedTemporaryFile )attribute (argument_list (keyword_argument (identifier_mode) identifier_mode (identifier_mode) identifier_mode )keyword_argument (keyword_argument (identifier_suffix) identifier_suffix (identifier_suffix) identifier_suffix )keyword_argument (keyword_argument (identifier_prefix) identifier_prefix (identifier_prefix) identifier_prefix )keyword_argument (keyword_argument (identifier_dir) identifier_dir (identifier_dir) identifier_dir )keyword_argument (keyword_argument (identifier_delete) identifier_delete (False) False )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (yield (identifier_fp) identifier_fp )yield )expression_statement )block (finally_clause (block (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_unlink) identifier_unlink )attribute (argument_list (attribute (identifier_fp) identifier_fp (identifier_name) identifier_name )attribute )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_e) identifier_e (identifier_errno) identifier_errno )attribute (identifier_ENOENT) identifier_ENOENT )comparison_operator (comparison_operator (identifier_ignore_missing) identifier_ignore_missing (False) False )comparison_operator )boolean_operator (block (raise_statement )raise_statement )block )if_statement )block )except_clause )try_statement )block )finally_clause )try_statement )block )function_definition )module
Create a temporary file. A contextmanager that creates and returns a named temporary file and removes it on exit. Differs from temporary file functions in :mod:`tempfile` by not deleting the file once it is closed, making it safe to write and close the file and then processing it with an external program. If the temporary file is moved elsewhere later on, `ignore_missing` should be set to `True`. :param mode: Passed on to :func:`tempfile.NamedTemporaryFile`. :param suffix: Passed on to :func:`tempfile.NamedTemporaryFile`. :param prefix: Passed on to :func:`tempfile.NamedTemporaryFile`. :param dir: Passed on to :func:`tempfile.NamedTemporaryFile`. :param ignore_missing: If set to `True`, no exception will be raised if the temporary file has been deleted when trying to clean it up. :return: A file object with a `.name`.
(module (function_definition (function_name_query_tracking_code) function_name_query_tracking_code (parameters (identifier_tracking_code) identifier_tracking_code (default_parameter (identifier_year) identifier_year (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_payload) identifier_payload (dictionary (pair (string_'Anio') string_'Anio' (boolean_operator (identifier_year) identifier_year (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_year) identifier_year )attribute )boolean_operator )pair (pair (string_'Tracking') string_'Tracking' (identifier_tracking_code) identifier_tracking_code )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (identifier__make_request) identifier__make_request (argument_list (identifier_TRACKING_URL) identifier_TRACKING_URL (identifier_payload) identifier_payload )argument_list )call )assignment )expression_statement (if_statement (not_operator (subscript (identifier_response) identifier_response (string_'d') string_'d' )subscript )not_operator (block (return_statement (list )list )return_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (subscript (subscript (identifier_response) identifier_response (string_'d') string_'d' )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_destination) identifier_destination (subscript (identifier_data) identifier_data (string_'RetornoCadena6') string_'RetornoCadena6' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_payload) identifier_payload (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'Destino') string_'Destino' (identifier_destination) identifier_destination )pair )dictionary )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (identifier__make_request) identifier__make_request (argument_list (identifier_TRACKING_DETAIL_URL) identifier_TRACKING_DETAIL_URL (identifier_payload) identifier_payload )argument_list )call )assignment )expression_statement (return_statement (call (identifier__process_detail) identifier__process_detail (argument_list (subscript (identifier_response) identifier_response (string_'d') string_'d' )subscript )argument_list )call )return_statement )block )function_definition )module
Given a tracking_code return a list of events related the tracking code
(module (function_definition (function_name_create_dataset) function_name_create_dataset (parameters (identifier_self) identifier_self (identifier_parent) identifier_parent (identifier_dataset) identifier_dataset (default_parameter (identifier_retry) identifier_retry (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_DEFAULT) identifier_DEFAULT )attribute )default_parameter (default_parameter (identifier_timeout) identifier_timeout (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_DEFAULT) identifier_DEFAULT )attribute )default_parameter (default_parameter (identifier_metadata) identifier_metadata (None) None )default_parameter )parameters (block (if_statement (comparison_operator (string_"create_dataset") string_"create_dataset" (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute (string_"create_dataset") string_"create_dataset" )subscript (call (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_wrap_method) identifier_wrap_method )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute (identifier_create_dataset) identifier_create_dataset )attribute (keyword_argument (identifier_default_retry) identifier_default_retry (attribute (subscript (attribute (identifier_self) identifier_self (identifier__method_configs) identifier__method_configs )attribute (string_"CreateDataset") string_"CreateDataset" )subscript (identifier_retry) identifier_retry )attribute )keyword_argument (keyword_argument (identifier_default_timeout) identifier_default_timeout (attribute (subscript (attribute (identifier_self) identifier_self (identifier__method_configs) identifier__method_configs )attribute (string_"CreateDataset") string_"CreateDataset" )subscript (identifier_timeout) identifier_timeout )attribute )keyword_argument (keyword_argument (identifier_client_info) identifier_client_info (attribute (identifier_self) identifier_self (identifier__client_info) identifier__client_info )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_service_pb2) identifier_service_pb2 (identifier_CreateDatasetRequest) identifier_CreateDatasetRequest )attribute (argument_list (keyword_argument (identifier_parent) identifier_parent (identifier_parent) identifier_parent )keyword_argument (keyword_argument (identifier_dataset) identifier_dataset (identifier_dataset) identifier_dataset )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_metadata) identifier_metadata (None) None )comparison_operator (block (expression_statement (assignment (identifier_metadata) identifier_metadata (list )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_metadata) identifier_metadata (call (identifier_list) identifier_list (argument_list (identifier_metadata) identifier_metadata )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_routing_header) identifier_routing_header (list (tuple (string_"parent") string_"parent" (identifier_parent) identifier_parent )tuple )list )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (expression_statement (assignment (identifier_routing_metadata) identifier_routing_metadata (call (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_routing_header) identifier_routing_header )attribute (identifier_to_grpc_metadata) identifier_to_grpc_metadata )attribute (argument_list (identifier_routing_header) identifier_routing_header )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_metadata) identifier_metadata (identifier_append) identifier_append )attribute (argument_list (identifier_routing_metadata) identifier_routing_metadata )argument_list )call )expression_statement )block )else_clause )try_statement (return_statement (call (subscript (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute (string_"create_dataset") string_"create_dataset" )subscript (argument_list (identifier_request) identifier_request (keyword_argument (identifier_retry) identifier_retry (identifier_retry) identifier_retry )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument (keyword_argument (identifier_metadata) identifier_metadata (identifier_metadata) identifier_metadata )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Creates a dataset. Example: >>> from google.cloud import automl_v1beta1 >>> >>> client = automl_v1beta1.AutoMlClient() >>> >>> parent = client.location_path('[PROJECT]', '[LOCATION]') >>> >>> # TODO: Initialize `dataset`: >>> dataset = {} >>> >>> response = client.create_dataset(parent, dataset) Args: parent (str): The resource name of the project to create the dataset for. dataset (Union[dict, ~google.cloud.automl_v1beta1.types.Dataset]): The dataset to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.automl_v1beta1.types.Dataset` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. Returns: A :class:`~google.cloud.automl_v1beta1.types.Dataset` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. google.api_core.exceptions.RetryError: If the request failed due to a retryable error and retry attempts failed. ValueError: If the parameters are invalid.
(module (function_definition (function_name_zip) function_name_zip (parameters (default_parameter (identifier_value) identifier_value (identifier_data) identifier_data )default_parameter (default_parameter (identifier_mu) identifier_mu (identifier_mu) identifier_mu )default_parameter (default_parameter (identifier_psi) identifier_psi (identifier_psi) identifier_psi )default_parameter )parameters (block (expression_statement (assignment (identifier_like) identifier_like (float_0.0) float_0.0 )assignment )expression_statement (for_statement (identifier_x) identifier_x (identifier_value) identifier_value (block (if_statement (not_operator (identifier_x) identifier_x )not_operator (block (expression_statement (augmented_assignment (identifier_like) identifier_like (call (attribute (identifier_np) identifier_np (identifier_log) identifier_log )attribute (argument_list (binary_operator (parenthesized_expression (binary_operator (float_1.) float_1. (identifier_psi) identifier_psi )binary_operator )parenthesized_expression (binary_operator (identifier_psi) identifier_psi (call (attribute (identifier_np) identifier_np (identifier_exp) identifier_exp )attribute (argument_list (unary_operator (identifier_mu) identifier_mu )unary_operator )argument_list )call )binary_operator )binary_operator )argument_list )call )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_like) identifier_like (binary_operator (call (attribute (identifier_np) identifier_np (identifier_log) identifier_log )attribute (argument_list (identifier_psi) identifier_psi )argument_list )call (call (identifier_poisson_like) identifier_poisson_like (argument_list (identifier_x) identifier_x (identifier_mu) identifier_mu )argument_list )call )binary_operator )augmented_assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_like) identifier_like )return_statement )block )function_definition )module
Zero-inflated Poisson likelihood
(module (function_definition (function_name_run_command) function_name_run_command (parameters (identifier_cmd_to_run) identifier_cmd_to_run )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_tempfile) identifier_tempfile (identifier_TemporaryFile) identifier_TemporaryFile )attribute (argument_list )argument_list )call (as_pattern_target (identifier_stdout_file) identifier_stdout_file )as_pattern_target )as_pattern )with_item (with_item (as_pattern (call (attribute (identifier_tempfile) identifier_tempfile (identifier_TemporaryFile) identifier_TemporaryFile )attribute (argument_list )argument_list )call (as_pattern_target (identifier_stderr_file) identifier_stderr_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_popen) identifier_popen (call (attribute (identifier_subprocess) identifier_subprocess (identifier_Popen) identifier_Popen )attribute (argument_list (identifier_cmd_to_run) identifier_cmd_to_run (keyword_argument (identifier_stdout) identifier_stdout (identifier_stdout_file) identifier_stdout_file )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (identifier_stderr_file) identifier_stderr_file )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_popen) identifier_popen (identifier_wait) identifier_wait )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_stderr_file) identifier_stderr_file (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_stdout_file) identifier_stdout_file (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (assignment (identifier_stderr) identifier_stderr (call (attribute (identifier_stderr_file) identifier_stderr_file (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_stdout) identifier_stdout (call (attribute (identifier_stdout_file) identifier_stdout_file (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_six) identifier_six (identifier_PY3) identifier_PY3 )attribute (block (expression_statement (assignment (identifier_stderr) identifier_stderr (call (attribute (identifier_stderr) identifier_stderr (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_stdout) identifier_stdout (call (attribute (identifier_stdout) identifier_stdout (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (expression_list (identifier_stderr) identifier_stderr (identifier_stdout) identifier_stdout )expression_list )return_statement )block )with_statement )block )function_definition )module
Wrapper around subprocess that pipes the stderr and stdout from `cmd_to_run` to temporary files. Using the temporary files gets around subprocess.PIPE's issues with handling large buffers. Note: this command will block the python process until `cmd_to_run` has completed. Returns a tuple, containing the stderr and stdout as strings.
(module (function_definition (function_name_load_crawler) function_name_load_crawler (parameters (identifier_self) identifier_self (identifier_crawler) identifier_crawler (identifier_url) identifier_url (identifier_ignore_regex) identifier_ignore_regex )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (call (identifier_CrawlerProcess) identifier_CrawlerProcess (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_cfg) identifier_cfg )attribute (identifier_get_scrapy_options) identifier_get_scrapy_options )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_crawl) identifier_crawl )attribute (argument_list (identifier_crawler) identifier_crawler (attribute (identifier_self) identifier_self (identifier_helper) identifier_helper )attribute (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_config) identifier_config (attribute (identifier_self) identifier_self (identifier_cfg) identifier_cfg )attribute )keyword_argument (keyword_argument (identifier_ignore_regex) identifier_ignore_regex (identifier_ignore_regex) identifier_ignore_regex )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Loads the given crawler with the given url. :param class crawler: class of the crawler to load :param str url: url to start the crawler with :param regex ignore_regex: to be able to ignore urls that match this regex code
(module (function_definition (function_name__document_root) function_name__document_root (parameters (identifier_self) identifier_self (default_parameter (identifier_fully_qualified) identifier_fully_qualified (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_nsmap) identifier_nsmap (dictionary (pair (string_"xsi") string_"xsi" (subscript (attribute (identifier_utils) identifier_utils (identifier_NAMESPACES) identifier_NAMESPACES )attribute (string_"xsi") string_"xsi" )subscript )pair (pair (string_"xlink") string_"xlink" (subscript (attribute (identifier_utils) identifier_utils (identifier_NAMESPACES) identifier_NAMESPACES )attribute (string_"xlink") string_"xlink" )subscript )pair )dictionary )assignment )expression_statement (if_statement (identifier_fully_qualified) identifier_fully_qualified (block (expression_statement (assignment (subscript (identifier_nsmap) identifier_nsmap (string_"mets") string_"mets" )subscript (subscript (attribute (identifier_utils) identifier_utils (identifier_NAMESPACES) identifier_NAMESPACES )attribute (string_"mets") string_"mets" )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_nsmap) identifier_nsmap (None) None )subscript (subscript (attribute (identifier_utils) identifier_utils (identifier_NAMESPACES) identifier_NAMESPACES )attribute (string_"mets") string_"mets" )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_attrib) identifier_attrib (dictionary (pair (call (attribute (string_"{}schemaLocation") string_"{}schemaLocation" (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_utils) identifier_utils (identifier_lxmlns) identifier_lxmlns )attribute (argument_list (string_"xsi") string_"xsi" )argument_list )call )argument_list )call (attribute (identifier_utils) identifier_utils (identifier_SCHEMA_LOCATIONS) identifier_SCHEMA_LOCATIONS )attribute )pair )dictionary )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_objid) identifier_objid )attribute (block (expression_statement (assignment (subscript (identifier_attrib) identifier_attrib (string_"OBJID") string_"OBJID" )subscript (attribute (identifier_self) identifier_self (identifier_objid) identifier_objid )attribute )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_etree) identifier_etree (identifier_Element) identifier_Element )attribute (argument_list (binary_operator (call (attribute (identifier_utils) identifier_utils (identifier_lxmlns) identifier_lxmlns )attribute (argument_list (string_"mets") string_"mets" )argument_list )call (string_"mets") string_"mets" )binary_operator (keyword_argument (identifier_nsmap) identifier_nsmap (identifier_nsmap) identifier_nsmap )keyword_argument (keyword_argument (identifier_attrib) identifier_attrib (identifier_attrib) identifier_attrib )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the mets Element for the document root.
(module (function_definition (function_name_parse) function_name_parse (parameters (identifier_self) identifier_self (identifier_words) identifier_words )parameters (block (function_definition (function_name_exact) function_name_exact (parameters (identifier_words) identifier_words )parameters (block (try_statement (block (return_statement (call (identifier_float) identifier_float (argument_list (identifier_words) identifier_words )argument_list )call )return_statement )block (except_clause (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition (expression_statement (assignment (identifier_guess) identifier_guess (call (identifier_exact) identifier_exact (argument_list (identifier_words) identifier_words )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_guess) identifier_guess (None) None )comparison_operator (block (return_statement (identifier_guess) identifier_guess )return_statement )block )if_statement (expression_statement (assignment (identifier_split) identifier_split (call (attribute (identifier_words) identifier_words (identifier_split) identifier_split )attribute (argument_list (string_' ') string_' ' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_split) identifier_split (unary_operator (integer_1) integer_1 )unary_operator )subscript (attribute (identifier_self) identifier_self (identifier___fractions__) identifier___fractions__ )attribute )comparison_operator (block (expression_statement (assignment (subscript (identifier_split) identifier_split (unary_operator (integer_1) integer_1 )unary_operator )subscript (subscript (attribute (identifier_self) identifier_self (identifier___fractions__) identifier___fractions__ )attribute (subscript (identifier_split) identifier_split (unary_operator (integer_1) integer_1 )unary_operator )subscript )subscript )assignment )expression_statement )block (elif_clause (comparison_operator (subscript (identifier_split) identifier_split (unary_operator (integer_1) integer_1 )unary_operator )subscript (attribute (identifier_self) identifier_self (identifier___ordinals__) identifier___ordinals__ )attribute )comparison_operator (block (expression_statement (assignment (subscript (identifier_split) identifier_split (unary_operator (integer_1) integer_1 )unary_operator )subscript (subscript (attribute (identifier_self) identifier_self (identifier___ordinals__) identifier___ordinals__ )attribute (subscript (identifier_split) identifier_split (unary_operator (integer_1) integer_1 )unary_operator )subscript )subscript )assignment )expression_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_parsed_ordinals) identifier_parsed_ordinals (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_split) identifier_split )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_parseFloat) identifier_parseFloat )attribute (argument_list (identifier_parsed_ordinals) identifier_parsed_ordinals )argument_list )call )return_statement )block )function_definition )module
A general method for parsing word-representations of numbers. Supports floats and integers. Args: words (str): Description of an arbitrary number. Returns: A double representation of the words.
(module (function_definition (function_name_generate) function_name_generate (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_s) identifier_s (attribute (identifier_self) identifier_self (identifier__docstring) identifier__docstring )attribute )assignment )expression_statement (expression_statement (augmented_assignment (identifier_s) identifier_s (call (attribute (call (attribute (call (attribute (identifier_self) identifier_self (identifier__get_source) identifier__get_source )attribute (argument_list )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_'endpoints = {}') string_'endpoints = {}' (binary_operator (string_'endpoints = ') string_'endpoints = ' (attribute (identifier_self) identifier_self (identifier__config_src) identifier__config_src )attribute )binary_operator )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_'logger.setLevel(logging.INFO)') string_'logger.setLevel(logging.INFO)' (binary_operator (string_'logger.setLevel(logging.%s)') string_'logger.setLevel(logging.%s)' (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_logging_level) identifier_logging_level )attribute )binary_operator )argument_list )call )augmented_assignment )expression_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
Generate Lambda function source; return it as a string. :rtype: str :returns: lambda function source
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_text) identifier_text )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_disabled) identifier_disabled )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_with_encoding) identifier_write_with_encoding )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_encoding) identifier_encoding )attribute (identifier_text) identifier_text )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_to_write) identifier_to_write (identifier_text) identifier_text )pattern_list (call (identifier_split_writable_text) identifier_split_writable_text (argument_list (attribute (identifier_self) identifier_self (identifier_encoder) identifier_encoder )attribute (identifier_text) identifier_text (attribute (identifier_self) identifier_self (identifier_encoding) identifier_encoding )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_to_write) identifier_to_write (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_with_encoding) identifier_write_with_encoding )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_encoding) identifier_encoding )attribute (identifier_to_write) identifier_to_write )argument_list )call )expression_statement )block )if_statement (while_statement (identifier_text) identifier_text (block (expression_statement (assignment (identifier_encoding) identifier_encoding (call (attribute (attribute (identifier_self) identifier_self (identifier_encoder) identifier_encoder )attribute (identifier_find_suitable_encoding) identifier_find_suitable_encoding )attribute (argument_list (subscript (identifier_text) identifier_text (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_encoding) identifier_encoding )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__handle_character_failed) identifier__handle_character_failed )attribute (argument_list (subscript (identifier_text) identifier_text (integer_0) integer_0 )subscript )argument_list )call )expression_statement (expression_statement (assignment (identifier_text) identifier_text (subscript (identifier_text) identifier_text (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_to_write) identifier_to_write (identifier_text) identifier_text )pattern_list (call (identifier_split_writable_text) identifier_split_writable_text (argument_list (attribute (identifier_self) identifier_self (identifier_encoder) identifier_encoder )attribute (identifier_text) identifier_text (identifier_encoding) identifier_encoding )argument_list )call )assignment )expression_statement (if_statement (identifier_to_write) identifier_to_write (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_with_encoding) identifier_write_with_encoding )attribute (argument_list (identifier_encoding) identifier_encoding (identifier_to_write) identifier_to_write )argument_list )call )expression_statement )block )if_statement )block )while_statement )block )function_definition )module
Write the text, automatically switching encodings.
(module (function_definition (function_name__detect_encoding) function_name__detect_encoding (parameters (default_parameter (identifier_data) identifier_data (None) None )default_parameter )parameters (block (import_statement (dotted_name (identifier_locale) identifier_locale )dotted_name )import_statement (expression_statement (assignment (identifier_enc_list) identifier_enc_list (list (string_'utf-8') string_'utf-8' (string_'latin-1') string_'latin-1' (string_'iso8859-1') string_'iso8859-1' (string_'iso8859-2') string_'iso8859-2' (string_'utf-16') string_'utf-16' (string_'cp720') string_'cp720' )list )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (call (attribute (identifier_locale) identifier_locale (identifier_getpreferredencoding) identifier_getpreferredencoding )attribute (argument_list (False) False )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (return_statement (identifier_code) identifier_code )return_statement )block )if_statement (if_statement (comparison_operator (call (attribute (identifier_code) identifier_code (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_enc_list) identifier_enc_list )comparison_operator (block (expression_statement (call (attribute (identifier_enc_list) identifier_enc_list (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (call (attribute (identifier_code) identifier_code (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_c) identifier_c (identifier_enc_list) identifier_enc_list (block (try_statement (block (for_statement (identifier_line) identifier_line (identifier_data) identifier_data (block (expression_statement (call (attribute (identifier_line) identifier_line (identifier_decode) identifier_decode )attribute (argument_list (identifier_c) identifier_c )argument_list )call )expression_statement )block )for_statement )block (except_clause (tuple (identifier_UnicodeDecodeError) identifier_UnicodeDecodeError (identifier_UnicodeError) identifier_UnicodeError (identifier_AttributeError) identifier_AttributeError )tuple (block (continue_statement )continue_statement )block )except_clause )try_statement (return_statement (identifier_c) identifier_c )return_statement )block )for_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Encoding not detected. Please pass encoding value manually") string_"Encoding not detected. Please pass encoding value manually" )argument_list )call )expression_statement )block )function_definition )module
Return the default system encoding. If data is passed, try to decode the data with the default system encoding or from a short list of encoding types to test. Args: data - list of lists Returns: enc - system encoding
(module (function_definition (function_name_get_approximate_times) function_name_get_approximate_times (parameters (typed_parameter (identifier_times) identifier_times (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_int) identifier_int )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_int) identifier_int )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_approximate_times) identifier_approximate_times (list )list )assignment )expression_statement (for_statement (identifier_time) identifier_time (identifier_times) identifier_times (block (expression_statement (assignment (identifier_hour) identifier_hour (binary_operator (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_time) identifier_time (identifier_HOUR_TO_TWENTY_FOUR) identifier_HOUR_TO_TWENTY_FOUR )binary_operator )argument_list )call (integer_24) integer_24 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_minute) identifier_minute (binary_operator (identifier_time) identifier_time (identifier_HOUR_TO_TWENTY_FOUR) identifier_HOUR_TO_TWENTY_FOUR )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_approximate_time) identifier_approximate_time (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_approximate_time) identifier_approximate_time (call (attribute (identifier_approximate_time) identifier_approximate_time (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_hour) identifier_hour (identifier_hour) identifier_hour )keyword_argument (keyword_argument (identifier_minute) identifier_minute (identifier_minute) identifier_minute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start_time_range) identifier_start_time_range (binary_operator (identifier_approximate_time) identifier_approximate_time (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_minutes) identifier_minutes (integer_30) integer_30 )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_end_time_range) identifier_end_time_range (binary_operator (identifier_approximate_time) identifier_approximate_time (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_minutes) identifier_minutes (integer_30) integer_30 )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_approximate_times) identifier_approximate_times (identifier_extend) identifier_extend )attribute (argument_list (list (binary_operator (binary_operator (attribute (identifier_start_time_range) identifier_start_time_range (identifier_hour) identifier_hour )attribute (identifier_HOUR_TO_TWENTY_FOUR) identifier_HOUR_TO_TWENTY_FOUR )binary_operator (attribute (identifier_start_time_range) identifier_start_time_range (identifier_minute) identifier_minute )attribute )binary_operator (binary_operator (binary_operator (attribute (identifier_end_time_range) identifier_end_time_range (identifier_hour) identifier_hour )attribute (identifier_HOUR_TO_TWENTY_FOUR) identifier_HOUR_TO_TWENTY_FOUR )binary_operator (attribute (identifier_end_time_range) identifier_end_time_range (identifier_minute) identifier_minute )attribute )binary_operator )list )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_approximate_times) identifier_approximate_times )return_statement )block )function_definition )module
Given a list of times that follow a word such as ``about``, we return a list of times that could appear in the query as a result of this. For example if ``about 7pm`` appears in the utterance, then we also want to add ``1830`` and ``1930``.
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_redis) identifier_redis (call (attribute (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call (identifier_get_redis) identifier_get_redis )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pipe) identifier_pipe (call (identifier_to_pipeline) identifier_to_pipeline (argument_list (identifier_redis) identifier_redis )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_pipe) identifier_pipe (identifier_hset) identifier_hset )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (argument_list )argument_list )call (string_'id') string_'id' (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )argument_list )call )expression_statement (for_statement (pattern_list (identifier_fieldname) identifier_fieldname (identifier_field) identifier_field )pattern_list (attribute (identifier_self) identifier_self (identifier_proxy) identifier_proxy )attribute (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_Relation) identifier_Relation )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_field) identifier_field (identifier_save) identifier_save )attribute (argument_list (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_fieldname) identifier_fieldname )argument_list )call (identifier_pipe) identifier_pipe (keyword_argument (identifier_commit) identifier_commit (False) False )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_pipe) identifier_pipe (identifier_sadd) identifier_sadd )attribute (argument_list (call (attribute (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call (identifier_members_key) identifier_members_key )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_pipe) identifier_pipe (identifier_execute) identifier_execute )attribute (argument_list )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_notify) identifier_notify )attribute (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (dictionary (pair (string_'event') string_'event' (conditional_expression (string_'create') string_'create' (not_operator (attribute (identifier_self) identifier_self (identifier__persisted) identifier__persisted )attribute )not_operator (string_'update') string_'update' )conditional_expression )pair (pair (string_'data') string_'data' (call (attribute (identifier_self) identifier_self (identifier_to_json) identifier_to_json )attribute (argument_list )argument_list )call )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_redis) identifier_redis (identifier_publish) identifier_publish )attribute (argument_list (call (attribute (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call (identifier_cls_key) identifier_cls_key )attribute (argument_list )argument_list )call (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_redis) identifier_redis (identifier_publish) identifier_publish )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (argument_list )argument_list )call (identifier_data) identifier_data )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__persisted) identifier__persisted )attribute (True) True )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Persists this object to the database. Each field knows how to store itself so we don't have to worry about it
(module (function_definition (function_name_load_word_file) function_name_load_word_file (parameters (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_words_file) identifier_words_file (call (identifier_resource_filename) identifier_resource_filename (argument_list (identifier___name__) identifier___name__ (binary_operator (string_"words/%s") string_"words/%s" (identifier_filename) identifier_filename )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_handle) identifier_handle (call (identifier_open) identifier_open (argument_list (identifier_words_file) identifier_words_file (string_'r') string_'r' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_words) identifier_words (call (attribute (identifier_handle) identifier_handle (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_handle) identifier_handle (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_words) identifier_words )return_statement )block )function_definition )module
Loads a words file as a list of lines
(module (function_definition (function_name_clean) function_name_clean (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 (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_pk) identifier_pk )attribute )not_operator (block (expression_statement (assignment (identifier_node) identifier_node (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute )assignment )expression_statement (if_statement (comparison_operator (attribute (attribute (identifier_node) identifier_node (identifier_participation_settings) identifier_participation_settings )attribute (identifier_comments_allowed) identifier_comments_allowed )attribute (False) False )comparison_operator (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (string_"Comments not allowed for this node") string_"Comments not allowed for this node" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (string_'nodeshot.core.layers') string_'nodeshot.core.layers' (attribute (identifier_settings) identifier_settings (identifier_INSTALLED_APPS) identifier_INSTALLED_APPS )attribute )comparison_operator (block (expression_statement (assignment (identifier_layer) identifier_layer (attribute (identifier_node) identifier_node (identifier_layer) identifier_layer )attribute )assignment )expression_statement (if_statement (comparison_operator (attribute (attribute (identifier_layer) identifier_layer (identifier_participation_settings) identifier_participation_settings )attribute (identifier_comments_allowed) identifier_comments_allowed )attribute (False) False )comparison_operator (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (string_"Comments not allowed for this layer") string_"Comments not allowed for this layer" )argument_list )call )raise_statement )block )if_statement )block )if_statement )block )if_statement )block )function_definition )module
Check if comments can be inserted for parent node or parent layer
(module (function_definition (function_name_dict_to_switch) function_name_dict_to_switch (parameters (identifier_d) identifier_d )parameters (block (function_definition (function_name_lookup) function_name_lookup (parameters (identifier_query) identifier_query )parameters (block (return_statement (subscript (identifier_d) identifier_d (identifier_query) identifier_query )subscript )return_statement )block )function_definition (expression_statement (assignment (attribute (identifier_lookup) identifier_lookup (identifier__always_inline_) identifier__always_inline_ )attribute (True) True )assignment )expression_statement (expression_statement (assignment (identifier_unrolling_items) identifier_unrolling_items (call (identifier_unrolling_iterable) identifier_unrolling_iterable (argument_list (call (attribute (identifier_d) identifier_d (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_lookup) identifier_lookup )return_statement )block )function_definition )module
Convert of dictionary with integer keys to a switch statement.
(module (function_definition (function_name_close_handle) function_name_close_handle (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_self) identifier_self (identifier_hThread) identifier_hThread )attribute (string_'close') string_'close' )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_hThread) identifier_hThread )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_hThread) identifier_hThread )attribute (tuple (None) None (attribute (identifier_win32) identifier_win32 (identifier_INVALID_HANDLE_VALUE) identifier_INVALID_HANDLE_VALUE )attribute )tuple )comparison_operator (block (expression_statement (call (attribute (identifier_win32) identifier_win32 (identifier_CloseHandle) identifier_CloseHandle )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_hThread) identifier_hThread )attribute )argument_list )call )expression_statement )block )elif_clause )if_statement )block (finally_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_hThread) identifier_hThread )attribute (None) None )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Closes the handle to the thread. @note: Normally you don't need to call this method. All handles created by I{WinAppDbg} are automatically closed when the garbage collector claims them.
(module (function_definition (function_name_notifications_view) function_name_notifications_view (parameters (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_page_name) identifier_page_name (string_"Your Notifications") string_"Your Notifications" )assignment )expression_statement (expression_statement (assignment (identifier_notifications) identifier_notifications (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute (identifier_notifications) identifier_notifications )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute (identifier_notifications) identifier_notifications )attribute (identifier_mark_all_as_read) identifier_mark_all_as_read )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (identifier_render_to_response) identifier_render_to_response (argument_list (string_"list_notifications.html") string_"list_notifications.html" (dictionary (pair (string_"page_name") string_"page_name" (identifier_page_name) identifier_page_name )pair (pair (string_"notifications") string_"notifications" (identifier_notifications) identifier_notifications )pair )dictionary (keyword_argument (identifier_context_instance) identifier_context_instance (call (identifier_RequestContext) identifier_RequestContext (argument_list (identifier_request) identifier_request )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Show a user their notifications.
(module (function_definition (function_name_identify_gwf) function_name_identify_gwf (parameters (identifier_origin) identifier_origin (identifier_filepath) identifier_filepath (identifier_fileobj) identifier_fileobj (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_fileobj) identifier_fileobj (None) None )comparison_operator (block (expression_statement (assignment (identifier_loc) identifier_loc (call (attribute (identifier_fileobj) identifier_fileobj (identifier_tell) identifier_tell )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fileobj) identifier_fileobj (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (try_statement (block (if_statement (comparison_operator (call (attribute (identifier_fileobj) identifier_fileobj (identifier_read) identifier_read )attribute (argument_list (integer_4) integer_4 )argument_list )call (identifier_GWF_SIGNATURE) identifier_GWF_SIGNATURE )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_fileobj) identifier_fileobj (identifier_seek) identifier_seek )attribute (argument_list (identifier_loc) identifier_loc )argument_list )call )expression_statement )block )finally_clause )try_statement )block )if_statement (if_statement (comparison_operator (identifier_filepath) identifier_filepath (None) None )comparison_operator (block (if_statement (call (attribute (identifier_filepath) identifier_filepath (identifier_endswith) identifier_endswith )attribute (argument_list (string_'.gwf') string_'.gwf' )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement (if_statement (call (attribute (identifier_filepath) identifier_filepath (identifier_endswith) identifier_endswith )attribute (argument_list (tuple (string_'.lcf') string_'.lcf' (string_'.cache') string_'.cache' )tuple )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_cache) identifier_cache (call (identifier_read_cache) identifier_read_cache (argument_list (identifier_filepath) identifier_filepath )argument_list )call )assignment )expression_statement )block (except_clause (identifier_IOError) identifier_IOError (block (return_statement (False) False )return_statement )block )except_clause (else_clause (block (if_statement (call (attribute (attribute (subscript (identifier_cache) identifier_cache (integer_0) integer_0 )subscript (identifier_path) identifier_path )attribute (identifier_endswith) identifier_endswith )attribute (argument_list (string_'.gwf') string_'.gwf' )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block )else_clause )try_statement )block )if_statement )block )if_statement )block )function_definition )module
Identify a filename or file object as GWF This function is overloaded in that it will also identify a cache file as 'gwf' if the first entry in the cache contains a GWF file extension
(module (function_definition (function_name_services) function_name_services (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__resources) identifier__resources )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___init) identifier___init )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (string_"services") string_"services" (attribute (identifier_self) identifier_self (identifier__resources) identifier__resources )attribute )comparison_operator (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (string_"/services") string_"/services" )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier__services) identifier__services (identifier_Services) identifier_Services )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_securityHandler) identifier_securityHandler (attribute (identifier_self) identifier_self (identifier__securityHandler) identifier__securityHandler )attribute )keyword_argument (keyword_argument (identifier_proxy_url) identifier_proxy_url (attribute (identifier_self) identifier_self (identifier__proxy_url) identifier__proxy_url )attribute )keyword_argument (keyword_argument (identifier_proxy_port) identifier_proxy_port (attribute (identifier_self) identifier_self (identifier__proxy_port) identifier__proxy_port )attribute )keyword_argument (keyword_argument (identifier_initialize) identifier_initialize (True) True )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Gets the services object which will provide the ArcGIS Server's admin information about services and folders.
(module (function_definition (function_name_get_machines) function_name_get_machines (parameters (identifier_self) identifier_self (identifier_origin) identifier_origin (identifier_hostnames) identifier_hostnames )parameters (block (expression_statement (assignment (identifier_hostnames) identifier_hostnames (dictionary_comprehension (pair (identifier_hostname) identifier_hostname (True) True )pair (for_in_clause (identifier_hostname) identifier_hostname (identifier_hostnames) identifier_hostnames )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_machines) identifier_machines (call (attribute (attribute (identifier_origin) identifier_origin (identifier_Machines) identifier_Machines )attribute (identifier_read) identifier_read )attribute (argument_list (keyword_argument (identifier_hostnames) identifier_hostnames (identifier_hostnames) identifier_hostnames )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_machines) identifier_machines (list_comprehension (identifier_machine) identifier_machine (for_in_clause (identifier_machine) identifier_machine (identifier_machines) identifier_machines )for_in_clause (if_clause (call (attribute (identifier_hostnames) identifier_hostnames (identifier_pop) identifier_pop )attribute (argument_list (attribute (identifier_machine) identifier_machine (identifier_hostname) identifier_hostname )attribute (False) False )argument_list )call )if_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_hostnames) identifier_hostnames )argument_list )call (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_CommandError) identifier_CommandError (argument_list (binary_operator (string_"Unable to find %s %s.") string_"Unable to find %s %s." (tuple (conditional_expression (string_"machines") string_"machines" (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_hostnames) identifier_hostnames )argument_list )call (integer_1) integer_1 )comparison_operator (string_"machine") string_"machine" )conditional_expression (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (identifier_hostnames) identifier_hostnames )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_machines) identifier_machines )return_statement )block )function_definition )module
Return a set of machines based on `hostnames`. Any hostname that is not found will result in an error.
(module (function_definition (function_name_connected) function_name_connected (parameters (identifier_G) identifier_G (identifier_method_name) identifier_method_name (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (string_"To be removed in 0.8. Use GraphCollection.analyze instead.") string_"To be removed in 0.8. Use GraphCollection.analyze instead." (identifier_DeprecationWarning) identifier_DeprecationWarning )argument_list )call )expression_statement (return_statement (call (attribute (identifier_G) identifier_G (identifier_analyze) identifier_analyze )attribute (argument_list (list (string_'connected') string_'connected' (identifier_method_name) identifier_method_name )list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Performs analysis methods from networkx.connected on each graph in the collection. Parameters ---------- G : :class:`.GraphCollection` The :class:`.GraphCollection` to analyze. The specified method will be applied to each graph in ``G``. method : string Name of method in networkx.connected. **kwargs : kwargs Keyword arguments, passed directly to method. Returns ------- results : dict Keys are graph indices, values are output of method for that graph. Raises ------ ValueError If name is not in networkx.connected, or if no such method exists.
(module (function_definition (function_name_render_or_send) function_name_render_or_send (parameters (identifier_func) identifier_func (identifier_message) identifier_message )parameters (block (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_endpoint) identifier_endpoint )attribute (attribute (identifier_func) identifier_func (identifier_func_name) identifier_func_name )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_mail) identifier_mail (identifier_send) identifier_send )attribute (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement )block )if_statement (if_statement (parenthesized_expression (boolean_operator (call (attribute (identifier_current_user) identifier_current_user (identifier_is_authenticated) identifier_is_authenticated )attribute (argument_list )argument_list )call (attribute (identifier_current_user) identifier_current_user (identifier_superuser) identifier_superuser )attribute )boolean_operator )parenthesized_expression (block (return_statement (call (identifier_render_template) identifier_render_template (argument_list (string_'debug_email.html') string_'debug_email.html' (keyword_argument (identifier_message) identifier_message (identifier_message) identifier_message )keyword_argument )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Renders an email message for debugging or actually sends it.