I hereby claim:
- I am betaveros on github.
- I am betaveros (https://keybase.io/betaveros) on keybase.
- I have a public key whose fingerprint is 9B4D 8695 1809 7390 1AC8 107E 58B4 4740 9AB4 540F
To claim this, I am signing this object:
set ruler | |
set showcmd | |
set hlsearch | |
set incsearch | |
set ignorecase | |
set smartcase | |
set autoindent | |
filetype plugin indent on | |
let mapleader = "," |
import codecs | |
import os | |
import shutil | |
import zipfile | |
def magic(fname): | |
if type(fname) == unicode: return fname | |
assert type(fname) == str | |
return codecs.decode(fname, 'shift-jis', 'replace') |
% underblank.sty: Blanks for tests and study guides and all that multiverse cr&p | |
% to get the answers, declare a command \underblankanswers to anything. | |
\ProvidesPackage{underblank} | |
\usepackage{ulem} | |
\usepackage{ifthen} % need 2 versions: w/, w/o answers | |
\normalem | |
\newlength{\answerwidth} | |
\newcommand{\emptyline}{\vspace{\baselineskip}} | |
\newcommand{\underblank}[2]{\settowidth{\answerwidth}{#1}\uline{\makebox[\answerwidth][c]{#2}}} |
#!/usr/bin/env python | |
# nontrivial parts come from | |
# http://paste.pound-python.org/raw/6aCbTG3lKgCWdrRygkBG/ | |
# tmux magic incantation: | |
# bind-key v command-prompt -p "Enter digraph:" "set-buffer \"%%\"; save-buffer /tmp/tmux-digraph-input; delete-buffer; if-shell 'digraph.py < /tmp/tmux-digraph-input > /tmp/tmux-digraph-output' 'load-buffer /tmp/tmux-digraph-output; paste-buffer -d; run-shell \"rm /tmp/tmux-digraph-output /tmp/tmux-digraph-input\"' 'display-message \"Error in digraph lookup\"'" | |
import logging | |
import os.path | |
import sys | |
import unicodedata |
I hereby claim:
To claim this, I am signing this object:
(lambda main: main(0, 'https://opensource.org/licenses/MIT', ''.join(filter(str.isalpha, __import__('random').choice(open('/usr/share/dict/words').readlines()).upper())), set(), '|======\n| |\n| {3} {0} {5}\n| {2}{1}{4}\n| {6} {7}\n| {8} {9}\n|', list('OT-\\-//\\||'), 10, main))(lambda _, license, chosen_word, guesses, scaffold, man, guesses_left, main_: main_(map(guesses.add, filter(str.isalpha, raw_input('%s(%s guesses left)\n%s\n%s:' % (','.join(sorted(guesses)), guesses_left, scaffold.format(*(man[:10-guesses_left] + [' '] * guesses_left)), ' '.join(letter if letter in guesses else '_' for letter in chosen_word))).upper())), license, chosen_word, guesses, scaffold, man, max((10 - len(guesses - set(chosen_word))), 0), main_) if not all(letter in guesses for letter in chosen_word) and guesses_left else __import__('sys').stdout.write('You ' + ['lose!\n' + scaffold.format(*man), 'win!'][bool(guesses_left)] + '\nWord was ' + chosen_word + '\n')) |
set nocp ai bs=2 cul hls ic is lbr list ls=2 mouse=a nu ru sc scs smd so=3 sw=4 ts=4 | |
set lcs=tab:»\ ,trail:␣ | |
filetype plugin indent on | |
syntax on | |
map <Space> i<Space><Esc> | |
map gA m'ggVG"+y'' |
import Control.Monad | |
import Data.List | |
-- Haskell comments look like this, lines that start with two hyphens. | |
{- You can also write range comments like this. -} | |
-- We did not write the type annotations (lines with ::) during class, and in | |
-- fact if you delete them Haskell will supply (more general) type signatures. | |
-- You can see what type Haskell thinks the things we've defined are by running |
from __future__ import division, print_function | |
def partial_differences(xs): | |
return [x2 - x1 for (x1, x2) in zip(xs, xs[1:])] | |
def index_of_max(xs): | |
return max(enumerate(xs), key=lambda pair: pair[1])[0] | |
# given a list of floats, compute a tempo and a timestamp | |
def tempo(xs, max_beats): |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Change fn+- to (minus sign)</name> | |
<appendix>You need to enable Unicode Hex Input and U.S. input sources.</appendix> | |
<identifier>private.fn_minus</identifier> | |
<autogen>__KeyToKey__ | |
KeyCode::MINUS, ModifierFlag::FN, | |
<!-- change input source to Unicode --> |