<commit_before># -*- coding: utf-8 -*-
# Django settings for account project

import os

import dj_database_url


def env_var(key, default=None):
    """Retrieves env vars and makes Python boolean replacements"""
    val = os.environ.get(key, default)
    if isinstance(val, str):
        lower_val = val.lower()
        if lower_val in ["t", "true"]:
            val = True
        elif lower_val in ["f", "false"]:
            val = False
    return val


def env_list(key, defaults=None, delimiter=","):
    if not defaults:
        defaults = []
    val_list = defaults
    val = os.environ.get(key, None)
    if val:
        val_list = val.split(delimiter)
    return val_list


PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))

DEBUG = env_var("DEBUG", False)

ALLOWED_HOSTS = [
    "chipy.org",
    "www.chipy.org",
    "chipy.herokuapp.com",
    "chipy-149.herokuapp.com",
    "localhost:8000",
    "localhost",
    "www.localhost:8000",
    "www.localhost",
]

ALLOWED_HOSTS = env_list("ALLOWED_HOSTS", ALLOWED_HOSTS)


# tells Pinax to serve media through the staticfiles app.
SERVE_MEDIA = env_var("SERVE_MEDIA", DEBUG)

SECURE_SSL_REDIRECT = env_var("SECURE_SSL_REDIRECT", True)

INTERNAL_IPS = [
    "127.0.0.1",
]

ADMINS = [(admin.split("@")[0], admin) for admin in env_var("ADMINS").split(",")]

MANAGERS = ADMINS

CHIPY_TOPIC_SUBMIT_EMAILS = env_var("CHIPY_TOPIC_SUBMIT_EMAILS", "").split(",")

# dj_database_url will pull from the DATABASE_URL environment variable
DATABASES = {"default": dj_database_url.config(default="postgres://localhost:5432/chipy_org")}

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = "US/Central"


# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = "en-us"

SITE_ID = env_var("SITE_ID", 1)<commit_msg>Default Admins to empty string<commit_after># -*- coding: utf-8 -*-
# Django settings for account project

import os

import dj_database_url


def env_var(key, default=None):
    """Retrieves env vars and makes Python boolean replacements"""
    val = os.environ.get(key, default)
    if isinstance(val, str):
        lower_val = val.lower()
        if lower_val in ["t", "true"]:
            val = True
        elif lower_val in ["f", "false"]:
            val = False
    return val


def env_list(key, defaults=None, delimiter=","):
    if not defaults:
        defaults = []
    val_list = defaults
    val = os.environ.get(key, None)
    if val:
        val_list = val.split(delimiter)
    return val_list


PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))

DEBUG = env_var("DEBUG", False)

ALLOWED_HOSTS = [
    "chipy.org",
    "www.chipy.org",
    "chipy.herokuapp.com",
    "chipy-149.herokuapp.com",
    "localhost:8000",
    "localhost",
    "www.localhost:8000",
    "www.localhost",
]

ALLOWED_HOSTS = env_list("ALLOWED_HOSTS", ALLOWED_HOSTS)


# tells Pinax to serve media through the staticfiles app.
SERVE_MEDIA = env_var("SERVE_MEDIA", DEBUG)

SECURE_SSL_REDIRECT = env_var("SECURE_SSL_REDIRECT", True)

INTERNAL_IPS = [
    "127.0.0.1",
]

ADMINS = [(admin.split("@")[0], admin) for admin in env_var("ADMINS", "").split(",")]

MANAGERS = ADMINS

CHIPY_TOPIC_SUBMIT_EMAILS = env_var("CHIPY_TOPIC_SUBMIT_EMAILS", "").split(",")

# dj_database_url will pull from the DATABASE_URL environment variable
DATABASES = {"default": dj_database_url.config(default="postgres://localhost:5432/chipy_org")}

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = "US/Central"


# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = "en-us"

SITE_ID = env_var("SITE_ID", 1)
{'fraction_non_alphanumeric': 0.1262135922330097, 'fraction_numerical': 0.012313521193464362, 'mean_word_length': 3.8109339407744875, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 2, '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': '1418953', 'n_tokens_mistral': 1520, 'n_tokens_neox': 1480, 'n_words': 370}