Skip to content

Instantly share code, notes, and snippets.

@Gear-Smith
Gear-Smith / bot_example.py
Last active March 27, 2020 23:43
A Cogs Example for the 0.16.12 version of - discord.py (with automatic directory searching)
import discord
from discord.ext import commands
import asyncio
import random
import os
import sys, traceback
description = '''
This is a multi file example showcasing many features of the command extension and the use of cogs.
@joinAero
joinAero / camera.py
Created May 19, 2017 06:36
Use Kinect with OpenCV (Python)
import cv2
import sys
class Camera(object):
def __init__(self, index=0):
self.cap = cv2.VideoCapture(index)
self.openni = index in (cv2.CAP_OPENNI, cv2.CAP_OPENNI2)
self.fps = 0
@sloria
sloria / bobp-python.md
Last active November 14, 2024 15:01
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens