Skip to content

Instantly share code, notes, and snippets.

{
"observer": {
"email": "beau.cronin@gmail.com"
},
"method": {
"mode": "web",
"platform": "orbital",
"identity": "3rdparty",
"encoding": "human"
},
@beaucronin
beaucronin / index.html
Created November 9, 2019 05:24
Leaflet GeoJSON Prototype
<div id="mapid"></div>
Verifying my Blockstack ID is secured with the address 18UUDfVMEwcVHGtjM8jqxzHvLSX95i6fJ9 https://explorer.blockstack.org/address/18UUDfVMEwcVHGtjM8jqxzHvLSX95i6fJ9
@beaucronin
beaucronin / README.md
Last active October 26, 2016 22:01
SSH into an EC2 instance by tag

Usage:

$ ec2-login-amazon <tag>
  • Aside from the AWS CLI tools, you'll need jq: https://stedolan.github.io/jq/
  • If multiple instances have the tag you specify, the first one will be chosen
  • There are separate commands for Amazon Linux and Ubuntu because, aside from looking at the AMI ID, there's no way to know which user name to use

Keybase proof

I hereby claim:

  • I am beaucronin on github.
  • I am beaucronin (https://keybase.io/beaucronin) on keybase.
  • I have a public key ASA8QFopPai5WRhYagivUf6FMWlePH57Q7CPv5R3NK3Irgo

To claim this, I am signing this object:

@beaucronin
beaucronin / gist:2229f825095db7d7dfd2
Last active April 6, 2021 14:19
Get transactions via Yodlee
import requests
import json
URL_BASE = 'https://rest.developer.yodlee.com/services/srest/restserver/v1.0'
# assumes you've signed up for dev access, and already done the one-time linking of bank accounts
# to user accounts via the Yodlee website
# cobrand login
payload = { 'cobrandLogin': 'sbCob<account>', 'cobrandPassword': '<something>' }
@beaucronin
beaucronin / gist:3094654
Created July 12, 2012 00:18
Veritable code to analyze heights and weights with different units
import veritable
import csv
import matplotlib.pyplot as plt
# Load the csv and read into a Veritable dataset using inches and pounds
print 'Reading data from file'
data_inches_pounds = []
with open('heights_weights_genders.csv') as fd:
rd = csv.reader(fd)
rd.next() # skip the header
@beaucronin
beaucronin / 0_preprocess.py
Created May 15, 2012 21:04
Single-malt scotch
import csv
import json
rd = csv.reader(open('scotch.csv'))
header = rd.next()
colors = header[1:15]
data = []
schema = {
'color': { 'type': 'categorical' },
'AGE': { 'type': 'count' },
@beaucronin
beaucronin / correlation_examples.R
Created April 27, 2012 14:36
Examples of dependence beyond correlation
#From http://en.wikipedia.org/wiki/File:Correlation_examples2.svg
#Title: An example of the correlation of x and y for various distributions of (x,y) pairs
#Tags: Mathematics; Statistics; Correlation
#Author: Denis Boigelot
#Packets needed : mvtnorm (rmvnorm), RSVGTipsDevice (devSVGTips)
#How to use: output()
#
#This is an translated version in R of an Matematica 6 code by Imagecreator.
@beaucronin
beaucronin / generate.py
Created April 19, 2012 17:43
Learning noisy-XOR with Veritable
# generate some noisy-XOR data
from random import random
N = 1000
noise = 0.1
data = []
for _ in range(N):
x1 = random() < 0.5