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 subprocess as sp | |
| proc = sp.Popen(['/usr/local/bin/node', '-p'], stdin=sp.PIPE, stdout=sp.PIPE) | |
| (stdout, stderr) = proc.communicate('4 * 1\n') | |
| print(stdout) |
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
| // Produce all primes from 2 to target using | |
| // the Sieve of Eratosthenes - https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes | |
| func eratosthenes(target: Int) -> [Int] { | |
| if target < 2 { | |
| return [] | |
| } | |
| var marked = Set<Int>() | |
| return (2...target).filter { | |
| (let number) -> Bool in | |
| var product = number * 2 |
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
| ~/cljs-aws [ lein repl | |
| Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=true | |
| Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=true | |
| nREPL server started on port 43339 on host 127.0.0.1 - nrepl://127.0.0.1:43339 | |
| REPL-y 0.3.5, nREPL 0.2.6 | |
| Clojure 1.6.0 | |
| OpenJDK 64-Bit Server VM 1.7.0_75-b13 | |
| Docs: (doc function-name-here) | |
| (find-doc "part-of-name-here") | |
| Source: (source function-name-here) |