Skip to content

Instantly share code, notes, and snippets.

View AnotherTwinkle's full-sized avatar

Fijaj AnotherTwinkle

View GitHub Profile
import time, os, sys
import json
import winsound
VALID_RESULTS = ['noop','skipped', 'unsolved', 'AC', 'WA', 'TLE', 'RTE', 'MLE']
class TimerExceeded(Exception):
pass
class Timer(object):
@AnotherTwinkle
AnotherTwinkle / shitpost_markov_chain.py
Last active June 2, 2022 17:53
An incredibly obfuscated Markov Chain.
import random
class MarkovChain(object):
def tuplemaker(self,words,length):
'''Creates the entries for the training dictionary, tuple[0]
is the key and the rest are values'''
for x in range(0,len(words)-1):
try:
yield tuple(words[x:x+length]) #Using yield because this list tends to get very big
'''This extension implents a rtfm support with discord.py'''
import discord
from discord.ext import commands
import inspect
import re
import builtins
import zlib
import io
@AnotherTwinkle
AnotherTwinkle / swearwords.txt
Last active March 24, 2021 12:11
A list of swear words used in filtering by the Discord Swear Detector Bot. (https://top.gg/bot/815622793546825738)
anal
anus
areole
arian
arrse
arse
arsehole
aryan
asanchez
ass