<commit_before>from hy.compiler.ast27 import forge_ast
from hy.lex.tokenize import tokenize
import codegen
import sys

from flask import Flask, render_template, request
app = Flask(__name__)


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


@app.route('/popup')
def popup():
    return render_template('popover.html')


@app.route('/translate', methods=['POST'])
def translate():
    lines = request.form['code']

    try:
        code = tokenize(lines)
        ast = forge_ast("stdin", code)<commit_msg>things<commit_after>from hy.compiler.ast27 import forge_ast
from hy.lex.tokenize import tokenize
import codegen
import sys

from flask import Flask, render_template, request
app = Flask(__name__)


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


@app.route('/translate', methods=['POST'])
def translate():
    lines = request.form['code']

    try:
        code = tokenize(lines)
        ast = forge_ast("stdin", code)
{'fraction_non_alphanumeric': 0.13711340206185568, 'fraction_numerical': 0.004123711340206186, 'mean_word_length': 4.306010928961749, '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': '6106821', 'n_tokens_mistral': 313, 'n_tokens_neox': 298, 'n_words': 78}