<commit_before>#!/usr/bin/env python
import os
import sys

### I know this is weird, but let us chdir() up to where
### the settings file is.
os.path.chdir(os.path.abspath(__file__, '../..'))
assert os.path.exists('mysite/settings.py')

### Okay, let us vendorify!
import vendor
vendor.vendorify()

### Now it is safe to import things.
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()<commit_msg>Fix the WSGI script to actually work<commit_after>#!/usr/bin/env python
import os
import os.path
import sys
import logging

### I know this is weird, but let us chdir() up to where
### the settings file is.
base_path = os.path.abspath(os.path.join(__file__, '../../..'))
print >> sys.stderr, base_path
os.chdir(base_path)

### Make sure we can find the settings module...
assert os.path.exists('mysite/settings.py')

### Okay, let us vendorify!
sys.path.insert(0, os.path.abspath('.'))
import vendor
vendor.vendorify()

### Now it is safe to import things.
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
{'fraction_non_alphanumeric': 0.14752724224643754, 'fraction_numerical': 0.0008382229673093043, 'mean_word_length': 4.685714285714286, 'pattern_counts': {'":': 0, '<': 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': '626099', 'n_tokens_mistral': 405, 'n_tokens_neox': 400, 'n_words': 114}