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:
import Control.Applicative (liftA2, liftA3) | |
import qualified Data.Map as M (empty, lookup, insertWith, delete) | |
import Data.Function (fix) | |
import Control.Monad (join) | |
primes = fix (flip (flip liftA2 head) tail . (liftA2 (liftA3 liftA2 (flip flip | |
. M.lookup)) (liftA2 ($) ((.) . (.) (liftA3 maybe) . (.) . (:)) . ((. flip | |
(.) . liftA2 (M.insertWith (++)) (join (*)) (replicate 1)) . flip (.))) | |
(((. flip (.) . liftA2 (.) (foldl . ((. flip flip) . flip flip (replicate | |
1) . flip liftA2 . (.) (M.insertWith (++)) . (+))) M.delete) . (flip (.)) | |
. (.) (.) ) ))) [2..] M.empty |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
public class CurrencyExchange { // I'm not an actionListener! | |
String[] differentCurrency = {"US Dollars","Japanese YEN","Chinese YUAN", "Korean WON"}; | |
JFrame frame; | |
JPanel contentPane; | |
JLabel label, result; |
import Control.Applicative | |
import Data.Maybe | |
-- Calculator digit rotation | |
cRotateDigit 0 = Just 0 | |
cRotateDigit 1 = Just 1 | |
cRotateDigit 2 = Just 2 | |
cRotateDigit 5 = Just 5 | |
cRotateDigit 6 = Just 9 | |
cRotateDigit 8 = Just 8 | |
cRotateDigit 9 = Just 6 |
hello | |
hello | |
hello | |
hello | |
hello | |
hello |
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 --> |