<commit_before>#!/usr/bin/python
import logging
import json
import cStringIO
import ipfsApi
from flask import Flask, request, jsonify, render_template, g
from flask_restplus import Api, Resource

app = Flask(__name__, static_url_path="")
logging.basicConfig(level=logging.DEBUG)


@app.before_request
def connect_to_ipfs():
    g.ipfs = ipfsApi.Client("ipfs", 5001)


@app.route("/")
def add():
    return render_template("add.html", title="Add")


@app.route("/submission")
def submission():
    return render_template("submission.html", title="Submission")


"""
RESTful API
"""
api = Api(app, version="v0", title="Cancer Gene Trust API", doc="/api",
          description="""
RESTful API for the Cancer Gene Trust Web Server (cgtd)
""")

<commit_msg>Add back .html to preserve option that html lives distributed without a server at some future date.<commit_after>#!/usr/bin/python
import logging
import json
import cStringIO
import ipfsApi
from flask import Flask, request, jsonify, render_template, g
from flask_restplus import Api, Resource

app = Flask(__name__, static_url_path="")
logging.basicConfig(level=logging.DEBUG)


@app.before_request
def connect_to_ipfs():
    g.ipfs = ipfsApi.Client("ipfs", 5001)


@app.route("/")
def add():
    return render_template("add.html", title="Add")


@app.route("/submission.html")
def submission():
    return render_template("submission.html", title="Submission")


"""
RESTful API
"""
api = Api(app, version="v0", title="Cancer Gene Trust API", doc="/api",
          description="""
RESTful API for the Cancer Gene Trust Web Server (cgtd)
""")


{'fraction_non_alphanumeric': 0.13713212273011896, 'fraction_numerical': 0.006261740763932373, 'mean_word_length': 5.2421875, 'pattern_counts': {'":': 0, '<': 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': '6556225', 'n_tokens_mistral': 520, 'n_tokens_neox': 498, 'n_words': 146}