This file contains 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/env python | |
import sys | |
import urllib | |
import requests | |
import itertools | |
from requests.adapters import HTTPAdapter | |
class RideMatch(object): | |
"""docstring for Scraper""" |
This file contains 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 sys, os, math | |
from ortools.constraint_solver import pywrapcp | |
from ortools.constraint_solver import routing_enums_pb2 | |
import matplotlib.pyplot as plt | |
import np | |
def getopts(argv): | |
opts = {} # Empty dictionary to store key-value pairs. | |
while argv: # While there are arguments left to parse... | |
if argv[0][0] == '-': # Found a "-name value" pair. |
This file contains 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
#include <FastLED.h> | |
#define DATA_PIN 6 | |
#define COLOR_ORDER GRB | |
#define CHIPSET WS2812B | |
#define BRIGHTNESS 192 | |
// Defining button | |
const int buttonPin = 2; |
This file contains 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
file = open(kml_path) | |
doc = Nokogiri::XML(file.read) | |
corridors = doc.css('kml Document Placemark').map { |placemark| | |
next unless corridor?(placemark) | |
create_polygon(placemark) | |
} | |
def factory | |
@factory ||= Locality.new.latlng.factory |
This file contains 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
def forever | |
i = 0 | |
while true | |
yield i | |
i = i + 1 | |
end | |
end | |
def alarm!(msg) | |
forever { `say '#{msg}'` } |
This file contains 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
<input class="form-control" type="text" unix-time-directive="timeFormat" ng-model="t.pickup_time"> | |
.directive('unixTimeDirective', function(moment) { | |
function link(scope, element, attrs, ngModelController) { | |
var format = scope.$eval(attrs.unixTimeDirective); | |
scope.$watch(attrs.unixTimeDirective, function(value) { | |
format = value; | |
}); | |
ngModelController.$parsers.push(function(data) { |
This file contains 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
require 'routific' | |
require 'json' | |
# Set the Routific API token | |
Routific.setToken('eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfaWQiOiI1NTIwN2Q2MTRiMzYyMjBhMDAwYzhlNjEiLCJpYXQiOjE0MjgxOTI2NTl9.gzapZ2hLNwGxGBNUaXJX6xv4osfz4nPUu0KzdhwMm0s') | |
def main | |
test1 | |
# test2 | |
end |