sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_setValues) function_name_setValues (parameters (identifier_self) identifier_self (identifier_values) identifier_values )parameters (block (expression_statement (assignment (identifier_ncols) identifier_ncols (call (attribute (identifier_self) identifier_self (identifier_getNumCols) identifier_getNumCols )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nindices) identifier_nindices (call (attribute (identifier_self) identifier_self (identifier_getNumIndices) identifier_getNumIndices )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_values) identifier_values (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_Utils) identifier_Utils (identifier_convToList) identifier_convToList )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call (identifier_nindices) identifier_nindices )comparison_operator )assert_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_Utils) identifier_Utils (identifier_convToList) identifier_convToList )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_value) identifier_value )argument_list )call (binary_operator (identifier_ncols) identifier_ncols (identifier_nindices) identifier_nindices )binary_operator )comparison_operator )assert_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_addRow) identifier_addRow )attribute (argument_list (binary_operator (identifier_key) identifier_key (identifier_value) identifier_value )binary_operator )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Set the values of a DataFrame from a dictionary. Args: values: Dictionary with the values to set.
(module (function_definition (function_name_compare_version) function_name_compare_version (parameters (identifier_self) identifier_self (identifier_version_string) identifier_version_string (identifier_op) identifier_op )parameters (block (import_from_statement (dotted_name (identifier_pkg_resources) identifier_pkg_resources )dotted_name (dotted_name (identifier_parse_version) identifier_parse_version )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_monty) identifier_monty (identifier_operator) identifier_operator )dotted_name (dotted_name (identifier_operator_from_str) identifier_operator_from_str )dotted_name )import_from_statement (expression_statement (assignment (identifier_op) identifier_op (call (identifier_operator_from_str) identifier_operator_from_str (argument_list (identifier_op) identifier_op )argument_list )call )assignment )expression_statement (return_statement (call (identifier_op) identifier_op (argument_list (call (identifier_parse_version) identifier_parse_version (argument_list (attribute (identifier_self) identifier_self (identifier_version) identifier_version )attribute )argument_list )call (call (identifier_parse_version) identifier_parse_version (argument_list (identifier_version_string) identifier_version_string )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Compare Abinit version to `version_string` with operator `op`
(module (function_definition (function_name_get_view) function_name_get_view (parameters (identifier_self) identifier_self (identifier_view_name) identifier_view_name )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_measure_to_view_map) identifier_measure_to_view_map )attribute (identifier_get_view) identifier_get_view )attribute (argument_list (keyword_argument (identifier_view_name) identifier_view_name (identifier_view_name) identifier_view_name )keyword_argument (keyword_argument (identifier_timestamp) identifier_timestamp (attribute (identifier_self) identifier_self (identifier_time) identifier_time )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
gets the view given the view name
(module (function_definition (function_name_obj_update_or_create) function_name_obj_update_or_create (parameters (identifier_model) identifier_model (default_parameter (identifier_defaults) identifier_defaults (None) None )default_parameter (default_parameter (identifier_update_fields) identifier_update_fields (identifier_UNSET) identifier_UNSET )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (pattern_list (identifier_obj) identifier_obj (identifier_created) identifier_created )pattern_list (call (attribute (attribute (identifier_model) identifier_model (identifier_objects) identifier_objects )attribute (identifier_get_or_create) identifier_get_or_create )attribute (argument_list (keyword_argument (identifier_defaults) identifier_defaults (identifier_defaults) identifier_defaults )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (identifier_created) identifier_created (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'CREATED %s %s') string_'CREATED %s %s' (attribute (attribute (identifier_model) identifier_model (identifier__meta) identifier__meta )attribute (identifier_object_name) identifier_object_name )attribute (attribute (identifier_obj) identifier_obj (identifier_pk) identifier_pk )attribute (keyword_argument (identifier_extra) identifier_extra (dictionary (pair (string_'pk') string_'pk' (attribute (identifier_obj) identifier_obj (identifier_pk) identifier_pk )attribute )pair )dictionary )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_obj_update) identifier_obj_update (argument_list (identifier_obj) identifier_obj (identifier_defaults) identifier_defaults (keyword_argument (identifier_update_fields) identifier_update_fields (identifier_update_fields) identifier_update_fields )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_obj) identifier_obj (identifier_created) identifier_created )expression_list )return_statement )block )function_definition )module
Mimic queryset.update_or_create but using obj_update.
(module (function_definition (function_name_get_rna) function_name_get_rna (parameters (identifier_self) identifier_self )parameters (type (identifier_Rna) identifier_Rna )type (block (if_statement (attribute (identifier_self) identifier_self (identifier_variants) identifier_variants )attribute (block (raise_statement (call (identifier_InferCentralDogmaException) identifier_InferCentralDogmaException (argument_list (string_'can not get rna for variant') string_'can not get rna for variant' )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_Rna) identifier_Rna (argument_list (keyword_argument (identifier_namespace) identifier_namespace (attribute (identifier_self) identifier_self (identifier_namespace) identifier_namespace )attribute )keyword_argument (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_identifier) identifier_identifier (attribute (identifier_self) identifier_self (identifier_identifier) identifier_identifier )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get the corresponding RNA or raise an exception if it's not the reference node. :raises: InferCentralDogmaException
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (default_parameter (identifier_outfname) identifier_outfname (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_outfname) identifier_outfname (boolean_operator (identifier_outfname) identifier_outfname (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute )boolean_operator )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_codecs) identifier_codecs (identifier_open) identifier_open )attribute (argument_list (identifier_outfname) identifier_outfname (string_'wb') string_'wb' (string_'windows-1252') string_'windows-1252' )argument_list )call (as_pattern_target (identifier_outf) identifier_outf )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_survey) identifier_survey (attribute (identifier_self) identifier_self (identifier_surveys) identifier_surveys )attribute (block (expression_statement (call (attribute (identifier_outf) identifier_outf (identifier_write) identifier_write )attribute (argument_list (call (attribute (string_'\r\n') string_'\r\n' (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_survey) identifier_survey (identifier__serialize) identifier__serialize )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_outf) identifier_outf (identifier_write) identifier_write )attribute (argument_list (binary_operator (binary_operator (string_'\r\n') string_'\r\n' (string_'\f') string_'\f' )binary_operator (string_'\r\n') string_'\r\n' )binary_operator )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_outf) identifier_outf (identifier_write) identifier_write )attribute (argument_list (string_'\x1A') string_'\x1A' )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Write or overwrite a `Survey` to the specified .DAT file
(module (function_definition (function_name__gather_field_values) function_name__gather_field_values (parameters (identifier_item) identifier_item (keyword_separator )keyword_separator (default_parameter (identifier_fields) identifier_fields (None) None )default_parameter (default_parameter (identifier_field_map) identifier_field_map (identifier_FIELD_MAP) identifier_FIELD_MAP )default_parameter (default_parameter (identifier_normalize_values) identifier_normalize_values (False) False )default_parameter (default_parameter (identifier_normalize_func) identifier_normalize_func (identifier_normalize_value) identifier_normalize_value )default_parameter )parameters (block (expression_statement (assignment (identifier_it) identifier_it (call (identifier_get_item_tags) identifier_get_item_tags (argument_list (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_fields) identifier_fields (None) None )comparison_operator (block (expression_statement (assignment (identifier_fields) identifier_fields (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_it) identifier_it (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_normalize) identifier_normalize (conditional_expression (identifier_normalize_func) identifier_normalize_func (identifier_normalize_values) identifier_normalize_values (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (identifier_str) identifier_str (argument_list (identifier_x) identifier_x )argument_list )call )lambda )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_field_values) identifier_field_values (list )list )assignment )expression_statement (for_statement (identifier_field) identifier_field (identifier_fields) identifier_fields (block (expression_statement (call (attribute (identifier_field_values) identifier_field_values (identifier_append) identifier_append )attribute (argument_list (call (identifier_normalize) identifier_normalize (argument_list (call (identifier_list_to_single_value) identifier_list_to_single_value (argument_list (call (identifier_get_field) identifier_get_field (argument_list (identifier_it) identifier_it (identifier_field) identifier_field (keyword_argument (identifier_field_map) identifier_field_map (identifier_field_map) identifier_field_map )keyword_argument )argument_list )call )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list (identifier_field_values) identifier_field_values )argument_list )call )return_statement )block )function_definition )module
Create a tuple of normalized metadata field values. Parameter: item (~collections.abc.Mapping, str, os.PathLike): Item dict or filepath. fields (list): A list of fields used to compare item dicts. field_map (~collections.abc.Mapping): A mapping field name aliases. Default: :data:`~google_music_utils.constants.FIELD_MAP` normalize_values (bool): Normalize metadata values to remove common differences between sources. Default: ``False`` normalize_func (function): Function to apply to metadata values if ``normalize_values`` is ``True``. Default: :func:`~google_music_utils.utils.normalize_value` Returns: tuple: Values from the given metadata fields.
(module (function_definition (function_name_attachment_state) function_name_attachment_state (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_state) identifier_state (None) None )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_attach_data) identifier_attach_data )attribute (block (expression_statement (assignment (identifier_state) identifier_state (attribute (attribute (identifier_self) identifier_self (identifier_attach_data) identifier_attach_data )attribute (identifier_status) identifier_status )attribute )assignment )expression_statement )block )if_statement (return_statement (identifier_state) identifier_state )return_statement )block )function_definition )module
Get the attachment state.
(module (function_definition (function_name_load_files) function_name_load_files (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_verbose) identifier_verbose )attribute (integer_2) integer_2 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Indexing {}") string_"Indexing {}" (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_filename) identifier_filename (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (expression_statement (assignment (identifier_file_path) identifier_file_path (binary_operator (binary_operator (identifier_path) identifier_path (string_"/") string_"/" )binary_operator (identifier_filename) identifier_filename )binary_operator )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_load_files) identifier_load_files )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )expression_statement )block (elif_clause (boolean_operator (call (attribute (identifier_filename) identifier_filename (identifier_endswith) identifier_endswith )attribute (argument_list (string_".yaml") string_".yaml" )argument_list )call (call (attribute (identifier_filename) identifier_filename (identifier_endswith) identifier_endswith )attribute (argument_list (string_".yml") string_".yml" )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_unfold_yaml) identifier_unfold_yaml )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition )module
Loads files in a given path and all its subdirectories
(module (function_definition (function_name_read_version) function_name_read_version (parameters )parameters (block (expression_statement (assignment (identifier_regex) identifier_regex (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (string_'^(?P<number>\d.*?) .*$') string_'^(?P<number>\d.*?) .*$' )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (string_'../CHANGELOG.rst') string_'../CHANGELOG.rst' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_line) identifier_line (identifier_f) identifier_f (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_regex) identifier_regex (identifier_match) identifier_match )attribute (argument_list (identifier_line) identifier_line )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (return_statement (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (string_'number') string_'number' )argument_list )call )return_statement )block )if_statement )block )for_statement )block )with_statement )block )function_definition )module
Read version from the first line starting with digit
(module (function_definition (function_name_get_value) function_name_get_value (parameters (identifier_self) identifier_self (default_parameter (identifier_tag) identifier_tag (None) None )default_parameter (default_parameter (identifier_field) identifier_field (None) None )default_parameter )parameters (block (assert_statement (not_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_tag) identifier_tag (None) None )comparison_operator (comparison_operator (identifier_field) identifier_field (None) None )comparison_operator )boolean_operator )parenthesized_expression )not_operator (string_"Cannot filter by tag and field simultaneously.") string_"Cannot filter by tag and field simultaneously." )assert_statement (expression_statement (assignment (identifier_selected_fields) identifier_selected_fields (call (attribute (identifier_self) identifier_self (identifier__select_by_field_or_tag) identifier__select_by_field_or_tag )attribute (argument_list (identifier_tag) identifier_tag (identifier_field) identifier_field )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_missing_fields_idents) identifier_missing_fields_idents (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_selected_fields) identifier_selected_fields )argument_list )call (call (identifier_set) identifier_set (argument_list (attribute (identifier_self) identifier_self (identifier_field_values) identifier_field_values )attribute )argument_list )call )binary_operator )assignment )expression_statement (if_statement (identifier_missing_fields_idents) identifier_missing_fields_idents (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Cannot generate value with undefined fields {}.") string_"Cannot generate value with undefined fields {}." (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (generator_expression (call (attribute (string_"'{}'") string_"'{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_f) identifier_f )argument_list )call (for_in_clause (identifier_f) identifier_f (identifier_missing_fields_idents) identifier_missing_fields_idents )for_in_clause )generator_expression )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_value) identifier_value (integer_0) integer_0 )assignment )expression_statement (for_statement (pattern_list (identifier_identifier) identifier_identifier (identifier_field) identifier_field )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_selected_fields) identifier_selected_fields )argument_list )call (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_field) identifier_field (identifier_length) identifier_length )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_field) identifier_field (identifier_start_at) identifier_start_at )attribute (None) None )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Field '{}' does not have a fixed size/position.") string_"Field '{}' does not have a fixed size/position." (identifier_format) identifier_format )attribute (argument_list (identifier_identifier) identifier_identifier )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (augmented_assignment (identifier_value) identifier_value (parenthesized_expression (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_field_values) identifier_field_values )attribute (identifier_identifier) identifier_identifier )subscript (attribute (identifier_field) identifier_field (identifier_start_at) identifier_start_at )attribute )binary_operator )parenthesized_expression )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Generate an integer whose bits are set according to the values of fields in this bit field. All other bits are set to zero. Parameters ---------- tag : str Optionally specifies that the value should only include fields with the specified tag. field : str Optionally specifies that the value should only include the specified field. Raises ------ ValueError If a field's value, length or position has not been defined. (e.g. :py:meth:`.assign_fields` has not been called). UnknownTagError If the tag specified using the `tag` argument does not exist. UnavailableFieldError If the field specified using the `field` argument does not exist or is not available.
(module (function_definition (function_name_get_contents_to_filename) function_name_get_contents_to_filename (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename (default_parameter (identifier_headers) identifier_headers (None) None )default_parameter (default_parameter (identifier_cb) identifier_cb (None) None )default_parameter (default_parameter (identifier_num_cb) identifier_num_cb (integer_10) integer_10 )default_parameter (default_parameter (identifier_torrent) identifier_torrent (False) False )default_parameter (default_parameter (identifier_version_id) identifier_version_id (None) None )default_parameter (default_parameter (identifier_res_download_handler) identifier_res_download_handler (None) None )default_parameter (default_parameter (identifier_response_headers) identifier_response_headers (None) None )default_parameter (default_parameter (identifier_callback) identifier_callback (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_fp) identifier_fp (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'wb') string_'wb' )argument_list )call )assignment )expression_statement (function_definition (function_name_got_contents_to_filename) function_name_got_contents_to_filename (parameters (identifier_response) identifier_response )parameters (block (expression_statement (call (attribute (identifier_fp) identifier_fp (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_last_modified) identifier_last_modified )attribute (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_modified_tuple) identifier_modified_tuple (call (attribute (identifier_rfc822) identifier_rfc822 (identifier_parsedate_tz) identifier_parsedate_tz )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_last_modified) identifier_last_modified )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_modified_stamp) identifier_modified_stamp (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_rfc822) identifier_rfc822 (identifier_mktime_tz) identifier_mktime_tz )attribute (argument_list (identifier_modified_tuple) identifier_modified_tuple )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_utime) identifier_utime )attribute (argument_list (attribute (identifier_fp) identifier_fp (identifier_name) identifier_name )attribute (tuple (identifier_modified_stamp) identifier_modified_stamp (identifier_modified_stamp) identifier_modified_stamp )tuple )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (if_statement (call (identifier_callable) identifier_callable (argument_list (identifier_callback) identifier_callback )argument_list )call (block (expression_statement (call (identifier_callback) identifier_callback (argument_list (identifier_response) identifier_response )argument_list )call )expression_statement )block )if_statement )block )function_definition (expression_statement (call (attribute (identifier_self) identifier_self (identifier_get_contents_to_file) identifier_get_contents_to_file )attribute (argument_list (identifier_fp) identifier_fp (identifier_headers) identifier_headers (identifier_cb) identifier_cb (identifier_num_cb) identifier_num_cb (keyword_argument (identifier_torrent) identifier_torrent (identifier_torrent) identifier_torrent )keyword_argument (keyword_argument (identifier_version_id) identifier_version_id (identifier_version_id) identifier_version_id )keyword_argument (keyword_argument (identifier_res_download_handler) identifier_res_download_handler (identifier_res_download_handler) identifier_res_download_handler )keyword_argument (keyword_argument (identifier_response_headers) identifier_response_headers (identifier_response_headers) identifier_response_headers )keyword_argument (keyword_argument (identifier_callback) identifier_callback (identifier_got_contents_to_filename) identifier_got_contents_to_filename )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Retrieve an object from S3 using the name of the Key object as the key in S3. Store contents of the object to a file named by 'filename'. See get_contents_to_file method for details about the parameters. :type filename: string :param filename: The filename of where to put the file contents :type headers: dict :param headers: Any additional headers to send in the request :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type torrent: bool :param torrent: If True, returns the contents of a torrent file as a string. :type res_upload_handler: ResumableDownloadHandler :param res_download_handler: If provided, this handler will perform the download. :type response_headers: dict :param response_headers: A dictionary containing HTTP headers/values that will override any headers associated with the stored object in the response. See http://goo.gl/EWOPb for details.
(module (function_definition (function_name_datetime_to_timestamp) function_name_datetime_to_timestamp (parameters (identifier_dt) identifier_dt )parameters (block (expression_statement (assignment (identifier_epoch) identifier_epoch (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_utcfromtimestamp) identifier_utcfromtimestamp )attribute (argument_list (integer_0) integer_0 )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_tzinfo) identifier_tzinfo (identifier_UTC) identifier_UTC )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (parenthesized_expression (binary_operator (identifier_dt) identifier_dt (identifier_epoch) identifier_epoch )binary_operator )parenthesized_expression (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Convert timezone-aware `datetime` to POSIX timestamp and return seconds since UNIX epoch. Note: similar to `datetime.timestamp()` in Python 3.3+.
(module (function_definition (function_name_check_calling_sequence) function_name_check_calling_sequence (parameters (identifier_name) identifier_name (identifier_function_name) identifier_function_name (identifier_function) identifier_function (identifier_possible_variables) identifier_possible_variables )parameters (block (try_statement (block (expression_statement (assignment (identifier_calling_sequence) identifier_calling_sequence (attribute (call (attribute (identifier_inspect) identifier_inspect (identifier_getargspec) identifier_getargspec )attribute (argument_list (attribute (identifier_function) identifier_function (identifier_input_object) identifier_input_object )attribute )argument_list )call (identifier_args) identifier_args )attribute )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_calling_sequence) identifier_calling_sequence (attribute (call (attribute (identifier_inspect) identifier_inspect (identifier_getargspec) identifier_getargspec )attribute (argument_list (identifier_function) identifier_function )argument_list )call (identifier_args) identifier_args )attribute )assignment )expression_statement )block )except_clause )try_statement (assert_statement (comparison_operator (subscript (identifier_calling_sequence) identifier_calling_sequence (integer_0) integer_0 )subscript (string_'self') string_'self' )comparison_operator (binary_operator (concatenated_string (string_"Wrong syntax for 'evaluate' in %s. The first argument ") string_"Wrong syntax for 'evaluate' in %s. The first argument " (string_"should be called 'self'.") string_"should be called 'self'." )concatenated_string (identifier_name) identifier_name )binary_operator )assert_statement (expression_statement (assignment (identifier_variables) identifier_variables (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_var) identifier_var )lambda_parameters (comparison_operator (identifier_var) identifier_var (identifier_possible_variables) identifier_possible_variables )comparison_operator )lambda (identifier_calling_sequence) identifier_calling_sequence )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_variables) identifier_variables )argument_list )call (integer_0) integer_0 )comparison_operator (binary_operator (concatenated_string (string_"The name of the variables for 'evaluate' in %s must be one or more ") string_"The name of the variables for 'evaluate' in %s must be one or more " (string_"among %s, instead of %s") string_"among %s, instead of %s" )concatenated_string (tuple (identifier_name) identifier_name (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (identifier_possible_variables) identifier_possible_variables )argument_list )call (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (identifier_variables) identifier_variables )argument_list )call )tuple )binary_operator )assert_statement (if_statement (comparison_operator (identifier_variables) identifier_variables (subscript (identifier_possible_variables) identifier_possible_variables (slice (colon) colon (call (identifier_len) identifier_len (argument_list (identifier_variables) identifier_variables )argument_list )call )slice )subscript )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (binary_operator (string_"The variables %s are out of order in '%s' of %s. Should be %s.") string_"The variables %s are out of order in '%s' of %s. Should be %s." (tuple (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (identifier_variables) identifier_variables )argument_list )call (identifier_function_name) identifier_function_name (identifier_name) identifier_name (subscript (identifier_possible_variables) identifier_possible_variables (slice (colon) colon (call (identifier_len) identifier_len (argument_list (identifier_variables) identifier_variables )argument_list )call )slice )subscript )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_other_parameters) identifier_other_parameters (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_var) identifier_var )lambda_parameters (boolean_operator (comparison_operator (identifier_var) identifier_var (identifier_variables) identifier_variables )comparison_operator (comparison_operator (identifier_var) identifier_var (string_'self') string_'self' )comparison_operator )boolean_operator )lambda (identifier_calling_sequence) identifier_calling_sequence )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_variables) identifier_variables (identifier_other_parameters) identifier_other_parameters )expression_list )return_statement )block )function_definition )module
Check the calling sequence for the function looking for the variables specified. One or more of the variables can be in the calling sequence. Note that the order of the variables will be enforced. It will also enforce that the first parameter in the calling sequence is called 'self'. :param function: the function to check :param possible_variables: a list of variables to check, The order is important, and will be enforced :return: a tuple containing the list of found variables, and the name of the other parameters in the calling sequence
(module (function_definition (function_name_fill_zero) function_name_fill_zero (parameters (default_parameter (identifier_x) identifier_x (None) None )default_parameter (default_parameter (identifier_y) identifier_y (None) None )default_parameter (default_parameter (identifier_label) identifier_label (None) None )default_parameter (default_parameter (identifier_color) identifier_color (None) None )default_parameter (default_parameter (identifier_width) identifier_width (None) None )default_parameter (default_parameter (identifier_dash) identifier_dash (None) None )default_parameter (default_parameter (identifier_opacity) identifier_opacity (None) None )default_parameter (default_parameter (identifier_mode) identifier_mode (string_'lines+markers') string_'lines+markers' )default_parameter (dictionary_splat_pattern (identifier_kargs) identifier_kargs )dictionary_splat_pattern )parameters (block (return_statement (call (identifier_line) identifier_line (argument_list (keyword_argument (identifier_x) identifier_x (identifier_x) identifier_x )keyword_argument (keyword_argument (identifier_y) identifier_y (identifier_y) identifier_y )keyword_argument (keyword_argument (identifier_label) identifier_label (identifier_label) identifier_label )keyword_argument (keyword_argument (identifier_color) identifier_color (identifier_color) identifier_color )keyword_argument (keyword_argument (identifier_width) identifier_width (identifier_width) identifier_width )keyword_argument (keyword_argument (identifier_dash) identifier_dash (identifier_dash) identifier_dash )keyword_argument (keyword_argument (identifier_opacity) identifier_opacity (identifier_opacity) identifier_opacity )keyword_argument (keyword_argument (identifier_mode) identifier_mode (identifier_mode) identifier_mode )keyword_argument (keyword_argument (identifier_fill) identifier_fill (string_'tozeroy') string_'tozeroy' )keyword_argument (dictionary_splat (identifier_kargs) identifier_kargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Fill to zero. Parameters ---------- x : array-like, optional y : TODO, optional label : TODO, optional Returns ------- Chart
(module (function_definition (function_name_wrap) function_name_wrap (parameters (identifier_stream) identifier_stream (default_parameter (identifier_unicode) identifier_unicode (False) False )default_parameter (default_parameter (identifier_window) identifier_window (integer_1024) integer_1024 )default_parameter (default_parameter (identifier_echo) identifier_echo (False) False )default_parameter (default_parameter (identifier_close_stream) identifier_close_stream (True) True )default_parameter )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_stream) identifier_stream (string_'read') string_'read' )argument_list )call (block (expression_statement (assignment (identifier_proxy) identifier_proxy (call (identifier_PollingStreamAdapter) identifier_PollingStreamAdapter (argument_list (identifier_stream) identifier_stream )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_stream) identifier_stream (string_'recv') string_'recv' )argument_list )call (block (expression_statement (assignment (identifier_proxy) identifier_proxy (call (identifier_PollingSocketStreamAdapter) identifier_PollingSocketStreamAdapter (argument_list (identifier_stream) identifier_stream )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'stream must have either read or recv method') string_'stream must have either read or recv method' )argument_list )call )raise_statement )block )else_clause )if_statement (if_statement (boolean_operator (identifier_echo) identifier_echo (identifier_unicode) identifier_unicode )boolean_operator (block (expression_statement (assignment (identifier_callback) identifier_callback (identifier__echo_text) identifier__echo_text )assignment )expression_statement )block (elif_clause (boolean_operator (identifier_echo) identifier_echo (not_operator (identifier_unicode) identifier_unicode )not_operator )boolean_operator (block (expression_statement (assignment (identifier_callback) identifier_callback (identifier__echo_bytes) identifier__echo_bytes )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_callback) identifier_callback (None) None )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_unicode) identifier_unicode (block (expression_statement (assignment (identifier_expecter) identifier_expecter (call (identifier_TextExpecter) identifier_TextExpecter (argument_list (identifier_proxy) identifier_proxy (keyword_argument (identifier_input_callback) identifier_input_callback (identifier_callback) identifier_callback )keyword_argument (keyword_argument (identifier_window) identifier_window (identifier_window) identifier_window )keyword_argument (keyword_argument (identifier_close_adapter) identifier_close_adapter (identifier_close_stream) identifier_close_stream )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_expecter) identifier_expecter (call (identifier_BytesExpecter) identifier_BytesExpecter (argument_list (identifier_proxy) identifier_proxy (keyword_argument (identifier_input_callback) identifier_input_callback (identifier_callback) identifier_callback )keyword_argument (keyword_argument (identifier_window) identifier_window (identifier_window) identifier_window )keyword_argument (keyword_argument (identifier_close_adapter) identifier_close_adapter (identifier_close_stream) identifier_close_stream )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_expecter) identifier_expecter )return_statement )block )function_definition )module
Wrap a stream to implement expect functionality. This function provides a convenient way to wrap any Python stream (a file-like object) or socket with an appropriate :class:`Expecter` class for the stream type. The returned object adds an :func:`Expect.expect` method to the stream, while passing normal stream functions like *read*/*recv* and *write*/*send* through to the underlying stream. Here's an example of opening and wrapping a pair of network sockets:: import socket import streamexpect source, drain = socket.socketpair() expecter = streamexpect.wrap(drain) source.sendall(b'this is a test') match = expecter.expect_bytes(b'test', timeout=5) assert match is not None :param stream: The stream/socket to wrap. :param bool unicode: If ``True``, the wrapper will be configured for Unicode matching, otherwise matching will be done on binary. :param int window: Historical characters to buffer. :param bool echo: If ``True``, echoes received characters to stdout. :param bool close_stream: If ``True``, and the wrapper is used as a context manager, closes the stream at the end of the context manager.
(module (function_definition (function_name_can_edit) function_name_can_edit (parameters (identifier_self) identifier_self (identifier_user) identifier_user )parameters (block (return_statement (boolean_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_class_) identifier_class_ )attribute (identifier_can_edit) identifier_can_edit )attribute (argument_list (identifier_user) identifier_user )argument_list )call (comparison_operator (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (string_u'locked') string_u'locked' )comparison_operator )boolean_operator )return_statement )block )function_definition )module
Return whether or not `user` can make changes to the project.
(module (function_definition (function_name_compress_monkey_patch) function_name_compress_monkey_patch (parameters )parameters (block (import_from_statement (dotted_name (identifier_compressor) identifier_compressor (identifier_templatetags) identifier_templatetags )dotted_name (aliased_import (dotted_name (identifier_compress) identifier_compress )dotted_name (identifier_compress_tags) identifier_compress_tags )aliased_import )import_from_statement (import_from_statement (dotted_name (identifier_compressor) identifier_compressor )dotted_name (aliased_import (dotted_name (identifier_base) identifier_base )dotted_name (identifier_compress_base) identifier_compress_base )aliased_import )import_from_statement (expression_statement (assignment (attribute (attribute (identifier_compress_base) identifier_compress_base (identifier_Compressor) identifier_Compressor )attribute (identifier_filter_input) identifier_filter_input )attribute (identifier_filter_input) identifier_filter_input )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_compress_base) identifier_compress_base (identifier_Compressor) identifier_Compressor )attribute (identifier_output) identifier_output )attribute (identifier_output) identifier_output )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_compress_base) identifier_compress_base (identifier_Compressor) identifier_Compressor )attribute (identifier_hunks) identifier_hunks )attribute (identifier_hunks) identifier_hunks )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_compress_base) identifier_compress_base (identifier_Compressor) identifier_Compressor )attribute (identifier_precompile) identifier_precompile )attribute (identifier_precompile) identifier_precompile )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_compress_tags) identifier_compress_tags (identifier_CompressorMixin) identifier_CompressorMixin )attribute (identifier_render_compressed) identifier_render_compressed )attribute (identifier_render_compressed) identifier_render_compressed )assignment )expression_statement (import_from_statement (dotted_name (identifier_django_pyscss) identifier_django_pyscss )dotted_name (aliased_import (dotted_name (identifier_compressor) identifier_compressor )dotted_name (identifier_pyscss_compressor) identifier_pyscss_compressor )aliased_import )import_from_statement (expression_statement (assignment (attribute (attribute (identifier_pyscss_compressor) identifier_pyscss_compressor (identifier_DjangoScssFilter) identifier_DjangoScssFilter )attribute (identifier_input) identifier_input )attribute (identifier_input) identifier_input )assignment )expression_statement )block )function_definition )module
patch all compress we need access to variables from widget scss for example we have:: /themes/bootswatch/cyborg/_variables but only if is cyborg active for this reasone we need dynamically append import to every scss file
(module (function_definition (function_name_xraw_command) function_name_xraw_command (parameters (identifier_self) identifier_self (identifier_netfn) identifier_netfn (identifier_command) identifier_command (default_parameter (identifier_bridge_request) identifier_bridge_request (tuple )tuple )default_parameter (default_parameter (identifier_data) identifier_data (tuple )tuple )default_parameter (default_parameter (identifier_delay_xmit) identifier_delay_xmit (None) None )default_parameter (default_parameter (identifier_retry) identifier_retry (True) True )default_parameter (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_rsp) identifier_rsp (call (attribute (attribute (identifier_self) identifier_self (identifier_ipmi_session) identifier_ipmi_session )attribute (identifier_raw_command) identifier_raw_command )attribute (argument_list (keyword_argument (identifier_netfn) identifier_netfn (identifier_netfn) identifier_netfn )keyword_argument (keyword_argument (identifier_command) identifier_command (identifier_command) identifier_command )keyword_argument (keyword_argument (identifier_bridge_request) identifier_bridge_request (identifier_bridge_request) identifier_bridge_request )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_delay_xmit) identifier_delay_xmit (identifier_delay_xmit) identifier_delay_xmit )keyword_argument (keyword_argument (identifier_retry) identifier_retry (identifier_retry) identifier_retry )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'error') string_'error' (identifier_rsp) identifier_rsp )comparison_operator (block (raise_statement (call (attribute (identifier_exc) identifier_exc (identifier_IpmiException) identifier_IpmiException )attribute (argument_list (subscript (identifier_rsp) identifier_rsp (string_'error') string_'error' )subscript (subscript (identifier_rsp) identifier_rsp (string_'code') string_'code' )subscript )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (identifier_rsp) identifier_rsp (string_'data') string_'data' )subscript (call (identifier_buffer) identifier_buffer (argument_list (subscript (identifier_rsp) identifier_rsp (string_'data') string_'data' )subscript )argument_list )call )assignment )expression_statement (return_statement (identifier_rsp) identifier_rsp )return_statement )block )function_definition )module
Send raw ipmi command to BMC, raising exception on error This is identical to raw_command, except it raises exceptions on IPMI errors and returns data as a buffer. This is the recommend function to use. The response['data'] being a buffer allows traditional indexed access as well as works nicely with struct.unpack_from when certain data is coming back. :param netfn: Net function number :param command: Command value :param bridge_request: The target slave address and channel number for the bridge request. :param data: Command data as a tuple or list :param retry: Whether to retry this particular payload or not, defaults to true. :param timeout: A custom time to wait for initial reply, useful for a slow command. This may interfere with retry logic. :returns: dict -- The response from IPMI device
(module (function_definition (function_name_get_all_submissions) function_name_get_all_submissions (parameters (identifier_course_id) identifier_course_id (identifier_item_id) identifier_item_id (identifier_item_type) identifier_item_type (default_parameter (identifier_read_replica) identifier_read_replica (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_submission_qs) identifier_submission_qs (attribute (identifier_Submission) identifier_Submission (identifier_objects) identifier_objects )attribute )assignment )expression_statement (if_statement (identifier_read_replica) identifier_read_replica (block (expression_statement (assignment (identifier_submission_qs) identifier_submission_qs (call (identifier__use_read_replica) identifier__use_read_replica (argument_list (identifier_submission_qs) identifier_submission_qs )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (call (attribute (call (attribute (call (attribute (identifier_submission_qs) identifier_submission_qs (identifier_select_related) identifier_select_related )attribute (argument_list (string_'student_item') string_'student_item' )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_student_item__course_id) identifier_student_item__course_id (identifier_course_id) identifier_course_id )keyword_argument (keyword_argument (identifier_student_item__item_id) identifier_student_item__item_id (identifier_item_id) identifier_item_id )keyword_argument (keyword_argument (identifier_student_item__item_type) identifier_student_item__item_type (identifier_item_type) identifier_item_type )keyword_argument )argument_list )call (identifier_order_by) identifier_order_by )attribute (argument_list (string_'student_item__student_id') string_'student_item__student_id' (string_'-submitted_at') string_'-submitted_at' (string_'-id') string_'-id' )argument_list )call (identifier_iterator) identifier_iterator )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_unused_student_id) identifier_unused_student_id (identifier_row_iter) identifier_row_iter )pattern_list (call (attribute (identifier_itertools) identifier_itertools (identifier_groupby) identifier_groupby )attribute (argument_list (identifier_query) identifier_query (call (attribute (identifier_operator) identifier_operator (identifier_attrgetter) identifier_attrgetter )attribute (argument_list (string_'student_item.student_id') string_'student_item.student_id' )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_submission) identifier_submission (call (identifier_next) identifier_next (argument_list (identifier_row_iter) identifier_row_iter )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (attribute (call (identifier_SubmissionSerializer) identifier_SubmissionSerializer (argument_list (identifier_submission) identifier_submission )argument_list )call (identifier_data) identifier_data )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'student_id') string_'student_id' )subscript (attribute (attribute (identifier_submission) identifier_submission (identifier_student_item) identifier_student_item )attribute (identifier_student_id) identifier_student_id )attribute )assignment )expression_statement (expression_statement (yield (identifier_data) identifier_data )yield )expression_statement )block )for_statement )block )function_definition )module
For the given item, get the most recent submission for every student who has submitted. This may return a very large result set! It is implemented as a generator for efficiency. Args: course_id, item_id, item_type (string): The values of the respective student_item fields to filter the submissions by. read_replica (bool): If true, attempt to use the read replica database. If no read replica is available, use the default database. Yields: Dicts representing the submissions with the following fields: student_item student_id attempt_number submitted_at created_at answer Raises: Cannot fail unless there's a database error, but may return an empty iterable.
(module (function_definition (function_name__to_utc) function_name__to_utc (parameters (identifier_self) identifier_self (identifier_dt) identifier_dt )parameters (block (expression_statement (assignment (identifier_tz) identifier_tz (call (attribute (identifier_self) identifier_self (identifier__get_tz) identifier__get_tz )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_loc_dt) identifier_loc_dt (call (attribute (identifier_tz) identifier_tz (identifier_localize) identifier_localize )attribute (argument_list (identifier_dt) identifier_dt )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_loc_dt) identifier_loc_dt (identifier_astimezone) identifier_astimezone )attribute (argument_list (attribute (identifier_pytz) identifier_pytz (identifier_utc) identifier_utc )attribute )argument_list )call )return_statement )block )function_definition )module
Takes a naive timezone with an localized value and return it formatted as utc.
(module (function_definition (function_name_check_key) function_name_check_key (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_key_size) identifier_key_size )attribute (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call (attribute (identifier_self) identifier_self (identifier_key_size) identifier_key_size )attribute )comparison_operator )boolean_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'invalid key size %s, must be one of %s') string_'invalid key size %s, must be one of %s' (tuple (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call (attribute (identifier_self) identifier_self (identifier_key_size) identifier_key_size )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Check that the key length is valid. @param key: a byte string
(module (function_definition (function_name__annotation_handler) function_name__annotation_handler (parameters (identifier_ion_type) identifier_ion_type (identifier_length) identifier_length (identifier_ctx) identifier_ctx )parameters (block (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_self) identifier_self )pattern_list (yield )yield )assignment )expression_statement (expression_statement (assignment (identifier_self_handler) identifier_self_handler (call (identifier__create_delegate_handler) identifier__create_delegate_handler (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_ctx) identifier_ctx (identifier_annotations) identifier_annotations )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_IonException) identifier_IonException (argument_list (string_'Annotation cannot be nested in annotations') string_'Annotation cannot be nested in annotations' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_ctx) identifier_ctx (call (attribute (identifier_ctx) identifier_ctx (identifier_derive_container_context) identifier_derive_container_context )attribute (argument_list (identifier_length) identifier_length (keyword_argument (identifier_add_depth) identifier_add_depth (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (tuple_pattern (identifier_ann_length) identifier_ann_length (identifier__) identifier__ )tuple_pattern (identifier__) identifier__ )pattern_list (yield (call (attribute (identifier_ctx) identifier_ctx (identifier_immediate_transition) identifier_immediate_transition )attribute (argument_list (call (identifier__var_uint_field_handler) identifier__var_uint_field_handler (argument_list (identifier_self_handler) identifier_self_handler (identifier_ctx) identifier_ctx )argument_list )call )argument_list )call )yield )assignment )expression_statement (if_statement (comparison_operator (identifier_ann_length) identifier_ann_length (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_IonException) identifier_IonException (argument_list (string_'Invalid annotation length subfield; annotation wrapper must have at least one annotation.') string_'Invalid annotation length subfield; annotation wrapper must have at least one annotation.' )argument_list )call )raise_statement )block )if_statement (expression_statement (yield (call (attribute (identifier_ctx) identifier_ctx (identifier_read_data_transition) identifier_read_data_transition )attribute (argument_list (identifier_ann_length) identifier_ann_length (identifier_self) identifier_self )argument_list )call )yield )expression_statement (expression_statement (assignment (identifier_ann_data) identifier_ann_data (call (attribute (attribute (identifier_ctx) identifier_ctx (identifier_queue) identifier_queue )attribute (identifier_read) identifier_read )attribute (argument_list (identifier_ann_length) identifier_ann_length )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_annotations) identifier_annotations (call (identifier_tuple) identifier_tuple (argument_list (call (identifier__parse_sid_iter) identifier__parse_sid_iter (argument_list (identifier_ann_data) identifier_ann_data )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (binary_operator (attribute (identifier_ctx) identifier_ctx (identifier_limit) identifier_limit )attribute (attribute (attribute (identifier_ctx) identifier_ctx (identifier_queue) identifier_queue )attribute (identifier_position) identifier_position )attribute )binary_operator (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_IonException) identifier_IonException (argument_list (string_'Incorrect annotation wrapper length.') string_'Incorrect annotation wrapper length.' )argument_list )call )raise_statement )block )if_statement (expression_statement (yield (call (attribute (identifier_ctx) identifier_ctx (identifier_immediate_transition) identifier_immediate_transition )attribute (argument_list (call (identifier__start_type_handler) identifier__start_type_handler (argument_list (attribute (identifier_ctx) identifier_ctx (identifier_field_name) identifier_field_name )attribute (attribute (identifier_ctx) identifier_ctx (identifier_whence) identifier_whence )attribute (identifier_ctx) identifier_ctx (keyword_argument (identifier_annotations) identifier_annotations (identifier_annotations) identifier_annotations )keyword_argument )argument_list )call )argument_list )call )yield )expression_statement )block )function_definition )module
Handles annotations. ``ion_type`` is ignored.
(module (function_definition (function_name_listen) function_name_listen (parameters )parameters (block (expression_statement (assignment (identifier_msg) identifier_msg (call (identifier_MSG) identifier_MSG (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_ctypes) identifier_ctypes (identifier_windll) identifier_windll )attribute (identifier_user32) identifier_user32 )attribute (identifier_GetMessageA) identifier_GetMessageA )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 )argument_list )call )expression_statement )block )function_definition )module
Listen for keyboard input.
(module (function_definition (function_name_get_current_user) function_name_get_current_user (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_url) identifier_url (attribute (identifier_self) identifier_self (identifier_current_user_url) identifier_current_user_url )attribute )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Get data from the current user endpoint
(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 (comparison_operator (string_'tokens') string_'tokens' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'tokens') string_'tokens' )subscript (list_comprehension (call (attribute (identifier_TokenResult) identifier_TokenResult (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_'tokens') string_'tokens' )argument_list )call )parenthesized_expression )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'sentences') string_'sentences' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'sentences') string_'sentences' )subscript (list_comprehension (call (attribute (identifier_SentenceResult) identifier_SentenceResult (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_'sentences') string_'sentences' )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 SyntaxResult object from a json dictionary.
(module (function_definition (function_name_get_list_from_file) function_name_get_list_from_file (parameters (identifier_file_name) identifier_file_name )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_file_name) identifier_file_name (keyword_argument (identifier_mode) identifier_mode (string_'r') string_'r' )keyword_argument (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument )argument_list )call (as_pattern_target (identifier_f1) identifier_f1 )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_lst) identifier_lst (call (attribute (identifier_f1) identifier_f1 (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement (return_statement (identifier_lst) identifier_lst )return_statement )block )function_definition )module
read the lines from a file into a list
(module (function_definition (function_name_template_sunmoon) function_name_template_sunmoon (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_kwargs_copy) identifier_kwargs_copy (call (attribute (attribute (identifier_self) identifier_self (identifier_base_dict) identifier_base_dict )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_kwargs_copy) identifier_kwargs_copy (identifier_update) identifier_update )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_kwargs_copy) identifier_kwargs_copy (string_'dataset') string_'dataset' )subscript (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'dataset') string_'dataset' (call (attribute (identifier_self) identifier_self (identifier_dataset) identifier_dataset )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_kwargs_copy) identifier_kwargs_copy (string_'component') string_'component' )subscript (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'component') string_'component' (call (attribute (identifier_self) identifier_self (identifier_component) identifier_component )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__replace_none) identifier__replace_none )attribute (argument_list (identifier_kwargs_copy) identifier_kwargs_copy )argument_list )call )expression_statement (expression_statement (assignment (identifier_localpath) identifier_localpath (call (attribute (attribute (identifier_NameFactory) identifier_NameFactory (identifier_templatesunmoon_format) identifier_templatesunmoon_format )attribute (identifier_format) identifier_format )attribute (argument_list (dictionary_splat (identifier_kwargs_copy) identifier_kwargs_copy )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'fullpath') string_'fullpath' (False) False )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_fullpath) identifier_fullpath )attribute (argument_list (keyword_argument (identifier_localpath) identifier_localpath (identifier_localpath) identifier_localpath )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (identifier_localpath) identifier_localpath )return_statement )block )function_definition )module
return the file name for sun or moon template files
(module (function_definition (function_name_visit_break) function_name_visit_break (parameters (identifier_self) identifier_self (identifier_node) identifier_node (identifier_parent) identifier_parent )parameters (block (return_statement (call (attribute (identifier_nodes) identifier_nodes (identifier_Break) identifier_Break )attribute (argument_list (call (identifier_getattr) identifier_getattr (argument_list (identifier_node) identifier_node (string_"lineno") string_"lineno" (None) None )argument_list )call (call (identifier_getattr) identifier_getattr (argument_list (identifier_node) identifier_node (string_"col_offset") string_"col_offset" (None) None )argument_list )call (identifier_parent) identifier_parent )argument_list )call )return_statement )block )function_definition )module
visit a Break node by returning a fresh instance of it
(module (function_definition (function_name_from_path) function_name_from_path (parameters (identifier_cls) identifier_cls (list_splat_pattern (identifier_path) identifier_path )list_splat_pattern (default_parameter (identifier_namespace) identifier_namespace (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_parent) identifier_parent (None) None )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_path) identifier_path )argument_list )call (integer_2) integer_2 )argument_list )call (block (expression_statement (assignment (identifier_parent) identifier_parent (call (identifier_cls) identifier_cls (argument_list (list_splat (subscript (identifier_path) identifier_path (slice (identifier_i) identifier_i (colon) colon (binary_operator (identifier_i) identifier_i (integer_2) integer_2 )binary_operator )slice )subscript )list_splat (keyword_argument (identifier_parent) identifier_parent (identifier_parent) identifier_parent )keyword_argument (keyword_argument (identifier_namespace) identifier_namespace (identifier_namespace) identifier_namespace )keyword_argument )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_parent) identifier_parent )return_statement )block )function_definition )module
Build up a Datastore key from a path. Parameters: \*path(tuple[str or int]): The path segments. namespace(str): An optional namespace for the key. This is applied to each key in the tree. Returns: anom.Key: The Datastore represented by the given path.
(module (function_definition (function_name_get_role) function_name_get_role (parameters (identifier_resource_root) identifier_resource_root (identifier_service_name) identifier_service_name (identifier_name) identifier_name (default_parameter (identifier_cluster_name) identifier_cluster_name (string_"default") string_"default" )default_parameter )parameters (block (return_statement (call (identifier__get_role) identifier__get_role (argument_list (identifier_resource_root) identifier_resource_root (call (identifier__get_role_path) identifier__get_role_path (argument_list (identifier_cluster_name) identifier_cluster_name (identifier_service_name) identifier_service_name (identifier_name) identifier_name )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Lookup a role by name @param resource_root: The root Resource object. @param service_name: Service name @param name: Role name @param cluster_name: Cluster name @return: An ApiRole object
(module (function_definition (function_name_ppo_original_world_model_stochastic_discrete) function_name_ppo_original_world_model_stochastic_discrete (parameters )parameters (block (expression_statement (assignment (identifier_hparams) identifier_hparams (call (identifier_ppo_original_params) identifier_ppo_original_params (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_policy_network) identifier_policy_network )attribute (string_"next_frame_basic_stochastic_discrete") string_"next_frame_basic_stochastic_discrete" )assignment )expression_statement (expression_statement (assignment (identifier_hparams_keys) identifier_hparams_keys (call (attribute (call (attribute (identifier_hparams) identifier_hparams (identifier_values) identifier_values )attribute (argument_list )argument_list )call (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_video_hparams) identifier_video_hparams (call (attribute (identifier_basic_stochastic) identifier_basic_stochastic (identifier_next_frame_basic_stochastic_discrete) identifier_next_frame_basic_stochastic_discrete )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_name) identifier_name (identifier_value) identifier_value )tuple_pattern (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (call (attribute (identifier_video_hparams) identifier_video_hparams (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call (block (if_statement (comparison_operator (identifier_name) identifier_name (identifier_hparams_keys) identifier_hparams_keys )comparison_operator (block (expression_statement (call (attribute (identifier_hparams) identifier_hparams (identifier_set_hparam) identifier_set_hparam )attribute (argument_list (identifier_name) identifier_name (identifier_value) identifier_value )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_hparams) identifier_hparams (identifier_add_hparam) identifier_add_hparam )attribute (argument_list (identifier_name) identifier_name (identifier_value) identifier_value )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_optimization_batch_size) identifier_optimization_batch_size )attribute (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_weight_decay) identifier_weight_decay )attribute (integer_0) integer_0 )assignment )expression_statement (return_statement (identifier_hparams) identifier_hparams )return_statement )block )function_definition )module
Atari parameters with stochastic discrete world model as policy.
(module (function_definition (function_name_add_update) function_name_add_update (parameters (identifier_self) identifier_self (identifier_selector) identifier_selector (identifier_update) identifier_update (default_parameter (identifier_multi) identifier_multi (False) False )default_parameter (default_parameter (identifier_upsert) identifier_upsert (False) False )default_parameter (default_parameter (identifier_collation) identifier_collation (None) None )default_parameter (default_parameter (identifier_array_filters) identifier_array_filters (None) None )default_parameter )parameters (block (expression_statement (call (identifier_validate_ok_for_update) identifier_validate_ok_for_update (argument_list (identifier_update) identifier_update )argument_list )call )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (identifier_SON) identifier_SON (argument_list (list (tuple (string_'q') string_'q' (identifier_selector) identifier_selector )tuple (tuple (string_'u') string_'u' (identifier_update) identifier_update )tuple (tuple (string_'multi') string_'multi' (identifier_multi) identifier_multi )tuple (tuple (string_'upsert') string_'upsert' (identifier_upsert) identifier_upsert )tuple )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_collation) identifier_collation (call (identifier_validate_collation_or_none) identifier_validate_collation_or_none (argument_list (identifier_collation) identifier_collation )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_collation) identifier_collation (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_uses_collation) identifier_uses_collation )attribute (True) True )assignment )expression_statement (expression_statement (assignment (subscript (identifier_cmd) identifier_cmd (string_'collation') string_'collation' )subscript (identifier_collation) identifier_collation )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_array_filters) identifier_array_filters (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_uses_array_filters) identifier_uses_array_filters )attribute (True) True )assignment )expression_statement (expression_statement (assignment (subscript (identifier_cmd) identifier_cmd (string_'arrayFilters') string_'arrayFilters' )subscript (identifier_array_filters) identifier_array_filters )assignment )expression_statement )block )if_statement (if_statement (identifier_multi) identifier_multi (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_is_retryable) identifier_is_retryable )attribute (False) False )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ops) identifier_ops )attribute (identifier_append) identifier_append )attribute (argument_list (tuple (identifier__UPDATE) identifier__UPDATE (identifier_cmd) identifier_cmd )tuple )argument_list )call )expression_statement )block )function_definition )module
Create an update document and add it to the list of ops.
(module (function_definition (function_name_get_sig_info) function_name_get_sig_info (parameters (identifier_hdr) identifier_hdr )parameters (block (expression_statement (assignment (identifier_string) identifier_string (string_'%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|') string_'%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|' )assignment )expression_statement (expression_statement (assignment (identifier_siginfo) identifier_siginfo (call (attribute (identifier_hdr) identifier_hdr (identifier_sprintf) identifier_sprintf )attribute (argument_list (identifier_string) identifier_string )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_siginfo) identifier_siginfo (string_'(none)') string_'(none)' )comparison_operator (block (expression_statement (assignment (identifier_error) identifier_error (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_sigtype) identifier_sigtype (identifier_sigdate) identifier_sigdate (identifier_sigid) identifier_sigid )pattern_list (call (attribute (identifier_siginfo) identifier_siginfo (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_error) identifier_error (integer_101) integer_101 )assignment )expression_statement (expression_statement (assignment (identifier_sigtype) identifier_sigtype (string_'MD5') string_'MD5' )assignment )expression_statement (expression_statement (assignment (identifier_sigdate) identifier_sigdate (string_'None') string_'None' )assignment )expression_statement (expression_statement (assignment (identifier_sigid) identifier_sigid (string_'None') string_'None' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_infotuple) identifier_infotuple (tuple (identifier_sigtype) identifier_sigtype (identifier_sigdate) identifier_sigdate (identifier_sigid) identifier_sigid )tuple )assignment )expression_statement (return_statement (expression_list (identifier_error) identifier_error (identifier_infotuple) identifier_infotuple )expression_list )return_statement )block )function_definition )module
hand back signature information and an error code Shamelessly stolen from Seth Vidal http://yum.baseurl.org/download/misc/checksig.py
(module (function_definition (function_name_name) function_name_name (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__name_map) identifier__name_map )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__name_map) identifier__name_map )attribute (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___dict__) identifier___dict__ )attribute (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 (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__name_map) identifier__name_map )attribute (identifier_value) identifier_value )subscript (identifier_key) identifier_key )assignment )expression_statement )block )if_statement )block )for_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__name_map) identifier__name_map )attribute (identifier_self) identifier_self )subscript )return_statement )block )function_definition )module
Get the enumeration name of this cursor kind.
(module (function_definition (function_name_days_and_sids_for_frames) function_name_days_and_sids_for_frames (parameters (identifier_frames) identifier_frames )parameters (block (if_statement (not_operator (identifier_frames) identifier_frames )not_operator (block (expression_statement (assignment (identifier_days) identifier_days (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list )list (keyword_argument (identifier_dtype) identifier_dtype (string_'datetime64[ns]') string_'datetime64[ns]' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sids) identifier_sids (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list )list (keyword_argument (identifier_dtype) identifier_dtype (string_'int64') string_'int64' )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_days) identifier_days (identifier_sids) identifier_sids )expression_list )return_statement )block )if_statement (expression_statement (call (identifier_check_indexes_all_same) identifier_check_indexes_all_same (argument_list (list_comprehension (attribute (identifier_frame) identifier_frame (identifier_index) identifier_index )attribute (for_in_clause (identifier_frame) identifier_frame (identifier_frames) identifier_frames )for_in_clause )list_comprehension (keyword_argument (identifier_message) identifier_message (string_'Frames have mistmatched days.') string_'Frames have mistmatched days.' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_check_indexes_all_same) identifier_check_indexes_all_same (argument_list (list_comprehension (attribute (identifier_frame) identifier_frame (identifier_columns) identifier_columns )attribute (for_in_clause (identifier_frame) identifier_frame (identifier_frames) identifier_frames )for_in_clause )list_comprehension (keyword_argument (identifier_message) identifier_message (string_'Frames have mismatched sids.') string_'Frames have mismatched sids.' )keyword_argument )argument_list )call )expression_statement (return_statement (expression_list (attribute (attribute (subscript (identifier_frames) identifier_frames (integer_0) integer_0 )subscript (identifier_index) identifier_index )attribute (identifier_values) identifier_values )attribute (attribute (attribute (subscript (identifier_frames) identifier_frames (integer_0) integer_0 )subscript (identifier_columns) identifier_columns )attribute (identifier_values) identifier_values )attribute )expression_list )return_statement )block )function_definition )module
Returns the date index and sid columns shared by a list of dataframes, ensuring they all match. Parameters ---------- frames : list[pd.DataFrame] A list of dataframes indexed by day, with a column per sid. Returns ------- days : np.array[datetime64[ns]] The days in these dataframes. sids : np.array[int64] The sids in these dataframes. Raises ------ ValueError If the dataframes passed are not all indexed by the same days and sids.
(module (function_definition (function_name_get_source) function_name_get_source (parameters (identifier_self) identifier_self (typed_parameter (identifier_environment) identifier_environment (type (identifier_Environment) identifier_Environment )type )typed_parameter (typed_parameter (identifier_template) identifier_template (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_str) identifier_str )type (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (type (identifier_Callable) identifier_Callable )type )type_parameter )generic_type )type (block (for_statement (identifier_loader) identifier_loader (call (attribute (identifier_self) identifier_self (identifier__loaders) identifier__loaders )attribute (argument_list )argument_list )call (block (try_statement (block (return_statement (call (attribute (identifier_loader) identifier_loader (identifier_get_source) identifier_get_source )attribute (argument_list (identifier_environment) identifier_environment (identifier_template) identifier_template )argument_list )call )return_statement )block (except_clause (identifier_TemplateNotFound) identifier_TemplateNotFound (block (continue_statement )continue_statement )block )except_clause )try_statement )block )for_statement (raise_statement (call (identifier_TemplateNotFound) identifier_TemplateNotFound (argument_list (identifier_template) identifier_template )argument_list )call )raise_statement )block )function_definition )module
Returns the template source from the environment. This considers the loaders on the :attr:`app` and blueprints.
(module (function_definition (function_name_get_public_orders) function_name_get_public_orders (parameters (identifier_self) identifier_self (default_parameter (identifier_group) identifier_group (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (argument_list (string_'get public orders') string_'get public orders' )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__rest_client) identifier__rest_client )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_endpoint) identifier_endpoint (string_'/order_book') string_'/order_book' )keyword_argument (keyword_argument (identifier_params) identifier_params (dictionary (pair (string_'book') string_'book' (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )pair (pair (string_'group') string_'group' (call (identifier_int) identifier_int (argument_list (identifier_group) identifier_group )argument_list )call )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return public orders that are currently open. :param group: If set to True (default: False), orders with the same price are grouped. :type group: bool :return: Public orders currently open. :rtype: dict
(module (function_definition (function_name_get_datastream) function_name_get_datastream (parameters (identifier_self) identifier_self (identifier_datastream) identifier_datastream )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_http) identifier_http )attribute (identifier_get) identifier_get )attribute (argument_list (binary_operator (string_'/Datastream/') string_'/Datastream/' (call (identifier_str) identifier_str (argument_list (identifier_datastream) identifier_datastream )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_datastream) identifier_datastream (call (attribute (identifier_Schemas) identifier_Schemas (identifier_Datastream) identifier_Datastream )attribute (argument_list (keyword_argument (identifier_datastream) identifier_datastream (identifier_response) identifier_response )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_datastream) identifier_datastream )return_statement )block )function_definition )module
To get Datastream by id
(module (function_definition (function_name_text_extents) function_name_text_extents (parameters (identifier_self) identifier_self (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_extents) identifier_extents (call (attribute (identifier_ffi) identifier_ffi (identifier_new) identifier_new )attribute (argument_list (string_'cairo_text_extents_t *') string_'cairo_text_extents_t *' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cairo) identifier_cairo (identifier_cairo_text_extents) identifier_cairo_text_extents )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__pointer) identifier__pointer )attribute (call (identifier__encode_string) identifier__encode_string (argument_list (identifier_text) identifier_text )argument_list )call (identifier_extents) identifier_extents )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_status) identifier__check_status )attribute (argument_list )argument_list )call )expression_statement (return_statement (tuple (attribute (identifier_extents) identifier_extents (identifier_x_bearing) identifier_x_bearing )attribute (attribute (identifier_extents) identifier_extents (identifier_y_bearing) identifier_y_bearing )attribute (attribute (identifier_extents) identifier_extents (identifier_width) identifier_width )attribute (attribute (identifier_extents) identifier_extents (identifier_height) identifier_height )attribute (attribute (identifier_extents) identifier_extents (identifier_x_advance) identifier_x_advance )attribute (attribute (identifier_extents) identifier_extents (identifier_y_advance) identifier_y_advance )attribute )tuple )return_statement )block )function_definition )module
Returns the extents for a string of text. The extents describe a user-space rectangle that encloses the "inked" portion of the text, (as it would be drawn by :meth:`show_text`). Additionally, the :obj:`x_advance` and :obj:`y_advance` values indicate the amount by which the current point would be advanced by :meth:`show_text`. Note that whitespace characters do not directly contribute to the size of the rectangle (:obj:`width` and :obj:`height`). They do contribute indirectly by changing the position of non-whitespace characters. In particular, trailing whitespace characters are likely to not affect the size of the rectangle, though they will affect the x_advance and y_advance values. Because text extents are in user-space coordinates, they are mostly, but not entirely, independent of the current transformation matrix. If you call :meth:`context.scale(2) <scale>`, text will be drawn twice as big, but the reported text extents will not be doubled. They will change slightly due to hinting (so you can't assume that metrics are independent of the transformation matrix), but otherwise will remain unchanged. :param text: The text to measure, as an Unicode or UTF-8 string. :returns: A ``(x_bearing, y_bearing, width, height, x_advance, y_advance)`` tuple of floats. :obj:`x_bearing` The horizontal distance from the origin to the leftmost part of the glyphs as drawn. Positive if the glyphs lie entirely to the right of the origin. :obj:`y_bearing` The vertical distance from the origin to the topmost part of the glyphs as drawn. Positive only if the glyphs lie completely below the origin; will usually be negative. :obj:`width` Width of the glyphs as drawn. :obj:`height` Height of the glyphs as drawn. :obj:`x_advance` Distance to advance in the X direction after drawing these glyphs. :obj:`y_advance` Distance to advance in the Y direction after drawing these glyphs. Will typically be zero except for vertical text layout as found in East-Asian languages.
(module (function_definition (function_name_get_objective) function_name_get_objective (parameters (identifier_self) identifier_self (identifier_sampler) identifier_sampler )parameters (block (function_definition (function_name_objective) function_name_objective (parameters (identifier_params) identifier_params )parameters (block (expression_statement (assignment (identifier_circuit) identifier_circuit (call (attribute (identifier_self) identifier_self (identifier_get_circuit) identifier_get_circuit )attribute (argument_list (identifier_params) identifier_params )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_circuit) identifier_circuit (identifier_make_cache) identifier_make_cache )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_energy) identifier_get_energy )attribute (argument_list (identifier_circuit) identifier_circuit (identifier_sampler) identifier_sampler )argument_list )call )return_statement )block )function_definition (return_statement (identifier_objective) identifier_objective )return_statement )block )function_definition )module
Get an objective function to be optimized.
(module (function_definition (function_name_add_shortcut_to_tooltip) function_name_add_shortcut_to_tooltip (parameters (identifier_action) identifier_action (identifier_context) identifier_context (identifier_name) identifier_name )parameters (block (expression_statement (call (attribute (identifier_action) identifier_action (identifier_setToolTip) identifier_setToolTip )attribute (argument_list (binary_operator (call (attribute (identifier_action) identifier_action (identifier_toolTip) identifier_toolTip )attribute (argument_list )argument_list )call (binary_operator (string_' (%s)') string_' (%s)' (call (identifier_get_shortcut) identifier_get_shortcut (argument_list (keyword_argument (identifier_context) identifier_context (identifier_context) identifier_context )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )binary_operator )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Add the shortcut associated with a given action to its tooltip
(module (function_definition (function_name_parse) function_name_parse (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_c) identifier_c (call (identifier_Collection) identifier_Collection (argument_list )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (attribute (identifier_self) identifier_self (identifier_datalen) identifier_datalen )attribute )comparison_operator (block (expression_statement (assignment (identifier_g) identifier_g (call (attribute (identifier_self) identifier_self (identifier_parseOneGame) identifier_parseOneGame )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_g) identifier_g (block (expression_statement (call (attribute (identifier_c) identifier_c (identifier_append) identifier_append )attribute (argument_list (identifier_g) identifier_g )argument_list )call )expression_statement )block (else_clause (block (break_statement )break_statement )block )else_clause )if_statement )block )while_statement (return_statement (identifier_c) identifier_c )return_statement )block )function_definition )module
Parses the SGF data stored in 'self.data', and returns a 'Collection'.
(module (function_definition (function_name_load_model) function_name_load_model (parameters (identifier_modelname) identifier_modelname (default_parameter (identifier_add_sentencizer) identifier_add_sentencizer (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_loading_start) identifier_loading_start (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nlp) identifier_nlp (call (attribute (identifier_spacy) identifier_spacy (identifier_load) identifier_load )attribute (argument_list (identifier_modelname) identifier_modelname )argument_list )call )assignment )expression_statement (if_statement (identifier_add_sentencizer) identifier_add_sentencizer (block (expression_statement (call (attribute (identifier_nlp) identifier_nlp (identifier_add_pipe) identifier_add_pipe )attribute (argument_list (call (attribute (identifier_nlp) identifier_nlp (identifier_create_pipe) identifier_create_pipe )attribute (argument_list (string_'sentencizer') string_'sentencizer' )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_loading_end) identifier_loading_end (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_loading_time) identifier_loading_time (binary_operator (identifier_loading_end) identifier_loading_end (identifier_loading_start) identifier_loading_start )binary_operator )assignment )expression_statement (if_statement (identifier_add_sentencizer) identifier_add_sentencizer (block (return_statement (expression_list (identifier_nlp) identifier_nlp (identifier_loading_time) identifier_loading_time (binary_operator (identifier_modelname) identifier_modelname (string_'_sentencizer') string_'_sentencizer' )binary_operator )expression_list )return_statement )block )if_statement (return_statement (expression_list (identifier_nlp) identifier_nlp (identifier_loading_time) identifier_loading_time (identifier_modelname) identifier_modelname )expression_list )return_statement )block )function_definition )module
Load a specific spaCy model
(module (function_definition (function_name__add_person_to_group) function_name__add_person_to_group (parameters (identifier_person) identifier_person (identifier_group) identifier_group )parameters (block (import_from_statement (dotted_name (identifier_karaage) identifier_karaage (identifier_datastores) identifier_datastores )dotted_name (dotted_name (identifier_add_accounts_to_group) identifier_add_accounts_to_group )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_karaage) identifier_karaage (identifier_datastores) identifier_datastores )dotted_name (dotted_name (identifier_add_accounts_to_project) identifier_add_accounts_to_project )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_karaage) identifier_karaage (identifier_datastores) identifier_datastores )dotted_name (dotted_name (identifier_add_accounts_to_institute) identifier_add_accounts_to_institute )dotted_name )import_from_statement (expression_statement (assignment (identifier_a_list) identifier_a_list (attribute (identifier_person) identifier_person (identifier_account_set) identifier_account_set )attribute )assignment )expression_statement (expression_statement (call (identifier_add_accounts_to_group) identifier_add_accounts_to_group (argument_list (identifier_a_list) identifier_a_list (identifier_group) identifier_group )argument_list )call )expression_statement (for_statement (identifier_project) identifier_project (call (attribute (attribute (identifier_group) identifier_group (identifier_project_set) identifier_project_set )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_add_accounts_to_project) identifier_add_accounts_to_project (argument_list (identifier_a_list) identifier_a_list (identifier_project) identifier_project )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_institute) identifier_institute (call (attribute (attribute (identifier_group) identifier_group (identifier_institute_set) identifier_institute_set )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_add_accounts_to_institute) identifier_add_accounts_to_institute (argument_list (identifier_a_list) identifier_a_list (identifier_institute) identifier_institute )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Call datastores after adding a person to a group.
(module (function_definition (function_name__populate_ranking_payoff_arrays) function_name__populate_ranking_payoff_arrays (parameters (identifier_payoff_arrays) identifier_payoff_arrays (identifier_scores) identifier_scores (identifier_costs) identifier_costs )parameters (block (expression_statement (assignment (identifier_n) identifier_n (subscript (attribute (subscript (identifier_payoff_arrays) identifier_payoff_arrays (integer_0) integer_0 )subscript (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (for_statement (pattern_list (identifier_p) identifier_p (identifier_payoff_array) identifier_payoff_array )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_payoff_arrays) identifier_payoff_arrays )argument_list )call (block (expression_statement (assignment (subscript (identifier_payoff_array) identifier_payoff_array (integer_0) integer_0 (slice (colon) colon )slice )subscript (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (identifier_n) identifier_n )argument_list )call (block (for_statement (identifier_j) identifier_j (call (identifier_range) identifier_range (argument_list (identifier_n) identifier_n )argument_list )call (block (expression_statement (assignment (subscript (identifier_payoff_array) identifier_payoff_array (identifier_i) identifier_i (identifier_j) identifier_j )subscript (unary_operator (subscript (identifier_costs) identifier_costs (identifier_p) identifier_p (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )subscript )unary_operator )assignment )expression_statement )block )for_statement )block )for_statement )block )for_statement (expression_statement (assignment (identifier_prize) identifier_prize (float_1.) float_1. )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_n) identifier_n )argument_list )call (block (for_statement (identifier_j) identifier_j (call (identifier_range) identifier_range (argument_list (identifier_n) identifier_n )argument_list )call (block (if_statement (comparison_operator (subscript (identifier_scores) identifier_scores (integer_0) integer_0 (identifier_i) identifier_i )subscript (subscript (identifier_scores) identifier_scores (integer_1) integer_1 (identifier_j) identifier_j )subscript )comparison_operator (block (expression_statement (augmented_assignment (subscript (subscript (identifier_payoff_arrays) identifier_payoff_arrays (integer_0) integer_0 )subscript (identifier_i) identifier_i (identifier_j) identifier_j )subscript (identifier_prize) identifier_prize )augmented_assignment )expression_statement )block (elif_clause (comparison_operator (subscript (identifier_scores) identifier_scores (integer_0) integer_0 (identifier_i) identifier_i )subscript (subscript (identifier_scores) identifier_scores (integer_1) integer_1 (identifier_j) identifier_j )subscript )comparison_operator (block (expression_statement (augmented_assignment (subscript (subscript (identifier_payoff_arrays) identifier_payoff_arrays (integer_1) integer_1 )subscript (identifier_j) identifier_j (identifier_i) identifier_i )subscript (identifier_prize) identifier_prize )augmented_assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (augmented_assignment (subscript (subscript (identifier_payoff_arrays) identifier_payoff_arrays (integer_0) integer_0 )subscript (identifier_i) identifier_i (identifier_j) identifier_j )subscript (binary_operator (identifier_prize) identifier_prize (integer_2) integer_2 )binary_operator )augmented_assignment )expression_statement (expression_statement (augmented_assignment (subscript (subscript (identifier_payoff_arrays) identifier_payoff_arrays (integer_1) integer_1 )subscript (identifier_j) identifier_j (identifier_i) identifier_i )subscript (binary_operator (identifier_prize) identifier_prize (integer_2) integer_2 )binary_operator )augmented_assignment )expression_statement )block )else_clause )if_statement )block )for_statement )block )for_statement )block )function_definition )module
Populate the ndarrays in `payoff_arrays` with the payoff values of the ranking game given `scores` and `costs`. Parameters ---------- payoff_arrays : tuple(ndarray(float, ndim=2)) Tuple of 2 ndarrays of shape (n, n). Modified in place. scores : ndarray(int, ndim=2) ndarray of shape (2, n) containing score values corresponding to the effort levels for the two players. costs : ndarray(float, ndim=2) ndarray of shape (2, n-1) containing cost values corresponding to the n-1 positive effort levels for the two players, with the assumption that the cost of the zero effort action is zero.
(module (function_definition (function_name__find_inline_images) function_name__find_inline_images (parameters (identifier_contentsinfo) identifier_contentsinfo )parameters (block (expression_statement (string_"Find inline images in the contentstream") string_"Find inline images in the contentstream" )expression_statement (for_statement (pattern_list (identifier_n) identifier_n (identifier_inline) identifier_inline )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_contentsinfo) identifier_contentsinfo (identifier_inline_images) identifier_inline_images )attribute )argument_list )call (block (expression_statement (yield (call (identifier_ImageInfo) identifier_ImageInfo (argument_list (keyword_argument (identifier_name) identifier_name (binary_operator (string_'inline-%02d') string_'inline-%02d' (identifier_n) identifier_n )binary_operator )keyword_argument (keyword_argument (identifier_shorthand) identifier_shorthand (attribute (identifier_inline) identifier_inline (identifier_shorthand) identifier_shorthand )attribute )keyword_argument (keyword_argument (identifier_inline) identifier_inline (identifier_inline) identifier_inline )keyword_argument )argument_list )call )yield )expression_statement )block )for_statement )block )function_definition )module
Find inline images in the contentstream
(module (function_definition (function_name_width) function_name_width (parameters (identifier_self) identifier_self )parameters (type (identifier_int) identifier_int )type (block (expression_statement (assignment (identifier_max_x) identifier_max_x (unary_operator (float_1.0) float_1.0 )unary_operator )assignment )expression_statement (for_statement (pattern_list (identifier_x) identifier_x (identifier__) identifier__ )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_entries) identifier_entries )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_max_x) identifier_max_x (call (identifier_max) identifier_max (argument_list (identifier_max_x) identifier_max_x (identifier_x) identifier_x )argument_list )call )assignment )expression_statement )block )for_statement (for_statement (identifier_v) identifier_v (attribute (identifier_self) identifier_self (identifier_vertical_lines) identifier_vertical_lines )attribute (block (expression_statement (assignment (identifier_max_x) identifier_max_x (call (identifier_max) identifier_max (argument_list (identifier_max_x) identifier_max_x (attribute (identifier_v) identifier_v (identifier_x) identifier_x )attribute )argument_list )call )assignment )expression_statement )block )for_statement (for_statement (identifier_h) identifier_h (attribute (identifier_self) identifier_self (identifier_horizontal_lines) identifier_horizontal_lines )attribute (block (expression_statement (assignment (identifier_max_x) identifier_max_x (call (identifier_max) identifier_max (argument_list (identifier_max_x) identifier_max_x (attribute (identifier_h) identifier_h (identifier_x1) identifier_x1 )attribute (attribute (identifier_h) identifier_h (identifier_x2) identifier_x2 )attribute )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (binary_operator (integer_1) integer_1 (call (identifier_int) identifier_int (argument_list (identifier_max_x) identifier_max_x )argument_list )call )binary_operator )return_statement )block )function_definition )module
Determines how many entry columns are in the diagram.
(module (function_definition (function_name__adjust_inferential_results_for_parameter_constraints) function_name__adjust_inferential_results_for_parameter_constraints (parameters (identifier_self) identifier_self (identifier_constraints) identifier_constraints )parameters (block (if_statement (comparison_operator (identifier_constraints) identifier_constraints (None) None )comparison_operator (block (expression_statement (assignment (identifier_inferential_attributes) identifier_inferential_attributes (list (string_"standard_errors") string_"standard_errors" (string_"tvalues") string_"tvalues" (string_"pvalues") string_"pvalues" (string_"robust_std_errs") string_"robust_std_errs" (string_"robust_t_stats") string_"robust_t_stats" (string_"robust_p_vals") string_"robust_p_vals" )list )assignment )expression_statement (assert_statement (call (identifier_all) identifier_all (argument_list (list_comprehension (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_inferential_attributes) identifier_inferential_attributes )for_in_clause )list_comprehension )argument_list )call )assert_statement (assert_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_"params") string_"params" )argument_list )call )assert_statement (expression_statement (assignment (identifier_all_names) identifier_all_names (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_params) identifier_params )attribute (identifier_index) identifier_index )attribute (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_series) identifier_series (list_comprehension (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_inferential_attributes) identifier_inferential_attributes )for_in_clause )list_comprehension (block (for_statement (identifier_pos) identifier_pos (identifier_constraints) identifier_constraints (block (expression_statement (assignment (subscript (attribute (identifier_series) identifier_series (identifier_loc) identifier_loc )attribute (subscript (identifier_all_names) identifier_all_names (identifier_pos) identifier_pos )subscript )subscript (attribute (identifier_np) identifier_np (identifier_nan) identifier_nan )attribute )assignment )expression_statement )block )for_statement )block )for_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Ensure that parameters that were constrained during estimation do not have any values showed for inferential results. After all, no inference was performed. Parameters ---------- constraints : list of ints, or None. If list, should contain the positions in the array of all estimated parameters that were constrained to their initial values. Returns ------- None.
(module (function_definition (function_name_loadScopeGroupbyName) function_name_loadScopeGroupbyName (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_service_group_id) identifier_service_group_id (default_parameter (identifier_callback) identifier_callback (None) None )default_parameter (default_parameter (identifier_errback) identifier_errback (None) None )default_parameter )parameters (block (import_statement (dotted_name (identifier_ns1) identifier_ns1 (identifier_ipam) identifier_ipam )dotted_name )import_statement (expression_statement (assignment (identifier_scope_group) identifier_scope_group (call (attribute (attribute (identifier_ns1) identifier_ns1 (identifier_ipam) identifier_ipam )attribute (identifier_Scopegroup) identifier_Scopegroup )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_service_group_id) identifier_service_group_id (identifier_service_group_id) identifier_service_group_id )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_scope_group) identifier_scope_group (identifier_load) identifier_load )attribute (argument_list (keyword_argument (identifier_callback) identifier_callback (identifier_callback) identifier_callback )keyword_argument (keyword_argument (identifier_errback) identifier_errback (identifier_errback) identifier_errback )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Load an existing Scope Group by name and service group id into a high level Scope Group object :param str name: Name of an existing Scope Group :param int service_group_id: id of the service group the Scope group is associated with
(module (function_definition (function_name__sign) function_name__sign (parameters (identifier_self) identifier_self (typed_parameter (identifier_data) identifier_data (type (identifier_bytes) identifier_bytes )type )typed_parameter )parameters (type (identifier_bytes) identifier_bytes )type (block (assert_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__raiden_service) identifier__raiden_service )attribute (None) None )comparison_operator )assert_statement (return_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__raiden_service) identifier__raiden_service )attribute (identifier_signer) identifier_signer )attribute (identifier_sign) identifier_sign )attribute (argument_list (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Use eth_sign compatible hasher to sign matrix data
(module (function_definition (function_name_compile) function_name_compile (parameters (identifier_conf) identifier_conf )parameters (block (with_statement (with_clause (with_item (call (identifier_errorprint) identifier_errorprint (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_config) identifier_config (call (identifier_ConfModule) identifier_ConfModule (argument_list (identifier_conf) identifier_conf )argument_list )call )assignment )expression_statement (for_statement (identifier_conf) identifier_conf (attribute (identifier_config) identifier_config (identifier_configurations) identifier_configurations )attribute (block (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_do_print) identifier_do_print (True) True )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Compiles classic uWSGI configuration file using the default or given `uwsgiconf` configuration module.
(module (function_definition (function_name_delete_jail) function_name_delete_jail (parameters (identifier_name) identifier_name )parameters (block (if_statement (call (identifier_is_jail) identifier_is_jail (argument_list (identifier_name) identifier_name )argument_list )call (block (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (string_'poudriere jail -d -j {0}') string_'poudriere jail -d -j {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (identifier_cmd) identifier_cmd )argument_list )call )expression_statement (if_statement (call (identifier_is_jail) identifier_is_jail (argument_list (identifier_name) identifier_name )argument_list )call (block (return_statement (call (attribute (string_'Looks like there was an issue deleteing jail \ {0}') string_'Looks like there was an issue deleteing jail \ {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )if_statement )block (else_clause (block (return_statement (call (attribute (string_'Looks like jail {0} has not been created') string_'Looks like jail {0} has not been created' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_make_file) identifier_make_file (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (identifier__config_dir) identifier__config_dir (argument_list )argument_list )call (call (attribute (string_'{0}-make.conf') string_'{0}-make.conf' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_make_file) identifier_make_file )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_make_file) identifier_make_file )argument_list )call )expression_statement )block (except_clause (tuple (identifier_IOError) identifier_IOError (identifier_OSError) identifier_OSError )tuple (block (return_statement (call (attribute (parenthesized_expression (concatenated_string (string_'Deleted jail "{0}" but was unable to remove jail make ') string_'Deleted jail "{0}" but was unable to remove jail make ' (string_'file') string_'file' )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )except_clause )try_statement (expression_statement (call (subscript (identifier___salt__) identifier___salt__ (string_'file.remove') string_'file.remove' )subscript (argument_list (identifier_make_file) identifier_make_file )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (string_'Deleted jail {0}') string_'Deleted jail {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )function_definition )module
Deletes poudriere jail with `name` CLI Example: .. code-block:: bash salt '*' poudriere.delete_jail 90amd64
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self (default_parameter (identifier_newdata) identifier_newdata (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_newdata) identifier_newdata (None) None )comparison_operator (block (expression_statement (assignment (identifier_newdata) identifier_newdata (call (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_molecule) identifier_molecule )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_origin) identifier_origin )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_axes) identifier_axes )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_nrep) identifier_nrep )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call (identifier_newdata) identifier_newdata (attribute (identifier_self) identifier_self (identifier_subtitle) identifier_subtitle )attribute (attribute (identifier_self) identifier_self (identifier_nuclear_charges) identifier_nuclear_charges )attribute )argument_list )call )return_statement )block )function_definition )module
Return a copy of the cube with optionally new data.
(module (function_definition (function_name_bitcoin_address) function_name_bitcoin_address (parameters (identifier_self) identifier_self )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_type_) identifier_type_ (call (attribute (attribute (identifier_self) identifier_self (identifier_random) identifier_random )attribute (identifier_choice) identifier_choice )attribute (argument_list (list (string_'1') string_'1' (string_'3') string_'3' )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_letters) identifier_letters (binary_operator (attribute (identifier_string) identifier_string (identifier_ascii_letters) identifier_ascii_letters )attribute (attribute (identifier_string) identifier_string (identifier_digits) identifier_digits )attribute )binary_operator )assignment )expression_statement (return_statement (binary_operator (identifier_type_) identifier_type_ (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (generator_expression (call (attribute (attribute (identifier_self) identifier_self (identifier_random) identifier_random )attribute (identifier_choice) identifier_choice )attribute (argument_list (identifier_letters) identifier_letters )argument_list )call (for_in_clause (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (integer_33) integer_33 )argument_list )call )for_in_clause )generator_expression )call )binary_operator )return_statement )block )function_definition )module
Generate a random bitcoin address. :return: Bitcoin address. :Example: 3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX
(module (function_definition (function_name_derive_title) function_name_derive_title (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_title) identifier_title )attribute )not_operator (block (return_statement (binary_operator (call (identifier__) identifier__ (argument_list (string_"Create %s") string_"Create %s" )argument_list )call (call (attribute (call (identifier_force_text) identifier_force_text (argument_list (attribute (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier__meta) identifier__meta )attribute (identifier_verbose_name) identifier_verbose_name )attribute )argument_list )call (identifier_title) identifier_title )attribute (argument_list )argument_list )call )binary_operator )return_statement )block (else_clause (block (return_statement (attribute (identifier_self) identifier_self (identifier_title) identifier_title )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
Derives our title from our object
(module (function_definition (function_name_get_attribute) function_name_get_attribute (parameters (typed_parameter (identifier_module_name) identifier_module_name (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_attribute_name) identifier_attribute_name (type (identifier_str) identifier_str )type )typed_parameter )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_module_name) identifier_module_name (identifier_str) identifier_str )argument_list )call )assert_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_attribute_name) identifier_attribute_name (identifier_str) identifier_str )argument_list )call )assert_statement (expression_statement (assignment (identifier__module) identifier__module (call (attribute (identifier_importlib) identifier_importlib (identifier_import_module) identifier_import_module )attribute (argument_list (identifier_module_name) identifier_module_name )argument_list )call )assignment )expression_statement (return_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier__module) identifier__module (identifier_attribute_name) identifier_attribute_name )argument_list )call )return_statement )block )function_definition )module
Get the specified module attribute. It most cases, it will be a class or function. :param module_name: module name :param attribute_name: attribute name :return: module attribute
(module (function_definition (function_name_log_middleware) function_name_log_middleware (parameters (identifier_store) identifier_store )parameters (block (function_definition (function_name_wrapper) function_name_wrapper (parameters (identifier_next_) identifier_next_ )parameters (block (function_definition (function_name_log_dispatch) function_name_log_dispatch (parameters (identifier_action) identifier_action )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Dispatch Action:') string_'Dispatch Action:' (identifier_action) identifier_action )argument_list )call )expression_statement (return_statement (call (identifier_next_) identifier_next_ (argument_list (identifier_action) identifier_action )argument_list )call )return_statement )block )function_definition (return_statement (identifier_log_dispatch) identifier_log_dispatch )return_statement )block )function_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
log all actions to console as they are dispatched
(module (function_definition (function_name_adjustMinimumWidth) function_name_adjustMinimumWidth (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_pw) identifier_pw (call (attribute (call (attribute (identifier_self) identifier_self (identifier_pixmapSize) identifier_pixmapSize )attribute (argument_list )argument_list )call (identifier_width) identifier_width )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setMinimumWidth) identifier_setMinimumWidth )attribute (argument_list (binary_operator (binary_operator (identifier_pw) identifier_pw (call (attribute (identifier_self) identifier_self (identifier_maximum) identifier_maximum )attribute (argument_list )argument_list )call )binary_operator (binary_operator (integer_3) integer_3 (call (attribute (identifier_self) identifier_self (identifier_maximum) identifier_maximum )attribute (argument_list )argument_list )call )binary_operator )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Modifies the minimum width to factor in the size of the pixmaps and the number for the maximum.
(module (function_definition (function_name_visit_Import) function_name_visit_Import (parameters (identifier_self) identifier_self (identifier_node) identifier_node )parameters (block (for_statement (identifier_alias) identifier_alias (attribute (identifier_node) identifier_node (identifier_names) identifier_names )attribute (block (expression_statement (assignment (identifier_current_module) identifier_current_module (identifier_MODULES) identifier_MODULES )assignment )expression_statement (for_statement (identifier_path) identifier_path (call (attribute (attribute (identifier_alias) identifier_alias (identifier_name) identifier_name )attribute (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call (block (if_statement (comparison_operator (identifier_path) identifier_path (identifier_current_module) identifier_current_module )comparison_operator (block (raise_statement (call (identifier_PythranSyntaxError) identifier_PythranSyntaxError (argument_list (call (attribute (string_"Module '{0}' unknown.") string_"Module '{0}' unknown." (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_alias) identifier_alias (identifier_name) identifier_name )attribute )argument_list )call (identifier_node) identifier_node )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_current_module) identifier_current_module (subscript (identifier_current_module) identifier_current_module (identifier_path) identifier_path )subscript )assignment )expression_statement )block )else_clause )if_statement )block )for_statement )block )for_statement )block )function_definition )module
Check if imported module exists in MODULES.
(module (function_definition (function_name_create_parser) function_name_create_parser (parameters (identifier_self) identifier_self (identifier_prog_name) identifier_prog_name (identifier_subcommand) identifier_subcommand )parameters (block (expression_statement (assignment (identifier_parser) identifier_parser (call (identifier_OptionParser) identifier_OptionParser (argument_list (keyword_argument (identifier_prog) identifier_prog (identifier_prog_name) identifier_prog_name )keyword_argument (keyword_argument (identifier_usage) identifier_usage (call (attribute (identifier_self) identifier_self (identifier_usage) identifier_usage )attribute (argument_list (identifier_subcommand) identifier_subcommand )argument_list )call )keyword_argument (keyword_argument (identifier_option_list) identifier_option_list (attribute (identifier_self) identifier_self (identifier_option_list) identifier_option_list )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_parser) identifier_parser )return_statement )block )function_definition )module
Create an OptionParser prog_name - Name of a command subcommand - Name of a subcommand
(module (function_definition (function_name__recursive_getitem) function_name__recursive_getitem (parameters (identifier_d) identifier_d (identifier_key) identifier_key )parameters (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_d) identifier_d )comparison_operator (block (return_statement (identifier_d) identifier_d )return_statement )block (else_clause (block (for_statement (identifier_v) identifier_v (call (attribute (identifier_d) identifier_d (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (return_statement (call (identifier__recursive_getitem) identifier__recursive_getitem (argument_list (identifier_v) identifier_v (identifier_key) identifier_key )argument_list )call )return_statement )block (else_clause (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_'Key not found: {}') string_'Key not found: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key )argument_list )call )argument_list )call )raise_statement )block )else_clause )for_statement )block )else_clause )if_statement )block )function_definition )module
Descend into a dict of dicts to return the one that contains a given key. Every value in the dict must be another dict.
(module (function_definition (function_name__get_raw_key) function_name__get_raw_key (parameters (identifier_self) identifier_self (identifier_key_id) identifier_key_id )parameters (block (try_statement (block (expression_statement (assignment (identifier_static_key) identifier_static_key (subscript (attribute (identifier_self) identifier_self (identifier__static_keys) identifier__static_keys )attribute (identifier_key_id) identifier_key_id )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_static_key) identifier_static_key (call (attribute (identifier_os) identifier_os (identifier_urandom) identifier_urandom )attribute (argument_list (integer_32) integer_32 )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__static_keys) identifier__static_keys )attribute (identifier_key_id) identifier_key_id )subscript (identifier_static_key) identifier_static_key )assignment )expression_statement )block )except_clause )try_statement (return_statement (call (identifier_WrappingKey) identifier_WrappingKey (argument_list (keyword_argument (identifier_wrapping_algorithm) identifier_wrapping_algorithm (attribute (identifier_WrappingAlgorithm) identifier_WrappingAlgorithm (identifier_AES_256_GCM_IV12_TAG16_NO_PADDING) identifier_AES_256_GCM_IV12_TAG16_NO_PADDING )attribute )keyword_argument (keyword_argument (identifier_wrapping_key) identifier_wrapping_key (identifier_static_key) identifier_static_key )keyword_argument (keyword_argument (identifier_wrapping_key_type) identifier_wrapping_key_type (attribute (identifier_EncryptionKeyType) identifier_EncryptionKeyType (identifier_SYMMETRIC) identifier_SYMMETRIC )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns a static, randomly-generated symmetric key for the specified key ID. :param str key_id: Key ID :returns: Wrapping key that contains the specified static key :rtype: :class:`aws_encryption_sdk.internal.crypto.WrappingKey`
(module (function_definition (function_name_add_before) function_name_add_before (parameters (identifier_self) identifier_self (identifier_pipeline) identifier_pipeline )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_pipeline) identifier_pipeline (identifier_Pipeline) identifier_Pipeline )argument_list )call )not_operator (block (expression_statement (assignment (identifier_pipeline) identifier_pipeline (call (identifier_Pipeline) identifier_Pipeline (argument_list (identifier_pipeline) identifier_pipeline )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_pipes) identifier_pipes )attribute (binary_operator (subscript (attribute (identifier_pipeline) identifier_pipeline (identifier_pipes) identifier_pipes )attribute (slice (colon) colon )slice )subscript (subscript (attribute (identifier_self) identifier_self (identifier_pipes) identifier_pipes )attribute (slice (colon) colon )slice )subscript )binary_operator )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Add a Pipeline to be applied before this processing pipeline. Arguments: pipeline: The Pipeline or callable to apply before this Pipeline.
(module (function_definition (function_name_getvalue) function_name_getvalue (parameters (identifier_self) identifier_self (identifier_v) identifier_v )parameters (block (if_statement (not_operator (call (identifier_is_measure) identifier_is_measure (argument_list (identifier_v) identifier_v )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'Incorrect input type for getvalue()') string_'Incorrect input type for getvalue()' )argument_list )call )raise_statement )block )if_statement (import_statement (dotted_name (identifier_re) identifier_re )dotted_name )import_statement (expression_statement (assignment (identifier_rx) identifier_rx (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (string_"m\d+") string_"m\d+" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (list )list )assignment )expression_statement (expression_statement (assignment (identifier_keys) identifier_keys (subscript (call (attribute (identifier_v) identifier_v (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (slice (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_keys) identifier_keys (identifier_sort) identifier_sort )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (if_statement (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (identifier_rx) identifier_rx (identifier_key) identifier_key )argument_list )call (block (expression_statement (call (attribute (identifier_out) identifier_out (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_dq) identifier_dq (identifier_quantity) identifier_quantity )attribute (argument_list (call (attribute (identifier_v) identifier_v (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Return a list of quantities making up the measures' value. :param v: a measure
(module (function_definition (function_name_serialize) function_name_serialize (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_mate_chrom) identifier_mate_chrom )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_remote_tag) identifier_remote_tag (string_".") string_"." )assignment )expression_statement )block (else_clause (block (if_statement (attribute (identifier_self) identifier_self (identifier_within_main_assembly) identifier_within_main_assembly )attribute (block (expression_statement (assignment (identifier_mate_chrom) identifier_mate_chrom (attribute (identifier_self) identifier_self (identifier_mate_chrom) identifier_mate_chrom )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_mate_chrom) identifier_mate_chrom (call (attribute (string_"<{}>") string_"<{}>" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_mate_chrom) identifier_mate_chrom )attribute )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_tpl) identifier_tpl (subscript (dictionary (pair (identifier_FORWARD) identifier_FORWARD (string_"[{}:{}[") string_"[{}:{}[" )pair (pair (identifier_REVERSE) identifier_REVERSE (string_"]{}:{}]") string_"]{}:{}]" )pair )dictionary (attribute (identifier_self) identifier_self (identifier_mate_orientation) identifier_mate_orientation )attribute )subscript )assignment )expression_statement (expression_statement (assignment (identifier_remote_tag) identifier_remote_tag (call (attribute (identifier_tpl) identifier_tpl (identifier_format) identifier_format )attribute (argument_list (identifier_mate_chrom) identifier_mate_chrom (attribute (identifier_self) identifier_self (identifier_mate_pos) identifier_mate_pos )attribute )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_orientation) identifier_orientation )attribute (identifier_FORWARD) identifier_FORWARD )comparison_operator (block (return_statement (binary_operator (identifier_remote_tag) identifier_remote_tag (attribute (identifier_self) identifier_self (identifier_sequence) identifier_sequence )attribute )binary_operator )return_statement )block (else_clause (block (return_statement (binary_operator (attribute (identifier_self) identifier_self (identifier_sequence) identifier_sequence )attribute (identifier_remote_tag) identifier_remote_tag )binary_operator )return_statement )block )else_clause )if_statement )block )function_definition )module
Return string representation for VCF
(module (function_definition (function_name_print_config) function_name_print_config (parameters )parameters (block (expression_statement (assignment (identifier_description) identifier_description (assignment (identifier_parser) identifier_parser (call (attribute (identifier_argparse) identifier_argparse (identifier_ArgumentParser) identifier_ArgumentParser )attribute (argument_list (keyword_argument (identifier_description) identifier_description (call (attribute (identifier_textwrap) identifier_textwrap (identifier_dedent) identifier_dedent )attribute (argument_list (identifier_description) identifier_description )argument_list )call )keyword_argument )argument_list )call )assignment )assignment )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'config_uri') string_'config_uri' (keyword_argument (identifier_type) identifier_type (identifier_str) identifier_str )keyword_argument (keyword_argument (identifier_help) identifier_help (string_'an integer for the accumulator') string_'an integer for the accumulator' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'-k') string_'-k' (string_'--key') string_'--key' (keyword_argument (identifier_dest) identifier_dest (string_'key') string_'key' )keyword_argument (keyword_argument (identifier_metavar) identifier_metavar (string_'PREFIX') string_'PREFIX' )keyword_argument (keyword_argument (identifier_type) identifier_type (identifier_str) identifier_str )keyword_argument (keyword_argument (identifier_action) identifier_action (string_'store') string_'store' )keyword_argument (keyword_argument (identifier_help) identifier_help (parenthesized_expression (concatenated_string (string_"Tells script to print only specified") string_"Tells script to print only specified" (string_" config tree provided by dotted name") string_" config tree provided by dotted name" )concatenated_string )parenthesized_expression )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_args) identifier_args (call (attribute (identifier_parser) identifier_parser (identifier_parse_args) identifier_parse_args )attribute (argument_list (subscript (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_config_uri) identifier_config_uri (attribute (identifier_args) identifier_args (identifier_config_uri) identifier_config_uri )attribute )assignment )expression_statement (expression_statement (assignment (identifier_env) identifier_env (call (identifier_bootstrap) identifier_bootstrap (argument_list (identifier_config_uri) identifier_config_uri )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_config) identifier_config (identifier_closer) identifier_closer )pattern_list (expression_list (subscript (subscript (identifier_env) identifier_env (string_'registry') string_'registry' )subscript (string_'config') string_'config' )subscript (subscript (identifier_env) identifier_env (string_'closer') string_'closer' )subscript )expression_list )assignment )expression_statement (try_statement (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_printer) identifier_printer (argument_list (call (identifier_slice_config) identifier_slice_config (argument_list (identifier_config) identifier_config (attribute (identifier_args) identifier_args (identifier_key) identifier_key )attribute )argument_list )call )argument_list )call )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'Sorry, but the key path {0}, does not exists in Your config!') string_'Sorry, but the key path {0}, does not exists in Your config!' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_args) identifier_args (identifier_key) identifier_key )attribute )argument_list )call )argument_list )call )expression_statement )block )except_clause (finally_clause (block (expression_statement (call (identifier_closer) identifier_closer (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Print config entry function.
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_running) identifier_running )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__thread) identifier__thread )attribute (call (attribute (identifier_threading) identifier_threading (identifier_Thread) identifier_Thread )attribute (argument_list (keyword_argument (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier__wrapped_target) identifier__wrapped_target )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier__thread) identifier__thread )attribute (identifier_daemon) identifier_daemon )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__thread) identifier__thread )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Start the run method as a new thread. It will first stop the thread if it is already running.
(module (function_definition (function_name_convert2wkt) function_name_convert2wkt (parameters (identifier_self) identifier_self (default_parameter (identifier_set3D) identifier_set3D (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_features) identifier_features (call (attribute (identifier_self) identifier_self (identifier_getfeatures) identifier_getfeatures )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_feature) identifier_feature (identifier_features) identifier_features (block (try_statement (block (expression_statement (call (attribute (call (attribute (identifier_feature) identifier_feature (identifier_geometry) identifier_geometry )attribute (argument_list )argument_list )call (identifier_Set3D) identifier_Set3D )attribute (argument_list (identifier_set3D) identifier_set3D )argument_list )call )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_dim) identifier_dim (conditional_expression (integer_3) integer_3 (identifier_set3D) identifier_set3D (integer_2) integer_2 )conditional_expression )assignment )expression_statement (expression_statement (call (attribute (call (attribute (identifier_feature) identifier_feature (identifier_geometry) identifier_geometry )attribute (argument_list )argument_list )call (identifier_SetCoordinateDimension) identifier_SetCoordinateDimension )attribute (argument_list (identifier_dim) identifier_dim )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (return_statement (list_comprehension (call (attribute (call (attribute (identifier_feature) identifier_feature (identifier_geometry) identifier_geometry )attribute (argument_list )argument_list )call (identifier_ExportToWkt) identifier_ExportToWkt )attribute (argument_list )argument_list )call (for_in_clause (identifier_feature) identifier_feature (identifier_features) identifier_features )for_in_clause )list_comprehension )return_statement )block )function_definition )module
export the geometry of each feature as a wkt string Parameters ---------- set3D: bool keep the third (height) dimension? Returns -------
(module (function_definition (function_name_delete_database) function_name_delete_database (parameters (identifier_self) identifier_self (identifier_database) identifier_database )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_"db/{0}") string_"db/{0}" (identifier_format) identifier_format )attribute (argument_list (identifier_database) identifier_database )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_method) identifier_method (string_'DELETE') string_'DELETE' )keyword_argument (keyword_argument (identifier_expected_response_code) identifier_expected_response_code (integer_204) integer_204 )keyword_argument )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Drop a database on the InfluxDB server. :param database: the name of the database to delete :type database: string :rtype: boolean
(module (function_definition (function_name_deploy) function_name_deploy (parameters )parameters (block (expression_statement (call (identifier__require_root) identifier__require_root (argument_list )argument_list )call )expression_statement (if_statement (not_operator (call (identifier_confirm) identifier_confirm (argument_list (string_"This will apply any available migrations to the database. Has the database been backed up?") string_"This will apply any available migrations to the database. Has the database been backed up?" )argument_list )call )not_operator (block (expression_statement (call (identifier_abort) identifier_abort (argument_list (string_"Aborted.") string_"Aborted." )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_confirm) identifier_confirm (argument_list (string_"Are you sure you want to deploy?") string_"Are you sure you want to deploy?" )argument_list )call )not_operator (block (expression_statement (call (identifier_abort) identifier_abort (argument_list (string_"Aborted.") string_"Aborted." )argument_list )call )expression_statement )block )if_statement (with_statement (with_clause (with_item (call (identifier_lcd) identifier_lcd (argument_list (identifier_PRODUCTION_DOCUMENT_ROOT) identifier_PRODUCTION_DOCUMENT_ROOT )argument_list )call )with_item )with_clause (block (with_statement (with_clause (with_item (call (identifier_shell_env) identifier_shell_env (argument_list (keyword_argument (identifier_PRODUCTION) identifier_PRODUCTION (string_"TRUE") string_"TRUE" )keyword_argument )argument_list )call )with_item )with_clause (block (expression_statement (call (identifier_local) identifier_local (argument_list (string_"git pull") string_"git pull" )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (string_"requirements.txt") string_"requirements.txt" (string_"r") string_"r" )argument_list )call (as_pattern_target (identifier_req_file) identifier_req_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_requirements) identifier_requirements (call (attribute (call (attribute (call (attribute (identifier_req_file) identifier_req_file (identifier_read) identifier_read )attribute (argument_list )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_require) identifier_require )attribute (argument_list (identifier_requirements) identifier_requirements )argument_list )call )expression_statement )block (except_clause (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_DistributionNotFound) identifier_DistributionNotFound )attribute (block (expression_statement (call (identifier_local) identifier_local (argument_list (string_"pip install -r requirements.txt") string_"pip install -r requirements.txt" )argument_list )call )expression_statement )block )except_clause (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier_traceback) identifier_traceback (identifier_format_exc) identifier_format_exc )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_local) identifier_local (argument_list (string_"pip install -r requirements.txt") string_"pip install -r requirements.txt" )argument_list )call )expression_statement )block )except_clause (else_clause (block (expression_statement (call (identifier_puts) identifier_puts (argument_list (string_"Python requirements already satisfied.") string_"Python requirements already satisfied." )argument_list )call )expression_statement )block )else_clause )try_statement )block )with_statement (with_statement (with_clause (with_item (call (identifier_prefix) identifier_prefix (argument_list (string_"source /usr/local/virtualenvs/ion/bin/activate") string_"source /usr/local/virtualenvs/ion/bin/activate" )argument_list )call )with_item )with_clause (block (expression_statement (call (identifier_local) identifier_local (argument_list (string_"./manage.py collectstatic --noinput") string_"./manage.py collectstatic --noinput" (keyword_argument (identifier_shell) identifier_shell (string_"/bin/bash") string_"/bin/bash" )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_local) identifier_local (argument_list (string_"./manage.py migrate") string_"./manage.py migrate" (keyword_argument (identifier_shell) identifier_shell (string_"/bin/bash") string_"/bin/bash" )keyword_argument )argument_list )call )expression_statement )block )with_statement (expression_statement (call (identifier_restart_production_gunicorn) identifier_restart_production_gunicorn (argument_list (keyword_argument (identifier_skip) identifier_skip (True) True )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )with_statement (expression_statement (call (identifier_puts) identifier_puts (argument_list (string_"Deploy complete.") string_"Deploy complete." )argument_list )call )expression_statement )block )function_definition )module
Deploy to production.
(module (function_definition (function_name_postToNodeInBox) function_name_postToNodeInBox (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg (identifier_frm) identifier_frm )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_trace) identifier_trace )attribute (argument_list (call (attribute (string_"{} appending to nodeInbox {}") string_"{} appending to nodeInbox {}" (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self (identifier_msg) identifier_msg )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_nodeInBox) identifier_nodeInBox )attribute (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_msg) identifier_msg (identifier_frm) identifier_frm )tuple )argument_list )call )expression_statement )block )function_definition )module
Append the message to the node inbox :param msg: a node message :param frm: the name of the node that sent this `msg`
(module (function_definition (function_name_wiki) function_name_wiki (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_date) identifier_date (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_pull) identifier_pull )attribute (identifier_created_at) identifier_created_at )attribute (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%m/%d/%Y %H:%M") string_"%m/%d/%Y %H:%M" )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_"{} {} ({} [{} github])\n") string_"{} {} ({} [{} github])\n" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_pull) identifier_pull )attribute (identifier_avatar_url) identifier_avatar_url )attribute (attribute (attribute (identifier_self) identifier_self (identifier_pull) identifier_pull )attribute (identifier_body) identifier_body )attribute (identifier_date) identifier_date (attribute (attribute (identifier_self) identifier_self (identifier_pull) identifier_pull )attribute (identifier_html_url) identifier_html_url )attribute )argument_list )call )return_statement )block )function_definition )module
Returns the wiki markup describing the details of the github pull request as well as a link to the details on github.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_default) identifier_default (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )return_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (identifier_list) identifier_list )argument_list )call )not_operator (block (expression_statement (assignment (identifier_name) identifier_name (list (identifier_name) identifier_name )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )assignment )expression_statement (try_statement (block (for_statement (identifier_key) identifier_key (identifier_name) identifier_name (block (expression_statement (assignment (identifier_data) identifier_data (subscript (identifier_data) identifier_data (identifier_key) identifier_key )subscript )assignment )expression_statement )block )for_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (identifier_default) identifier_default )return_statement )block )except_clause )try_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Get attribute value or return default Whole data dictionary is returned when no attribute provided. Supports direct values retrieval from deep dictionaries as well. Dictionary path should be provided as list. The following two examples are equal: tree.data['hardware']['memory']['size'] tree.get(['hardware', 'memory', 'size']) However the latter approach will also correctly handle providing default value when any of the dictionary keys does not exist.
(module (function_definition (function_name_place_market_order) function_name_place_market_order (parameters (identifier_self) identifier_self (typed_parameter (identifier_side) identifier_side (type (identifier_Side) identifier_Side )type )typed_parameter (typed_parameter (identifier_amount) identifier_amount (type (identifier_Number) identifier_Number )type )typed_parameter )parameters (type (identifier_Order) identifier_Order )type (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_place_order) identifier_place_order )attribute (argument_list (identifier_side) identifier_side (attribute (identifier_OrderType) identifier_OrderType (identifier_MARKET) identifier_MARKET )attribute (identifier_amount) identifier_amount )argument_list )call )return_statement )block )function_definition )module
Place a market order.
(module (function_definition (function_name_dump_message) function_name_dump_message (parameters (identifier_obj) identifier_obj (identifier_msg) identifier_msg (default_parameter (identifier_field_archiver) identifier_field_archiver (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_mtype) identifier_mtype (attribute (identifier_msg) identifier_msg (identifier___class__) identifier___class__ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_fields) identifier_fields (call (attribute (identifier_mtype) identifier_mtype (identifier_f_specs) identifier_f_specs )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_obj) identifier_obj (conditional_expression (call (attribute (identifier_collections) identifier_collections (identifier_OrderedDict) identifier_OrderedDict )attribute (argument_list )argument_list )call (comparison_operator (identifier_obj) identifier_obj (None) None )comparison_operator (call (identifier_get_elem) identifier_get_elem (argument_list (identifier_obj) identifier_obj )argument_list )call )conditional_expression )assignment )expression_statement (for_statement (identifier_field) identifier_field (identifier_fields) identifier_fields (block (expression_statement (await (call (identifier_dump_message_field) identifier_dump_message_field (argument_list (identifier_obj) identifier_obj (keyword_argument (identifier_msg) identifier_msg (identifier_msg) identifier_msg )keyword_argument (keyword_argument (identifier_field) identifier_field (identifier_field) identifier_field )keyword_argument (keyword_argument (identifier_field_archiver) identifier_field_archiver (identifier_field_archiver) identifier_field_archiver )keyword_argument )argument_list )call )await )expression_statement )block )for_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Dumps message to the object. Returns message popo representation. :param obj: :param msg: :param field_archiver: :return:
(module (function_definition (function_name_make_url) function_name_make_url (parameters (identifier_path) identifier_path (default_parameter (identifier_protocol) identifier_protocol (None) None )default_parameter (default_parameter (identifier_hosts) identifier_hosts (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_protocol) identifier_protocol (conditional_expression (string_'https://') string_'https://' (not_operator (identifier_protocol) identifier_protocol )not_operator (identifier_protocol) identifier_protocol )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_host) identifier_host (conditional_expression (subscript (identifier_hosts) identifier_hosts (call (attribute (identifier_random) identifier_random (identifier_randrange) identifier_randrange )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_hosts) identifier_hosts )argument_list )call )argument_list )call )subscript (identifier_hosts) identifier_hosts (string_'archive.org') string_'archive.org' )conditional_expression )assignment )expression_statement (return_statement (binary_operator (binary_operator (identifier_protocol) identifier_protocol (identifier_host) identifier_host )binary_operator (call (attribute (identifier_path) identifier_path (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )binary_operator )return_statement )block )function_definition )module
Make an URL given a path, and optionally, a protocol and set of hosts to select from randomly. :param path: The Archive.org path. :type path: str :param protocol: (optional) The HTTP protocol to use. "https://" is used by default. :type protocol: str :param hosts: (optional) A set of hosts. A host will be chosen at random. The default host is "archive.org". :type hosts: iterable :rtype: str :returns: An Absolute URI.
(module (function_definition (function_name_sg_summary_gradient) function_name_sg_summary_gradient (parameters (identifier_tensor) identifier_tensor (identifier_gradient) identifier_gradient (default_parameter (identifier_prefix) identifier_prefix (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_prefix) identifier_prefix (conditional_expression (string_'') string_'' (comparison_operator (identifier_prefix) identifier_prefix (None) None )comparison_operator (binary_operator (identifier_prefix) identifier_prefix (string_'/') string_'/' )binary_operator )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (conditional_expression (binary_operator (identifier_prefix) identifier_prefix (call (identifier__pretty_name) identifier__pretty_name (argument_list (identifier_tensor) identifier_tensor )argument_list )call )binary_operator (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (binary_operator (identifier_prefix) identifier_prefix (identifier_name) identifier_name )binary_operator )conditional_expression )assignment )expression_statement (expression_statement (call (identifier__scalar) identifier__scalar (argument_list (binary_operator (identifier_name) identifier_name (string_'/grad') string_'/grad' )binary_operator (call (attribute (identifier_tf) identifier_tf (identifier_reduce_mean) identifier_reduce_mean )attribute (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_abs) identifier_abs )attribute (argument_list (identifier_gradient) identifier_gradient )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier__histogram) identifier__histogram (argument_list (binary_operator (identifier_name) identifier_name (string_'/grad-h') string_'/grad-h' )binary_operator (call (attribute (identifier_tf) identifier_tf (identifier_abs) identifier_abs )attribute (argument_list (identifier_gradient) identifier_gradient )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
r"""Register `tensor` to summary report as `gradient` Args: tensor: A `Tensor` to log as gradient gradient: A 0-D `Tensor`. A gradient to log prefix: A `string`. A prefix to display in the tensor board web UI. name: A `string`. A name to display in the tensor board web UI. Returns: None
(module (function_definition (function_name_get_gradients) function_name_get_gradients (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (generic_type (identifier_List) identifier_List (type_parameter (type (attribute (attribute (identifier_mx) identifier_mx (identifier_nd) identifier_nd )attribute (identifier_NDArray) identifier_NDArray )attribute )type )type_parameter )generic_type )type )type_parameter )generic_type )type (block (return_statement (dictionary_comprehension (pair (binary_operator (string_"dev_%d_%s") string_"dev_%d_%s" (tuple (identifier_i) identifier_i (identifier_name) identifier_name )tuple )binary_operator (subscript (attribute (identifier_exe) identifier_exe (identifier_grad_arrays) identifier_grad_arrays )attribute (identifier_j) identifier_j )subscript )pair (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_exe) identifier_exe )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_executors) identifier_executors )attribute )argument_list )call )for_in_clause (for_in_clause (pattern_list (identifier_j) identifier_j (identifier_name) identifier_name )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_executor_group) identifier_executor_group )attribute (identifier_arg_names) identifier_arg_names )attribute )argument_list )call )for_in_clause (if_clause (boolean_operator (comparison_operator (identifier_name) identifier_name (attribute (attribute (identifier_self) identifier_self (identifier_executor_group) identifier_executor_group )attribute (identifier_param_names) identifier_param_names )attribute )comparison_operator (comparison_operator (subscript (attribute (subscript (attribute (identifier_self) identifier_self (identifier_executors) identifier_executors )attribute (integer_0) integer_0 )subscript (identifier_grad_arrays) identifier_grad_arrays )attribute (identifier_j) identifier_j )subscript (None) None )comparison_operator )boolean_operator )if_clause )dictionary_comprehension )return_statement )block )function_definition )module
Returns a mapping of parameters names to gradient arrays. Parameter names are prefixed with the device.
(module (function_definition (function_name_get_cmd) function_name_get_cmd (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (None) None )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute (tuple (string_'nose') string_'nose' (string_'nosetests') string_'nosetests' )tuple )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (binary_operator (string_"nosetests %s") string_"nosetests %s" (attribute (identifier_self) identifier_self (identifier_file_path) identifier_file_path )attribute )binary_operator )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute (string_'django') string_'django' )comparison_operator (block (expression_statement (assignment (identifier_executable) identifier_executable (binary_operator (string_"%s/manage.py") string_"%s/manage.py" (attribute (identifier_self) identifier_self (identifier_file_path) identifier_file_path )attribute )binary_operator )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_executable) identifier_executable )argument_list )call (block (expression_statement (assignment (identifier_cmd) identifier_cmd (binary_operator (string_"python %s/manage.py test") string_"python %s/manage.py test" (attribute (identifier_self) identifier_self (identifier_file_path) identifier_file_path )attribute )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_cmd) identifier_cmd (string_"django-admin.py test") string_"django-admin.py test" )assignment )expression_statement )block )else_clause )if_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute (string_'py') string_'py' )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (binary_operator (string_'py.test %s') string_'py.test %s' (attribute (identifier_self) identifier_self (identifier_file_path) identifier_file_path )attribute )binary_operator )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute (string_'symfony') string_'symfony' )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (string_'symfony test-all') string_'symfony test-all' )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute (string_'jelix') string_'jelix' )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (string_'php tests.php') string_'php tests.php' )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute (string_'phpunit') string_'phpunit' )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (string_'phpunit') string_'phpunit' )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute (string_'sphinx') string_'sphinx' )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (string_'make html') string_'make html' )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute (string_'tox') string_'tox' )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (string_'tox') string_'tox' )assignment )expression_statement )block )elif_clause )if_statement (if_statement (not_operator (identifier_cmd) identifier_cmd )not_operator (block (raise_statement (call (identifier_InvalidTestProgram) identifier_InvalidTestProgram (argument_list (binary_operator (string_"The test program %s is unknown. Valid options are: `nose`, `django` and `py`") string_"The test program %s is unknown. Valid options are: `nose`, `django` and `py`" (attribute (identifier_self) identifier_self (identifier_test_program) identifier_test_program )attribute )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_custom_args) identifier_custom_args )attribute (block (expression_statement (assignment (identifier_cmd) identifier_cmd (binary_operator (string_'%s %s') string_'%s %s' (tuple (identifier_cmd) identifier_cmd (attribute (identifier_self) identifier_self (identifier_custom_args) identifier_custom_args )attribute )tuple )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_cmd) identifier_cmd )return_statement )block )function_definition )module
Returns the full command to be executed at runtime
(module (function_definition (function_name_from_edgelist) function_name_from_edgelist (parameters (identifier_self) identifier_self (identifier_edges) identifier_edges (default_parameter (identifier_strict) identifier_strict (True) True )default_parameter )parameters (block (for_statement (identifier_edge) identifier_edge (identifier_edges) identifier_edges (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_edge) identifier_edge )argument_list )call (integer_3) integer_3 )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update) identifier_update )attribute (argument_list (subscript (identifier_edge) identifier_edge (integer_1) integer_1 )subscript (subscript (identifier_edge) identifier_edge (integer_0) integer_0 )subscript (dictionary_splat (subscript (identifier_edge) identifier_edge (integer_2) integer_2 )subscript )dictionary_splat )argument_list )call )expression_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_edge) identifier_edge )argument_list )call (integer_2) integer_2 )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update) identifier_update )attribute (argument_list (subscript (identifier_edge) identifier_edge (integer_1) integer_1 )subscript (subscript (identifier_edge) identifier_edge (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block )elif_clause (elif_clause (identifier_strict) identifier_strict (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'edge incorrect shape: {}') string_'edge incorrect shape: {}' (identifier_format) identifier_format )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_edge) identifier_edge )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition )module
Load transform data from an edge list into the current scene graph. Parameters ------------- edgelist : (n,) tuples (node_a, node_b, {key: value}) strict : bool If true, raise a ValueError when a malformed edge is passed in a tuple.
(module (function_definition (function_name_confidence_interval) function_name_confidence_interval (parameters (identifier_self) identifier_self (identifier_confidenceLevel) identifier_confidenceLevel )parameters (block (if_statement (not_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_confidenceLevel) identifier_confidenceLevel (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_confidenceLevel) identifier_confidenceLevel (integer_1) integer_1 )comparison_operator )boolean_operator )parenthesized_expression )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Parameter percentage has to be in [0,1]") string_"Parameter percentage has to be in [0,1]" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_underestimations) identifier_underestimations (list )list )assignment )expression_statement (expression_statement (assignment (identifier_overestimations) identifier_overestimations (list )list )assignment )expression_statement (for_statement (identifier_error) identifier_error (attribute (identifier_self) identifier_self (identifier__errorValues) identifier__errorValues )attribute (block (if_statement (comparison_operator (identifier_error) identifier_error (None) None )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (identifier_error) identifier_error (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_overestimations) identifier_overestimations (identifier_append) identifier_append )attribute (argument_list (identifier_error) identifier_error )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_error) identifier_error (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_underestimations) identifier_underestimations (identifier_append) identifier_append )attribute (argument_list (identifier_error) identifier_error )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_overestimations) identifier_overestimations (identifier_sort) identifier_sort )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_underestimations) identifier_underestimations (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_reverse) identifier_reverse (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_overIdx) identifier_overIdx (binary_operator (call (identifier_int) identifier_int (argument_list (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_overestimations) identifier_overestimations )argument_list )call (identifier_confidenceLevel) identifier_confidenceLevel )binary_operator )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_underIdx) identifier_underIdx (binary_operator (call (identifier_int) identifier_int (argument_list (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_underestimations) identifier_underestimations )argument_list )call (identifier_confidenceLevel) identifier_confidenceLevel )binary_operator )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_overestimation) identifier_overestimation (float_0.0) float_0.0 )assignment )expression_statement (expression_statement (assignment (identifier_underestimation) identifier_underestimation (float_0.0) float_0.0 )assignment )expression_statement (if_statement (comparison_operator (identifier_overIdx) identifier_overIdx (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_overestimation) identifier_overestimation (subscript (identifier_overestimations) identifier_overestimations (identifier_overIdx) identifier_overIdx )subscript )assignment )expression_statement )block (else_clause (block (print_statement (call (identifier_len) identifier_len (argument_list (identifier_overestimations) identifier_overestimations )argument_list )call (identifier_confidenceLevel) identifier_confidenceLevel )print_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_underIdx) identifier_underIdx (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_underestimation) identifier_underestimation (subscript (identifier_underestimations) identifier_underestimations (identifier_underIdx) identifier_underIdx )subscript )assignment )expression_statement )block )if_statement (return_statement (expression_list (identifier_underestimation) identifier_underestimation (identifier_overestimation) identifier_overestimation )expression_list )return_statement )block )function_definition )module
Calculates for which value confidenceLevel% of the errors are closer to 0. :param float confidenceLevel: percentage of the errors that should be smaller than the returned value for overestimations and larger than the returned value for underestimations. confidenceLevel has to be in [0.0, 1.0] :return: return a tuple containing the underestimation and overestimation for the given confidenceLevel :rtype: tuple :warning: Index is still not calculated correctly
(module (function_definition (function_name_docgraph2freqt) function_name_docgraph2freqt (parameters (identifier_docgraph) identifier_docgraph (default_parameter (identifier_root) identifier_root (None) None )default_parameter (default_parameter (identifier_include_pos) identifier_include_pos (False) False )default_parameter (default_parameter (identifier_escape_func) identifier_escape_func (identifier_FREQT_ESCAPE_FUNC) identifier_FREQT_ESCAPE_FUNC )default_parameter )parameters (block (if_statement (comparison_operator (identifier_root) identifier_root (None) None )comparison_operator (block (return_statement (call (attribute (string_u"\n") string_u"\n" (identifier_join) identifier_join )attribute (generator_expression (call (identifier_sentence2freqt) identifier_sentence2freqt (argument_list (identifier_docgraph) identifier_docgraph (identifier_sentence) identifier_sentence (keyword_argument (identifier_include_pos) identifier_include_pos (identifier_include_pos) identifier_include_pos )keyword_argument (keyword_argument (identifier_escape_func) identifier_escape_func (identifier_escape_func) identifier_escape_func )keyword_argument )argument_list )call (for_in_clause (identifier_sentence) identifier_sentence (attribute (identifier_docgraph) identifier_docgraph (identifier_sentences) identifier_sentences )attribute )for_in_clause )generator_expression )call )return_statement )block (else_clause (block (return_statement (call (identifier_sentence2freqt) identifier_sentence2freqt (argument_list (identifier_docgraph) identifier_docgraph (identifier_root) identifier_root (keyword_argument (identifier_include_pos) identifier_include_pos (identifier_include_pos) identifier_include_pos )keyword_argument (keyword_argument (identifier_escape_func) identifier_escape_func (identifier_escape_func) identifier_escape_func )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
convert a docgraph into a FREQT string.
(module (function_definition (function_name_lookup_data) function_name_lookup_data (parameters (identifier_self) identifier_self (identifier_lookup) identifier_lookup (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_value) identifier_value (identifier_data) identifier_data )assignment )expression_statement (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_lookup) identifier_lookup (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_parts) identifier_parts )not_operator (not_operator (subscript (identifier_parts) identifier_parts (integer_0) integer_0 )subscript )not_operator )boolean_operator (block (return_statement (identifier_value) identifier_value )return_statement )block )if_statement (expression_statement (assignment (identifier_part) identifier_part (subscript (identifier_parts) identifier_parts (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_remaining_lookup) identifier_remaining_lookup (call (attribute (string_'.') string_'.' (identifier_join) identifier_join )attribute (argument_list (subscript (identifier_parts) identifier_parts (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (identifier_callable) identifier_callable (argument_list (call (identifier_getattr) identifier_getattr (argument_list (identifier_data) identifier_data (string_'keys') string_'keys' (None) None )argument_list )call )argument_list )call (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_data) identifier_data (string_'__getitem__') string_'__getitem__' )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_value) identifier_value (subscript (identifier_data) identifier_data (identifier_part) identifier_part )subscript )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_getattr) identifier_getattr (argument_list (identifier_data) identifier_data (identifier_part) identifier_part )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (if_statement (boolean_operator (call (identifier_callable) identifier_callable (argument_list (identifier_value) identifier_value )argument_list )call (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_value) identifier_value (string_'db_manager') string_'db_manager' )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_value) identifier_value (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_remaining_lookup) identifier_remaining_lookup )not_operator (block (return_statement (identifier_value) identifier_value )return_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_lookup_data) identifier_lookup_data )attribute (argument_list (identifier_remaining_lookup) identifier_remaining_lookup (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Given a lookup string, attempts to descend through nested data looking for the value. Can work with either dictionary-alikes or objects (or any combination of those). Lookups should be a string. If it is a dotted path, it will be split on ``.`` & it will traverse through to find the final value. If not, it will simply attempt to find either a key or attribute of that name & return it. Example:: >>> data = { ... 'type': 'message', ... 'greeting': { ... 'en': 'hello', ... 'fr': 'bonjour', ... 'es': 'hola', ... }, ... 'person': Person( ... name='daniel' ... ) ... } >>> lookup_data('type', data) 'message' >>> lookup_data('greeting.en', data) 'hello' >>> lookup_data('person.name', data) 'daniel'
(module (function_definition (function_name_list_) function_name_list_ (parameters (default_parameter (identifier_runas) identifier_runas (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (identifier__rbenv_exec) identifier__rbenv_exec (argument_list (list (string_'install') string_'install' (string_'--list') string_'--list' )list (keyword_argument (identifier_runas) identifier_runas (identifier_runas) identifier_runas )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_output) identifier_output (block (for_statement (identifier_line) identifier_line (call (attribute (identifier_output) identifier_output (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_line) identifier_line (string_'Available versions:') string_'Available versions:' )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
List the installable versions of ruby runas The user under which to run rbenv. If not specified, then rbenv will be run as the user under which Salt is running. CLI Example: .. code-block:: bash salt '*' rbenv.list
(module (function_definition (function_name_utc_dt) function_name_utc_dt (parameters (identifier_dt) identifier_dt )parameters (block (if_statement (not_operator (attribute (identifier_dt) identifier_dt (identifier_tzinfo) identifier_tzinfo )attribute )not_operator (block (return_statement (call (attribute (attribute (identifier_pytz) identifier_pytz (identifier_utc) identifier_utc )attribute (identifier_localize) identifier_localize )attribute (argument_list (identifier_dt) identifier_dt )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_dt) identifier_dt (identifier_astimezone) identifier_astimezone )attribute (argument_list (attribute (identifier_pytz) identifier_pytz (identifier_utc) identifier_utc )attribute )argument_list )call )return_statement )block )function_definition )module
Set UTC timezone on a datetime object. A naive datetime is assumed to be in UTC TZ.
(module (function_definition (function_name_connect) function_name_connect (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (for_statement (identifier_group) identifier_group (tuple (string_'inlets') string_'inlets' (string_'receivers') string_'receivers' (string_'outlets') string_'outlets' (string_'senders') string_'senders' )tuple (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__connect_subgroup) identifier__connect_subgroup )attribute (argument_list (identifier_group) identifier_group )argument_list )call )expression_statement )block )for_statement )block (except_clause (identifier_BaseException) identifier_BaseException (block (expression_statement (call (attribute (identifier_objecttools) identifier_objecttools (identifier_augment_excmessage) identifier_augment_excmessage )attribute (argument_list (binary_operator (concatenated_string (string_'While trying to build the node connection of the `%s` ') string_'While trying to build the node connection of the `%s` ' (string_'sequences of the model handled by element `%s`') string_'sequences of the model handled by element `%s`' )concatenated_string (tuple (subscript (identifier_group) identifier_group (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (call (attribute (identifier_objecttools) identifier_objecttools (identifier_devicename) identifier_devicename )attribute (argument_list (identifier_self) identifier_self )argument_list )call )tuple )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Connect the link sequences of the actual model.
(module (function_definition (function_name_wrap) function_name_wrap (parameters (identifier_self) identifier_self (identifier_string) identifier_string (identifier_width) identifier_width )parameters (block (if_statement (boolean_operator (not_operator (identifier_string) identifier_string )not_operator (comparison_operator (identifier_width) identifier_width (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"invalid string: %s or width: %s") string_"invalid string: %s or width: %s" (tuple (identifier_string) identifier_string (identifier_width) identifier_width )tuple )binary_operator )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_tmp) identifier_tmp (string_"") string_"" )assignment )expression_statement (for_statement (identifier_line) identifier_line (call (attribute (identifier_string) identifier_string (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_line) identifier_line )argument_list )call (identifier_width) identifier_width )comparison_operator (block (expression_statement (augmented_assignment (identifier_tmp) identifier_tmp (binary_operator (identifier_line) identifier_line (string_"\n") string_"\n" )binary_operator )augmented_assignment )expression_statement (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_cur) identifier_cur (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_length) identifier_length (call (identifier_len) identifier_len (argument_list (identifier_line) identifier_line )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (binary_operator (identifier_cur) identifier_cur (identifier_width) identifier_width )binary_operator (identifier_length) identifier_length )comparison_operator (block (expression_statement (assignment (identifier_cur) identifier_cur (binary_operator (binary_operator (call (attribute (subscript (identifier_line) identifier_line (slice (colon) colon (binary_operator (identifier_cur) identifier_cur (identifier_width) identifier_width )binary_operator )slice )subscript (identifier_rfind) identifier_rfind )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_sep) identifier_sep )attribute )argument_list )call (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_sep) identifier_sep )attribute )argument_list )call )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_line) identifier_line (binary_operator (binary_operator (subscript (identifier_line) identifier_line (slice (colon) colon (identifier_cur) identifier_cur )slice )subscript (string_"\n") string_"\n" )binary_operator (subscript (identifier_line) identifier_line (slice (binary_operator (identifier_cur) identifier_cur (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript )binary_operator )assignment )expression_statement )block )while_statement (expression_statement (augmented_assignment (identifier_tmp) identifier_tmp (binary_operator (identifier_line) identifier_line (string_"\n\n") string_"\n\n" )binary_operator )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_tmp) identifier_tmp )return_statement )block )function_definition )module
Wrap lines according to width Place '\n' whenever necessary
(module (function_definition (function_name_from_database) function_name_from_database (parameters (identifier_cls) identifier_cls (identifier_database) identifier_database )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_database) identifier_database (identifier_PostgresqlDatabase) identifier_PostgresqlDatabase )argument_list )call (block (return_statement (call (identifier_PostgresqlMigrator) identifier_PostgresqlMigrator (argument_list (identifier_database) identifier_database )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_database) identifier_database (identifier_SqliteDatabase) identifier_SqliteDatabase )argument_list )call (block (return_statement (call (identifier_SqliteMigrator) identifier_SqliteMigrator (argument_list (identifier_database) identifier_database )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_database) identifier_database (identifier_MySQLDatabase) identifier_MySQLDatabase )argument_list )call (block (return_statement (call (identifier_MySQLMigrator) identifier_MySQLMigrator (argument_list (identifier_database) identifier_database )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_SchemaMigrator) identifier_SchemaMigrator (identifier_cls) identifier_cls )argument_list )call (identifier_from_database) identifier_from_database )attribute (argument_list (identifier_database) identifier_database )argument_list )call )return_statement )block )function_definition )module
Initialize migrator by db.
(module (function_definition (function_name_get_all_formulae) function_name_get_all_formulae (parameters (identifier_chebi_ids) identifier_chebi_ids )parameters (block (expression_statement (assignment (identifier_all_formulae) identifier_all_formulae (list_comprehension (call (identifier_get_formulae) identifier_get_formulae (argument_list (identifier_chebi_id) identifier_chebi_id )argument_list )call (for_in_clause (identifier_chebi_id) identifier_chebi_id (identifier_chebi_ids) identifier_chebi_ids )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_sublist) identifier_sublist (identifier_all_formulae) identifier_all_formulae )for_in_clause (for_in_clause (identifier_x) identifier_x (identifier_sublist) identifier_sublist )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Returns all formulae
(module (function_definition (function_name_domain_score) function_name_domain_score (parameters (identifier_self) identifier_self (identifier_domains) identifier_domains )parameters (block (expression_statement (call (identifier_warn) identifier_warn (argument_list (concatenated_string (string_'OpenDNS Domain Scores endpoint is deprecated. Use ') string_'OpenDNS Domain Scores endpoint is deprecated. Use ' (string_'InvestigateApi.categorization() instead') string_'InvestigateApi.categorization() instead' )concatenated_string (identifier_DeprecationWarning) identifier_DeprecationWarning )argument_list )call )expression_statement (expression_statement (assignment (identifier_url_path) identifier_url_path (string_'domains/score/') string_'domains/score/' )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__multi_post) identifier__multi_post )attribute (argument_list (identifier_url_path) identifier_url_path (identifier_domains) identifier_domains )argument_list )call )return_statement )block )function_definition )module
Calls domain scores endpoint. This method is deprecated since OpenDNS Investigate API endpoint is also deprecated.
(module (function_definition (function_name_get_wide_unicode) function_name_get_wide_unicode (parameters (identifier_self) identifier_self (identifier_i) identifier_i )parameters (block (expression_statement (assignment (identifier_value) identifier_value (list )list )assignment )expression_statement (for_statement (identifier_x) identifier_x (call (identifier_range) identifier_range (argument_list (integer_3) integer_3 )argument_list )call (block (expression_statement (assignment (identifier_c) identifier_c (call (identifier_next) identifier_next (argument_list (identifier_i) identifier_i )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_c) identifier_c (string_'0') string_'0' )comparison_operator (block (expression_statement (call (attribute (identifier_value) identifier_value (identifier_append) identifier_append )attribute (argument_list (identifier_c) identifier_c )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_SyntaxError) identifier_SyntaxError (argument_list (binary_operator (string_'Invalid wide Unicode character at %d!') string_'Invalid wide Unicode character at %d!' (parenthesized_expression (binary_operator (attribute (identifier_i) identifier_i (identifier_index) identifier_index )attribute (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier_next) identifier_next (argument_list (identifier_i) identifier_i )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_c) identifier_c (tuple (string_'0') string_'0' (string_'1') string_'1' )tuple )comparison_operator (block (expression_statement (call (attribute (identifier_value) identifier_value (identifier_append) identifier_append )attribute (argument_list (identifier_c) identifier_c )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_SyntaxError) identifier_SyntaxError (argument_list (binary_operator (string_'Invalid wide Unicode character at %d!') string_'Invalid wide Unicode character at %d!' (parenthesized_expression (binary_operator (attribute (identifier_i) identifier_i (identifier_index) identifier_index )attribute (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement (for_statement (identifier_x) identifier_x (call (identifier_range) identifier_range (argument_list (integer_4) integer_4 )argument_list )call (block (expression_statement (assignment (identifier_c) identifier_c (call (identifier_next) identifier_next (argument_list (identifier_i) identifier_i )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_c) identifier_c (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier__HEX) identifier__HEX )comparison_operator (block (expression_statement (call (attribute (identifier_value) identifier_value (identifier_append) identifier_append )attribute (argument_list (identifier_c) identifier_c )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_SyntaxError) identifier_SyntaxError (argument_list (binary_operator (string_'Invalid wide Unicode character at %d!') string_'Invalid wide Unicode character at %d!' (parenthesized_expression (binary_operator (attribute (identifier_i) identifier_i (identifier_index) identifier_index )attribute (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (return_statement (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Get narrow Unicode.
(module (function_definition (function_name_get_plugins_info) function_name_get_plugins_info (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_d) identifier_d (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_p) identifier_p (attribute (identifier_self) identifier_self (identifier_plugins) identifier_plugins )attribute (block (expression_statement (call (attribute (identifier_d) identifier_d (identifier_update) identifier_update )attribute (argument_list (call (attribute (identifier_p) identifier_p (identifier_get_info) identifier_get_info )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Collect the current live info from all the registered plugins. Return a dictionary, keyed on the plugin name.
(module (function_definition (function_name_transaction) function_name_transaction (parameters (identifier_data_access) identifier_data_access )parameters (block (expression_statement (assignment (identifier_old_autocommit) identifier_old_autocommit (attribute (identifier_data_access) identifier_data_access (identifier_autocommit) identifier_autocommit )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_data_access) identifier_data_access (identifier_autocommit) identifier_autocommit )attribute (False) False )assignment )expression_statement (try_statement (block (expression_statement (yield (identifier_data_access) identifier_data_access )yield )expression_statement )block (except_clause (as_pattern (identifier_RollbackTransaction) identifier_RollbackTransaction (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_data_access) identifier_data_access (identifier_rollback) identifier_rollback )attribute (argument_list )argument_list )call )expression_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_data_access) identifier_data_access (identifier_rollback) identifier_rollback )attribute (argument_list )argument_list )call )expression_statement (raise_statement (identifier_ex) identifier_ex )raise_statement )block )except_clause (else_clause (block (expression_statement (call (attribute (identifier_data_access) identifier_data_access (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )else_clause (finally_clause (block (expression_statement (assignment (attribute (identifier_data_access) identifier_data_access (identifier_autocommit) identifier_autocommit )attribute (identifier_old_autocommit) identifier_old_autocommit )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Wrap statements in a transaction. If the statements succeed, commit, otherwise rollback. :param data_access: a DataAccess instance
(module (function_definition (function_name_list_all_directories) function_name_list_all_directories (parameters (identifier_self) identifier_self )parameters (block (function_definition (function_name_list_dirs_recursively) function_name_list_dirs_recursively (parameters (identifier_directory) identifier_directory )parameters (block (if_statement (comparison_operator (identifier_directory) identifier_directory (attribute (identifier_self) identifier_self (identifier_filesystem) identifier_filesystem )attribute )comparison_operator (block (expression_statement (yield (identifier_directory) identifier_directory )yield )expression_statement )block )if_statement (expression_statement (assignment (identifier_d_gen) identifier_d_gen (call (attribute (identifier_itertools) identifier_itertools (identifier_chain) identifier_chain )attribute (argument_list (attribute (identifier_directory) identifier_directory (identifier_directories) identifier_directories )attribute (list_splat (call (identifier_tuple) identifier_tuple (generator_expression (call (identifier_list_dirs_recursively) identifier_list_dirs_recursively (argument_list (identifier_d) identifier_d )argument_list )call (for_in_clause (identifier_d) identifier_d (attribute (identifier_directory) identifier_directory (identifier_directories) identifier_directories )attribute )for_in_clause )generator_expression )call )list_splat )argument_list )call )assignment )expression_statement (for_statement (identifier_d) identifier_d (identifier_d_gen) identifier_d_gen (block (expression_statement (yield (identifier_d) identifier_d )yield )expression_statement )block )for_statement )block )function_definition (return_statement (call (identifier_list_dirs_recursively) identifier_list_dirs_recursively (argument_list (attribute (identifier_self) identifier_self (identifier_filesystem) identifier_filesystem )attribute )argument_list )call )return_statement )block )function_definition )module
Utility method that yields all directories on the device's file systems.
(module (function_definition (function_name__form_datetimes) function_name__form_datetimes (parameters (identifier_days) identifier_days (identifier_msecs) identifier_msecs )parameters (block (expression_statement (assignment (identifier_all_datetimes) identifier_all_datetimes (list )list )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (attribute (identifier_days) identifier_days (identifier_size) identifier_size )attribute )argument_list )call (block (expression_statement (assignment (identifier_day) identifier_day (call (identifier_int) identifier_int (argument_list (subscript (identifier_days) identifier_days (identifier_i) identifier_i )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_msec) identifier_msec (subscript (identifier_msecs) identifier_msecs (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_scanline_datetimes) identifier_scanline_datetimes (list )list )assignment )expression_statement (for_statement (identifier_j) identifier_j (call (identifier_range) identifier_range (argument_list (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_VALUES_PER_SCAN_LINE) identifier_VALUES_PER_SCAN_LINE (integer_4) integer_4 )binary_operator )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_usec) identifier_usec (binary_operator (integer_1000) integer_1000 (parenthesized_expression (binary_operator (binary_operator (identifier_j) identifier_j (identifier_VIEW_TIME_ADJUSTMENT) identifier_VIEW_TIME_ADJUSTMENT )binary_operator (identifier_msec) identifier_msec )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_delta) identifier_delta (parenthesized_expression (call (attribute (identifier_dt) identifier_dt (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_days) identifier_days (identifier_day) identifier_day )keyword_argument (keyword_argument (identifier_microseconds) identifier_microseconds (identifier_usec) identifier_usec )keyword_argument )argument_list )call )parenthesized_expression )assignment )expression_statement (for_statement (identifier_k) identifier_k (call (identifier_range) identifier_range (argument_list (integer_4) integer_4 )argument_list )call (block (expression_statement (call (attribute (identifier_scanline_datetimes) identifier_scanline_datetimes (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_delta) identifier_delta (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement (expression_statement (call (attribute (identifier_all_datetimes) identifier_all_datetimes (identifier_append) identifier_append )attribute (argument_list (identifier_scanline_datetimes) identifier_scanline_datetimes )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_all_datetimes) identifier_all_datetimes (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_np) identifier_np (identifier_float64) identifier_float64 )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Calculate seconds since EPOCH from days and milliseconds for each of IASI scan.
(module (function_definition (function_name_get_valid_cwd) function_name_get_valid_cwd (parameters )parameters (block (try_statement (block (expression_statement (assignment (identifier_cwd) identifier_cwd (call (identifier__current_dir) identifier__current_dir (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (block (expression_statement (call (identifier_warn) identifier_warn (argument_list (binary_operator (binary_operator (string_"Your current directory is invalid. If you open a ticket at ") string_"Your current directory is invalid. If you open a ticket at " (string_"https://github.com/milkbikis/powerline-shell/issues/new ") string_"https://github.com/milkbikis/powerline-shell/issues/new " )binary_operator (string_"we would love to help fix the issue.") string_"we would love to help fix the issue." )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (string_"> ") string_"> " )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_cwd) identifier_cwd (identifier_split) identifier_split )attribute (argument_list (attribute (identifier_os) identifier_os (identifier_sep) identifier_sep )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_up) identifier_up (identifier_cwd) identifier_cwd )assignment )expression_statement (while_statement (boolean_operator (identifier_parts) identifier_parts (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_up) identifier_up )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_up) identifier_up (call (attribute (attribute (identifier_os) identifier_os (identifier_sep) identifier_sep )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_parts) identifier_parts )argument_list )call )assignment )expression_statement )block )while_statement (if_statement (comparison_operator (identifier_cwd) identifier_cwd (identifier_up) identifier_up )comparison_operator (block (expression_statement (call (identifier_warn) identifier_warn (argument_list (binary_operator (string_"Your current directory is invalid. Lowest valid directory: ") string_"Your current directory is invalid. Lowest valid directory: " (identifier_up) identifier_up )binary_operator )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_cwd) identifier_cwd )return_statement )block )function_definition )module
Determine and check the current working directory for validity. Typically, an directory arises when you checkout a different branch on git that doesn't have this directory. When an invalid directory is found, a warning is printed to the screen, but the directory is still returned as-is, since this is what the shell considers to be the cwd.
(module (function_definition (function_name_get_history_by_tail_number) function_name_get_history_by_tail_number (parameters (identifier_self) identifier_self (identifier_tail_number) identifier_tail_number (default_parameter (identifier_page) identifier_page (integer_1) integer_1 )default_parameter (default_parameter (identifier_limit) identifier_limit (integer_100) integer_100 )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_REG_BASE) identifier_REG_BASE (identifier_format) identifier_format )attribute (argument_list (identifier_tail_number) identifier_tail_number (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier_AUTH_TOKEN) identifier_AUTH_TOKEN )attribute )argument_list )call (identifier_page) identifier_page (identifier_limit) identifier_limit )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__fr24) identifier__fr24 )attribute (identifier_get_data) identifier_get_data )attribute (argument_list (identifier_url) identifier_url (True) True )argument_list )call )return_statement )block )function_definition )module
Fetch the history of a particular aircraft by its tail number. This method can be used to get the history of a particular aircraft by its tail number. It checks the user authentication and returns the data accordingly. Args: tail_number (str): The tail number, e.g. VT-ANL page (int): Optional page number; for users who are on a plan with flightradar24 they can pass in higher page numbers to get more data limit (int): Optional limit on number of records returned Returns: A list of dicts with the data; one dict for each row of data from flightradar24 Example:: from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_history_by_flight_number('VT-ANL') f.get_history_by_flight_number('VT-ANL',page=1,limit=10)
(module (function_definition (function_name_findPrevStmt) function_name_findPrevStmt (parameters (identifier_self) identifier_self (identifier_block) identifier_block )parameters (block (expression_statement (assignment (identifier_stmtEnd) identifier_stmtEnd (call (attribute (identifier_self) identifier_self (identifier__prevNonCommentBlock) identifier__prevNonCommentBlock )attribute (argument_list (identifier_block) identifier_block )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_stmtStart) identifier_stmtStart (call (attribute (identifier_self) identifier_self (identifier_findStmtStart) identifier_findStmtStart )attribute (argument_list (identifier_stmtEnd) identifier_stmtEnd )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Statement) identifier_Statement (argument_list (attribute (identifier_self) identifier_self (identifier__qpart) identifier__qpart )attribute (identifier_stmtStart) identifier_stmtStart (identifier_stmtEnd) identifier_stmtEnd )argument_list )call )return_statement )block )function_definition )module
Returns a tuple that contains the first and last line of the previous statement before line.
(module (function_definition (function_name_check_security_settings) function_name_check_security_settings (parameters )parameters (block (expression_statement (assignment (identifier_in_production) identifier_in_production (not_operator (parenthesized_expression (boolean_operator (attribute (identifier_current_app) identifier_current_app (identifier_debug) identifier_debug )attribute (attribute (identifier_current_app) identifier_current_app (identifier_testing) identifier_testing )attribute )boolean_operator )parenthesized_expression )not_operator )assignment )expression_statement (expression_statement (assignment (identifier_secure) identifier_secure (call (attribute (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (string_'SESSION_COOKIE_SECURE') string_'SESSION_COOKIE_SECURE' )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_in_production) identifier_in_production (not_operator (identifier_secure) identifier_secure )not_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_current_app) identifier_current_app (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_"SESSION_COOKIE_SECURE setting must be set to True to prevent the ") string_"SESSION_COOKIE_SECURE setting must be set to True to prevent the " (string_"session cookie from being leaked over an insecure channel.") string_"session cookie from being leaked over an insecure channel." )concatenated_string )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Warn if session cookie is not secure in production.