Paragraph
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
height: 700 | |
scrolling: yes |
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 me.core | |
(:import [java.util.concurrent.atomic LongAdder] | |
[java.util.concurrent CountDownLatch])) | |
(defmacro fiber [& body] | |
`(.. (Thread/builder) | |
(virtual) | |
(task (fn [] ~@body)) | |
; (build) |
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/bash | |
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home lein run |
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 step [s] | |
[(keyword (subs s 0 1)) (Integer/parseInt (subs s 1))]) | |
(defn get-dots [dots action] | |
(let [[op len] action | |
dots dots | |
from (last dots) | |
[from_x from_y] from | |
f+x (partial + from_x 1) | |
f-x (partial - from_x 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
;; Gaussian sum! | |
user=> (crit/with-progress-reporting (crit/quick-bench (/ (* (+ 1 99999) 99999) 2))) | |
Warming up for JIT optimisations 5000000000 ... | |
compilation occured before 333366 iterations | |
Estimating execution count ... | |
Sampling ... | |
Final GC... | |
Checking GC... | |
WARNING: Final GC required 8.548926352381509 % of runtime | |
Finding outliers ... |
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
(let [q 6 | |
n 10] | |
(/ (* q | |
(- 1 | |
(js/Math.pow q n))) | |
(- 1 q) | |
) | |
) |
-
Установить VirtualBox
-
Скачать docker machine, прописать в path
-
Выполнить
docker-machine create -d virtualbox --virtualbox-boot2docker-url https://releases.rancher.com/os/latest/rancheros.iso --virtualbox-memory "2048" VM4DOCKERNAME
(VM4DOCKERNAME as you wish) -
Проверить докер-vm
docker-machine ls
-
Работа с docker
5.1. Заходим в докер-vm
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
(->> | |
'(1 2 3 4) | |
(map #(Math/pow % 2)) | |
(partition 2) | |
(map println) | |
dorun | |
) |
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 subtask+ [] | |
(js/Promise. (fn [resolve] | |
(js/setTimeout #(resolve :success) 5000))) | |
) | |
(defn main [] | |
(-> (subtask+) | |
(.then (fn [result] (println "Got " result) )) | |
(.catch (fn [e] (println "Shit happend! " e )) ) | |
)) |
NewerOlder