<commit_before># System imports first
import sys

# Module (local) imports
from import_data import import_data
from process import process_data, normalize, rotate_data
from output import plot_data


def main(argv=None):
    """ Main function, executed when running 'project_one'. """
    # Read the data
    data = import_data('data.txt')
    data = process_data(data)
    # data = normalize(data)
    # data = rotate_data(data)
    plot_data(data)

# If we're being run with `python project_one.py`, execute main() and exit
# afterwards with the return value of main().
if __name__ == "__main__":
    sys.exit(main())<commit_msg>Use command-line argument to specify data.<commit_after># System imports first
import sys
import argparse

# Module (local) imports
from import_data import import_data
from process import process_data, normalize, rotate_data
from output import plot_data


def main(argv=None):
    """ Main function, executed when running 'project_one'. """
    # Parse command-line arguments, this allows the input to be
    # configured from the command line.
    parser = argparse.ArgumentParser(
        description='Import, process and plot test data.'
    )
    parser.add_argument('data_file', type=str)

    args = parser.parse_args(argv)

    # Read the data
    data = import_data(args.data_file)
    data = process_data(data)
    # data = normalize(data)
    # data = rotate_data(data)
    plot_data(data)

# If we're being run with `python project_one.py`, execute main() and exit
# afterwards with the return value of main().
if __name__ == "__main__":
    sys.exit(main())
{'fraction_non_alphanumeric': 0.0969355847404628, 'fraction_numerical': 0.0, 'mean_word_length': 4.047318611987381, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '4120709', 'n_tokens_mistral': 469, 'n_tokens_neox': 456, 'n_words': 162}