Skip to content

Instantly share code, notes, and snippets.

%matplotlib inline
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
def control_chart(df, x, y, goal=None, title="Control Chart"):
df['Goal'] = goal
df['Mean'] = df[y].mean()

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

from airtable import Airtable
from flask import Flask, redirect, request, url_for
import json
import markdown
from datetime import datetime, timedelta, timezone
# https://gist.github.com/doctorpangloss/13ab29abd087dc1927475e560f876797
def sm2(x: [int], a=6.0, b=-0.8, c=0.28, d=0.02, theta=0.2) -> float:
"""
Returns the number of days to delay the next review of an item by, fractionally, based on the history of answers x to
# TODO:
# - [ ] Embedly
# -
require "httparty"
require "aws-sdk-s3"
SITES = [
{
paper: "https://paper.dropbox.com/doc/...",
#!/usr/bin/env ruby
require "commonmarker"
require "octokit"
repo = ARGV[0]
doc = CommonMarker.render_doc(open(ARGV[1]).read)
outline = Hash.new { "" }

Keybase proof

I hereby claim:

  • I am abhiyerra on github.
  • I am abhiyerra (https://keybase.io/abhiyerra) on keybase.
  • I have a public key ASBAR0ByOSJbUFV6BpKQGJPfbw8mRWfpeie-u34jjMihhAo

To claim this, I am signing this object:

@abhiyerra
abhiyerra / gmail.tf
Created December 2, 2016 18:53
Cloudflare + Gmail MX Records
provider "cloudflare" {
email = ""
token = ""
}
resource "cloudflare_record" "cf_mx0" {
domain = "opszero.com"
name = "@"
value = "aspmx.l.google.com"
priority = "1"
@abhiyerra
abhiyerra / seespot.sh
Created October 28, 2016 18:22
seespotrun
seespot -health-port=8686 -health-path=/health -app-health=”https://localhost:8080/health" -cleanup-task=/path/to/cleanup.sh
@abhiyerra
abhiyerra / parkingspot.sh
Last active September 27, 2016 22:30
parkingspot-curl
curl -i \
-H "Content-Type: application/json"
-H 'X-PARKINGSPOT-API-KEY: yourkey' \
-X POST
-d '{"MaxBid": 0.25, "Region": "us-west-2"}'
https://api.parkingspot.bid/v1/spot/me
# You can also just use our CLI tool:
# https://github.com/acksin/parkingspot
@abhiyerra
abhiyerra / parkingspot-docker-machine.sh
Last active October 5, 2016 01:12
docker-machine and docker-compose
PARKINGSPOT_API_KEY=yourapikey
$(parkingspot -memory 2000 -cpu 6 -max-bid 0.50) docker-machine create --driver amazonec2 \
--amazonec2-request-spot-instance \
--amazonec2-region "${PARKINGSPOT_REGION}" \
--amazonec2-spot-price "${PARKINGSPOT_BID}" \
--amazonec2-instance-type "${PARKINGSPOT_INSTANCE_TYPE}" \
parkingspot-worker
# If you want to use Docker Compose