<commit_before>from flask import Flask, Response
import requests

app = Flask(__name__)
default_name = '<NAME>'


@app.route('/')
def mainpage():
    name = default_name

    header = '<html><head><title>Identidock</title></head><body>'
    body = '''<div style="margin:0 auto; width:400px;">
              <form method="POST">
              Hello <input type="text" name="name" value="{}">
              </form>
              <p>You look like a:
              <img src="/monster/monster.png"/>
              </div>'''.format(name)
    footer = '</body></html>'

    return header + body + footer


@app.route('/monster/<name>')<commit_msg>Username submit works<commit_after>from flask import Flask, Response, request
import requests
import hashlib

app = Flask(__name__)
salt = '<PASSWORD>'
default_name = '<NAME>'


@app.route('/', methods=['GET', 'POST'])
def mainpage():

    name = default_name
    if request.method == 'POST':
        name = request.form['name']

    salted_name = salt + name
    name_hash = hashlib.sha256(salted_name.encode()).hexdigest()

    header = '<html><head><title>Identidock</title></head><body>'
    body = '''<div style="margin:0 auto; width:400px;">
              <form method="POST">
              Hello <input type="text" name="name" value="{}">
              </form>
              <p>You look like a:
              <img src="/monster/{}"/>
              </div>'''.format(name, name_hash)
    footer = '</body></html>'

    return header + body + footer


@app.route('/monster/<name>')
{'fraction_non_alphanumeric': 0.17901639344262296, 'fraction_numerical': 0.007213114754098361, 'mean_word_length': 2.712895377128954, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, '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': '2201398', 'n_tokens_mistral': 486, 'n_tokens_neox': 458, 'n_words': 109}