<commit_before>
# Establish the common DatabaseOperations instance, which we call 'db'.
# This code somewhat lifted from django evolution
from django.conf import settings
module_name = ['south.db', settings.DATABASE_ENGINE]
module = __import__('.'.join(module_name),{},{},[''])
db = module.DatabaseOperations()<commit_msg>Better error message when running south with an unsupported DB engine defined.<commit_after>
# Establish the common DatabaseOperations instance, which we call 'db'.
# This code somewhat lifted from django evolution
from django.conf import settings
import sys
module_name = ['south.db', settings.DATABASE_ENGINE]
try:
    module = __import__('.'.join(module_name),{},{},[''])
except ImportError:
    sys.stderr.write("There is no South database module for the engine '%s'. Please either choose a supported one, or remove South from INSTALLED_APPS.\n" % settings.DATABASE_ENGINE)
    sys.exit(1)
db = module.DatabaseOperations()
{'fraction_non_alphanumeric': 0.11075949367088607, 'fraction_numerical': 0.0010548523206751054, 'mean_word_length': 5.827338129496403, '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': '4389209', 'n_tokens_mistral': 262, 'n_tokens_neox': 260, 'n_words': 94}