Skip to content

Instantly share code, notes, and snippets.

@ericbusboom
ericbusboom / certgen.rb
Created November 9, 2015 16:54 — forked from sheerun/certgen.rb
Docker TLS certificate generator
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@ericbusboom
ericbusboom / row_gen_for_source
Last active August 29, 2015 14:23
row_gen_for_source
def row_gen_for_source(self, source_name, use_row_spec = True):
source = self.metadata.sources[source_name]
fn = self.filesystem.download(source_name)
if fn.endswith('.zip'):
sub_file = source.file
fn = self.filesystem.unzip(fn, regex=sub_file)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ericbusboom
ericbusboom / anscombes.csv
Last active September 3, 2021 18:03
Anscombe's Quartet Data
id dataset x y
0 I 10.0 8.04
1 I 8.0 6.95
2 I 13.0 7.58
3 I 9.0 8.81
4 I 11.0 8.33
5 I 14.0 9.96
6 I 6.0 7.24
7 I 4.0 4.26
8 I 12.0 10.84
@ericbusboom
ericbusboom / cache_url.py
Last active August 29, 2015 14:04
cache_url function
import requests
def cache_url(url):
"""Load a url to a local file, or return the file path if it already exists
This function will download the given URL to the current directory, with a file name of the
last path element in the URL. """
import os
import urlparse
from IPython.display import display, clear_output
import sys
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ericbusboom
ericbusboom / hhsa-chcf-manifest.txt
Last active August 29, 2015 13:56
HHSA / CHCF code-a-thon ambry manifest
This Ambry Manifest assembles a database of health datasets for the San Diego County HHSA / CHCF code-a-thon
NOTE! In version 0.0.2 of the ACS data, the "measure" and "error" files have the
names backwards.
ambry warehouse -d 'postgis://postgres:frangible234!@warehouse1/db1' install /Users/eric/proj/chcf_codeathon/manifest.txt
partitions:
census.gov-acs-geo-orig-geofile-20105-0.1.1