<commit_before># Django settings for inspector project.

import os
import sys

import dj_database_url


DEBUG = bool(os.environ.get('DEBUG', False))
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    ('Meshy', '<EMAIL>'),
)

MANAGERS = ADMINS

DATABASES = {'default': dj_database_url.config(default='postgres://localhost/ccbv')}
ALLOWED_HOSTS = ('*',)


def get_cache():
    try:
        os.environ['MEMCACHE_SERVERS'] = os.environ['MEMCACHIER_SERVERS']
        os.environ['MEMCACHE_USERNAME'] = os.environ['MEMCACHIER_USERNAME']
        os.environ['MEMCACHE_PASSWORD'] = os.environ['MEMCACHIER_PASSWORD']
        return {
            'default': {
                'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
                'LOCATION': os.environ['MEMCACHIER_SERVERS'],
                'TIMEOUT': 500,
                'BINARY': True,
            }
        }
    except:
        return {<commit_msg>using memcacheift in settings to get it's env vars from heroku<commit_after># Django settings for inspector project.

import os
import sys

import dj_database_url
# See: https://github.com/rdegges/django-heroku-memcacheify
from memcacheify import memcacheify


DEBUG = bool(os.environ.get('DEBUG', False))
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    ('Meshy', '<EMAIL>'),
)

MANAGERS = ADMINS

DATABASES = {'default': dj_database_url.config(default='postgres://localhost/ccbv')}
ALLOWED_HOSTS = ('*',)


def get_cache():
    try:
        os.environ['MEMCACHE_SERVERS'] = os.environ['MEMCACHIER_SERVERS']
        os.environ['MEMCACHE_USERNAME'] = os.environ['MEMCACHIER_USERNAME']
        os.environ['MEMCACHE_PASSWORD'] = os.environ['MEMCACHIER_PASSWORD']
        return memcacheify(timeout=500)
    except:
        return {
{'fraction_non_alphanumeric': 0.1342673671920607, 'fraction_numerical': 0.0035026269702276708, 'mean_word_length': 3.4404145077720205, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '6234971', 'n_tokens_mistral': 604, 'n_tokens_neox': 590, 'n_words': 102}