Skip to content

Instantly share code, notes, and snippets.

View monkeycycle's full-sized avatar

Michael Pereira monkeycycle

View GitHub Profile
@monkeycycle
monkeycycle / README.MD
Created February 13, 2017 21:10 — forked from 1wheel/README.MD
you-draw-it
@monkeycycle
monkeycycle / tweet_dumper.py
Created February 15, 2017 03:01 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@monkeycycle
monkeycycle / Makefile
Created February 15, 2017 03:02 — forked from yanofsky/Makefile
This is workflow for downloading, processing, and mosaicing Landsat scenes, as a Makefile
# lansatutil directory
LANDSAT = ~/landsat
# scenes to target
LANDSAT_IDS = \
LC81220442016038LGN00 \
LC81220452016038LGN00 \
LC81210442014281LGN00 \
LC81210452014281LGN00
@monkeycycle
monkeycycle / gif_maker.sh
Created February 15, 2017 03:02 — forked from yanofsky/gif_maker.sh
How to Make a gif from a folder of images
# requirement! install imagemagick
# brew install imagemagick
# or build from source here http://www.imagemagick.org/script/binary-releases.php
#navigate to folder of the images
cd folderofmyimages/
# take every jpg in the folder and smash into a gif with a frame rate of 0.5 sec
convert -delay 50 *.jpg gif_of_my_images.gif
@monkeycycle
monkeycycle / index.js
Created February 24, 2017 04:13 — forked from thomaswilburn/index.js
ASP page scraper with comments
// Built-in modules
var csv = require("csv");
var fs = require("fs");
var url = require("url");
// Loaded from NPM
var $ = require("cheerio"); // jQuery-like DOM library
var async = require("async"); // Easier concurrency utils
var request = require("request"); // Make HTTP requests simply
@monkeycycle
monkeycycle / durhamcounty.py
Created February 24, 2017 04:13 — forked from johnhawkinson/durhamcounty.py
Durham County NYC - Inmate Population Search
#!/usr/bin/python
import mechanize
import lxml.html
BASE_URL = "http://www2.durhamcountync.gov/sheriff/ips/default.aspx"
def parse_names(root):
# finds the names and prints
names = root.xpath("//a[@class='rvsnavy-bold']")
@monkeycycle
monkeycycle / .block
Created March 2, 2017 16:01 — forked from palewire/.block
Load data incrementally in d3 using a sorted value
license: MIT
border: no
height: 800
@monkeycycle
monkeycycle / .block
Created March 5, 2017 02:26 — forked from HarryStevens/.block
Annotations with Swoopy Drag for Scatter Plot
license: gpl-3.0
@monkeycycle
monkeycycle / 0_reuse_code.js
Created March 30, 2017 01:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@monkeycycle
monkeycycle / index.html
Created March 31, 2017 03:51 — forked from biovisualize/index.html
Basic Reusable Slopegraph
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<script type='text/javascript' src="http://d3js.org/d3.v2.js"></script>
<script type='text/javascript' src="slopegraph.js"></script>
<style type='text/css'>
line.slope-line{
stroke:green