<commit_before>import pandas as pd
import matplotlib.pyplot as plt
import pdb

df = pd.read_csv("DBA.csv")
#df = pd.read_csv("XQQ.TO.csv")

df["SMA50"] = df["Close"].rolling(50).mean()

for i in range(1, len(df)):
    df.loc[i, 'tr'] = max(
        df.loc[i, 'High'] - df.loc[i, 'Low'],<commit_msg>Use command-line argument to feed in the filename<commit_after>import pandas as pd
import matplotlib.pyplot as plt
import pdb
import sys

# USAGE:
# python3 run.py DBA.csv
#
# The CSV file must be formatted the way you get it from Yahoo Finance, or this script
# will break.
# date, open, high, low, close, adj.close, volume

df = pd.read_csv(sys.argv[1])

df["SMA50"] = df["Close"].rolling(50).mean()

for i in range(1, len(df)):
    df.loc[i, 'tr'] = max(
        df.loc[i, 'High'] - df.loc[i, 'Low'],
{'fraction_non_alphanumeric': 0.16978776529338327, 'fraction_numerical': 0.0149812734082397, 'mean_word_length': 3.8902439024390243, 'pattern_counts': {'":': 0, '<': 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': '383963', 'n_tokens_mistral': 318, 'n_tokens_neox': 309, 'n_words': 92}