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
;; Adaptation, in l1, of my Clojure adaptation[1] of Douglas | |
;; R. Hofstadter's humorous Lisp program published in Metamagical Themas, | |
;; Scientific American, 1983: | |
;; [1] http://johnj.com/posts/oodles/ | |
(def recipes '((TOMATOES (TOMATOES on MACARONI (and TOMATOES only) | |
exquisitely SPICED)) | |
(MACARONI (MACARONI and CHEESE (a REPAST of Naples, Italy))) | |
(REPAST (rather extraordinary PASTA and SAUCE, typical)) | |
(CHEESE (cheddar, havarti, emmentaler |
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 https://gist.github.com/eigenhombre/204400c786f9dba3a8d3193d3ce1542a: | |
See also: http://johnj.com/posts/practices/ | |
- [ ] LICENSE file, including disclaimer | |
- [ ] Automated build via Docker and GitHub Actions | |
- [ ] Automated builds include unit tests | |
- [ ] Automated builds include linting | |
- [ ] Artwork | |
- [ ] Versioned |
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
10:50:18 janet 56.4F ≡ * ☐ ~ (master) > time ./build/janet -e '(print "hello")' | |
hello | |
real 0m0.009s | |
user 0m0.004s | |
sys 0m0.003s | |
10:50:21 janet 56.4F ≡ * ☐ ~ (master) > time clojure -e '(println "hello")' | |
WARNING: When invoking clojure.main, use -M | |
hello |
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
(defparameter +lookups+ '((CM . 900) | |
(M . 1000) | |
(CD . 400) | |
(D . 500) | |
(XC . 90) | |
(C . 100) | |
(XL . 40) | |
(L . 50) | |
(IX . 9) | |
(X . 10) |
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
// See http://johnj.com/art/warperms/ for context.... | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"os" | |
"time" | |
) |
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
My Apple devices started stating "incorrect password" for my network, even though they had conncted previously. | |
So how to fix Unifi network "incorrect password" error on iPhone, iPod, iPad and Macbook pro? | |
The reason for the error is the WiFi management done on iOS devices. | |
The default settings for the Unifi AP range are not compatible with iOS 11 and 12 and OSX High Sierra (and maybe more). | |
The reason for the error is the "DTIM Mode" (beacon timing) setting for power saving. |
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
{"basics":{"email":"[email protected]","name":"John Jacobsen","label":"Non-Human","website":"http://johnj.com/tech.html"},"meta":{"theme":"elegant"}} |
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 bb | |
(require '[babashka.curl :as curl]) | |
(let [{:keys [body status]} | |
(curl/get "https://projects.fivethirtyeight.com/2020-election-forecast/us_simulations.json") | |
winner-map | |
(->> true | |
(json/parse-string body) | |
first |
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 covid19.core | |
" | |
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, | |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS | |
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | |
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE | |
OR OTHER DEALINGS IN THE SOFTWARE. |
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 python | |
import random | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import sys | |
def histnums(filename, x, nbins=100): | |
fig, ax = plt.subplots() | |
ax.hist(np.array(x), bins=nbins, density=True) |
NewerOlder