This file contains hidden or 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
import csv | |
from PIL import Image | |
rows = csv.reader(open("scores_for_bloom.csv", "r")) | |
rows = sorted(rows, key=lambda x:x[2], reverse=True)[1:] | |
for index, row in enumerate(rows): | |
image = Image.open(open(row[-1], "rb")) | |
image.save("datasets/videos/faces/sorted/bloom/%s.jpg" % index) |
This file contains hidden or 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
# see https://imgur.com/a/GS9n20F | |
import os | |
import pickle | |
import numpy as np | |
import scipy.spatial.distance | |
from PIL import Image | |
eu = scipy.spatial.distance.euclidean | |
ze = np.load("facenet/src/zuck_embeddings.npy") |
This file contains hidden or 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
import time | |
import os | |
import numpy as np | |
import scipy.misc | |
import tensorflow as tf | |
import facenet | |
image_size = (160, 160) |
This file contains hidden or 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
;; use [reagent "0.8.0"] | |
(let [unsafe-component (r/create-class | |
{:reagent-render (fn [& args] | |
(js/console.log "this should be printed twice, because strict mode 'double invokes' render methods in dev mode, to bring side effectful code to the fore") | |
[:div | |
"rendering this should produce a warning in the console about lifecycle methods in " | |
[:a {:href "https://reactjs.org/docs/strict-mode.html"} | |
"strict mode"]]) | |
:component-will-mount (fn [this] |
This file contains hidden or 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 scratch.core | |
(:require | |
[reagent.core :as r] | |
[taoensso.tufte :as tufte :refer (defnp p profiled profile)])) | |
(enable-console-print!) | |
(tufte/add-basic-println-handler! {}) | |
(defonce props (r/atom {:todos 1})) |
This file contains hidden or 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
I walked by the sea, and there came to me, | |
as a star-beam on the wet sand, | |
a white shell like a sea-bell; | |
trembling it lay in my wet hand. | |
In my fingers shaken I heard waken |
This file contains hidden or 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 fake-poll-fn [] | |
(range 10)) | |
(defn possible-not-claimed? | |
[work-item] | |
(pos-int? work-item)) | |
(defn claim-log-process-transact | |
[work-item] |
This file contains hidden or 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 '[think.parallel.core :as par]) | |
(let [new-val (inc counter)] | |
(alter-var-root #'counter (constantly 100)) | |
(let [vals (binding [counter 50] | |
(par/queued-pmap 50 (fn [_] counter) (range 200)))] | |
(alter-var-root #'counter (constantly 400)) | |
(println vals))) | |
(println counter) |
This file contains hidden or 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
IMG="fsof-lein-test" | |
REPL_PORT=6666 | |
docker build \ | |
-t $IMG \ | |
-f Dockerfile.dev \ | |
--build-arg USERID=$(id -u) \ | |
--build-arg GROUPID=$(id -u) \ | |
--build-arg USERNAME=$USER \ | |
. |
This file contains hidden or 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
~/t/fsof circleci $… circleci build 2267ms Wed 01 Nov 2017 12:10:39 PM MDT | |
====>> Spin up Environment | |
Build-agent version 0.0.4499-d8fe89b (2017-10-31T13:39:51+0000) | |
Starting container circleci/clojure:lein-2.7.1 | |
using image circleci/clojure@sha256:7f4647ec1f1dc1078fa5904c48d3c37106ba4b266b7f386da38c477a4bae6213 | |
Using build environment variables: | |
BASH_ENV=/tmp/.bash_env-localbuild-1509559843 |