<commit_before>from telegram import Updater
import json
import os
import manyNames
import reprimandUser


def getToken():
    token = []
    if not os.path.exists('token.json'):
        token.append(input('Insert Token here: '))
        with open('token.json', 'w') as f:
            json.dump(token, f)
    else:
        with open("token.json") as f:
            token = json.load(f)
    return token[0]


def echo(bot, update):
    '''
    Simple function that echos every received message back to the user.
    '''
    if update.message.text is not None and update.message.text != '':
        print('Message received: "{msg}" from {usr}'.format(
               msg=update.message.text,
               usr=update.message.from_user.username))
        usersToMention = manyNames.get_mentions(update.message.text)
        if len(usersToMention) > 0:
            for username in usersToMention:
                msg = reprimandUser.buildmessage(username)
                bot.sendMessage(chat_id=update.message.chat_id, text=msg)
    '''
    elif update.message.sticker is not None:
        print("{}".format(update.message.sticker))
        bot.sendSticker(chat_id=update.message.chat_id,
                        sticker='BQADAQADLgEAArED5ATHstrectuzrwI')'''


def main():
    token = getToken()
    print('''
       .. ..<commit_msg>add a little sleep. Just to make it even more fun!<commit_after>from telegram import Updater
import json
import os
import manyNames
import reprimandUser
import time


def getToken():
    token = []
    if not os.path.exists('token.json'):
        token.append(input('Insert Token here: '))
        with open('token.json', 'w') as f:
            json.dump(token, f)
    else:
        with open("token.json") as f:
            token = json.load(f)
    return token[0]


def echo(bot, update):
    '''
    Simple function that echos every received message back to the user.
    '''
    if update.message.text is not None and update.message.text != '':
        print('Message received: "{msg}" from {usr}'.format(
               msg=update.message.text,
               usr=update.message.from_user.username))
        usersToMention = manyNames.get_mentions(update.message.text)
        time.sleep(2)
        if len(usersToMention) > 0:
            for username in usersToMention:
                msg = reprimandUser.buildmessage(username)
                bot.sendMessage(chat_id=update.message.chat_id, text=msg)
    '''
    elif update.message.sticker is not None:
        print("{}".format(update.message.sticker))
        bot.sendSticker(chat_id=update.message.chat_id,
                        sticker='BQADAQADLgEAArED5ATHstrectuzrwI')'''


def main():
    token = getToken()
    print('''
       .. ..
{'fraction_non_alphanumeric': 0.11891694109037687, 'fraction_numerical': 0.002561287961946579, 'mean_word_length': 2.400497512437811, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3554219', 'n_tokens_mistral': 832, 'n_tokens_neox': 817, 'n_words': 195}