<commit_before>from django.template import Library
from django.utils import timezone
from datetime import datetime, timedelta

register = Library()

@register.filter(name='days_since')
def active_days(enable_date, disable_date):
    """Returns the number of days the segment has been active"""
    if enable_date is not None:
        if disable_date is None or (disable_date < enable_date):
            # There is no disable date, or it is not relevant.
            delta = timezone.now() - enable_date
            return delta.days
        if disable_date > enable_date:
            # There is a disable date and it is relevant.
            delta = disable_date - enable_date<commit_msg>Removed unused import statement from filters<commit_after>from django.template import Library
from django.utils import timezone

register = Library()

@register.filter(name='days_since')
def active_days(enable_date, disable_date):
    """Returns the number of days the segment has been active"""
    if enable_date is not None:
        if disable_date is None or (disable_date < enable_date):
            # There is no disable date, or it is not relevant.
            delta = timezone.now() - enable_date
            return delta.days
        if disable_date > enable_date:
            # There is a disable date and it is relevant.
            delta = disable_date - enable_date
{'fraction_non_alphanumeric': 0.06661786237188873, 'fraction_numerical': 0.0, 'mean_word_length': 2.9169054441260744, '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': '1691282', 'n_tokens_mistral': 348, 'n_tokens_neox': 346, 'n_words': 141}