Skip to content

Instantly share code, notes, and snippets.

View saralilyb's full-sized avatar
🤷‍♀️

Sara Burke saralilyb

🤷‍♀️
View GitHub Profile
@saralilyb
saralilyb / meshgrid.coffee
Last active February 29, 2016 18:53
Replicates a baby version of MATLAB's meshgrid in CoffeeScript using the NumericJS library: http://www.numericjs.com.
meshgrid = (value) ->
m = []
value_length = value.length
i = 0
while i < value_length
m.push(value)
i += 1
[m, numeric.transpose(m)]
@saralilyb
saralilyb / arrminmax.coffee
Last active February 2, 2025 18:37
The following are done up to dig into nested arrays and find the max or min values in them. In CoffeeScript. From http://stackoverflow.com/questions/10564441/how-to-find-the-max-min-of-a-nested-array-in-javascript.
arrmax = (arrs) ->
toplevel = []
i = 0
l = arrs.length
while i < l
toplevel.push Math.max.apply(window, arrs[i])
i++
Math.max.apply window, toplevel
arrmin = (arrs) ->
toplevel = []
@saralilyb
saralilyb / say.sh
Created January 7, 2016 04:07 — forked from dkarter/say.sh
OS X `Say` voices try out
echo 'Agnes'
say -v 'Agnes' "Isn't it nice to have a computer that will talk to you?"
echo 'Albert'
say -v 'Albert' "I have a frog in my throat. No, I mean a real frog!"
echo 'Alex'
say -v 'Alex' "Most people recognize me by my voice."
echo 'Alice'
say -v 'Alice' "Salve, mi chiamo Alice e sono una voce italiana."
echo 'Alva'
say -v 'Alva' "Hej, jag heter Alva. Jag är en svensk röst."