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 __future__ import division | |
import math | |
last_points = [] | |
sides = 6 | |
m = None | |
def setup(): | |
global m | |
strokeWeight(2) | |
size(650,650) |
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
# Python 3 - AP test scraper to Blackborad format | |
__author__ = "Sam Rosen" | |
f = open("2013psych.txt", errors="ignore") | |
output = open("2013psychBB.txt", "w") | |
questions_choices = [] | |
qc = questions_choices | |
answers = [] | |
n = 0 | |
for l in f: | |
#print(l.encode("ASCII", errors="ignore")) |
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
# Elevens Simulation - Python 3.3 | |
# http://media.collegeboard.com/digitalServices/pdf/ap/ap-compscia-elevens-lab-student-guide.pdf | |
# https://paste.ee/p/fdfd7 | |
from random import randint | |
def flip(): | |
if randint(0,2) < 2: | |
return "heads" | |
return "tails" | |
def arePermutations(li, st): | |
li_histo = {} |
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
# http://codegolf.stackexchange.com/questions/22144/images-with-all-colors | |
from PIL import Image | |
from random import choice, shuffle, randint | |
from math import sqrt | |
import itertools | |
import time | |
WIDTH = 256 | |
HEIGHT = 128 | |
# colors is defined in main | |
def color_dif(color, compare): |