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
Background | |
Simplifying somewhat, each word of English is composed of a string of sounds, called "phones"/"phonemes". For example, "cat" has the phones /k/, /a/, /t/. | |
Some phones are more "confusable" with other phones--it's easier to mishear /m/ (as in "ram") as /n/ (as in "ran") than /t/ (as in "rat"). I happen to have a phone-to-phone confusion matrix, which tells me the probability of confusing any phone as any other phone. | |
If I want to calculate how easy it is to confuse one string of phones with another of equal length (e.g., hearing "ram" as "rat"), I simply multiply the probability of hearing each phone in the first string as the corresponding phone in the second string. E.g., P(/r/|/r/) * P(/a/|/a/) * P(/t/|/m/). Like I said, I get these probabilities from my confusion matrix. |
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
" Settings | |
"set nosmoothscroll | |
set noautofocus " The opposite of autofocus; this setting stops | |
" sites from focusing on an input box when they load | |
set typelinkhints | |
let searchlimit = 20 | |
let scrollstep = 50 | |
let barposition = "top" | |
let hintcharacters = "asdfjkl" | |
let completionengines = ["google", "amazon"] |
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
def gen_nonce(): | |
"""Generates a random string of bytes, base64 encoded""" | |
length = 64 | |
string = base64.b64encode(os.urandom(length), altchars=b'-_') | |
b64len = 4 * min(length, 3) | |
if length % 3 == 1: | |
b64len += 2 | |
elif length % 3 == 2: | |
b64len += 3 | |
return string[0:b64len].decode() |
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
### Keybase proof | |
I hereby claim: | |
* I am hfukada on github. | |
* I am hiroshf (https://keybase.io/hiroshf) on keybase. | |
* I have a public key whose fingerprint is 2E52 8A40 D052 B98C 3AE7 E119 9DE5 5147 A170 3CCE | |
To claim this, I am signing this object: |