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
'''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: |
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
isPrime = lambda n: filter(lambda x: n % x == 0, range(n/2, 1, -1)) |
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
;; 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 |
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
//module A | |
mod B; | |
mod C; | |
use B; | |
use C; | |
//module B | |
mod C; |
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
extern mod std; | |
use std::list::*; | |
struct Board { | |
black: u64, | |
white: u64 | |
} | |
struct Position(int, int); |
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
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): |
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
% 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 |
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
# 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 |
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
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 |
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
A | |
A = | |
5 -1 0 0 | |
-1 5 -1 0 | |
0 -1 5 -1 | |
0 0 -1 5 | |
sigma = 5; |
OlderNewer