<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template


register = template.Library()


@register.filter
def ofKey(value, arg):
    if value:
        return value.get(arg)
    return ""


@register.filter
def callMethod(obj, methodName, *args):
    method = getattr(obj, methodName)
    return method(*args)<commit_msg>add multi argument on template callMethod<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import template


register = template.Library()


@register.filter
def ofKey(value, arg):
    if value:
        return value.get(arg)
    return ""


@register.filter
def callMethod(obj, args):
    arg = args.split(',')
    methodName = arg[0]
    method = getattr(obj, methodName)
    return method(arg[1])
{'fraction_non_alphanumeric': 0.13565891472868216, 'fraction_numerical': 0.00516795865633075, 'mean_word_length': 3.505813953488372, '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': '7538278', 'n_tokens_mistral': 250, 'n_tokens_neox': 240, 'n_words': 65}