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
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
#!/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
(defun split-frame-eql-parts* (group dir amt) | |
(when (not (eq amt 1)) | |
(when-let ((new-frame (split-frame group dir (/ (- amt 1) amt)))) | |
(cons new-frame (split-frame-eql-parts* group dir (- amt 1)))))) | |
(defun split-frame-eql-parts (group dir amt) | |
"Splits frame in equal parts defined by amt." | |
(assert (> amt 1)) | |
(let ((f (tile-group-current-frame group)) | |
(new-frame-numbers (split-frame-eql-parts* group dir amt))) |
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 cats-spec.either | |
(:require [cats.monad.either :as m.either] | |
[clojure.spec.alpha :as s] | |
[clojure.spec.gen.alpha :as gen])) | |
(defn either-impl | |
[form-r pred-r form-l pred-l] | |
(let [spec-r (delay (s/specize* pred-r form-r)) | |
spec-l (delay (s/specize* pred-l form-l))] | |
(reify |
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 sklearn.base import BaseEstimator, TransformerMixin | |
from sklearn.model_selection import cross_val_predict | |
from sklearn.pipeline import make_union | |
from sklearn.model_selection._split import check_cv | |
from sklearn.utils.validation import check_X_y | |
class BlendedClassifierTransformer(BaseEstimator, TransformerMixin): | |
def __init__(self, clf, cv=3): | |
self.clf = clf | |
self.cv = cv |
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
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <set> | |
#include <bitset> | |
#include <list> | |
#include <stack> | |
#include <queue> | |
#include <deque> | |
#include <string> |