<commit_before>from flask import Flask, render_template, request, redirect
from subprocess import check_output
from flask.ext.rq import RQ
import tasks
import re
import config

app = Flask(__name__)
RQ(app)


@app.route("/")
def home():
    return render_template('skel.html', root=config.ROOT_URL)


@app.route("/add", methods=['POST'])
def submit_url():
    url = request.form['url']
    add = request.form['command'] == "add"

    is_soundcloud = re.match(r'^https?://(www\.)?soundcloud.com/', url) is not None

    if is_soundcloud:
        check_output(["mpc", "load", "soundcould://url/" + url])
    else:
        tasks.convert_and_add.delay(url, {'add': add})

    return redirect(config.WEB_MPD_URL)


if __name__ == "__main__":
    app.run(debug=config.DEBUG)<commit_msg>Fix typo<commit_after>from flask import Flask, render_template, request, redirect
from subprocess import check_output
from flask.ext.rq import RQ
import tasks
import re
import config

app = Flask(__name__)
RQ(app)


@app.route("/")
def home():
    return render_template('skel.html', root=config.ROOT_URL)


@app.route("/add", methods=['POST'])
def submit_url():
    url = request.form['url']
    add = request.form['command'] == "add"

    is_soundcloud = re.match(r'^https?://(www\.)?soundcloud.com/', url) is not None

    if is_soundcloud:
        check_output(["mpc", "load", "soundcloud://url/" + url])
    else:
        tasks.convert_and_add.delay(url, {'add': add})

    return redirect(config.WEB_MPD_URL)


if __name__ == "__main__":
    app.run(debug=config.DEBUG)
{'fraction_non_alphanumeric': 0.1594855305466238, 'fraction_numerical': 0.0, 'mean_word_length': 4.152317880794702, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7596498', 'n_tokens_mistral': 545, 'n_tokens_neox': 525, 'n_words': 122}