Skip to content

Instantly share code, notes, and snippets.

View Nikitaw99's full-sized avatar

Nikitaw99 Nikitaw99

  • Russia
View GitHub Profile
@leovoel
leovoel / basic_bot.py
Last active January 25, 2024 04:19
discord.py's basic_bot.py converted to use "cogs".
from discord.ext import commands
description = '''An example bot to showcase the discord.ext.commands extension
module.
There are a number of utility commands being showcased here.'''
# this specifies what extensions to load when the bot starts up
startup_extensions = ["members", "rng"]
@christian-oudard
christian-oudard / gfm.py
Created June 29, 2010 18:51
Github Flavored Markdown in Python
import re
from hashlib import md5
def gfm(text):
# Extract pre blocks.
extractions = {}
def pre_extraction_callback(matchobj):
digest = md5(matchobj.group(0)).hexdigest()
extractions[digest] = matchobj.group(0)
return "{gfm-extraction-%s}" % digest