<commit_before>from pyramid.view import view_config

import logging
logger = logging.getLogger(__name__)

class Home(object):
    def __init__(self, request):
        self.request = request
        self.session = self.request.session

    @view_config(route_name='home', renderer='json')
    def view(self):
        return {'message': 'welcome to the real world'}<commit_msg>show available service on main page<commit_after>from pyramid.view import view_config

import logging
logger = logging.getLogger(__name__)

from registry.models import list_services

class Home(object):
    def __init__(self, request):
        self.request = request
        self.session = self.request.session

    @view_config(route_name='home', renderer='json')
    def view(self):
        services = list_services(self.request)
        return {'status': 'running', 'services': services}
{'fraction_non_alphanumeric': 0.10520231213872833, 'fraction_numerical': 0.0, 'mean_word_length': 4.034883720930233, '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': '5481626', 'n_tokens_mistral': 242, 'n_tokens_neox': 235, 'n_words': 64}