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
/* Courtesy of Jake Albaugh: https://twitter.com/jake_albaugh/status/1118611365508337665 */ | |
const bars = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"]; | |
const ctx = new AudioContext(); | |
const analyser = ctx.createAnalyser(); | |
analyser.fftSize = 32; | |
const uIntArray = new Uint8Array(16); | |
navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => { | |
ctx.createMediaStreamSource(stream).connect(analyser); | |
updateUrl(); |
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
function collatz(n, steps = []) { | |
if (isNaN(n)) return NaN; | |
if (steps.length === 0) steps.push(n); | |
const isEven = n%2 === 0; | |
const newInt = isEven ? n / 2 : (3 * n) + 1; | |
steps.push(newInt); | |
return newInt !== 1 ? collatz(newInt, steps) : steps; |
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 os, shutil, sys, getopt, fnmatch, json | |
from os.path import join | |
from HTMLParser import HTMLParser | |
from pyth.plugins.rtf15.reader import Rtf15Reader | |
from pyth.plugins.xhtml.writer import XHTMLWriter | |
from bs4 import BeautifulSoup | |
# constants | |
DEFAULT_DICTIONARY = { | |
'chronoNumber': '', |
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
const verbAspects = ['simple', 'continuous', 'perfect', 'perfectContinuous']; | |
const verbTenses = ['past', 'present', 'future']; | |
const verbMoods = ['indicative', 'imperative', 'subjunctive']; | |
const moods = { | |
indicative: { | |
present: { |
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
/* | |
* Conjunctions | |
* https://www.english-grammar-revolution.com/list-of-conjunctions.html | |
*/ | |
module.exports = [ | |
{ | |
conjunction: ['and'], | |
type: 'coordinating', | |
}, |
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
/* | |
* List of Descriptive Adjectives | |
* https://www.ef.edu/english-resources/english-vocabulary/top-50-adjectives/ | |
*/ | |
module.exports = [ | |
'able', | |
'bad', | |
'best', | |
'better', |
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
/* | |
* English preposition list | |
* https://www.talkenglish.com/vocabulary/top-50-prepositions.aspx | |
*/ | |
module.exports = [ | |
'of', | |
'with', | |
'at', | |
'from', |
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
/* | |
* English pronoun list | |
* https://www.ef.edu/english-resources/english-grammar/pronouns/ | |
* person: 1,2,3 (first, second, third person) | |
* gender: f == female, m == male, n == neutral | |
* number: s == singular, p == plural | |
* referent: i == inanimate, a == animate | |
*/ | |
/* |
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
(function(){ | |
function getTCM(locationURL) { | |
return locationURL.replace('#id=',''); | |
} | |
function getItem(tcm) { | |
return $models.getItem(tcm); | |
} |