<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import fnmatch

from flask.ext.failsafe import failsafe
from flask.ext.script import Manager
from flask.ext.script.commands import Clean, Server, Shell, ShowUrls
from flask.ext.migrate import MigrateCommand
from flask.ext.assets import ManageAssets

from config import AVAILABLE_CONFIGS, DEFAULT_CONFIG
from application import create_app, db, models
from tests import fixtures

manager = Manager(failsafe(create_app), with_default_commands=False)


def _make_context():
    return dict(app=manager.app, db=db, models=models, fixtures=fixtures)

manager.add_option('-c', '--config', dest='config',
                   choices=AVAILABLE_CONFIGS.keys(), default=DEFAULT_CONFIG)
manager.add_command('clean', Clean())
manager.add_command('runserver', Server())
manager.add_command('shell', Shell(make_context=_make_context))
manager.add_command('urls', ShowUrls())
manager.add_command('db', MigrateCommand)
manager.add_command("assets", ManageAssets())


@manager.command<commit_msg>Renamed the runserver command to server<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import fnmatch

from flask.ext.failsafe import failsafe
from flask.ext.script import Manager
from flask.ext.script.commands import Clean, Server, Shell, ShowUrls
from flask.ext.migrate import MigrateCommand
from flask.ext.assets import ManageAssets

from config import AVAILABLE_CONFIGS, DEFAULT_CONFIG
from application import create_app, db, models
from tests import fixtures

manager = Manager(failsafe(create_app), with_default_commands=False)


def _make_context():
    return dict(app=manager.app, db=db, models=models, fixtures=fixtures)

manager.add_option('-c', '--config', dest='config',
                   choices=AVAILABLE_CONFIGS.keys(), default=DEFAULT_CONFIG)
manager.add_command('clean', Clean())
manager.add_command('server', Server())
manager.add_command('shell', Shell(make_context=_make_context))
manager.add_command('urls', ShowUrls())
manager.add_command('db', MigrateCommand)
manager.add_command("assets", ManageAssets())


@manager.command
{'fraction_non_alphanumeric': 0.11676786548341897, 'fraction_numerical': 0.0009341429238673517, 'mean_word_length': 6.386206896551724, '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': '5199406', 'n_tokens_mistral': 662, 'n_tokens_neox': 636, 'n_words': 156}