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 trigger-above-cancel-below | |
"Set state to \"critical\" when metric is > above for trigger_window seconds. | |
Reset to \"ok\" when metric is < below for cancel-window seconds." | |
[above trigger-window below cancel-window & children] | |
(let [changed-stream (changed-state {:init "ok"} | |
#(call-rescue % children)) | |
;; Forward critical or ok if they are stable | |
stable-stream (sdo | |
(stable trigger-window :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
(defn ex10 [animals] | |
(let [start-stop-button (by-id "ex10-button-start-stop") | |
prev-button (by-id "ex10-button-prev") | |
next-button (by-id "ex10-button-next") | |
start-stop (events->chan start-stop-button EventType.CLICK | |
(chan 1 (map (constantly :start-stop)))) | |
prev (events->chan prev-button EventType.CLICK | |
(chan 1 (map (constantly :previous)))) | |
next (events->chan next-button EventType.CLICK | |
(chan 1 (map (constantly :next)))) |
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
{ | |
"authors":[ | |
{ | |
"title":"Alf Bjarne Johnsen", | |
"contacts":[ ], | |
"id":"b63996c4-74c4-419e-850d-706599bb9d55" | |
}, | |
{ | |
"title":"Bjørn Haugan", | |
"contacts":[ ], |
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
function format_value(value) { | |
if (value instanceof Date) { | |
// Convert to google sheets compatible date string | |
return value.toISOString().substring(0, 16).replace("T", " ").replace(":", ".") | |
} | |
return value; | |
} | |
function to_csv(columns, rows) { | |
const sep = ";"; |
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
{ | |
"Msg": "IonLambdaException", | |
"Ex": { | |
"Cause": "Too many results", | |
"Via": [ | |
{ | |
"Type": "clojure.lang.ExceptionInfo", | |
"Message": "Too many results", | |
"Data": { | |
"CognitectAnomaliesCategory": "CognitectAnomaliesFault", |