<commit_before>from flask import Flask, render_template, request, g
from gifquick.views import GifView, QuickView, HookView, APIView
from gifquick.config import _cfg

app = Flask(__name__)
app.secret_key = _cfg("secret_key")


@app.before_request
def find_dnt():
    field = "Dnt"
    do_not_track = False
    if field in request.headers:
        do_not_track = True if request.headers[field] == "1" else False

    g.do_not_track = do_not_track


@app.context_processor
def inject():
    mobile = request.user_agent.platform in ['android', 'iphone', 'ipad']
    return {
        'mobile': mobile,
        'analytics_id': _cfg("google_analytics_id"),
        'analytics_domain': _cfg("google_analytics_domain"),
        'dwolla_id': _cfg("dwolla_id"),
        'coinbase_id': _cfg("coinbase_id"),
        'flattr_id': _cfg("flattr_id")
    }


@app.route("/")
def index():
    opted_out = "ad-opt-out" in request.cookies
    return render_template("index.html", ads=not opted_out)


@app.route("/demo")
def demo():
    return render_template("demo.html")

@app.route("/donate")
def donate():
    opted_out = "ad-opt-out" in request.cookies
    return render_template("donate.html", ads=not opted_out)

@app.route("/thanks")
def thanks():
    return render_template("thanks.html")

APIView.register(app)
HookView.register(app)
GifView.register(app)
QuickView.register(app)

print app.url_map
if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True)<commit_msg>Removed debugging print<commit_after>from flask import Flask, render_template, request, g
from gifquick.views import GifView, QuickView, HookView, APIView
from gifquick.config import _cfg

app = Flask(__name__)
app.secret_key = _cfg("secret_key")


@app.before_request
def find_dnt():
    field = "Dnt"
    do_not_track = False
    if field in request.headers:
        do_not_track = True if request.headers[field] == "1" else False

    g.do_not_track = do_not_track


@app.context_processor
def inject():
    mobile = request.user_agent.platform in ['android', 'iphone', 'ipad']
    return {
        'mobile': mobile,
        'analytics_id': _cfg("google_analytics_id"),
        'analytics_domain': _cfg("google_analytics_domain"),
        'dwolla_id': _cfg("dwolla_id"),
        'coinbase_id': _cfg("coinbase_id"),
        'flattr_id': _cfg("flattr_id")
    }


@app.route("/")
def index():
    opted_out = "ad-opt-out" in request.cookies
    return render_template("index.html", ads=not opted_out)


@app.route("/demo")
def demo():
    return render_template("demo.html")

@app.route("/donate")
def donate():
    opted_out = "ad-opt-out" in request.cookies
    return render_template("donate.html", ads=not opted_out)

@app.route("/thanks")
def thanks():
    return render_template("thanks.html")

APIView.register(app)
HookView.register(app)
GifView.register(app)
QuickView.register(app)

if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True)
{'fraction_non_alphanumeric': 0.14241803278688525, 'fraction_numerical': 0.0034153005464480873, 'mean_word_length': 4.193262411347518, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '426672', 'n_tokens_mistral': 1038, 'n_tokens_neox': 1009, 'n_words': 213}