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
functions { | |
real interpolate_linear(vector z, vector ts, real t){ | |
/* Equation from https://en.wikipedia.org/wiki/Linear_interpolation */ | |
for (i in 1:rows(ts)-1){ | |
if ((ts[i] < t) && (ts[i+1] > t)){ | |
return z[i] + (t - ts[i]) * (z[i + 1] - z[i]) / (ts[i + 1] - ts[i]); | |
} | |
} | |
reject("Bad inputs: ", z, ts, t); | |
} |
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
"""Find the most common letters in five letter English words at each position. | |
This is to help you play wordle (https://www.powerlanguage.co.uk/wordle/) | |
""" | |
import requests | |
URL = "https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt" |
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
Debugger entered--Lisp error: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’") | |
(split-string (s-format format-string #'(lambda (fields-string) (car (split-string fields-string ":")))) "[ ]+") | |
(closure (crm-separator t) (format-string) (split-string (s-format format-string #'(lambda (fields-string) (car (split-string fields-string ":")))) "[ ]+"))("${author editor:30} ${date year issued:4} ...") | |
mapcar((closure (crm-separator t) (format-string) (split-string (s-format format-string #'(lambda (fields-string) (car (split-string fields-string ":")))) "[ ]+")) ("${author editor:30} ${date year issued:4} ..." " ${=key= id:15} ${=type=:12} ${tags...")) | |
#f(compiled-function #'sequence #<bytecode 0x1848f6065ad47df4>)((closure (crm-separator t) (format-string) (split-string (s-format format-string #'(lambda (fields-string) (car (split-string fields-string ":")))) "[ ]+")) ("${author editor:30} ${date year issued:4} ..." " ${=key= id:15} ${=type=:12} ${ta |
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
Debugger entered--Lisp error: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’") | |
(split-string (s-format format-string #'(lambda (fields-string) (car (split-string fields-string ":")))) "[ ]+") | |
(closure (crm-separator t) (format-string) (split-string (s-format format-string #'(lambda (fields-string) (car (split-string fields-string ":")))) "[ ]+"))("${author editor:30} ${date year issued:4} ...") | |
mapcar((closure (crm-separator t) (format-string) (split-string (s-format format-string #'(lambda (fields-string) (car (split-string fields-string ":")))) "[ ]+")) ("${author editor:30} ${date year issued:4} ..." " ${=key= id:15} ${=type=:12} ${tags...")) | |
#f(compiled-function #'sequence #<bytecode 0x1848f6065a957df4>)((closure (crm-separator t) (format-string) (split-string (s-format format-string #'(lambda (fields-string) (car (split-string fields-string ":")))) "[ ]+")) ("${author editor:30} ${date year issued:4} ..." " ${=key= id:15} ${=type=:12} ${ta |
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
import cmdstanpy | |
MODEL_FILE = "likert_comparison.stan" | |
DATA = { | |
"K": 3, | |
"N_pre": 30, | |
"N_post": 29, | |
"pre": [1] * 14 + [2] * 12 + [3] * 4, | |
"post": [1] * 6 + [2] * 13 + [3] * 10 | |
} |