<commit_before># -*- coding: utf-8 -*-

# Standard library imports
# Third party imports
from django import template
from django.conf import settings

# Local application / specific library imports

register = template.Library()


@register.filter
def is_anonymous(user):
    """
    Determines whether the given user is the anonymous user.

    Usage::

        {% if topic.poster|is_anonymous %}...{% endif %}
    """
    return user.id == settings.ANONYMOUS_USER_ID if hasattr(settings, 'ANONYMOUS_USER_ID') \
        else False
<commit_msg>Forum member tags updated<commit_after># -*- coding: utf-8 -*-

# Standard library imports
# Third party imports
from django import template
from django.conf import settings

# Local application / specific library imports

register = template.Library()


@register.filter
def is_anonymous(user):
    """
    Determines whether the given user is the anonymous user.

    Usage::

        {% if topic.poster|is_anonymous %}...{% endif %}
    """
    return user.id == settings.ANONYMOUS_USER_ID if hasattr(settings, 'ANONYMOUS_USER_ID') \
        else user.is_authenticated()

{'fraction_non_alphanumeric': 0.10644007155635063, 'fraction_numerical': 0.0017889087656529517, 'mean_word_length': 3.4939759036144578, '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': '6070224', 'n_tokens_mistral': 338, 'n_tokens_neox': 312, 'n_words': 99}