Skip to content

Instantly share code, notes, and snippets.

View sjsrey's full-sized avatar

Sergio Rey sjsrey

View GitHub Profile
@sjsrey
sjsrey / README.md
Last active December 24, 2015 13:09 — forked from wrobstory/README.md

Choropleth Mapping with Folium

A Leaflet.js map created with Folium and a custom D3 threshold scale, with data bound between the Pandas DataFrame and the TopoJSON. See the Gist for the python code to generate the dataframe. The map was generated with the following Python code:

map_3 = folium.Map(location=[40, -99], zoom_start=4)
map_3.geo_json(geo_path=county_geo, data_out='data3.json', data=df,
               columns=['GEO_ID', 'Median_Household_Income_2011'],
               key_on='feature.id',
 fill_color='PuRd', line_opacity=0.3,
# -*- mode: ruby -*-
# vi: set ft=ruby :
MACHINE_NAME = "PYVM"
Vagrant.configure("2") do |config|
#config.vm.box = "1404amd64"
config.vm.box = "base"
# config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
@sjsrey
sjsrey / gitlogger.rb
Last active August 29, 2015 14:10 — forked from ttscoff/gitlogger.rb
#!/usr/bin/env ruby
require 'time'
require 'erb'
require 'cgi'
filename = "~/.gitlogger"
## File format, One per line
# Repo Name:/path/to/base
dayone = false # log to day one? (true or false)
textlog = false # "~/Dropbox/nvALT2.2/GitLogger.md" # set to false to disable
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sjsrey
sjsrey / getbibs.py
Created January 11, 2017 22:59 — forked from wcaleb/getbibs.py
The Pandoc filter and shell script I use to make a bibliography file from my BibTeX note files. See http://wcm1.web.rice.edu/plain-text-citations.html
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Pandoc filter that grabs the BibTeX code block from each note file
# and then uses bibtexparser to add a "short title" entry in the "note" field,
# appending finished BibTeX entry to a bibliography file.
from pandocfilters import toJSONFilter, CodeBlock
# https://github.com/sciunto/python-bibtexparser
import bibtexparser
@sjsrey
sjsrey / .crostini-setup
Created December 16, 2018 00:51 — forked from tjpalanca/.crostini-setup
Crostini Setup
These scripts set up Crostini on my Pixelbook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.