Skip to content

Instantly share code, notes, and snippets.

View agileurbanite's full-sized avatar

Urbanite agileurbanite

View GitHub Profile

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL
@agileurbanite
agileurbanite / itinerary.md
Last active December 26, 2015 22:57
Itinerary

12/24

  • Pretzels at Philadelphia Pretzel Factory
  • Love Park
  • Macy's or Comcast or Both for Christmas Stuff
  • Dinner at Bistro Romano at 7
  • Dinner at Modo Mio at 7 Up north philly (possibly call to cancel)

12/25

  • Brunch ?
  • pretzel
var arr = [5,6,7,8], floor, ceil;
for(var i = 0; i < arr.length; i++) {
floor = Math.floor(arr[i] / 2);
ceil = Math.ceil(arr[i]/2);
console.log(floor * ceil);
}
@agileurbanite
agileurbanite / bike-allocation.md
Created March 28, 2015 00:20
Bike Allocation Problem

Problem:

Dispatch and redistribute bikes through different nodes based on distance and need.

Assumptions:

  • A need is defined as closest to, or is, zero capacity or closest to filled, or is filled capacity.
  • Distance and average time it takes to travel to node based on need from last point. (Who is your nearest neighbor?)
  • The optimal state of a node is half of it's capacity.
  • What is the current state of the van if it is less then the optimal state must be greater, it needs to travel to a neighbor with filled or close to filled capacity to redistribute or back to headquarters.