<commit_before>#!/usr/bin/env python
import sys
from os.path import dirname, abspath

from django.conf import settings

if not settings.configured:
    settings.configure(
        DATABASE_ENGINE = 'sqlite3',
        SITE_ID = 1,
        TEMPLATE_LOADERS = (
            'django.template.loaders.filesystem.load_template_source',
            'django.template.loaders.app_directories.load_template_source',
        ),
        MIDDLEWARE_CLASSES = (
            'django.middleware.common.CommonMiddleware',<commit_msg>Allow running tests with postgres<commit_after>#!/usr/bin/env python
import sys
from os.path import dirname, abspath

from django.conf import settings

if len(sys.argv) > 1 and 'postgres' in sys.argv:
    sys.argv.remove('postgres')
    db_engine = 'postgresql_psycopg2'
    db_name = 'test_main'
else:
    db_engine = 'sqlite3'
    db_name = ''

if not settings.configured:
    settings.configure(
        DATABASE_ENGINE = db_engine,
        DATABASE_NAME = db_name,
        SITE_ID = 1,
        TEMPLATE_LOADERS = (
            'django.template.loaders.filesystem.load_template_source',
            'django.template.loaders.app_directories.load_template_source',
        ),
        MIDDLEWARE_CLASSES = (
            'django.middleware.common.CommonMiddleware',
{'fraction_non_alphanumeric': 0.09453125, 'fraction_numerical': 0.0046875, 'mean_word_length': 2.9174311926605503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5577385', 'n_tokens_mistral': 423, 'n_tokens_neox': 408, 'n_words': 73}