Definitely check out the awesome blog post where this code originated. It's well worth the read!
To run:
$ ghci Solution.hs
*Main> :type solution (nil :: N6)
| #!/bin/bash | |
| gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
| <code_scheme name="TW" version="173"> | |
| <ClojureCodeStyleSettings>{ | |
| :cljs.core/as-> :only-indent | |
| :cljs.core/assoc 0 | |
| :cljs.core/cond-> :only-indent | |
| :cljs.core/cond->> :only-indent | |
| :cljs.core/defonce :only-indent | |
| :cljs.core/with-meta :only-indent | |
| :cljs.core.async/go :only-indent | |
| :cljs.core.async/go-loop :only-indent |
| ; https://gist.github.com/munificent/b1bcd969063da3e6c298be070a22b604 | |
| (ns dgn) | |
| (def H 40) | |
| (def W 80) | |
| (def TV " ") | |
| (def TF ".") | |
| (def TW "#") | |
| (def TC "!") | |
| (def TOD "\\") |
Definitely check out the awesome blog post where this code originated. It's well worth the read!
To run:
$ ghci Solution.hs
*Main> :type solution (nil :: N6)
| # use ImageMagick convert | |
| # the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
| convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
Lower bound of Wilson score confidence interval for a Bernoulli parameter
All implementations use 95% probability.
pos is the number of positive votes, n is the total number of votes.