<commit_before>import shelve, time
arguments = ["connection", "info", "args"]
minlevel = 1
helpstring = "addquote <quote>"

def main(connection, info, args) :
    qdb = shelve.open("quotes.db", writeback=True)
    if not qdb.has_key("quotes") :
        qdb["quotes"] = []
        qdb.sync()
    qdb.append("quote":" ".join(args[1:]), "time":time.time(), "method":"IRC", "info":info, "deleted":False})
    qdb.sync()
    connection.ircsend(info["channel"], "Quote %(quotenum)d added successfully." % dict(quotenum=len(qdb["quotes"])))
    qdb.close()<commit_msg>Fixing addquote.py<commit_after>import shelve, time
arguments = ["connection", "info", "args"]
minlevel = 1
helpstring = "addquote <quote>"

def main(connection, info, args) :
    qdb = shelve.open("quotes.db", writeback=True)
    if not qdb.has_key("quotes") :
        qdb["quotes"] = []
        qdb.sync()
    qdb.append({"quote":" ".join(args[1:]), "time":time.time(), "method":"IRC", "info":info, "deleted":False})
    qdb.sync()
    connection.ircsend(info["channel"], "Quote %(quotenum)d added successfully." % dict(quotenum=len(qdb["quotes"])))
    qdb.close()
{'fraction_non_alphanumeric': 0.20921985815602837, 'fraction_numerical': 0.0035460992907801418, 'mean_word_length': 4.673366834170854, 'pattern_counts': {'":': 10, '<': 5, '<?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': '2314936', 'n_tokens_mistral': 403, 'n_tokens_neox': 398, 'n_words': 76}