Skip to content

Instantly share code, notes, and snippets.

import csv
all_orders = [[
'Name',
'Shipping Tracking'
]]
with open('orders.csv', 'rU') as f:
reader = csv.DictReader(f)
for row in reader:
@randylubin
randylubin / lambda.py
Last active July 24, 2017 22:47
Send sweet nothings with Lambda and Twilio
import base64
import json
import os
import urllib
import random
from urllib import request, parse
TWILIO_SMS_URL = "https://api.twilio.com/2010-04-01/Accounts/{}/Messages.json"
TWILIO_ACCOUNT_SID = os.environ.get("TWILIO_ACCOUNT_SID")

Learn to Code!

Summary and links

Start withs some games

  • Lightbot
  • CodeCombat
  • Checkio.org

Design a simple site with HTML and CSS

  • Noodle around with Scratchpad.io
@randylubin
randylubin / proxyServer
Created July 1, 2012 19:02
Node.js Multi-App Proxy Server with Forwarding
var http = require('http'),
httpProxy = require('http-proxy');
//
// Setup proxy server with forwarding
//
var options = {
router: {
'proxytest.randylubin.com': '127.0.0.1:7200',
'randylubin.com': '127.0.0.1:7200',
@randylubin
randylubin / gist:2821692
Created May 28, 2012 23:41
Node proxy server
var http = require('http'),
httpProxy = require('http-proxy');
//
// Setup proxy server with forwarding
//
var options = {
router: {
'proxytest.randylubin.com': '127.0.0.1:7200',
'randylubin.com': '127.0.0.1:7200',
@randylubin
randylubin / gist:2160209
Last active October 2, 2015 03:18
Unfair Flip Solution
import random
def fairFlip():
return random.randrange(2)
startingOdds = .625
def unfairFlip(odds):
if odds >= .5:
if fairFlip() == 1:
### Keybase proof
I hereby claim:
* I am randylubin on github.
* I am rl (https://keybase.io/rl) on keybase.
* I have a public key whose fingerprint is 2F4E 623E 0C65 4ED7 8457 1CC1 4FDE 20C4 00E0 3423
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am randy on github.
  • I am rl (https://keybase.io/rl) on keybase.
  • I have a public key whose fingerprint is 2F4E 623E 0C65 4ED7 8457 1CC1 4FDE 20C4 00E0 3423

To claim this, I am signing this object: