<commit_before>from rest_framework.response import Response
from rest_framework.decorators import api_view

from app.services.statistics_service import StatisticsService
from app.serializers.statistics_serializer import HeroesStatisticsSerializer

@api_view()
def heroes_statistics(request):
    heroes_statistics = StatisticsService().get_heroes_statistics()
    serializer = HeroesStatisticsSerializer(heroes_statistics)
    return Response(serializer.data)
<commit_msg>change heroes statistics endpoint to use service with only 1000 matches<commit_after>from rest_framework.response import Response
from rest_framework.decorators import api_view

from app.services.statistics_service import StatisticsService
from app.serializers.statistics_serializer import HeroesStatisticsSerializer

@api_view()
def heroes_statistics(request):
    heroes_statistics = StatisticsService(quantity=1000).get_heroes_statistics()
    serializer = HeroesStatisticsSerializer(heroes_statistics)
    return Response(serializer.data)

{'fraction_non_alphanumeric': 0.054187192118226604, 'fraction_numerical': 0.007881773399014778, 'mean_word_length': 8.321100917431192, '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': '6169722', 'n_tokens_mistral': 263, 'n_tokens_neox': 252, 'n_words': 60}