<commit_before>from flask import request

from mongows import app
from mongows.db import get_connection

@app.route('/')
def hello():
    db = get_connection()
    emptyset = db.some_collection.find()
    return 'Hello World! {0}'.format(emptyset.count())

@app.route('/db', methods=['POST'])
def db_post():
    # TODO: create new collection with id
    return '/db Not Implemented'

@app.route('/db/:id', methods=['POST'])
def db_id_post():
    # TODO: call mongo and return results
    query = request.form['query']
    return '/db/:id Not Implemented'

@app.route('/db/:id/keep-alive', methods=['POST'])
def db_id_keep-alive():
    # TODO: call mongo to keep session alive
    return 'keep-alive Not Implemented'<commit_msg>Views: Clean up stub methods.<commit_after>from mongows import app
from mongows.db import get_connection

@app.route('/')
def hello():
    db = get_connection()
    emptyset = db.some_collection.find()
    return 'Hello World! {0}'.format(emptyset.count())

@app.route('/mws', methods=['POST'])
def create_mws_resource():
    # TODO: Create resource and return its associated id.
    return '/mws: Not yet implemented.'

@app.route('/mws/<res_id>/keep-alive', methods=['POST'])
def keep_mws_alive(res_id):
    # TODO: Reset timeout period on mws resource with the given id.
    return '/mws/:id/keep-alive: Not yet implemented.'

@app.route('/mws/<res_id>/db/<collection_name>/find', methods=['GET'])
def db_collection_find(res_id, collection_name):
    # TODO: Call find() on the specified params and return results.
    return '/mws/:id/db/:collection/find: Not yet implemented.'
{'fraction_non_alphanumeric': 0.1517412935323383, 'fraction_numerical': 0.0012437810945273632, 'mean_word_length': 4.31023102310231, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1727178', 'n_tokens_mistral': 516, 'n_tokens_neox': 514, 'n_words': 147}