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 "net/http" | |
require "nokogiri" | |
require "date" | |
require "json" | |
require "digest/sha1" | |
class Schedule | |
attr_reader :genre | |
def initialize |
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
(defn twitterwater | |
([array] (twitterwater array 0)) | |
([array v] | |
(let [reducer (fn [state n] (if (:count? state) | |
(if (> n 0) | |
(assoc state :av 0 :v (+ (:v state) (:av state))) | |
(assoc state :av (inc (:av state)))) | |
(if (> n 0) | |
(assoc state :count? true) | |
state))) |
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
#!/bin/sh | |
step() { | |
echo "-----> $@" | |
} | |
run() { | |
$* 2>&1 | while read line; do | |
echo " $line" | |
done |