<commit_before>import os
from flask import Flask, render_template, send_from_directory, jsonify

#-----------------------------------
# initialization
#-----------------------------------

app = Flask(__name__)

app.config.update(
	DEBUG = True,
)

#-----------------------------------
# controllers
#-----------------------------------

@app.errorhandler(404)
def page_not_found(e):
	return render_template('404.html'), 404

@app.route("/", methods=['GET'])
def index():
	return render_template('index.html')

@app.route("/companies", methods=['GET'])
def search():
	sample = {"results":[{"organization":"Buzzfeed",
						  "description":"BuzzFeed is a media company providing social news and entertainment-related information and videos.",
						  "funding":"46.3M",
						  "industries":["News","Media"],
						  "location":"New York,NY",
						  "founders":["<NAME>","<NAME>"],
						  "founded":"2008",
						  "technologies":["Javascript","Python","Perl"],
						  "investors":["Lerer Ventures","RRE Ventures"],
						  "size":"100-500",
						  "stargazers":1000,
						  "twitter-id":"buzzfeed",
						  "github-url":"http://github.com/buzzfeed",
						  "crunchbase-url":"http://crunchbase.com/organization/buzzfeed",
						  "logo-url":"http://a3.images.crunchbase.com/image/upload/c_pad,h_98,w_98/v1397183627/f8f063b7cc03d05841d03a3c764936a6.png"}]}

	return jsonify(sample)

@app.route("/", methods=['GET'])
def redirect():
	return render_template('index.html')

#-----------------------------------
# launch
#-----------------------------------

if __name__ == "__main__":
	port = int(os.environ.get("PORT", 5000))
	app.run(host='0.0.0.0', port=port)
<commit_msg>redirect routing<commit_after>import os
from flask import Flask, render_template, send_from_directory, jsonify, url_for, redirect

#-----------------------------------
# initialization
#-----------------------------------

app = Flask(__name__)

app.config.update(
	DEBUG = True,
)

#-----------------------------------
# controllers
#-----------------------------------

@app.errorhandler(404)
def page_not_found(e):
	return render_template('404.html'), 404

@app.route("/", methods=['GET'])
def index():
	return render_template('index.html')

@app.route("/companies", methods=['GET'])
def search():
	sample = {"results":[{"organization":"Buzzfeed",
						  "description":"BuzzFeed is a media company providing social news and entertainment-related information and videos.",
						  "funding":"46.3M",
						  "industries":["News","Media"],
						  "location":"New York,NY",
						  "founders":["<NAME>","<NAME>"],
						  "founded":"2008",
						  "technologies":["Javascript","Python","Perl"],
						  "investors":["Lerer Ventures","RRE Ventures"],
						  "size":"100-500",
						  "stargazers":1000,
						  "twitter-id":"buzzfeed",
						  "github-url":"http://github.com/buzzfeed",
						  "crunchbase-url":"http://crunchbase.com/organization/buzzfeed",
						  "logo-url":"http://a3.images.crunchbase.com/image/upload/c_pad,h_98,w_98/v1397183627/f8f063b7cc03d05841d03a3c764936a6.png"}]}

	return jsonify(sample)

@app.route("/results", methods=['GET'])
def results():
	return redirect(url_for('index'))

#-----------------------------------
# launch
#-----------------------------------

if __name__ == "__main__":
	port = int(os.environ.get("PORT", 5000))
	app.run(host='0.0.0.0', port=port)

{'fraction_non_alphanumeric': 0.2916790050340539, 'fraction_numerical': 0.042049156055670715, 'mean_word_length': 2.4932781799379526, 'pattern_counts': {'":': 34, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6446689', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1020, 'n_words': 163}