<commit_before>import sqlite3
import ClientAPI
import MailboxAPI

def InitializeDatabase():
    conn = sqlite3.connect('Emailbox.db')
    cursor = conn.cursor()

    cursor.execute('''CREATE TABLE IF NOT EXISTS CLIENTS
                    (
                        ID INTEGER PRIMARY KEY AUTOINCREMENT,
                        FLOOR INTEGER NOT NULL,
                        FIRST_NAME NVARCHAR(60) NOT NULL,
                        LAST_NAME NVARCHAR(60) NOT NULL,
                        EMAIL_ADDRESS VARCHAR(200) NOT NULL
                    )''')

    cursor.execute('''CREATE TABLE IF NOT EXISTS MAILBOXES
                    (
                        ID INTEGER PRIMARY KEY AUTOINCREMENT,
                        INUSED BOOLEAN NOT NULL
                    )''')

    cursor.execute('''CREATE TABLE IF NOT EXISTS MAILBOX_BINDING
                    (
                        ID INTEGER PRIMARY KEY AUTOINCREMENT,
                        PWD VARCHAR(200) NOT NULL,
                        MAILBOX_IDS VARCHAR(100) NOT NULL,
                        CLIENT_ID INTEGER NOT NULL, --FOREIGN KEY CLIENT(ID)
                        LAST_REMIND_TIME DATETIME DEFAULT CURRENT_TIMESTAMP,
                        FINISH BOOLEAN NOT NULL --CHECK IF THIS PACKAGE IS BEEN TAKE OFF
                    )''')

    conn.commit()
    conn.close()

def AddSystemData():
    conn = sqlite3.connect('Emailbox.db')
    cursor = conn.cursor()

    #Mailbox Data
    cursor.execute("INSERT INTO MAILBOXES VALUES(NULL, 0)")
    cursor.execute("INSERT INTO MAILBOXES VALUES(NULL, 0)")

    #Add Your Own Data
    cursor.execute("INSERT INTO CLIENTS VALUES(NULL, '4F','Test', 'Test', '<EMAIL>')")
    cursor.execute("INSERT INTO CLIENTS VALUES(NULL, '5F','Test', 'Test', '<EMAIL>')")

    conn.commit()
    conn.close()

if __name__ == "__main__":
    InitializeDatabase()
    AddSystemData()
    clients = ClientAPI.ClientRepository.GetAll()
    assign = MailboxAPI.MailboxRepository.Assign(1)
    MailboxAPI.MailboxRepository.ConfirmAssign(assign, clients[0])
    MailboxAPI.MailboxRepository.ResendPassword()
<commit_msg>update systemdata<commit_after>import sqlite3
import ClientAPI
import MailboxAPI

def InitializeDatabase():
    conn = sqlite3.connect('Emailbox.db')
    cursor = conn.cursor()

    cursor.execute('''CREATE TABLE IF NOT EXISTS CLIENTS
                    (
                        ID INTEGER PRIMARY KEY AUTOINCREMENT,
                        FLOOR INTEGER NOT NULL,
                        FIRST_NAME NVARCHAR(60) NOT NULL,
                        LAST_NAME NVARCHAR(60) NOT NULL,
                        EMAIL_ADDRESS VARCHAR(200) NOT NULL
                    )''')

    cursor.execute('''CREATE TABLE IF NOT EXISTS MAILBOXES
                    (
                        ID INTEGER PRIMARY KEY AUTOINCREMENT,
                        INUSED BOOLEAN NOT NULL
                    )''')

    cursor.execute('''CREATE TABLE IF NOT EXISTS MAILBOX_BINDING
                    (
                        ID INTEGER PRIMARY KEY AUTOINCREMENT,
                        PWD VARCHAR(200) NOT NULL,
                        MAILBOX_IDS VARCHAR(100) NOT NULL,
                        CLIENT_ID INTEGER NOT NULL, --FOREIGN KEY CLIENT(ID)
                        LAST_REMIND_TIME DATETIME DEFAULT CURRENT_TIMESTAMP,
                        FINISH BOOLEAN NOT NULL --CHECK IF THIS PACKAGE IS BEEN TAKE OFF
                    )''')

    conn.commit()
    conn.close()

def AddSystemData():
    conn = sqlite3.connect('Emailbox.db')
    cursor = conn.cursor()

    #Mailbox Data
    cursor.execute("INSERT INTO MAILBOXES VALUES(NULL, 0)")
    cursor.execute("INSERT INTO MAILBOXES VALUES(NULL, 0)")

    #Add Your Own Data
    cursor.execute("INSERT INTO CLIENTS VALUES(NULL, '1F', 'Wei-Ming', 'Chen', '<EMAIL>')")
    cursor.execute("INSERT INTO CLIENTS VALUES(NULL, '2F', 'Hsiu-Chi', 'Chang', '<EMAIL>')")
    cursor.execute("INSERT INTO CLIENTS VALUES(NULL, '3F', 'Cheng-Yuan', 'Li', '<EMAIL>')")

    conn.commit()
    conn.close()

if __name__ == "__main__":
    InitializeDatabase()
    AddSystemData()
    clients = ClientAPI.ClientRepository.GetAll()
    assign = MailboxAPI.MailboxRepository.Assign(1)
    MailboxAPI.MailboxRepository.ConfirmAssign(assign, clients[0])
    MailboxAPI.MailboxRepository.ResendPassword()

{'fraction_non_alphanumeric': 0.0945977277996754, 'fraction_numerical': 0.010433572919081846, 'mean_word_length': 1.938692098092643, 'pattern_counts': {'":': 2, '<': 8, '<?xml version=': 0, '>': 8, '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': '2090558', 'n_tokens_mistral': 1326, 'n_tokens_neox': 1161, 'n_words': 307}