<commit_before>#!/usr/bin/env python
import datetime, os

#this method expects a two-dimensional list containing the data as lst, and a one-dimensional list containing titles as titlelst
def generate(lst, titlelst, count=[], folder=os.getcwd()+'/'):
    #make the document pretty (inthefuture)
    
    #hideous code to create the html report file with the prefix in the format of year month day hour minute
    report = open(folder + str(datetime.datetime.today()).replace(':','').replace('.','').replace(' ','').replace('-','')[0:14]+'report.html','w')
    report.write("""
                 <head>
                 <script src="sorttable.js"></script>
                 </head>
                 <style>
h1{
    font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
    font-size: 30px;
    color: #003399
    background: #fff;
    margin: 45px;
    text-align: left;
}

table
{
	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
	font-size: 12px;
	background: #fff;
	margin: 45px;
	width: 480px;
	border-collapse: collapse;
	text-align: left;
}
table th
{<commit_msg>makes tables sort again<commit_after>#!/usr/bin/env python
import datetime, os

#this method expects a two-dimensional list containing the data as lst, and a one-dimensional list containing titles as titlelst
def generate(lst, titlelst, count=[], folder=os.getcwd()+'/'):
    #make the document pretty (inthefuture)
    
    #hideous code to create the html report file with the prefix in the format of year month day hour minute
    report = open(folder + str(datetime.datetime.today()).replace(':','').replace('.','').replace(' ','').replace('-','')[0:14]+'report.html','w')
    #Import js library to make tables sort
    report.write('<head>')
    report.write('<script src="'+ os.getcwd() + '/sorttable.js"></script>')
    report.write('</head>')
    report.write("""
    <style>
h1{
    font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
    font-size: 30px;
    color: #003399
    background: #fff;
    margin: 45px;
    text-align: left;
}

table
{
	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
	font-size: 12px;
	background: #fff;
	margin: 45px;
	width: 480px;
	border-collapse: collapse;
	text-align: left;
}
table th
{
{'fraction_non_alphanumeric': 0.15602836879432624, 'fraction_numerical': 0.018617021276595744, 'mean_word_length': 3.5967413441955194, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3344028', 'n_tokens_mistral': 763, 'n_tokens_neox': 717, 'n_words': 220}