<commit_before>from bot_app.messages import *
import bot_app.data as data

class Settings:
    settings = {}
    settings["everybody_can_send_messages"] = False
    settings["enable_message_polling"] = False

    def set_setting(self, setting, value):
        if not setting in self.settings.keys():
            raise Exception("Unknown setting: " + str(setting))

        self.settings[setting] = value
        return True

    def get_setting(self, setting):
        if not setting in self.settings.keys():
            raise Exception("Unknown setting: " + str(setting))

        return self.settings[setting]

settings = Settings()

def list_settings(bot, update):
    global settings

    chat_id = update.message.chat_id

    message = "Settings:\n"

    for s in settings.settings.keys():
        message += s + ": " + str(settings.settings[s]) + "\n"

    send_custom_message(bot, chat_id, message)
<commit_msg>Started working<commit_after>from bot_app.messages import *
import bot_app.data as data

class Settings:
    settings = {}
    settings["chat_mode"] = "off"

    def set_setting(self, setting, value):
        if not setting in self.settings.keys():
            raise Exception("Unknown setting: " + str(setting))

        self.settings[setting] = value
        return True

    def get_setting(self, setting):
        if not setting in self.settings.keys():
            raise Exception("Unknown setting: " + str(setting))

        return self.settings[setting]

settings = Settings()

def list_settings(bot, update):
    global settings

    chat_id = update.message.chat_id

    message = "Settings:\n"

    for s in settings.settings.keys():
        message += s + ": " + str(settings.settings[s]) + "\n"

    send_custom_message(bot, chat_id, message)

{'fraction_non_alphanumeric': 0.11336717428087986, 'fraction_numerical': 0.0, 'mean_word_length': 3.00451467268623, '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': '6766242', 'n_tokens_mistral': 511, 'n_tokens_neox': 494, 'n_words': 133}