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 bash | |
set -euo pipefail | |
HEARTBEAT_INTERVAL=3 | |
EXPONENTIAL_BACKOFF_POWER=2 | |
EXPONENTIAL_BACKOFF_MAX_TIMEOUT=60 | |
EXPONENTIAL_BACKOFF_INITIAL_TIMEOUT=1 | |
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
FROM tensorflow/tensorflow:1.4.0 | |
ENV HOME /root | |
RUN echo 'export LC_ALL=C.UTF-8' >> /etc/profile | |
RUN echo 'export LANG=C.UTF-8' >> /etc/profile | |
RUN pip install enigma-catalyst | |
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension |
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
(ns collisions.core | |
(:require [clojure.string :as str]) | |
(:gen-class)) | |
(defn str->edge [s] | |
(->> (str/split s #" ") | |
(map #(Integer/parseInt %)))) | |
(defn file-contents->edges [s] | |
(->> (str/split s #"\n") |
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
(ns aeron-cluster-test.core | |
(:require [clojure.stacktrace :refer [print-stack-trace]]) | |
(:import [org.agrona CloseHelper] | |
[org.agrona.concurrent AgentTerminationException] | |
[org.agrona ExpandableArrayBuffer] | |
[org.agrona ErrorHandler] | |
[io.aeron.cluster ClusteredMediaDriver ConsensusModule ConsensusModule$Context] | |
[io.aeron.cluster.client EgressListener AeronCluster AeronCluster$Context ] | |
[io.aeron.cluster.service ClusteredService ClusteredServiceContainer ClusteredServiceContainer$Context Cluster ClusteredServiceAgent ClientSession] |
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
(ns caioaao.purely-functional.solutions.range-consolidation) | |
(defn ranges->events [vs] | |
(mapcat (fn [[a b]] [[:open a] [:close b]]) vs)) | |
(def type->priority | |
{:open 1 | |
:close 2}) | |
;; since range includes both ends, `open` events have priority over `close` |
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
(ns playground | |
(:require [state-flow.core :as state-flow] | |
[state-flow.state :as state])) | |
(defn inc-a [s] | |
(update s :a inc)) | |
(defn change-state [] | |
(state/modify inc-a)) |
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
(ns leak-test.core | |
(:gen-class)) | |
(def alphanumerics (concat (map char (range (int \A) (inc (int \Z)))) | |
(range 0 10))) | |
(defn random-alphanumeric-string [len] | |
"Generates a pseudo-random alphanumeric string" | |
(apply str (repeatedly len #(rand-nth alphanumerics)))) |