<commit_before>import os
import logging
import urllib
import csv
from StringIO import StringIO
import datetime

import jinja2
from flask import  make_response
from flask.ext.sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('CLEARDB_DATABASE_URL')
app.config['SQLALCHEMY_POOL_RECYCLE'] = 60
db = SQLAlchemy(app)

from database import db_session
from models import *
from base import *
import utilities



app = utilities.init_flask(__name__)
db = SQLAlchemy(app)


jinja_environment = jinja2.Environment(
    autoescape=True,
    loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), "templates")))

@app.teardown_appcontext
def shutdown_session(exception=None):<commit_msg>Adding import of Flask - so gunicorn will work <commit_after>import os
import logging
import urllib
import csv
from StringIO import StringIO
import datetime

import jinja2
from flask import  Flask, make_response
from flask.ext.sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('CLEARDB_DATABASE_URL')
app.config['SQLALCHEMY_POOL_RECYCLE'] = 60
db = SQLAlchemy(app)

from database import db_session
from models import *
from base import *
import utilities



app = utilities.init_flask(__name__)
db = SQLAlchemy(app)


jinja_environment = jinja2.Environment(
    autoescape=True,
    loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), "templates")))

@app.teardown_appcontext
def shutdown_session(exception=None):
{'fraction_non_alphanumeric': 0.08588158750813273, 'fraction_numerical': 0.006506180871828237, 'mean_word_length': 6.53921568627451, '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': '6353036', 'n_tokens_mistral': 544, 'n_tokens_neox': 505, 'n_words': 120}