Skip to content

Instantly share code, notes, and snippets.

Simon Podhajsky shippy

Block or report user

Report or block shippy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
shippy /
Last active Sep 18, 2018
Using nested rules with Dragonfly
# A proof of concept for implementing re-usable nested rules in Dragonfly.
# See
# for the accompanying article.
import pkg_resources
pkg_resources.require("dragonfly >=")
except ImportError:
View Vundle bug replication
#!/usr/bin/env bash
# A script to replicate VundleVim/Vundle.vim/issues/807
## Setup
cd /tmp
rm -rf bugtest
mkdir bugtest && cd bugtest && git init
git submodule add -b vundle_bug dotvim
git submodule update --init --recursive
shippy / 1-downloadFromGH.rb
Last active Mar 21, 2017
Mirroring a repository with issues, labels & milestones from one GitHub server to another
View 1-downloadFromGH.rb
require 'pry'
require 'octokit'
require 'json'
# Part 0: Extract bare repo and push it to GH:
# Follow
# Part 1: Extract issues & everything else from the source repo
## Setup
Octokit.configure do |c|
View GelmanCup.r
## Dependencies (get them with `install.packages(c("dplyr", "ggplot2", "ggthemes"))`)
options(repr.plot.width = 8, repr.plot.height = 5) # Default figure size
## Load + process data
x <- read.csv("gelman_cup_graphic_reporting_challenge_data.csv")
# The output of the script is meant to be piped to an output csv file.
# Usage:
# python > foursquare.csv
import xml.etree.ElementTree as ET
from dateutil import parser
from datetime import *
tree = ET.parse('foursquare.kml') # or whatever the kml file is called
root = tree.getroot()
shippy /
Created Apr 29, 2014
Scripts for scraping google results, gather first-order links between them, and export them to Gephi-compatible CSV. Order of running:,,,, and
# Crawls results scraped by; saves resulting nodes and edges into pickles.
import pickle
import urlparse
from objects import *
import pdb
nodes = []
edges = []
shippy / volby13-gdp.r
Created Jan 27, 2013
Explores the relationship between regional GDP per capita and proportion of second-round votes that Milos Zeman, the Czech President-Elect, received.
View volby13-gdp.r
reg_gdp_url <- ""
reg_gdp <- readHTMLTable(reg_gdp_url, encoding = "UTF-8")
reg_gdp[[2]][1:14,2] -> regions
as.numeric(gsub(",", "", as.character(reg_gdp[[2]][1:14,8]))) -> GDP
nuts <- c(1100, 2100, 3100, 3200, 4100, 4200, 5100, 5200, 5300, 6200, 8100, 7100, 7200, 6100)
You can’t perform that action at this time.