<commit_before>from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
from django.conf import settings

from emo.templatetags.emoji_dict import emoji_dict

import re

register = template.Library()
emoji_finder = re.compile(u':[-\w]+:')


@register.filter(is_safe=True)
@stringfilter
def emoji(value):
    for emoji in set(emoji_finder.findall(value)):
        if emoji in emoji_dict:
            value = value.replace(emoji, u'<span class="emoji"><img src="' + settings.STATIC_URL + 'adminplus/img/%s" height="22" width="22" alt="%s"></span>' % (emoji_dict[emoji], emoji[1:-1]))
    return mark_safe(value)
<commit_msg>Changed broken static path from adminplus to emo<commit_after>from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
from django.conf import settings

from emo.templatetags.emoji_dict import emoji_dict

import re

register = template.Library()
emoji_finder = re.compile(u':[-\w]+:')


@register.filter(is_safe=True)
@stringfilter
def emoji(value):
    for emoji in set(emoji_finder.findall(value)):
        if emoji in emoji_dict:
            value = value.replace(emoji, u'<span class="emoji"><img src="' + settings.STATIC_URL + 'emo/img/%s" height="22" width="22" alt="%s"></span>' % (emoji_dict[emoji], emoji[1:-1]))
    return mark_safe(value)

{'fraction_non_alphanumeric': 0.13126323218066338, 'fraction_numerical': 0.008468595624558928, 'mean_word_length': 5.219298245614035, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4126791', 'n_tokens_mistral': 476, 'n_tokens_neox': 476, 'n_words': 111}