<commit_before># -*- coding: utf-8 -*-

from tasks import task1, task2
import flask


def index():
    return flask.render_template('index.html', title='index')


def app_factory():
    app = flask.Flask(import_name=__package__)
    app.add_url_rule('/', 'index', index)
    app.add_url_rule('/task1', 'task1', task1.solve)
    app.add_url_rule('/task2', 'task2', task2.solve)
    return app


def run_local(*args, **kwargs):
    app = app_factory()
    app.run()<commit_msg>Allow POST as well as GET<commit_after># -*- coding: utf-8 -*-

from tasks import task1, task2
import flask


def index():
    return flask.render_template('index.html', title='index')


def app_factory():
    app = flask.Flask(import_name=__package__)
    app.add_url_rule('/', 'index', index)
    app.add_url_rule('/task1', 'task1', task1.solve, methods=['GET', 'POST'])
    app.add_url_rule('/task2', 'task2', task2.solve, methods=['GET', 'POST'])
    return app


def run_local(*args, **kwargs):
    app = app_factory()
    app.run()
{'fraction_non_alphanumeric': 0.17391304347826086, 'fraction_numerical': 0.017786561264822136, 'mean_word_length': 4.065, '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': '4513263', 'n_tokens_mistral': 367, 'n_tokens_neox': 353, 'n_words': 80}