<commit_before>#!/usr/bin/env python
from __future__ import unicode_literals
import os
import sys
import subprocess
import unittest
from flask.ext.script import Manager, Server, Shell
from flask.ext.migrate import MigrateCommand
from app import app, db, es, Snippet
from app.management import es_manager


manager = Manager(app)


#-----------------------------------------------------------------------------#
# Server
#-----------------------------------------------------------------------------#
server = Server(host='0.0.0.0', use_debugger=True)
manager.add_command("runserver", server)


#-----------------------------------------------------------------------------#
# Database Management
#-----------------------------------------------------------------------------#
manager.add_command('db', MigrateCommand)


#-----------------------------------------------------------------------------#
# ElasticSearch Manage
#-----------------------------------------------------------------------------#
manager.add_command('es', es_manager)


#-----------------------------------------------------------------------------#
# Shell
#-----------------------------------------------------------------------------#
def _make_context():
    """_make_context

       :returns: A dict of objects to import in the shell
    """
    return dict(app=app, db=db, es=es, Snippet=Snippet)

manager.add_command("shell", Shell(make_context=_make_context))

<commit_msg>Another doc string correction<commit_after>#!/usr/bin/env python
from __future__ import unicode_literals
import os
import sys
import subprocess
import unittest
from flask.ext.script import Manager, Server, Shell
from flask.ext.migrate import MigrateCommand
from app import app, db, es, Snippet
from app.management import es_manager


manager = Manager(app)


#-----------------------------------------------------------------------------#
# Server
#-----------------------------------------------------------------------------#
server = Server(host='0.0.0.0', use_debugger=True)
manager.add_command("runserver", server)


#-----------------------------------------------------------------------------#
# Database Management
#-----------------------------------------------------------------------------#
manager.add_command('db', MigrateCommand)


#-----------------------------------------------------------------------------#
# ElasticSearch Manage
#-----------------------------------------------------------------------------#
manager.add_command('es', es_manager)


#-----------------------------------------------------------------------------#
# Shell
#-----------------------------------------------------------------------------#
def _make_context():
    """Function to declare all the objects to import into the shell.

       :returns: A dict of objects to import in the shell
    """
    return dict(app=app, db=db, es=es, Snippet=Snippet)

manager.add_command("shell", Shell(make_context=_make_context))


{'fraction_non_alphanumeric': 0.48149394347240915, 'fraction_numerical': 0.0026917900403768506, 'mean_word_length': 0.9623762376237623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6130186', 'n_tokens_mistral': 603, 'n_tokens_neox': 580, 'n_words': 157}