<commit_before>import datetime

from django import template

from .. import models


register = template.Library()


@register.inclusion_tag('events/tags/list_events.html')
def list_events(number_of_events=3):
    now = datetime.datetime.now()
    events = models.Event.objects.filter(date__gte=now).all()[:number_of_events]
    has_range = False
    for evt in events:
        if evt.end_date:
            has_range = True
            break
    return {<commit_msg>Remove future-restriction on list_events tag<commit_after>from django import template

from .. import models


register = template.Library()


@register.inclusion_tag('events/tags/list_events.html')
def list_events(number_of_events=None):
    events = models.Event.objects.all()
    if number_of_events is not None:
        events = events[:number_of_events]
    has_range = False
    for evt in events:
        if evt.end_date:
            has_range = True
            break
    return {
{'fraction_non_alphanumeric': 0.09014675052410902, 'fraction_numerical': 0.0010482180293501049, 'mean_word_length': 3.1703056768558953, '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': '7237157', 'n_tokens_mistral': 287, 'n_tokens_neox': 285, 'n_words': 67}