Skip to content

Instantly share code, notes, and snippets.

View forrcaho's full-sized avatar

Forrest Cahoon forrcaho

  • Minneapolis
  • 18:01 (UTC -05:00)
View GitHub Profile
@forrcaho
forrcaho / factorization_quiz.py
Created October 23, 2022 01:51
Quiz for practicing factorization
import random
import re
from typing import Tuple
class FactorizationProblem:
"""Generates a factorization problem"""
def coinflip() -> bool:
return (random.randrange(2) == 0)
@forrcaho
forrcaho / artist_album_track.json
Last active September 7, 2021 19:40
Convert a JSON file with structured data into an SQLite DB file
{
"artist" : [
{
"name": "The Beatles",
"album" : [
{
"title": "Sgt. Pepper's Lonely Hearts Club Band",
"track": [
{
"title": "Within You Without You",
@forrcaho
forrcaho / additive-test.ck
Last active January 5, 2019 02:48
Fixed Additive object: now a Chubgraph
class AdditivePartial extends SinOsc {
int partialNumber;
float baseFreq;
float noteAmplitude;
fun void init( int partialNumber, float baseFreq, float noteAmplitude )
{
0 => this.gain;
0 => this.freq;
partialNumber => this.partialNumber;