<commit_before>import os
import sys

from django.template import Context
import django.template.loader

sys.path.append(os.getcwd())
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shoot.django_settings")

config = {}

try:
    import shootconfig
    print("Custom context found...")
    config['context'] = Context(shootconfig.context)
except ImportError:
    print("No custom context found...")
    config['context'] = Context()<commit_msg>shoot can, if present, use CWD/django_settings.py as Django settings module<commit_after>import os
import sys

from django.template import Context
import django.template.loader

CWD = os.getcwd()
sys.path.append(CWD)

if os.path.exists(os.path.join(CWD, 'django_settings.py')):
    django_settings_module = 'django_settings'
    print("found custom django settings...")
else:
    django_settings_module = 'shoot.django_settings'
    print('no custom django settings found, using defaults..')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", django_settings_module)

config = {}

try:
    import shootconfig
    print("Custom context found...")
    config['context'] = Context(shootconfig.context)
except ImportError:
    print("No custom context found, using defaults...")
    config['context'] = Context()
{'fraction_non_alphanumeric': 0.12179487179487179, 'fraction_numerical': 0.0, 'mean_word_length': 4.919431279620853, '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': '6493196', 'n_tokens_mistral': 371, 'n_tokens_neox': 366, 'n_words': 91}