View gist:6986296
(ns metra | |
(:require [cheshire.core :refer [generate-string parse-string] | |
[clj-http.client :as http])) | |
(defn get-trains [] | |
(let [timestamp (str "/Date(" (.getTime (java.util.Date.)) "-0000)/") | |
body {:stationRequest {:Corridor "MD-N", :Destination "LIBERTYVIL", :Origin "CUS", :timestamp timestamp}} | |
response (http/post "http://12.205.200.243/AJAXTrainTracker.svc/GetAcquityTrainData" {:body (generate-string body) :content-type :json}) | |
resp-body (parse-string ((parse-string (response :body) true) :d) true)] | |
resp-body)) |
View active_record_gem.rb
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.1.8' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# Ensure backward compatibility with Minitest 4 | |
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) | |
# This connection will do for database-independent bug reports. |
View Color
import Color (..) | |
import Graphics.Collage (..) | |
import Graphics.Element (..) | |
import List | |
import Signal | |
import Time | |
main : Signal Element | |
main = Signal.map display angle |
View elm-fibonacci.elm
module Fibonacci where | |
import List exposing (reverse, sum, take) | |
import Graphics.Element exposing (show) | |
fibonacci : Int -> List Int | |
fibonacci n = | |
let fibonacci' n acc = | |
if n <= 2 then | |
acc |
View TraversableExercises.hs
module TraversableExercises where | |
import Test.QuickCheck | |
import Test.QuickCheck.Checkers | |
import Test.QuickCheck.Classes | |
data Three' a b = | |
Three' a b b | |
deriving (Eq, Ord, Show) |
View bifunctor.hs
{-# LANGUAGE ScopedTypeVariables #-} | |
bifunctor :: forall m a b c d e f. | |
( Bifunctor m | |
, Arbitrary a, Arbitrary b, Arbitrary c | |
, Arbitrary d, Arbitrary e, Arbitrary f | |
, CoArbitrary a, CoArbitrary d | |
, Show (m a d), Arbitrary (m a d), EqProp (m a d), EqProp (m c f) | |
) => | |
m (a,b,c) (d,e,f) -> TestBatch |
View gist:83609f1ed2fb3a3d179a2876b9976565
### Keybase proof | |
I hereby claim: | |
* I am robertjlooby on github. | |
* I am robertjlooby (https://keybase.io/robertjlooby) on keybase. | |
* I have a public key ASAMTQTDlH0G8sD96hZBYVBoiundH0VBFK27Uiqjr82l7go | |
To claim this, I am signing this object: |
View WU-TANG
Additional Grant of Rights | |
"Software" means the PROJECT software distributed by OWNER | |
OWNER hereby grants to each recipient of the Software | |
("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable | |
(subject to the termination provision below) license under any Necessary | |
Claims, to make, have made, use, sell, offer to sell, import, and otherwise | |
transfer the Software. |