<commit_before>#!flask/bin/python
import sys
from flask import Flask, jsonify, render_template

app = Flask(__name__, static_folder='client', static_url_path='', template_folder='client')
args = sys.argv[1:]

tasks = [
    {
        'id': 1,
        'title': u'Buy groceries',
        'description': u'Milk, Cheese, Pizza, Fruit, Tylenol',
        'done': False
    },
    {
        'id': 2,
        'title': u'Learn Python',
        'description': u'Need to find a good Python tutorial on the web',
        'done': False
    }
]

@app.route('/')
def index():
    return render_template('index.html')

@app.route('/todo/api/v1.0/tasks', methods=['GET'])
def get_tasks():
    return jsonify({'tasks': tasks})

@app.route('/todo/api/v1.0/tasks/<int:task_id>', methods=['GET'])
def get_task(task_id):
    task = [task for task in tasks if task['id'] == task_id]
    if len(task) == 0:
        abort(404)
    return jsonify({'task': task[0]})

server_port = 9000
if args:
    server_port = int(args[0])

if __name__ == '__main__':
    app.run(debug=True, port=server_port)<commit_msg>fix heroku port<commit_after>#!flask/bin/python
import sys
from flask import Flask, jsonify, render_template

app = Flask(__name__, static_folder='client', static_url_path='', template_folder='client')
args = sys.argv[1:]

tasks = [
    {
        'id': 1,
        'title': u'Buy groceries',
        'description': u'Milk, Cheese, Pizza, Fruit, Tylenol',
        'done': False
    },
    {
        'id': 2,
        'title': u'Learn Python',
        'description': u'Need to find a good Python tutorial on the web',
        'done': False
    }
]

@app.route('/')
def index():
    return render_template('index.html')

@app.route('/todo/api/v1.0/tasks', methods=['GET'])
def get_tasks():
    return jsonify({'tasks': tasks})

@app.route('/todo/api/v1.0/tasks/<int:task_id>', methods=['GET'])
def get_task(task_id):
    task = [task for task in tasks if task['id'] == task_id]
    if len(task) == 0:
        abort(404)
    return jsonify({'task': task[0]})

server_port = int(os.environ.get('PORT', 58058))

if __name__ == '__main__':
    app.run(debug=True, port=server_port)
{'fraction_non_alphanumeric': 0.17611524163568773, 'fraction_numerical': 0.015799256505576207, 'mean_word_length': 3.367139959432049, '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': '6750280', 'n_tokens_mistral': 794, 'n_tokens_neox': 768, 'n_words': 180}