<commit_before>#!/usr/bin/python
#-*- coding: UTF-8 -*-
import sys
import os
import logging
logging.basicConfig(filename='cicm.log', format='%(asctime)s | %(name)s | %(levelname)s | %(message)s', level=logging.DEBUG)

from db import FileDatabase
from gui2db import Gui2Db
from tkgui import Main
from tkgraphics import gallery_with_slideshow
from tagview import TagView
from helpview import HelpView

import keybindings

if __name__ == "__main__":

    dbname = 'master.sqlite'
    if len(sys.argv) > 1:
        dbname = sys.argv[1]
    logging.debug('Database: %s', dbname)

    run_init = False
    if not os.path.exists(dbname):
        dbname.debug('run init on %s', dbname)
        run_init = True
    db = FileDatabase(dbname)<commit_msg>Fix logging when initializing database<commit_after>#!/usr/bin/python
#-*- coding: UTF-8 -*-
import sys
import os
import logging
logging.basicConfig(filename='cicm.log', format='%(asctime)s | %(name)s | %(levelname)s | %(message)s', level=logging.DEBUG)

from db import FileDatabase
from gui2db import Gui2Db
from tkgui import Main
from tkgraphics import gallery_with_slideshow
from tagview import TagView
from helpview import HelpView

import keybindings

if __name__ == "__main__":

    dbname = 'master.sqlite'
    if len(sys.argv) > 1:
        dbname = sys.argv[1]
    logging.debug('Database: %s', dbname)

    run_init = False
    if not os.path.exists(dbname):
        logging.debug('run init on %s', dbname)
        run_init = True
    db = FileDatabase(dbname)
{'fraction_non_alphanumeric': 0.11772486772486772, 'fraction_numerical': 0.006613756613756613, 'mean_word_length': 3.960655737704918, 'pattern_counts': {'":': 2, '<': 3, '<?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': '1381123', 'n_tokens_mistral': 521, 'n_tokens_neox': 511, 'n_words': 139}