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

@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"
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
module Jekyll
# Convert org-mode files.
require 'org-ruby'
class OrgConverter < Converter
safe true
def setup
# No-op
end
@abhiyerra
abhiyerra / growl-net.pl
Created January 1, 2011 07:05
irssi script to send growl notifications.
#!/usr/bin/env perl -w
#
# This is a simple irssi script to send out Growl notifications ovet the network using
# Net::Growl. Currently, it sends notifications when your name is
# highlighted, and when you receive private messages.
# Based on the original growl script by Nelson Elhage and Toby Peterson.
use strict;
use vars qw($VERSION %IRSSI $growl);
# 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 { "" }
@abhiyerra
abhiyerra / parkingspot-terraform-spot-fleet.tf
Created September 26, 2016 20:11
parkingspot-terraform-spot-fleet
resource "aws_spot_fleet_request" "cheap_compute" {
iam_fleet_role = "arn:aws:iam::12345678:role/spot-fleet"
spot_price = "0.03"
allocation_strategy = "diversified"
target_capacity = 6
valid_until = "2019-11-04T20:44:20Z"
launch_specification {
instance_type = "m4.10xlarge"
ami = "ami-1234"
spot_price = "2.793"

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: