This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import re | |
from bs4 import BeautifulSoup | |
import urllib2 | |
import csv | |
from datetime import datetime | |
from agithub import Github | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.Map.addInitHook(function() { | |
var slides = document.querySelector('.slides'), | |
zoom = Number(slides.style.zoom); | |
// Reveal.js sometimes use the zoom CSS property, but sometimes a scale | |
// transform instead. We handle both. | |
if (zoom) { | |
this._container.style.zoom = 1/zoom; | |
} else { | |
zoom = Number(slides.style.transform.replace(/.*scale\(([0-9\.]+)\).*/, '$1')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.map { | |
width: 960px; | |
height: 480px; | |
} | |
.reveal .leaflet-container .leaflet-fade-anim .leaflet-tile, .reveal .leaflet-container .leaflet-fade-anim .leaflet-popup { | |
-webkit-transition: opacity 0.2s linear; | |
-moz-transition: opacity 0.2s linear; | |
-o-transition: opacity 0.2s linear; | |
transition: opacity 0.2s linear; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var L = require('leaflet'); | |
module.exports = L.CircleMarker.extend({ | |
initialize: function(latLng, heading, options) { | |
this._heading = heading; | |
L.CircleMarker.prototype.initialize.call(this, latLng, options); | |
}, | |
setHeading: function(heading) { | |
this._heading = heading; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
body { | |
background-color: black; | |
padding: 0; | |
margin: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class GravatarUrlHelper | |
{ | |
public static string GravatarUrl(this UrlHelper urlHelper, string emailAddress, int size = 38, string defaultAvatar = "identicon") | |
{ | |
var md5 = MD5.Create(); | |
var hash = md5.ComputeHash(Encoding.ASCII.GetBytes(emailAddress.Trim().ToLowerInvariant())); | |
return string.Format("https://www.gravatar.com/avatar/{0}?s={1}&d={2}", hash, size, defaultAvatar); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var osmium = require('osmium'); | |
var bboxPolygon = require('turf-bbox-polygon'); | |
var path = process.argv[2]; | |
var reader = new osmium.BasicReader(path); | |
var handler = new osmium.Handler(); | |
var locHandler = new osmium.LocationHandler(); | |
var header = reader.header(); | |
var bound = header.bounds[0], | |
extent = [bound.left(),bound.bottom(),bound.right(),bound.top()], | |
extentPolygon = bboxPolygon(extent); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('simple-get'), | |
extend = require('extend'); | |
function DistanceMatrix(features, options) { | |
this.options = extend({}, { serviceUrl: 'http://router.project-osrm.org/table'}, options); | |
this._features = features.features.reduce(function(fs, f, i) { | |
if (f.geometry.type !== 'Point') { | |
throw 'Feature geometries must be Points.'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import jsprit.core.problem.Location; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logObject(o, indent) { | |
var keys; | |
indent = indent || ''; | |
try { | |
keys = Object.keys(o); | |
} catch (e) { | |
console.log(indent + '=' + o.toString()); | |
return; |