<commit_before>#!/usr/bin/python
from format import *
import sys
def usage(prog_name):
    print "Usage: %s dbench_output_dir email_to_report_to" % prog_name
if len(sys.argv) != 3:
    usage(sys.argv[0])
    sys.exit(2)
db = dbench(sys.argv[1] + '/', sys.argv[2])
db.report()<commit_msg>Account for --email flag.<commit_after>#!/usr/bin/python
from format import *
import sys
email_flag = '--email'
def usage(prog_name):
    print "Usage: %s dbench_output_dir %s email_to_report_to" % (prog_name, email_flag)
if len(sys.argv) != 4 or sys.argv[2] != email_flag:
    usage(sys.argv[0])
    sys.exit(2)
db = dbench(sys.argv[1] + '/', sys.argv[3])
db.report()
{'fraction_non_alphanumeric': 0.17251908396946564, 'fraction_numerical': 0.016793893129770993, 'mean_word_length': 4.512605042016807, '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': '3789790', 'n_tokens_mistral': 265, 'n_tokens_neox': 256, 'n_words': 55}