Skip to content

Instantly share code, notes, and snippets.

@matttrent
matttrent / remote-pull.sh
Last active March 25, 2018 20:36
remote put/get scripts
#!/bin/bash
# syncs the default EC2 instance to current project (as defined by git repo)
# get the path to the project root (where the .git folder is)
project_path=`git rev-parse --show-toplevel 2> /dev/null`
if [ $? -eq 0 ]; then
# name of the project folder
project_name=`basename $project_path`
@matttrent
matttrent / asi.md
Last active March 4, 2018 07:55
art of scientific investigation
title author
The Art of Scientific Investigation
W. I. B. Beveridge

The Art of Scientific Investigation

Elaborate apparatus plays an important part in the science of to-day, but I sometimes wonder if we are not inclined to forget that the most important instrument in research must always be the mind of man.

preparation

The Host line can contain multiple strings (and wildcard matches).
With this config:
Host deeplearn-v100 ec2-XXX-XXX-XXX-XXX.us-west-2.compute.amazonaws.com
HostName ec2-XXX-XXX-XXX-XXX.us-west-2.compute.amazonaws.com
User ubuntu
IdentityFile ~/.ssh/aws-key.pem
IdentitiesOnly yes
ForwardAgent yes
@matttrent
matttrent / list_rate_schedule.py
Last active October 25, 2019 07:04
Keras list of learning rates schedule
def list_rate_schedule(lrates, output=True):
sched = []
last_lr = [0]
for lr, n in lrates:
sched += [lr] * n
def lr_sched(epoch):
lr = sched[-1]
if epoch < len(sched):

bookx so good they can't ignore you

Rule 1: don't follow your passion

"Follow your passion" is dangerous advice.

The traits that can make your life interesting, I learned, have very little to do with intensive soul-searching. Princeton Web Solutions [Cal's high school web company], in other works, inoculated me against the idea that occupational happiness requires a calling.

The world is filled with opportunities like Princeton Web Solutions waiting to be exploited to make your life more interest. Any job/challenge is interesting for a sufficiently short period of time. This isn't a downside.

asset_id
F6C979018E353E861B5FBB727AC42F31

The Idea Factory: Bell Labs and the Great Age of American Innovation

By Gertner, Jon

Indeed, the techniques forged at Bell Labs—that knack for apprehending a vexing problem, gathering ideas that might lead to a solution, and then pushing toward the development of a product that could be deployed on a massive scale—are still worth considering today, where we confront a host of challenges (information overloads, infectious disease, and climate change, among others) that seem very nearly intractable.

@matttrent
matttrent / technical interview strategies.md
Created February 18, 2014 05:32
coding interview prep

refx technical interview strategies

5 steps to answer a question

  1. ask to resolve ambiguity
    • in the range of 3-5 questions
    • make sure to make all your assumptions explicit
  2. design algorithm
    • state algorithmic complexity, ask if what they expect
  • are you making the right tradeoffs?