<commit_before>import os
import difflib
import logging
from pprint import pformat
from datetime import datetime, timedelta

from pylons import c, g
import pkg_resources
from pylons import c, request
from tg import expose, redirect, flash
from webob import exc
from pymongo.bson import ObjectId


from ming.orm import session
from allura import version
from allura.app import Application, WidgetController, ConfigOption, SitemapEntry
from allura.lib import helpers as h
from allura.ext.project_home import model as M
from allura.lib.security import require, has_project_access, has_artifact_access
from allura.model import User, ArtifactLink
from allura.model import ApiToken
from allura.controllers import BaseController

log = logging.getLogger(__name__)


class SampleSiteAdminApp(Application):
    __version__ = version.__version__
    installable = True
    tool_label='Sample Site Admin'
    default_mount_label='SiteAdmin'
    default_mount_point='site'
    status='user'

    def __init__(self, user, config):
        Application.__init__(self, user, config)
        self.root = SiteAdminController()

    def admin_menu(self):
        return []<commit_msg>[#0] Update for pymongo 1.9 (bson is now top-level package).<commit_after>import os
import difflib
import logging
from pprint import pformat
from datetime import datetime, timedelta

from pylons import c, g
import pkg_resources
from pylons import c, request
from tg import expose, redirect, flash
from webob import exc
from bson import ObjectId


from ming.orm import session
from allura import version
from allura.app import Application, WidgetController, ConfigOption, SitemapEntry
from allura.lib import helpers as h
from allura.ext.project_home import model as M
from allura.lib.security import require, has_project_access, has_artifact_access
from allura.model import User, ArtifactLink
from allura.model import ApiToken
from allura.controllers import BaseController

log = logging.getLogger(__name__)


class SampleSiteAdminApp(Application):
    __version__ = version.__version__
    installable = True
    tool_label='Sample Site Admin'
    default_mount_label='SiteAdmin'
    default_mount_point='site'
    status='user'

    def __init__(self, user, config):
        Application.__init__(self, user, config)
        self.root = SiteAdminController()

    def admin_menu(self):
        return []
{'fraction_non_alphanumeric': 0.05872412336290663, 'fraction_numerical': 0.0012674271229404308, 'mean_word_length': 4.861386138613861, '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': '1359212', 'n_tokens_mistral': 667, 'n_tokens_neox': 648, 'n_words': 235}