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
#!python | |
from itertools import permutations | |
def num(format, vals): | |
return int("".join(str(vals[letter]) for letter in format)) | |
letters = "eightrnwy " | |
def to_indices(word): | |
return [letters.find(letter) for letter in word] |
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
" Add to ~/.vimrc | |
" F5 opens a Terminal window with its current directory set to the current | |
" file's parent. | |
" [The command uses an extra CR at the end to get rid of the "Continue" | |
" prompt, since it will always run over a one-line status bar. :silent doesn't | |
" help when the command itself is too long for the status bar. Putting the | |
" command into a variable before executing may be another way to do it. | |
" Even better: in a function, save sc (showcmd), set nosc, run cmd, restore sc.] | |
map <F5> :!osascript -e 'tell app "Terminal" to activate do script with command "cd " & quoted form of "%:p:h"'<CR><CR> |