<commit_before>"""The application's Globals object"""

from app_factory import AppFactoryDict

class Globals(object):
    """Globals acts as a container for objects available throughout the
    life of the application
    """

    def __init__(self):
        """One instance of Globals is created during application
        initialization and is available during requests via the 'g'
        variable
        """
        self.widgets = {'home': {}, 'canvas': {}, 'profile': {}, 'preview': {}, 'config':{}} # {viewtype: {name: Widget instance}}
        self.resourceviews = AppFactoryDict() # {name: ResourceView instance}
        self.apps =  AppFactoryDict() # {name: App instance}

        # Our comet data streamer, responsible for polling the data
        # streams, and providing data to the widgets
        #from myfedora.streams import DataStreamer
        #self.datastreamer = DataStreamer()

        FEED_CACHE = "/tmp/moksha-feeds"

        from shove import Shove
        from feedcache.cache import Cache
        self.feed_storage = Shove('file://' + FEED_CACHE)
        self.feed_cache = Cache(self.feed_storage)<commit_msg>Comment out the Shove object, as we are not using it yet<commit_after>"""The application's Globals object"""

from app_factory import AppFactoryDict

class Globals(object):
    """Globals acts as a container for objects available throughout the
    life of the application
    """

    def __init__(self):
        """One instance of Globals is created during application
        initialization and is available during requests via the 'g'
        variable
        """
        self.widgets = {'home': {}, 'canvas': {}, 'profile': {}, 'preview': {}, 'config':{}} # {viewtype: {name: Widget instance}}
        self.resourceviews = AppFactoryDict() # {name: ResourceView instance}
        self.apps =  AppFactoryDict() # {name: App instance}

        # Our comet data streamer, responsible for polling the data
        # streams, and providing data to the widgets
        #from myfedora.streams import DataStreamer
        #self.datastreamer = DataStreamer()

        #FEED_CACHE = "/tmp/moksha-feeds"

        #from shove import Shove
        #from feedcache.cache import Cache
        #self.feed_storage = Shove('file://' + FEED_CACHE)
        #self.feed_cache = Cache(self.feed_storage)
{'fraction_non_alphanumeric': 0.10508182601205857, 'fraction_numerical': 0.0, 'mean_word_length': 3.0051724137931033, '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': '1752993', 'n_tokens_mistral': 633, 'n_tokens_neox': 619, 'n_words': 212}