<commit_before>from flask import Flask, jsonify, request
import core
app = Flask(__name__)

@app.route("/", methods=["POST"])
@app.route("/login", methods=["POST"])
def login():
    return jsonify(core.User(request.form["username"], request.form["password"]))

core._api_mains.append(app.run)<commit_msg>[api] add /register route to api prototype<commit_after>from flask import Flask, jsonify, request
import core
app = Flask(__name__)

@app.route("/", methods=["POST"])
@app.route("/login", methods=["POST"])
def login():
    return jsonify(core.User(request.form["username"], request.form["password"]))

@app.route("/register", methods=["POST"])
def register():
    return jsonify(core.User(request.form["username"], request.form["password"], register=True))

core._api_mains.append(app.run)
{'fraction_non_alphanumeric': 0.19293820933165196, 'fraction_numerical': 0.0, 'mean_word_length': 7.1020408163265305, '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': '2672598', 'n_tokens_mistral': 250, 'n_tokens_neox': 245, 'n_words': 53}