<commit_before>"""
Contains the configuration class for the Flask app.\n
Created by <NAME> on 3/12/2018.\n
Last modified by <NAME> on 5/9/2018.
"""

import os

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

# Retrieve the CSRF token from a file on the server. Make sure this file isn't
# world-readable! You can generate a good token with os.urandom(12) and then
# copy-paste it into the file called "csrf".
skey = ""
with open("csrf") as fp:
	skey = fp.read().strip()

# The environment variables are currently set in the run_powertoken.sh script.
# TODO: Add administrator email addresses to the ADMINS field.
class Config(object):
	"""
	Name-value pairs for the Flask app configuration.
	"""
	SECRET_KEY = os.environ.get("SECRET_KEY") or skey
	SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL") or \
		"sqlite:///" + os.path.join(basedir, "data/pt-fade.db")
	SQLALCHEMY_TRACK_MODIFICATIONS = False
	MAIL_SERVER = os.environ.get("MAIL_SERVER")
	MAIL_PORT = int(os.environ.get("MAIL_PORT") or 25)
	MAIL_USE_TLS = int(os.environ.get("MAIL_USE_TLS") or 0)
	MAIL_USERNAME = os.environ.get("MAIL_USERNAME")
	MAIL_PASSWORD = <PASSWORD>("MAIL_PASSWORD")
	ADMINS = ["<EMAIL>"]
	LOG_FILE = os.path.join(basedir, "data/app.log")<commit_msg>Modified code so database still tracks expired activities.<commit_after>"""
Contains the configuration class for the Flask app.\n
Created by <NAME> on 3/12/2018.\n
Last modified by <NAME> on 5/9/2018.
"""

import os

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

# The environment variables are currently set in the run_powertoken.sh script.
# TODO: Add administrator email addresses to the ADMINS field.
class Config(object):
	"""
	Name-value pairs for the Flask app configuration.
	"""
	SECRET_KEY = os.environ.get("SECRET_KEY")
	SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL") or \
		"sqlite:///" + os.path.join(basedir, "data/pt-fade.db")
	SQLALCHEMY_TRACK_MODIFICATIONS = False
	MAIL_SERVER = os.environ.get("MAIL_SERVER")
	MAIL_PORT = int(os.environ.get("MAIL_PORT") or 25)
	MAIL_USE_TLS = int(os.environ.get("MAIL_USE_TLS") or 0)
	MAIL_USERNAME = os.environ.get("MAIL_USERNAME")
	MAIL_PASSWORD = os.environ.get("MAIL_PASSWORD")
	ADMINS = ["<EMAIL>"]
	LOG_FILE = os.path.join(basedir, "data/app.log")
{'fraction_non_alphanumeric': 0.13403880070546736, 'fraction_numerical': 0.014991181657848324, 'mean_word_length': 4.8782383419689115, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '2385806', 'n_tokens_mistral': 849, 'n_tokens_neox': 843, 'n_words': 210}