<commit_before>###
# Copyright (c) 2013, tann <<EMAIL>>
# All rights reserved.
#
#
###

import supybot.utils as utils
from supybot.commands import *
import supybot.plugins as plugins
import supybot.ircutils as ircutils
import supybot.callbacks as callbacks
import supybot.ircdb as ircdb
import supybot.ircmsgs as ircmsgs
import supybot.schedule as schedule
import supybot.log as log
import os
import re
import sqlite3
import random
import time
import datetime

class TriviaTime(callbacks.Plugin):
    """
        TriviaTime - A trivia word game, guess the word and score points. Play KAOS rounds and work together to solve clues to find groups of words.
    """
    threaded = True # enables threading for supybot plugin

    def __init__(self, irc):
        log.info('*** Loaded TriviaTime!!! ***')
        self.__parent = super(TriviaTime, self)
        self.__parent.__init__(irc)

        """ games info """
        self.games = {} # separate game for each channel
        self.skips = {}
        self.pings = {}

        """ connections """
        dbLocation = self.registryValue('sqlitedb')
        # tuple head, tail ('example/example/', 'filename.txt')
        dbFolder = os.path.split(dbLocation)
        # take folder from split
        dbFolder = dbFolder[0]
        # create the folder
        if not os.path.exists(dbFolder):
            log.info("""The database location did not exist, creating folder structure""")
            os.makedirs(dbFolder)
        self.storage = self.Storage(dbLocation)
        self.storage.dropUserLogTable()
        self.storage.makeUserLogTable()
        self.storage.dropGameTable()
        self.storage.makeGameTable()
        self.storage.dropGameLogTable()
        self.storage.makeGameLogTable()
        self.storage.dropUserTable()
        self.storage.makeUserTable()
        self.storage.dropReportTable()
        self.storage.makeReportTable()
        self.storage.dropQuestionTable()
        self.storage.makeQuestionTable()
        self.storage.dropTemporaryQuestionTable()
        self.storage.makeTemporaryQuestionTable()
        self.storage.dropEditTable()
        self.storage.makeEditTable()
        #self.storage.insertUserLog('root', 1, 1, 10, 10, 30, 2013)
        #self.storage.insertUser('root', 1, 1)

        #filename = self.registryValue('quizfile')
        #self.addQuestionsFromFile(filename)
<commit_msg>Commenting out drop tables<commit_after>###
# Copyright (c) 2013, tann <<EMAIL>>
# All rights reserved.
#
#
###

import supybot.utils as utils
from supybot.commands import *
import supybot.plugins as plugins
import supybot.ircutils as ircutils
import supybot.callbacks as callbacks
import supybot.ircdb as ircdb
import supybot.ircmsgs as ircmsgs
import supybot.schedule as schedule
import supybot.log as log
import os
import re
import sqlite3
import random
import time
import datetime

class TriviaTime(callbacks.Plugin):
    """
        TriviaTime - A trivia word game, guess the word and score points. Play KAOS rounds and work together to solve clues to find groups of words.
    """
    threaded = True # enables threading for supybot plugin

    def __init__(self, irc):
        log.info('*** Loaded TriviaTime!!! ***')
        self.__parent = super(TriviaTime, self)
        self.__parent.__init__(irc)

        """ games info """
        self.games = {} # separate game for each channel
        self.skips = {}
        self.pings = {}

        """ connections """
        dbLocation = self.registryValue('sqlitedb')
        # tuple head, tail ('example/example/', 'filename.txt')
        dbFolder = os.path.split(dbLocation)
        # take folder from split
        dbFolder = dbFolder[0]
        # create the folder
        if not os.path.exists(dbFolder):
            log.info("""The database location did not exist, creating folder structure""")
            os.makedirs(dbFolder)
        self.storage = self.Storage(dbLocation)
        #self.storage.dropUserLogTable()
        self.storage.makeUserLogTable()
        #self.storage.dropGameTable()
        self.storage.makeGameTable()
        #self.storage.dropGameLogTable()
        self.storage.makeGameLogTable()
        #self.storage.dropUserTable()
        self.storage.makeUserTable()
        #self.storage.dropReportTable()
        self.storage.makeReportTable()
        #self.storage.dropQuestionTable()
        self.storage.makeQuestionTable()
        #self.storage.dropTemporaryQuestionTable()
        self.storage.makeTemporaryQuestionTable()
        #self.storage.dropEditTable()
        self.storage.makeEditTable()
        #self.storage.insertUserLog('root', 1, 1, 10, 10, 30, 2013)
        #self.storage.insertUser('root', 1, 1)

        #filename = self.registryValue('quizfile')
        #self.addQuestionsFromFile(filename)

{'fraction_non_alphanumeric': 0.10504289600334799, 'fraction_numerical': 0.008369951872776732, 'mean_word_length': 2.8548387096774195, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1000949', 'n_tokens_mistral': 1421, 'n_tokens_neox': 1360, 'n_words': 349}