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
from numpy import any, all, where, zeros | |
from random import choice, randint | |
from itertools import product | |
from readchar import readchar | |
from colorama import Fore as cf | |
SIZE, MAX = 5, 10 | |
def add_tile(a): | |
a[choice([*zip(*where(a==0))])] = randint(1,2) |
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://mathworld.wolfram.com/HeartCurve.html | |
float a=0; //angle | |
float x, y; | |
float scaleDiv = 40; //scale divisor for the size of the heart | |
void setup() { | |
size(720, 720); | |
colorMode(HSB, 360); | |
background(0); | |
noStroke(); | |
} |
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
#/usr/bin/python3 | |
# play a sequence of beeps | |
# based on https://stackoverflow.com/a/27978895/3210924 | |
import pyaudio | |
import numpy as np | |
from numpy import zeros | |
import sys | |
import time |