<commit_before>from flask import Flask, render_template, request, url_for, make_response, session, redirect, g, flash
import random, urllib
from dogeify import *
from colors import *


app = Flask(__name__)
# app.config.from_object(__name__)
app.secret_key = <KEY>'




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

@app.route("/dogeify", methods=['GET'])
def dogeifyText():
    text = request.args.get("userText")
    if len(text) > 750:
        flash("Text has exceeded length limit!")
        return render_template("home.html", flashType="danger")  
    dogeTextArray = superdogeify(text)
    dogeResult = []
    for dogePair in dogeTextArray:
        dogeResult.append([dogePair, random.choice(htmlColors.keys())])
    result = [text, dogeResult]
    processHistory(text)
    return render_template("dogetext.html", result=result)
    
@app.route('/clearhistory')
def clearHistory():
    session.pop('history')<commit_msg>2000 char cap<commit_after>from flask import Flask, render_template, request, url_for, make_response, session, redirect, g, flash
import random, urllib
from dogeify import *
from colors import *


app = Flask(__name__)
# app.config.from_object(__name__)
app.secret_key = <KEY>'




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

@app.route("/dogeify", methods=['GET'])
def dogeifyText():
    text = request.args.get("userText")
    if len(text) > 2000:
        flash("Text has exceeded length limit!")
        return render_template("home.html", flashType="danger")  
    dogeTextArray = superdogeify(text)
    dogeResult = []
    for dogePair in dogeTextArray:
        dogeResult.append([dogePair, random.choice(htmlColors.keys())])
    result = [text, dogeResult]
    processHistory(text)
    return render_template("dogetext.html", result=result)
    
@app.route('/clearhistory')
def clearHistory():
    session.pop('history')
{'fraction_non_alphanumeric': 0.13662637940094588, 'fraction_numerical': 0.005780346820809248, 'mean_word_length': 4.4245014245014245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1096548', 'n_tokens_mistral': 619, 'n_tokens_neox': 596, 'n_words': 137}