Use these commands to run a jupyter server on a remote server and access it locally in a browser. You must have SSH access to the browser. Use any port you want.
Do not forget to change username@server
to the correct value!
where | using | command |
---|
cons = (h, t) -> (m) -> m(h, t) | |
car = (x) -> x((h, t) -> h) | |
cdr = (x) -> if x then x((h, t) -> t) else null | |
map = (ls, f) -> | |
cons (f car ls), if cdr ls then map cdr(ls), f else null | |
foldl = (ls, f, n) -> | |
f (car ls), if cdr ls then foldl (cdr ls), f, n else n |
# -*- coding: utf-8 -*- | |
import sys | |
import enchant | |
""" | |
trying to make sense of unicode_ebooks | |
you need pyenchant: | |
brew install enchant | |
pip install pyenchant | |
""" |
// Adapted from Zachary Johnson's Commander Clone 0.2 screen scaling example http://www.zachstronaut.com/projects/commander-clone/0.2/game.html | |
// Modified to strictly choose 1X or 2X or 4X scaling as appopriate, so we don't end up with screwed up scaling artifacts. | |
// NOTE: uses jQuery for the DOM load event | |
$(function () { | |
fullScreenify(); | |
window.addEventListener('resize', fullScreenify, false); | |
function fullScreenify() { |
from fabric.api import env, run, sudo, local, put | |
def production(): | |
"""Defines production environment""" | |
env.user = "deploy" | |
env.hosts = ['example.com',] | |
env.base_dir = "/var/www" | |
env.app_name = "app" | |
env.domain_name = "app.example.com" | |
env.domain_path = "%(base_dir)s/%(domain_name)s" % { 'base_dir':env.base_dir, 'domain_name':env.domain_name } |
"dungeon planet" by Joseph Parker | |
Book 1 - Rules | |
Chapter 1 - Computers | |
An operating system is a kind of value. The operating systems are linux. | |
A computer is a kind of device. Understand "computer" as computer. | |
A computer has a text called power_up_text. |
'''This scripts implements Kim's paper "Convolutional Neural Networks for Sentence Classification" | |
with a very small embedding size (20) than the commonly used values (100 - 300) as it gives better | |
result with much less parameters. | |
Run on GPU: THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python imdb_cnn.py | |
Get to 0.853 test accuracy after 5 epochs. 13s/epoch on Nvidia GTX980 GPU. | |
''' | |
from __future__ import print_function |
Taught by Brad Knox at the MIT Media Lab in 2014. Course website. Lecture and visiting speaker notes.
import math | |
class Vector(object): | |
def __init__(self, *args): | |
""" Create a vector, example: v = Vector(1,2) """ | |
if len(args)==0: self.values = (0,0) | |
else: self.values = args | |
def norm(self): | |
""" Returns the norm (length, magnitude) of the vector """ |