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
### Links | |
Personal site: https://kevingal.com/ | |
GitHub: https://github.com/Kevinpgalligan | |
### CracklePop | |
Common Lisp: | |
https://gist.github.com/Kevinpgalligan/c75b8d48fd616fb9fa8c2f0fc18dd802 | |
### Something I've written myself | |
A calculator language with a CLI, GUI, unit conversion, functions and other conveniences. It's about 1400 lines of Python code. I now use it for all my day-to-day calculations! |
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
NB. Functions for analysing Markov processes through | |
NB. their transition matrices. | |
NB. Takes transition matrix as x, number of rounds as y. | |
calcMarkovDistribution =: dyad define | |
P =. x | |
n =. # P | |
matmul =. +/ . * | |
((] ,. ((P&matmul @: ,. @: ({:"1))) ) ^: y) ,. 1 , (n-1)$0 | |
) |
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
(defvar *acceptor*) | |
(defun start-server (&key (doc-root #P"www/")) | |
(setf *acceptor* | |
(make-instance | |
'hunchentoot:easy-acceptor | |
:port 4242 | |
:document-root doc-root | |
:error-template-directory (merge-pathnames #P"errors/" | |
doc-root))) |
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
CL-USER> (load "/home/kg/test.lisp") | |
To load "random-state": | |
Load 1 ASDF system: | |
random-state | |
; Loading "random-state" | |
Distribution for range 0..1 | |
0 0.500334 | |
1 0.499666 | |
Distribution for range 0..2 |