<commit_before># -*- encoding:utf-8 -*-
from flask import Flask
from cyclonejet.views.frontend import frontend
from flaskext.sqlalchemy import SQLAlchemy
import settings


app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
app.register_module(frontend)

db = SQLAlchemy(app)<commit_msg>Switch to Blueprints, custom 404 handler.<commit_after># -*- encoding:utf-8 -*-
from flask import Flask, render_template

from cyclonejet.views.frontend import frontend
from cyclonejet.views.errors import errors

from flaskext.sqlalchemy import SQLAlchemy
import settings

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI

#Blueprint registration
app.register_blueprint(frontend)
app.register_blueprint(errors)

#DB intialization
db = SQLAlchemy(app)


#Custom Error handling (move this somewhere else?)
@app.errorhandler(404)
def page_not_found(e):
    return render_template('404.html'), 404


{'fraction_non_alphanumeric': 0.09498399146211313, 'fraction_numerical': 0.014941302027748132, 'mean_word_length': 6.3858267716535435, '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': '1034562', 'n_tokens_mistral': 321, 'n_tokens_neox': 296, 'n_words': 73}