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
https://en.wikipedia.org/wiki/Paradox_of_tolerance |
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
Solution to an old puzzle. The puzzle text: | |
02201010121021210121111011020201012110221021 | |
21020201012102221020211111110210101211010102 | |
10010120211210202101211102210212010121012111 | |
00210201010121101010210010120220010121102011 | |
02021102101201010120211210121111110101202112 | |
01012020210101201212012100121101212012110121 | |
20121201211 |
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
(intern ":fact") | |
(intern ":expt") | |
(defun sp/fact (n) ; n! | |
(if (> n 1) | |
(* n (sp/fact (- n 1))) | |
1)) | |
(defun sp/term(op &rest rest) | |
(cond ((eq op :fact) (cons 'sp/fact rest)) ; a! |
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
i=0 | |
j=3 | |
k=5 | |
while i<40: | |
if j==0 and k==0: | |
print(f'{i} fizzbuzz') | |
j=2 | |
k=4 | |
elif j==0: | |
print(f'{i} fizz') |
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 python3 | |
# see https://old.reddit.com/r/mathematics/comments/p2wv1a/twin_primes_square_distances/ | |
def find_prime_pairs(n): | |
sieve = [True] * n | |
if n > 0: | |
sieve[0] = False | |
if n > 1: | |
sieve[1] = False | |
for number in range(2, int(n ** 0.5) + 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
;; | |
;; I'm not sure why these aren't part of `math-standard-units`. | |
;; Source: https://en.wikipedia.org/wiki/Mebibyte | |
;; | |
(setq math-additional-units '( | |
;; Base units. Note "b" is Barns in math-standard-units, while convention "B" is Bytes, so | |
;; there's no conflict. | |
(bits nil "bits") | |
(B "8 * bits" "Bytes") |
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
;; ---- Asynchronous ----- | |
(defun retrieve-handler (status) | |
(message "callback %s with %s chars" status (buffer-size)) | |
(setq got status)) | |
(condition-case x (url-retrieve "http://ahsdjfas" #'retrieve-handler) (t (message "handle %s" x))) | |
"handle (error ahsdjfas/80 nodename nor servname provided, or not known)" | |
(condition-case x (url-retrieve "http:ahsdjfas" #'retrieve-handler) (t (message "handle %s" x))) |
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
www.wcupa.edu/volunteer | |
http://chestercountyfoodbank.volunteerhub.com Chester County Food Bank | |
http://safeharborofgwc.org Safe Harbor homeless shelter | |
https://bvspca.org Brandywine Valley SPCA | |
http://hfhcc.org/ Habitat for Humanity They're mostly working near Downingtown | |
https://www.indivisiblechesco.org Indivisible Chester County (This one's political). | |
https://www.all4pawsrescue.com/volunteer All Four Paws | |
http://www.lamanchaanimalrescue.org La Mancha rescue | |
http://chescolibraries.org/volunteer-fair |
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
;; g'bye stack | |
(let () | |
(defun f (n) | |
(if (< n 2) 1 | |
(+ (f (- n 1)) (f (- n 2))))) | |
(loop for i from 0 upto 20 | |
collect (f i)) | |
) |
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
# Samples: 21K of event 'cpu-clock' | |
# Event count (approx.): 5466750000 | |
# | |
# Children Self Command Shared Object Symbol | |
# ........ ........ ....... ................. ................................................................................................................................................................... | |
# | |
96.75% 0.00% consul consul [.] runtime.goexit | |
| | |
---runtime.goexit | |
| |
NewerOlder