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
import random | |
# Generate a random (but bounded) RGB value, run it through the HSL algorithm | |
# Run recursively until we are happy that the colour looks good. | |
def get_background_colour(): | |
r = random.randint(100, 255) | |
g = random.randint(100, 255) | |
b = random.randint(100, 255) | |
light = lightness(r, g, b) |
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
import pathlib | |
from PIL import Image | |
# Layer the transparent cat onto a solid pink background image and save. | |
def create_cat(id): | |
image = Image.open("Paper_Cat_Transparent.png") | |
path = "cats/" |
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
package com.grampabacon.shors; | |
import static java.lang.String.format; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Random; | |
import org.mathIT.numbers.Numbers; | |
import org.mathIT.quantum.Circuit; |
NewerOlder