<commit_before>"""
Django settings for amy project.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import json

from django.utils.translation import ugettext_lazy as _

BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/


# SECURITY WARNING: don't run with DEBUG turned on in production!
DEBUG = json.loads(os.environ.get('AMY_DEBUG', 'true'))
# For deployment in production:
# AMY_DEBUG=false AMY_SECRET_KEY="..." ./manage.py runserver ...

if DEBUG:
    SECRET_KEY = '<KEY>'
else:
    SECRET_KEY = None
SECRET_KEY = os.environ.get('AMY_SECRET_KEY', SECRET_KEY)

# be sure to put these values in your envvars, even for development
RECAPTCHA_PUBLIC_KEY = os.environ.get('AMY_RECAPTCHA_PUBLIC_KEY', None)
RECAPTCHA_PRIVATE_KEY = os.environ.get('AMY_RECAPTCHA_PRIVATE_KEY', None)
RECAPTCHA_USE_SSL = True
NOCAPTCHA = True  # nicer input

if DEBUG:
    # 'PASSED' in the form will always pass the RECAPTCHA test
    NOCAPTCHA = False  # uglier input, but possible to manually enter 'PASSED'
    os.environ['RECAPTCHA_TESTING'] = 'True'
else:
    # ensure the keys are present on production
    assert RECAPTCHA_PUBLIC_KEY, 'RECAPTCHA site key not present'
    assert RECAPTCHA_PRIVATE_KEY, 'RECAPTCHA secure key not present'

# email settings
ADMINS = (
    ('<NAME>', '<EMAIL>'),
    ('<NAME>', '<EMAIL>'),
)
# "From:" for error messages sent out to ADMINS
SERVER_EMAIL = os.environ.get('AMY_SERVER_EMAIL', 'root@localhost')

# addresses to receive "New workshop request" or "New profile update request"
# notifications
REQUEST_NOTIFICATIONS_RECIPIENTS = (
    '<EMAIL>',
)
EMAIL_HOST = os.environ.get('AMY_EMAIL_HOST', 'localhost')
EMAIL_HOST_USER = os.environ.get('AMY_EMAIL_HOST_USER', '')
EMAIL_HOST_PASSWORD = os.environ.get('AMY_EMAIL_HOST_PASSWORD', '')
EMAIL_PORT = int(os.environ.get('AMY_EMAIL_PORT', 25))
EMAIL_TIMEOUT = 10  # timeout for blocking email operations, in seconds
EMAIL_USE_TLS = json.loads(os.environ.get('AMY_EMAIL_USE_TLS', 'false'))
EMAIL_USE_SSL = json.loads(os.environ.get('AMY_EMAIL_USE_SSL', 'false'))

# "From:" for NOT error messages (ie. sent to whoever we want)
DEFAULT_FROM_EMAIL = os.environ.get('AMY_DEFAULT_FROM_EMAIL',
                                    'webmaster@localhost')

if DEBUG:<commit_msg>Settings: set correct email address for admins' ML<commit_after>"""
Django settings for amy project.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import json

from django.utils.translation import ugettext_lazy as _

BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/


# SECURITY WARNING: don't run with DEBUG turned on in production!
DEBUG = json.loads(os.environ.get('AMY_DEBUG', 'true'))
# For deployment in production:
# AMY_DEBUG=false AMY_SECRET_KEY="..." ./manage.py runserver ...

if DEBUG:
    SECRET_KEY = '<KEY>'
else:
    SECRET_KEY = None
SECRET_KEY = os.environ.get('AMY_SECRET_KEY', SECRET_KEY)

# be sure to put these values in your envvars, even for development
RECAPTCHA_PUBLIC_KEY = os.environ.get('AMY_RECAPTCHA_PUBLIC_KEY', None)
RECAPTCHA_PRIVATE_KEY = os.environ.get('AMY_RECAPTCHA_PRIVATE_KEY', None)
RECAPTCHA_USE_SSL = True
NOCAPTCHA = True  # nicer input

if DEBUG:
    # 'PASSED' in the form will always pass the RECAPTCHA test
    NOCAPTCHA = False  # uglier input, but possible to manually enter 'PASSED'
    os.environ['RECAPTCHA_TESTING'] = 'True'
else:
    # ensure the keys are present on production
    assert RECAPTCHA_PUBLIC_KEY, 'RECAPTCHA site key not present'
    assert RECAPTCHA_PRIVATE_KEY, 'RECAPTCHA secure key not present'

# email settings
ADMINS = (
    ('<NAME>', '<EMAIL>'),
    ('<NAME>', '<EMAIL>'),
)
# "From:" for error messages sent out to ADMINS
SERVER_EMAIL = os.environ.get('AMY_SERVER_EMAIL', 'root@localhost')

# addresses to receive "New workshop request" or "New profile update request"
# notifications
REQUEST_NOTIFICATIONS_RECIPIENTS = (
    '<EMAIL>',
)
EMAIL_HOST = os.environ.get('AMY_EMAIL_HOST', 'localhost')
EMAIL_HOST_USER = os.environ.get('AMY_EMAIL_HOST_USER', '')
EMAIL_HOST_PASSWORD = os.environ.get('AMY_EMAIL_HOST_PASSWORD', '')
EMAIL_PORT = int(os.environ.get('AMY_EMAIL_PORT', 25))
EMAIL_TIMEOUT = 10  # timeout for blocking email operations, in seconds
EMAIL_USE_TLS = json.loads(os.environ.get('AMY_EMAIL_USE_TLS', 'false'))
EMAIL_USE_SSL = json.loads(os.environ.get('AMY_EMAIL_USE_SSL', 'false'))

# "From:" for NOT error messages (ie. sent to whoever we want)
DEFAULT_FROM_EMAIL = os.environ.get('AMY_DEFAULT_FROM_EMAIL',
                                    'webmaster@localhost')

if DEBUG:
{'fraction_non_alphanumeric': 0.11829383886255924, 'fraction_numerical': 0.0037914691943127963, 'mean_word_length': 4.72234273318872, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1015889', 'n_tokens_mistral': 1893, 'n_tokens_neox': 1858, 'n_words': 458}