This file contains hidden or 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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains hidden or 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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains hidden or 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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains hidden or 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
# Example | |
from urllib2 import urlopen | |
import random | |
cat = (random.randint(100,500), random.randint(100,500)) | |
site = urlopen('http://placekitten.com/{}/{}'.format(*cat)) | |
data = site.read() | |
cat_file = open('demoncat.jpg','w') |
This file contains hidden or 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
def addUnique(l,item): | |
if item not in l: | |
l.append(item) | |
return l | |
from PIL import Image | |
import sys | |
im = Image.open(sys.argv[1]) | |
pix = im.load() |
This file contains hidden or 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
colors = ["black","white","grey","darkgrey", "lightgrey","gray","darkgray","lightgray","red","darkred","lightred","brown","darkbrown","lightbrown","orange","yellow","green","darkgreen","lightgreen","blue","lightblue","darkblue","purple","pink","transparent"] | |
numerics = ["1","2","3","4","5","6","7","8","9","0"] | |
def get_me_my_game_string_now(): | |
import urllib2 | |
game_url = "https://gist.githubusercontent.com/ColtonPhillips/3d66191462a417f45419/raw/6512cd41f0bae75333f7a3b2befd22e4b8fae7ad/Let's%2520Save%2520Everybody's%2520Pets.txt" | |
response = urllib2.urlopen(game_url) | |
html = response.read() | |
return html |
This file contains hidden or 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
def addUnique(l,item): | |
if item not in l: | |
l.append(item) | |
return l | |
from PIL import Image | |
import sys | |
im = Image.open(sys.argv[1]) | |
pix = im.load() |
This file contains hidden or 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
#http://www.equasys.de/colorconversion.html | |
import sys | |
y = sys.argv[1] | |
cb = sys.argv[2] | |
cr = sys.argv[3] | |
y = int(y) | |
cb = int(cb) | |
cr = int(cr) | |
r = y + 1.4 * (cr - 128) |
This file contains hidden or 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
#http://www.picturetopeople.org/p2p/picture_to_people_colors.p2p/color_converter?color_space=RGB&color_channel1=0&color_channel2=0&color_channel3=0 | |
#https://msdn.microsoft.com/en-us/library/ff635643.aspx | |
#rgb range - [0,255] | |
#y range - [0,255] | |
#cb,cr range - [-128,127] | |
import sys | |
import time | |
#r = int(sys.argv[1]) |
NewerOlder