<commit_before>""" Prepares application environment.
    Variables assume project setup like:
    easyrequest_stuff
        easyrequest_project
            easyrequest_config
            easyrequest_app
        env_ezrqst
     """


import os, pprint, sys


## become self-aware
current_directory = os.path.dirname(os.path.abspath(__file__))

## vars
ACTIVATE_FILE = os.path.abspath( u'%s/../../env_ezrqst/bin/activate_this.py' % current_directory )
PROJECT_DIR = os.path.abspath( u'%s/../../easyrequest_project' % current_directory )
PROJECT_ENCLOSING_DIR = os.path.abspath( u'%s/../..' % current_directory )
SETTINGS_MODULE = u'easyrequest_config.settings'
SITE_PACKAGES_DIR = os.path.abspath( u'%s/../../env_ezrqst/lib/python*/site-packages' % current_directory )

## virtualenv
execfile( ACTIVATE_FILE, dict(__file__=ACTIVATE_FILE) )  # _now_ django is loaded into env, so following command will work
from django.core.wsgi import get_wsgi_application

## sys.path additions
for entry in [PROJECT_DIR, PROJECT_ENCLOSING_DIR, SITE_PACKAGES_DIR]:
 if entry not in sys.path:
   sys.path.append( entry )

## environment additions
os.environ[u'DJANGO_SETTINGS_MODULE'] = SETTINGS_MODULE  # so django can access its settings

## gogogo
application = get_wsgi_application()<commit_msg>updates wsgi file.<commit_after>""" Prepares application environment.
    Variables assume project setup like:
    easyrequest_stuff
        easyrequest_project
            easyrequest_config
            easyrequest_app
        env_ezrqst
     """


import os, pprint, sys


## become self-aware
current_directory = os.path.dirname(os.path.abspath(__file__))

## vars
CONFIG_DIR = os.path.dirname( os.path.abspath(__file__) )
PROJECT_DIR = os.path.dirname( CONFIG_DIR )
PROJECT_STUFF_DIR = os.path.dirname( PROJECT_DIR )  # easyrequest_project
SITE_PACKAGES_DIR = '%s/env_ezrqst/lib/python2.7/site-packages' % PROJECT_STUFF_DIR
ACTIVATE_FILE = '%s/env_ezrqst/bin/activate_this.py' % PROJECT_STUFF_DIR
SETTINGS_MODULE = 'easyrequest_config.settings'

## virtualenv
execfile( ACTIVATE_FILE, dict(__file__=ACTIVATE_FILE) )  # _now_ django is loaded into env

## sys.path additions
for entry in [PROJECT_DIR, PROJECT_STUFF_DIR, SITE_PACKAGES_DIR]:
 if entry not in sys.path:
   sys.path.append( entry )

## environment additions
os.environ[u'DJANGO_SETTINGS_MODULE'] = SETTINGS_MODULE  # so django can access its settings

## gogogo
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
{'fraction_non_alphanumeric': 0.10136217948717949, 'fraction_numerical': 0.0008012820512820513, 'mean_word_length': 4.536585365853658, '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': '6687933', 'n_tokens_mistral': 857, 'n_tokens_neox': 828, 'n_words': 172}