<commit_before>import logging

from pylons import tmpl_context as c
from pylons.i18n import _

from adhocracy import model
from adhocracy.lib import event, helpers as h, tiles
from adhocracy.lib.base import BaseController
from adhocracy.lib.pager import NamedPager
from adhocracy.lib.templating import render

log = logging.getLogger(__name__)


class EventController(BaseController):

    def all(self, format='html'):
        query = model.meta.Session.query(model.Event)
        query = query.order_by(model.Event.time.desc())
        query = query.limit(50)
<commit_msg>Don't show hidden instances in event list<commit_after>import logging

from pylons import tmpl_context as c
from pylons.i18n import _

from adhocracy import model
from adhocracy.lib import event, helpers as h, tiles
from adhocracy.lib.base import BaseController
from adhocracy.lib.pager import NamedPager
from adhocracy.lib.templating import render

log = logging.getLogger(__name__)


class EventController(BaseController):

    def all(self, format='html'):
        query = model.meta.Session.query(model.Event)\
            .join(model.Instance).filter(model.Instance.hidden == False)\
            .order_by(model.Event.time.desc())\
            .limit(50)

{'fraction_non_alphanumeric': 0.08670988654781199, 'fraction_numerical': 0.006482982171799027, 'mean_word_length': 4.061475409836065, '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': '5881054', 'n_tokens_mistral': 389, 'n_tokens_neox': 365, 'n_words': 102}