<commit_before># -*- coding: utf-8 -*-

import json
import logging

import web

from nailgun.db import orm
from nailgun.api.models import Notification
from nailgun.api.handlers.base import JSONHandler


class NotificationHandler(JSONHandler):
    fields = (
        "id",
        "cluster",
        "topic",
        "message",
        "status",
        "node_id"
    )
    model = Notification

    @classmethod
    def render(cls, instance, fields=None):
        json_data = JSONHandler.render(instance, fields=cls.fields)
        json_data["date"] = "-".join([
            str(instance.datetime.hour),
            str(instance.datetime.minute)
        ])
        json_data["time"] = ":".join([
            str(instance.datetime.day),<commit_msg>fixed mistakes after review<commit_after># -*- coding: utf-8 -*-

import json
import logging

import web

from nailgun.db import orm
from nailgun.api.models import Notification
from nailgun.api.handlers.base import JSONHandler


class NotificationHandler(JSONHandler):
    fields = (
        "id",
        "cluster",
        "topic",
        "message",
        "status",
        "node_id"
    )
    model = Notification

    @classmethod
    def render(cls, instance, fields=None):
        json_data = JSONHandler.render(instance, fields=cls.fields)
        json_data["time"] = "-".join([
            str(instance.datetime.hour),
            str(instance.datetime.minute),
            str(instance.datetime.second)
        ])
        json_data["date"] = ":".join([
            str(instance.datetime.day),
{'fraction_non_alphanumeric': 0.12443584784010316, 'fraction_numerical': 0.0012894906511927789, 'mean_word_length': 2.3812636165577343, 'pattern_counts': {'":': 2, '<': 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': '5316214', 'n_tokens_mistral': 446, 'n_tokens_neox': 435, 'n_words': 97}