<commit_before># -*- coding: utf-8 -*-
from flask import render_template, redirect, request, make_response, abort
from filterss import app
from forms import FilterForm
from helpers import get_url, url_vars, set_filter, connect_n_parse
from helpers import remove_tags, test_cond, word_wrap, format_date, test_url
import sys
import urllib

reload(sys)
sys.setdefaultencoding('utf-8')


@app.route('/')
@app.route('/index')
def index():
    form = FilterForm()
    return render_template('form.html', form=form)


@app.route('/filter', methods=('GET', 'POST'))
def filter():
    form = FilterForm()
    if form.validate_on_submit():<commit_msg>Minor changes & code cleaning<commit_after># coding: utf-8
from flask import render_template, redirect, request, make_response, abort
from filterss import app
from forms import FilterForm
from helpers import get_url, url_vars, set_filter, connect_n_parse
from helpers import remove_tags, test_cond, word_wrap, format_date, test_url
import sys
import urllib

reload(sys)
sys.setdefaultencoding('utf-8')


@app.route('/')
def index():
    return render_template('form.html', form=FilterForm())


@app.route('/filter', methods=('GET', 'POST'))
def filter():
    form = FilterForm()
    if form.validate_on_submit():
{'fraction_non_alphanumeric': 0.12370311252992817, 'fraction_numerical': 0.0031923383878691143, 'mean_word_length': 5.852459016393443, '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': '6566021', 'n_tokens_mistral': 390, 'n_tokens_neox': 383, 'n_words': 115}