<commit_before>import os
import asyncio
import discord
import poll
import image
import random
import time
import subprocess
import weather
import wolf
import alert
import metro
import nasa
import tramtracker
import quotes
import translate
import datetime
import langcodes
import basil

class Bot(object):
    def __init__(self, client, config):
        self.client = client
        self.config = config
        self.game_obj = None
        self.polls = {}
        self.groups = ['metro', 'quote', 'lenny', 'poll', 'wa', 'waa', 'clear', 'tex', 'astro', 'tram', 'gather', 'tl', 'tll', 'remind', 'basil']
        wolf.startWA(config['WA_appid'])

    @asyncio.coroutine
    def remind(self, message, *args):
        if len(args) < 3:
            yield from self.client.send_message(message.channel, "remind <target> <time> <message>")
            return
        target = args[0]
        if args[0] == 'all':
            target = '@everyone'
        elif args[0] == 'me':
            target = message.author.mention
        yield from alert.queue(target, args[1], args[2])
        yield from self.client.send_message(discord.Object(id = self.config['main_channel']), target + ' ' + args[2])

    @asyncio.coroutine
    def basil(self, message, command, *args):
        yield from getattr(self, 'basil_' + command)(message, *args)

    @asyncio.coroutine
    def basil_moisture(self, message, *args):
        yield from self.client.send_message(message.channel, basil.moisture())

    @asyncio.coroutine
    def basil_history(self, message, timestr, *args):
        yield from self.client.send_message(message.channel, basil.history(timestr))

    @asyncio.coroutine
    def basil_graph(self, message, timestr, *args):
        # Defaults to 1 week of history
        imagefile = basil.graph(timestr)
        if imagefile is not None:<commit_msg>Default values for timestr<commit_after>import os
import asyncio
import discord
import poll
import image
import random
import time
import subprocess
import weather
import wolf
import alert
import metro
import nasa
import tramtracker
import quotes
import translate
import datetime
import langcodes
import basil

class Bot(object):
    def __init__(self, client, config):
        self.client = client
        self.config = config
        self.game_obj = None
        self.polls = {}
        self.groups = ['metro', 'quote', 'lenny', 'poll', 'wa', 'waa', 'clear', 'tex', 'astro', 'tram', 'gather', 'tl', 'tll', 'remind', 'basil']
        wolf.startWA(config['WA_appid'])

    @asyncio.coroutine
    def remind(self, message, *args):
        if len(args) < 3:
            yield from self.client.send_message(message.channel, "remind <target> <time> <message>")
            return
        target = args[0]
        if args[0] == 'all':
            target = '@everyone'
        elif args[0] == 'me':
            target = message.author.mention
        yield from alert.queue(target, args[1], args[2])
        yield from self.client.send_message(discord.Object(id = self.config['main_channel']), target + ' ' + args[2])

    @asyncio.coroutine
    def basil(self, message, command, *args):
        yield from getattr(self, 'basil_' + command)(message, *args)

    @asyncio.coroutine
    def basil_moisture(self, message, *args):
        yield from self.client.send_message(message.channel, basil.moisture())

    @asyncio.coroutine
    def basil_history(self, message, timestr='1d', *args):
        yield from self.client.send_message(message.channel, basil.history(timestr))

    @asyncio.coroutine
    def basil_graph(self, message, timestr='1w', *args):
        imagefile = basil.graph(timestr)
        if imagefile is not None:
{'fraction_non_alphanumeric': 0.12366912366912367, 'fraction_numerical': 0.004641004641004641, 'mean_word_length': 3.1401129943502823, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '24912', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1123, 'n_words': 310}