<commit_before>import inspect
import traceback

from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin


class Owner(Plugin):
    """
    Owner-only commands.
    """
    @commands.command(name="eval")
    async def _eval(self, ctx: Context, *, eval_str: str):
        msg = await ctx.channel.send("Evaluating...")
        try:
            result = eval(eval_str)
            if inspect.isawaitable(result):
                result = await result

            result = str(result)
        except Exception as e:
            tb = ''.join(traceback.format_exc())
            result = tb

        fmtted = "```py\n{}\n```".format(result)
        await msg.edit(fmtted)<commit_msg>Add load and unload commands.<commit_after>import inspect
import traceback

from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin


def is_owner(self, ctx: Context):
    return ctx.author.id == <PASSWORD> or ctx.message.author.id == ctx.bot.application_info.owner.id


class Owner(Plugin):
    """
    Owner-only commands.
    """
    plugin_check = is_owner

    @commands.command(name="eval")
    async def _eval(self, ctx: Context, *, eval_str: str):
        msg = await ctx.channel.send("Evaluating...")
        try:
            result = eval(eval_str)
            if inspect.isawaitable(result):
                result = await result

            result = str(result)
        except Exception as e:
            tb = ''.join(traceback.format_exc())
            result = tb

        fmtted = "```py\n{}\n```".format(result)
        await msg.edit(fmtted)

    @commands.command(name="load", invokation_checks=[is_owner])
    async def _load(self, ctx: Context, *, import_name: str):
        """
        Loads a plugin.
        """
        await self.bot.load_plugins_from(import_name)
        await ctx.message.channel.send(":heavy_check_mark: Loaded.")

    @commands.command(name="unload", invokation_checks=[is_owner])
    async def _unload(self, ctx: Context, *, import_name: str):
        """
        Unloads a plugin.
        """
        await self.bot.unload_plugins_from(import_name)
        await ctx.message.channel.send(":heavy_check_mark: Unloaded.")
{'fraction_non_alphanumeric': 0.12180052956751986, 'fraction_numerical': 0.0, 'mean_word_length': 2.54773082942097, 'pattern_counts': {'":': 2, '<': 4, '<?xml version=': 0, '>': 4, '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': '1498088', 'n_tokens_mistral': 680, 'n_tokens_neox': 655, 'n_words': 155}