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 numpy as np | |
from scipy.io.wavfile import write | |
import sounddevice as sd | |
# import time | |
import matplotlib.pyplot as plot | |
from itertools import count | |
from random import seed, random | |
sps = 44100 # Samples per second |
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/env python3 | |
from functools import reduce | |
import numpy as np | |
# mutable, imperative | |
def fact1(n): | |
out = 1 | |
for i in range(1, n+1): | |
out *= i | |
return out |
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/env python3 | |
import numpy as np | |
def string_to_byte_array(s : str) -> np.ndarray: | |
return np.array([ord(c) for c in s], dtype=np.uint8) | |
def jenkins_one_at_a_time(bytes: np.ndarray[np.uint8]) -> np.uint32: | |
hash = np.uint32(0) | |
for byte in bytes: | |
hash += np.uint8(byte) |
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 bpy | |
from bpy import data as D | |
import itertools | |
import numpy as np | |
from scipy.signal import convolve | |
import time | |
import math | |
## PRELIM |