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

from telegram.ext import Updater
from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, RegexHandler,
                          ConversationHandler)
from bs4 import BeautifulSoup
from ConfigParser import RawConfigParser
import logging
import re
import requests

logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)


def start(bot, update):
    bot.send_message(chat_id=update.message.chat_id, text="I'm a bot, please talk to me!")

def google(bot, update):
    search = update.message.text
    search = re.sub(r'^(?i)google ','',search)
    logger.info("Google %s" %search)
    r = requests.get('https://www.google.com/search?q='+ search)
    soup = BeautifulSoup(r.text, "html.parser")
    result = soup.find('h3', {'class': 'r'}).find('a').attrs['href']
    update.message.reply_text(result)

def girlfriend(bot, update):
    logger.info("girlfriend called")
    update.message.reply_text(u"醒醒吧你沒有女友")

def sister(bot, update):
    logger.info("sister called")
    update.message.reply_text(u"醒醒吧你沒有妹妹")
    
def no_money(bot, update):
    logger.info("no money called")
    update.message.reply_sticker(sticker='CAADBQADTgADVRXrCVFQ913jCk08Ag')

def main():
    cfg = RawConfigParser()
    with open('config', 'rb') as fp:
        cfg.readfp(fp, 'config')
    token = cfg.get('auth', 'token')
    updater = Updater(token)
    dp = updater.dispatcher
    dp.add_handler(CommandHandler('start', start))
    dp.add_handler(RegexHandler('^(?i)google .*', google))
    dp.add_handler(RegexHandler(u'.*女朋友.*', girlfriend))
    dp.add_handler(RegexHandler(u'.*妹妹.*', sister))
    dp.add_handler(RegexHandler(u'.*沒錢.*', no_money))
    updater.start_polling()
    updater.idle()

if __name__ == '__main__':
    main()
<commit_msg>Add I Think No Feature<commit_after># -*- coding: utf-8 -*-

from telegram.ext import Updater
from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, RegexHandler,
                          ConversationHandler)
from bs4 import BeautifulSoup
from ConfigParser import RawConfigParser
import logging
import re
import requests

logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)


def start(bot, update):
    bot.send_message(chat_id=update.message.chat_id, text="I'm a bot, please talk to me!")

def google(bot, update):
    search = update.message.text
    search = re.sub(r'^(?i)google ','',search)
    logger.info("Google %s" %search)
    r = requests.get('https://www.google.com/search?q='+ search)
    soup = BeautifulSoup(r.text, "html.parser")
    result = soup.find('h3', {'class': 'r'}).find('a').attrs['href']
    update.message.reply_text(result)

def girlfriend(bot, update):
    logger.info("girlfriend called")
    update.message.reply_text(u"醒醒吧你沒有女友")

def sister(bot, update):
    logger.info("sister called")
    update.message.reply_text(u"醒醒吧你沒有妹妹")
    
def no_money(bot, update):
    logger.info("no money called")
    update.message.reply_sticker(sticker='CAADBQADTgADVRXrCVFQ913jCk08Ag')

def i_think_no(bot, update):
    logger.info("nooooooo")
    update.message.reply_sticker(sticker='CAADBQADUAADVRXrCVXDWs7XUQUfAg')

def main():
    cfg = RawConfigParser()
    with open('config', 'rb') as fp:
        cfg.readfp(fp, 'config')
    token = cfg.get('auth', 'token')
    updater = Updater(token)
    dp = updater.dispatcher
    dp.add_handler(CommandHandler('start', start))
    dp.add_handler(RegexHandler('^(?i)google .*', google))
    dp.add_handler(RegexHandler(u'.*女朋友.*', girlfriend))
    dp.add_handler(RegexHandler(u'.*妹妹.*', sister))
    dp.add_handler(RegexHandler(u'.*沒錢.*', no_money))
    dp.add_handler(RegexHandler(u'.*不行.*', i_think_no))
    updater.start_polling()
    updater.idle()

if __name__ == '__main__':
    main()

{'fraction_non_alphanumeric': 0.15720081135902636, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 4.323886639676114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '6352680', 'n_tokens_mistral': 1418, 'n_tokens_neox': 1426, 'n_words': 257}