<commit_before>from datetime import datetime
import multiprocessing
import os

from biisan.constants import (
    ABOUT_TMPL,
    BIISAN_DATA_DIR,
    QUESTIONS,
    SETTINGS_TMPL,
)

from glueplate import Glue as _
from PyInquirer import prompt


def init():
    data_dir = os.path.join(os.getcwd(), BIISAN_DATA_DIR)
    if os.path.exists(data_dir):
        print('biisan data directory, {0} exists already.'.format(BIISAN_DATA_DIR))
        return
    answer = prompt(QUESTIONS)
    os.mkdir(data_dir)
    os.mkdir(os.path.join(data_dir, 'data'))
    os.mkdir(os.path.join(data_dir, 'data', 'blog'))
    os.mkdir(os.path.join(data_dir, 'data', 'templates'))
    os.mkdir(os.path.join(data_dir, 'data', 'extra'))
    os.mkdir(os.path.join(data_dir, 'out'))
    with open(os.path.join(data_dir, 'data', 'biisan_local_settings.py'), 'w') as f:
        f.write(<commit_msg>use sys.exit<commit_after>from datetime import datetime
import multiprocessing
import os
import sys

from biisan.constants import (
    ABOUT_TMPL,
    BIISAN_DATA_DIR,
    QUESTIONS,
    SETTINGS_TMPL,
)

from glueplate import Glue as _
from PyInquirer import prompt


def init():
    data_dir = os.path.join(os.getcwd(), BIISAN_DATA_DIR)
    if os.path.exists(data_dir):
        sys.exit('biisan data directory, {0} exists already.'.format(BIISAN_DATA_DIR))
        return
    answer = prompt(QUESTIONS)
    os.mkdir(data_dir)
    os.mkdir(os.path.join(data_dir, 'data'))
    os.mkdir(os.path.join(data_dir, 'data', 'blog'))
    os.mkdir(os.path.join(data_dir, 'data', 'templates'))
    os.mkdir(os.path.join(data_dir, 'data', 'extra'))
    os.mkdir(os.path.join(data_dir, 'out'))
    with open(os.path.join(data_dir, 'data', 'biisan_local_settings.py'), 'w') as f:
        f.write(
{'fraction_non_alphanumeric': 0.14017094017094017, 'fraction_numerical': 0.0011396011396011395, 'mean_word_length': 3.850828729281768, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1623004', 'n_tokens_mistral': 677, 'n_tokens_neox': 645, 'n_words': 126}