<commit_before>from django import template

from feincms.module.medialibrary.models import MediaFile
from feinheit.media_variation.models import MediaVariation

register = template.Library()


def tryint(v):
    try:
        return int(v)
    except ValueError:
        return 999999 # Arbitrarily big number

def get_options_from_arg(arg):
    # try to get quality
    if 'q' in arg:
        size, q = arg.split('q')
        q = tryint(q)
    else:
        q =  90
        size = arg
    
    # defining the size
    x, y = [tryint(x) for x in size.split('x')]<commit_msg>fixed typo in media_variation templatetags<commit_after>from django import template

from feincms.module.medialibrary.models import MediaFile
from feinheit.media_variations.models import MediaVariation

register = template.Library()


def tryint(v):
    try:
        return int(v)
    except ValueError:
        return 999999 # Arbitrarily big number

def get_options_from_arg(arg):
    # try to get quality
    if 'q' in arg:
        size, q = arg.split('q')
        q = tryint(q)
    else:
        q =  90
        size = arg
    
    # defining the size
    x, y = [tryint(x) for x in size.split('x')]
{'fraction_non_alphanumeric': 0.08843537414965986, 'fraction_numerical': 0.013605442176870748, 'mean_word_length': 2.6439628482972135, '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': '3507173', 'n_tokens_mistral': 391, 'n_tokens_neox': 381, 'n_words': 115}