<commit_before>#!/usr/bin/python3.6
import json
import logging
from lib import rank
from lib import webutil

def average(event, context):
    ranking_average = {
        'rankings': rank.average_individual()
    }
    return webutil.respond_success_json(ranking_average)
<commit_msg>fix ranking api for new json serialization<commit_after>#!/usr/bin/python3.6
import json
import logging
from lib import rank
from lib import webutil

def average(event, context):
    ranking_average = {
        'rankings': rank.average_individual()
    }
    return webutil.respond_success_json(json.dumps(ranking_average))

{'fraction_non_alphanumeric': 0.08731466227347612, 'fraction_numerical': 0.006589785831960461, 'mean_word_length': 4.527272727272727, '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': '3665227', 'n_tokens_mistral': 193, 'n_tokens_neox': 182, 'n_words': 48}