<commit_before>from flask import Flask, render_template
from minecraft_query import MinecraftQuery

app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile('application.cfg', silent=True)

@app.route('/')
def voltaire():
    NUMSERVERS = len(MCSERVERS)

    return render_template('index.html', PAGE_TITLE=PAGE_TITLE, SITE_TITLE=SITE_TITLE, MCSERVERS=MCSERVERS, NUMSERVERS=NUMSERVERS)

@app.route('/mcstatus/<hostname>')
def mcstatus(MCSERVER_ADDR):

    get_status = MinecraftQuery(MCSERVER_ADDR,25565).get_rules()
    ONLINE_PLAYERS = get_status['players']
    NUM_PLAYERS = get_status['NUM_PLAYERS']
    MAX_PLAYERS = get_status['MAX_PLAYERS']

    return render_template('mcstatus.html', ONLINE_PLAYERS=ONLINE_PLAYERS, NUM_PLAYERS=NUM_PLAYERS, MAX_PLAYERS=MAX_PLAYERS)

if __name__ == '__main__':
    app.run()
<commit_msg>numplayers and maxplayers are namespace from minecraftquery<commit_after>from flask import Flask, render_template
from minecraft_query import MinecraftQuery

app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile('application.cfg', silent=True)

@app.route('/')
def voltaire():
    NUMSERVERS = len(MCSERVERS)

    return render_template('index.html', PAGE_TITLE=PAGE_TITLE, SITE_TITLE=SITE_TITLE, MCSERVERS=MCSERVERS, NUMSERVERS=NUMSERVERS)

@app.route('/mcstatus/<hostname>')
def mcstatus(MCSERVER_ADDR):

    get_status = MinecraftQuery(MCSERVER_ADDR,25565).get_rules()
    ONLINE_PLAYERS = get_status['players']
    NUM_PLAYERS = get_status['numplayers']
    MAX_PLAYERS = get_status['maxplayers']

    return render_template('mcstatus.html', ONLINE_PLAYERS=ONLINE_PLAYERS, NUM_PLAYERS=NUM_PLAYERS, MAX_PLAYERS=MAX_PLAYERS)

if __name__ == '__main__':
    app.run()

{'fraction_non_alphanumeric': 0.11277330264672036, 'fraction_numerical': 0.005753739930955121, 'mean_word_length': 7.164319248826291, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1593868', 'n_tokens_mistral': 659, 'n_tokens_neox': 620, 'n_words': 96}