<commit_before>from flask import Flask, jsonify, request
import settings, getopt, sys, os
app = Flask(__name__)


@app.route('/.well-known/host-meta.json', methods=['GET'])
def send_host_meta_json():
    return jsonify({
        "links": settings.LINKS
    })

@app.route('/.well-known/host-meta', methods=['GET'])
def send_host_meta_xrd():
    return settings.JINJA_ENV.get_template("host-meta.xrd.tpl").render(links=settings.LINKS)

opts, args = getopt.getopt(sys.argv[1:], "h:p:", ["host=", "port="])

options = dict(opts)
<commit_msg>remove .well-known prefix from path<commit_after>from flask import Flask, jsonify, request
import settings, getopt, sys, os
app = Flask(__name__)


@app.route('/.well-known/host-meta.json', methods=['GET'])
def send_host_meta_json():
    return jsonify({
        "links": settings.LINKS
    })

@app.route('/host-meta', methods=['GET'])
def send_host_meta_xrd():
    return settings.JINJA_ENV.get_template("host-meta.xrd.tpl").render(links=settings.LINKS)

opts, args = getopt.getopt(sys.argv[1:], "h:p:", ["host=", "port="])

options = dict(opts)

{'fraction_non_alphanumeric': 0.1850828729281768, 'fraction_numerical': 0.001841620626151013, 'mean_word_length': 5.106741573033708, 'pattern_counts': {'":': 2, '<': 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': '598062', 'n_tokens_mistral': 395, 'n_tokens_neox': 390, 'n_words': 74}