Skip to content

Instantly share code, notes, and snippets.

@eamartin
eamartin / benchmark.py
Created August 10, 2011 09:10
Python JSON Benchmark
'''cjson, jsonlib, simplejson, and yajl also use C code
demjson did not use C code, but was too painfully slow to benchmark
(took about 20 seconds for these tests)
'''
import json
import sys
import time
with open('doc.json') as f:
isPrime = lambda n: filter(lambda x: n % x == 0, range(n/2, 1, -1))
;; If not explicitly defined otherwise, use spaces instead of tabs
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq indent-line-function 'insert-tab)
(setq inhibit-startup-message t)
(menu-bar-mode 0)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(add-hook 'python-mode-hook
//module A
mod B;
mod C;
use B;
use C;
//module B
mod C;
extern mod std;
use std::list::*;
struct Board {
black: u64,
white: u64
}
struct Position(int, int);
class GSNCost(Cost):
def __init__(self, costs):
"""Costs is a list a (int, float, Cost) tuples
int : layer index to apply on
float : coefficient for cost
Cost : actual reconstruction cost for that layer
"""
self.costs = costs
def expr(self, model, data):
% id
uid=999(nerds) gid=999(nerds) groups=999(nerds)
% getfacl data
# file: data
# owner: emartin
# group: emartin
user::rwx
user:nerds:rw-
user:emartin:rwx
# installing oh-my-zsh walkthrough
# git is a version control system. used by programmers so that multiple people can work on the same
# thing at the same time. git also allows you to edit code without worrying about breaking the code
# because you can revert to previous versions.
# This command copies the git repository for the oh-my-zsh project
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
# All of your interaction with the computer over the command line happens through a program called a
# "shell". common shells are sh, bash, and zsh. The shell is responsible for doing things like starting
@eamartin
eamartin / emartin_lisa_notes.txt
Created August 27, 2013 20:19
Notes from a summer of working with the LISA group. Mostly about what I learned about training supervised GSNs.
Feel free to contact me with any questions about this material:
email: [email protected]
Skype: eric.a.martin
Here are some notes from a summer of work. I'm primarily writing these down
so the knowledge doesn't get lost. Most of this documented is describing what
did and did not work for training supervised GSNs. I'm also including a couple
of curious things I found this summer.
Supervised GSN training experience
A
A =
5 -1 0 0
-1 5 -1 0
0 -1 5 -1
0 0 -1 5
sigma = 5;