<commit_before>from __future__ import absolute_import
import importlib
from utils import strings


class BaseService:

    def __init__(self, config, comms):
        self.comms = comms
        self.config = config

    def setup(self):
        pass

    def execute(self, request, body, bot_stats):
        event = self.get_event(request, body)<commit_msg>Enable events, by default all events are allowed<commit_after>from __future__ import absolute_import
import importlib
from utils import strings


class BaseService:

    def __init__(self, config, comms):
        self.comms = comms
        self.config = config

    def setup(self):
        pass

    def execute(self, request, body, bot_stats):
        event = self.get_event(request, body)
        if self.config.get('notify_events'):
            if event not in self.config.get('notify_events'):
                return 'Event disabled'
{'fraction_non_alphanumeric': 0.07941834451901567, 'fraction_numerical': 0.0, 'mean_word_length': 2.925438596491228, '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': '4927607', 'n_tokens_mistral': 252, 'n_tokens_neox': 243, 'n_words': 78}