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 math import floor | |
from sys import float_info, stdout | |
from internetarchive import download | |
from moviepy.editor import VideoFileClip, concatenate_videoclips, vfx | |
from moviepy.video.tools.cuts import find_video_period | |
from random import choice, sample | |
import time | |
from argparse import ArgumentParser | |
import os | |
import pytesseract |
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
// This script is deprecated, use https://github.com/OverlappingElvis/blob-opera-midi instead! | |
const fs = require(`fs`) | |
const _ = require(`lodash`) | |
const { Player } = require(`midi-player-js`) | |
const blessed = require(`blessed`) | |
const contrib = require(`blessed-contrib`) | |
const Alea = require(`alea`) | |
const VOWELS = _.range(4) |
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
{ | |
"theme":"Festive", | |
"parts":[ | |
{ | |
"notes":[ | |
{ | |
"timeSeconds":0, | |
"midiPitch":69, | |
"librettoChunk":{ | |
"vowel":{ |
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
const allCandles = (new Array(256)).fill(256).map((val, index) => (index).toString(2).padStart(8, 0)) | |
const nonsymmetricCandles = allCandles.reduce((memo, candles) => { | |
if (memo.includes([...candles].reverse().join(''))) { | |
return memo | |
} | |
memo.push(candles) |
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
const chevrotain = require(`chevrotain`) | |
const { Lexer, Parser } = chevrotain | |
const allTokens = [] | |
const createToken = (options) => { | |
const token = chevrotain.createToken(options) | |
allTokens.push(token) |
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
/* | |
I really wanted my band to do this Mezz Mezzrow song (https://www.youtube.com/watch?v=UEQ6v0pWUcg) but nobody wanted to learn the sequence. Now they have no excuse. | |
*/ | |
var _ = require('underscore'); | |
// Folks, we're gonna do some muggin' with numbers. "Well explain it to me, man!" | |
var lessThanSeventy = function(number) { | |
if (number === 7) { | |
return 'uh'; |
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
// underscore.js helpers | |
var _ = require('underscore'); | |
// State aliases | |
var OCCUPIED = true; | |
var VACANT = false; | |
// Sample a current state | |
var knock = function(state) { | |
var correct = state.sign === state.bathroom; |