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

"""
management script
~~~~~~~~~~~~~~~~~

Run the application, take administrative action.

:Copyright: 2006-2014 <NAME>
"""

from flask.ext.script import Manager

from byceps.application import create_app
from byceps.database import db


CONFIG_NAME = 'development'


app = create_app(CONFIG_NAME)

manager = Manager(app)


@manager.shell
def make_shell_context():
    return {
        'app': app,<commit_msg>Expose avatar images on the development server when in debug mode.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
management script
~~~~~~~~~~~~~~~~~

Run the application, take administrative action.

:Copyright: 2006-2014 <NAME>
"""

from flask.ext.script import Manager
from werkzeug.wsgi import SharedDataMiddleware

from byceps.application import create_app
from byceps.database import db


CONFIG_NAME = 'development'


app = create_app(CONFIG_NAME)

if app.debug:
    exports = {
        '/users/avatars': str(app.config['PATH_USER_AVATAR_IMAGES']),
    }
    app.wsgi_app = SharedDataMiddleware(app.wsgi_app, exports)

manager = Manager(app)


@manager.shell
def make_shell_context():
    return {
        'app': app,
{'fraction_non_alphanumeric': 0.13696369636963696, 'fraction_numerical': 0.01485148514851485, 'mean_word_length': 4.273913043478261, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3661525', 'n_tokens_mistral': 406, 'n_tokens_neox': 377, 'n_words': 99}