Using matroids to solve subset sum.
The (Decision) Subset Sum Problem:
var msgpack = require("../"), | |
pack = msgpack.pack.pure, | |
unpack = msgpack.unpack.pure, | |
assert = require("assert"); | |
function genObj(type, size){ | |
var obj; | |
switch(type){ | |
case "raw": |
// make everything legible | |
var MSG_PACK_POS_FIXNUM = 0x00, | |
MSG_PACK_MAP_FIX = 0x80, | |
MSG_PACK_ARRAY_FIX = 0x90, | |
MSG_PACK_RAW_FIX = 0xa0, | |
MSG_PACK_NIL = 0xc0, | |
MSG_PACK_FALSE = 0xc2, | |
MSG_PACK_TRUE = 0xc3, | |
MSG_PACK_FLOAT = 0xca, /* Not supported */ |
Arthur Samuel (1959): Field of study that gives computers the ability to learn without being explicitly programmed.
Well-posed Learning problem: A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance T, as measured by P, improves with experience E.
These are my personal notes about the course of the same name on Coursera. Feel free to fork these and make your own notes. I'm open to suggestions.
The sub-titles of these notes correspond roughly to a various group of lectures for each week, however, I do occasionally stray for the sake of clarity.
set nocompatible | |
set backupdir=~/.vim/backups | |
set undofile | |
set undodir=~/.vim/undo " remember undos across sessions | |
set noswapfile | |
" ---------------------------------------------------------------------------- | |
" Text Formatting | |
" ---------------------------------------------------------------------------- |
var freq = require("freq"), | |
fs = require("fs"), | |
eng = { | |
'e': 13.11, | |
't': 10.47, | |
'a': 8.15, | |
'o': 8.00, | |
'n': 7.10, | |
'r': 6.83, | |
'i': 6.35, |
// Useful when performing linear cryptanalysis of block ciphers w/ S-Boxes | |
// Example S-Boxes used in the GHOST algorithm | |
var sb1 = [ 4, 10, 9, 2, 13, 8, 0, 14, 6, 11, 1, 12, 7, 15, 5, 3 ], | |
sb2 = [ 14, 11, 4, 12, 6, 13, 15, 10, 2, 3, 8, 1, 0, 7, 5, 9 ], | |
sb3 = [ 5, 8, 1, 13, 10, 3, 4, 2, 14, 15, 12, 7, 6, 0, 9, 11 ], | |
sb4 = [ 7, 13, 10, 1, 0, 8, 9, 15, 14, 4, 6, 12, 11, 2, 5, 3 ], | |
sb5 = [ 6, 12, 7, 1, 5, 15, 13, 8, 4, 10, 9, 14, 0, 2, 11, 2 ], | |
sb6 = [ 4, 11, 10, 0, 7, 2, 1, 13, 3, 6, 8, 5, 9, 12, 15, 14 ], | |
sb7 = [ 13, 11, 4, 1, 3, 15, 5, 9, 0, 10, 14, 7, 6, 8, 2, 12 ], | |
sb8 = [ 1, 15, 13, 0, 5, 7, 10, 4, 9, 2, 3, 14, 6, 11, 8, 12 ]; |
# Eliptic Curve Cryptography w/ Julia! | |
abstract EC | |
## The point O found at every horizontal line | |
type ECInf <: EC | |
end | |
## Points on the curve |
#!/bin/bash -e | |
# Installs the specified version of node.js | |
# Usage: | |
# node_update [v]0.0.0 | |
base_dir=$HOME/GitProjects | |
restore=$PWD | |
if [ $# -ne 1 ] |