This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# PNG Gamma trick (by @marcan42 / marcan@marcan.st) | |
# | |
# This script implements an improved version of the gamma trick used to make | |
# thumbnail images on reddit/4chan look different from the full-size image. | |
# | |
# Sample output (SFW; images by @Miluda): | |
# https://mrcn.st/t/homura_gamma_trick.png | |
# https://www.reddit.com/r/test/comments/6edthw/ (click for fullsize) | |
# https://twitter.com/marcan42/status/869855956842143744 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# let's play LCR! | |
# http://en.wikipedia.org/wiki/LCR_(dice_game) | |
from random import choice, shuffle, random | |
def makeDie(L=1,C=1,R=1,D=3): | |
print "Making a die with " + str(L + C + R + D) + " sides." | |
die = ([-1] * L) + (["pot"] * C) + ([1] * R) + ([0] * D) | |
return die |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bitarray import bitarray | |
import mmh3 | |
# gist adapted from mburst's work | |
# https://gist.github.com/4700640 | |
# using this dictionary: | |
# http://manpages.ubuntu.com/manpages/precise/man5/american-english-huge.5.html | |
# comments on reddit |