<commit_before># coding=utf-8
__author__ = 'm_messiah'
from base64 import b64decode
from random import choice
from fuzzywuzzy import process

responses = {
    "Hello": ["Hi there!", "Hi!", "Welcome!", "Hello, {name}!"],
    "Hi there": ["Hello!", "Hello, {name}!", "Hi!", "Welcome!"],
    "Hi!": ["Hi there!", "Hello, {name}!", "Welcome!", "Hello!"],
    "Welcome": ["Hi there!", "Hi!", "Hello!", "Hello, {name}!",],
    "How are you?": ["I'm fine!", "Status: Working...", "I'm doing great."],
    "Good bye": ["Bye, {name}!"]
}

def human_response(message):
    return choice(
        responses.get(
            process.extract(message.get("text", ""),
                            responses.keys(),
                            limit=1)[0][0]
        )
    ).format_map({'name': message["from"].get("first_name", ""),
                  'date': message.get("date", ""),
                  })


def about(arguments, message):
    return """Hey, %s!
My author is @m_messiah.
You can find this nickname at:
    + Telegram
    + Twitter
    + Instagram
    + VK
    + GitHub (m-messiah)<commit_msg>fix for unknown command<commit_after># coding=utf-8
__author__ = 'm_messiah'
from base64 import b64decode
from random import choice
from fuzzywuzzy import process

responses = {
    "Hello": ["Hi there!", "Hi!", "Welcome!", "Hello, {name}!"],
    "Hi there": ["Hello!", "Hello, {name}!", "Hi!", "Welcome!"],
    "Hi!": ["Hi there!", "Hello, {name}!", "Welcome!", "Hello!"],
    "Welcome": ["Hi there!", "Hi!", "Hello!", "Hello, {name}!",],
    "How are you?": ["I'm fine!", "Status: Working...", "I'm doing great."],
    "Good bye": ["Bye, {name}!"]
}

def human_response(message):
    leven = process.extract(message.get("text", ""), responses.keys(), limit=1)
    if leven[0][1] < 75:
        response = "I can not understand you"
    else:
        response = leven[0][0]
    return choice(responses.get(response)
                  ).format_map({'name': message["from"].get("first_name", ""),
                                'date': message.get("date", ""),
                                })


def about(arguments, message):
    return """Hey, %s!
My author is @m_messiah.
You can find this nickname at:
    + Telegram
    + Twitter
    + Instagram
    + VK
    + GitHub (m-messiah)
{'fraction_non_alphanumeric': 0.20456540825285338, 'fraction_numerical': 0.00877963125548727, 'mean_word_length': 2.7669421487603305, 'pattern_counts': {'":': 12, '<': 4, '<?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': '3246762', 'n_tokens_mistral': 795, 'n_tokens_neox': 750, 'n_words': 200}