Skip to content

Instantly share code, notes, and snippets.

View ioistired's full-sized avatar

io ioistired

View GitHub Profile
@ioistired
ioistired / inspectable_timeit.py
Last active June 26, 2019 20:05 — forked from imayhaveborkedit/timeit.py
Like `python -m timeit` but you can probe the results
import timeit as _timeit
import math
import sys
import warnings
from dataclasses import dataclass, field
from typing import List
def timeit(stmt, *, setup='pass', repeat=5, number=0, precision=3, globals=None):
timer = _timeit.Timer(stmt, setup, globals=globals)
@ioistired
ioistired / bot_example.py
Last active September 9, 2019 20:13 — forked from EvieePy/bot_example.py
A Cogs Example for the rewrite version of - discord.py
import discord
from discord.ext import commands
import sys, traceback
"""This is a multi file example showcasing many features of the command extension and the use of cogs.
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic
understanding and platform for creating your own bot.
These examples make use of Python 3.6+ and the 1.0.0 version on the lib.