<commit_before>"""
Contains functions and classes used to parse, handle, validate and interpret
data received from the CanSat (or Faker).
"""

from .exceptions import ParseError, MalformedPacket, InvalidLine
from .calculate import (calculate_temp_NTC, calculate_press, calculate_height,
                        calculate_gyr)
from .config import EXAMPLE_DATA_CONFIG

from copy import copy

import re

HEAD = "SGCanScience"
HEAD_SEP = ">"  # Separates Head of datastring.
DATA_SEP = "|"  # Separates data-points of datastring.
FIELD_SEP = ":"  # Separates key and value in a data field.
REQUIRED_FIELDS = ["Time", "Press", "NTC", "GyrX", "GyrY", "GyrZ",
                   "AccX", "AccY", "AccZ", "MagX", "MagY", "MagZ", "Lat",
                   "Long", "Sat"]
<commit_msg>More flexible parse.<commit_after>"""
Contains functions and classes used to parse, handle, validate and interpret
data received from the CanSat (or Faker).
"""

from .exceptions import ParseError, MalformedPacket, InvalidLine
from .calculate import (calculate_temp_NTC, calculate_press, calculate_height,
                        calculate_gyr)
from .config import EXAMPLE_DATA_CONFIG

from copy import copy

import re

HEAD = "SGCanScience"
HEAD_SEP = ">"  # Separates Head of datastring.
DATA_SEP = "|"  # Separates data-points of datastring.
FIELD_SEP = ":"  # Separates key and value in a data field.
REQUIRED_FIELDS = ["Time", "Press", "NTC", "GyrX", "GyrY", "GyrZ",
                   "AccX", "AccY", "AccZ", "MagX", "MagY", "MagZ", "Lat",
                   "Sat"]

{'fraction_non_alphanumeric': 0.11909385113268608, 'fraction_numerical': 0.0, 'mean_word_length': 3.56047197640118, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3356855', 'n_tokens_mistral': 508, 'n_tokens_neox': 495, 'n_words': 159}