<commit_before>from django import template
from django.utils.timesince import timesince
from datetime import datetime, date
import json
register = template.Library()

@register.filter(name="utctimesince")
def utctimesince(value):
    if not value:
        return ""
    return timesince(value, now=datetime.utcnow())

@register.filter(name="format_fractional_percentage")
def fractional_percentage(value):
    try:
        return "%d%%" % round(value * 100)
    except:
        return "NaN"

@register.filter(name="format_meters")
def meters_to_kms(value):
    try:
        return round(value / 1000)
    except:
        return "NaN"

@register.filter(name="format_daily_meters_hourly_rate")
def meters_per_day_to_km_per_hour(value):
    try:
        return (value / 24) / 1000
    except:
        return "0"

@register.filter(name="format_seconds_minutes")
def meters_to_kms(value):
    try:
        return round(value / 60, 1)
    except:
        return "NaN"<commit_msg>Bump precision of format_seconds_minutes<commit_after>from django import template
from django.utils.timesince import timesince
from datetime import datetime, date
import json
register = template.Library()

@register.filter(name="utctimesince")
def utctimesince(value):
    if not value:
        return ""
    return timesince(value, now=datetime.utcnow())

@register.filter(name="format_fractional_percentage")
def fractional_percentage(value):
    try:
        return "%d%%" % round(value * 100)
    except:
        return "NaN"

@register.filter(name="format_meters")
def meters_to_kms(value):
    try:
        return round(value / 1000)
    except:
        return "NaN"

@register.filter(name="format_daily_meters_hourly_rate")
def meters_per_day_to_km_per_hour(value):
    try:
        return (value / 24) / 1000
    except:
        return "0"

@register.filter(name="format_seconds_minutes")
def meters_to_kms(value):
    try:
        return round(value / 60, 3)
    except:
        return "NaN"
{'fraction_non_alphanumeric': 0.10745058286872783, 'fraction_numerical': 0.017232640648758235, 'mean_word_length': 3.722488038277512, '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': '5924872', 'n_tokens_mistral': 660, 'n_tokens_neox': 618, 'n_words': 142}