Skip to content

Instantly share code, notes, and snippets.

ML in JS

Chris Price

tensorflow.js

ImageNet - image categorization

MobileNet is this but optimised for low-power devices.

Best practice for an individual developer Best practice for team Best practice for platform
Use version control Peer review all code before it hits production Emphasise lowering cost of change
Use automated testing Supportive - no points scoring or gatekeeping Emphasise lowering cost of failure
All code is accompanied by tests Culture of collaboration Environment building is automated
Work in small chunks Culture of empathy Have CI setup
Mindful of security implications Pairing when appropriate DR is automated
Open to change Able to choose own tools as appropriate Application deployment is automated
Speak to users Can bootstrap a dev setup easily Deploy continuously to dev/staging/QA
Consider data implications, PII and sharing Systems and project architecture are well documented Deploy production regularly
Write documentation Have a playbook or wiki or FAQ Have appropriate logging and monitoring
@the-frey
the-frey / sonic_pi_lesson_4.rb
Created March 13, 2019 11:08
Fourth part of sonic pi lesson
# okay, so we've learned the basics of functions
# and variables
# now it's time to look at some sonic pi features
# like samples and loops
loop_length = sample_duration(:loop_amen)
live_loop :amen do
sample :loop_amen
sleep loop_length
@the-frey
the-frey / sonic_pi_lesson_3.rb
Created March 13, 2019 10:54
Third part of sonic pi workshop
# functions can have many arguments
# sometimes these arguments are named
# we use them like this:
play(80, attack: 0.5, decay: 2)
# run the code now.
# what's different about that sound?
sleep(1)
# we can write functions with many arguments
@the-frey
the-frey / sonic_pi_lesson_2.rb
Created March 13, 2019 10:49
Second part of sonic pi workshop
# we can use functions that other people have written
# sonic pi has many of these,
# and we have seen one already
play(80)
# actually, we've seen two :)
# remember this one?
sleep(1)
# we can also write our own
@the-frey
the-frey / sonic_pi_lesson_1.rb
Created March 13, 2019 10:43
First part of sonic pi lesson
# Welcome to the Sonic Pi workshop!
# these are comments - this means text
# that will not affect the program.
# we can use them for memos, or instructions
# this is a variable
# we can assign a value to it
midi_note = 80
# this is a function.

Quick lean coffee

Here's a quick and easy lean coffee that seems to work okay with multi-disciplinary teams.

Total time: 1hr

  1. each person writes post-its with a smiley face or frowny face [5mins]
  2. each person goes through their post-its and puts them up [5mins]
  3. facilitator organises into themes and bundles duplicates [5mins]
  4. dot vote on post-its - 3 dots per person [5mins]
@the-frey
the-frey / slides text.md
Last active March 8, 2019 08:37
Where we're going, we don't need servers

Where we're going, we don't need servers


or: how I learned to stop worrying and love serverless


So, about me

@the-frey
the-frey / zshrc.sh
Created March 4, 2019 23:52
Lein version in zshell
# put this toward the end of your .zshrc
# replace `/usr/local/bin/lein` with the output of `which lein`
LEIN_VERSION_PROMPT=$(/usr/local/bin/lein --version | sed 's/\ on.*//')
RPROMPT="%{$fg[blue]%}\$LEIN_VERSION_PROMPT %{$fg[yellow]%}[%*]%{$fg[default]%}"

Keybase proof

I hereby claim:

  • I am the-frey on github.
  • I am thefrey (https://keybase.io/thefrey) on keybase.
  • I have a public key ASA3lFGvVz3pXoYwiOkm2YA81Vxxv1PryPHg2jYJbVKMfwo

To claim this, I am signing this object: