This file contains hidden or 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
--[[ | |
This layer expects an [n x d] Tensor and normalizes each | |
row to have unit L2 norm. | |
]]-- | |
local L2Normalize, parent = torch.class('nn.L2Normalize', 'nn.Module') | |
function L2Normalize:__init() | |
parent.__init(self) | |
end | |
function L2Normalize:updateOutput(input) |
This file contains hidden or 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
--[[ | |
LSTM cell. Modified from | |
https://github.com/oxford-cs-ml-2015/practical6/blob/master/LSTM.lua | |
--]] | |
local LSTM = {} | |
-- Creates one timestep of one LSTM | |
function LSTM.lstm(opt) | |
local x = nn.Identity()() |
This file contains hidden or 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
from starcluster.clustersetup import ClusterSetup | |
from starcluster.logger import log | |
import subprocess | |
from starcluster import threadpool | |
from boto.route53.connection import Route53Connection | |
from boto.route53.connection import ResourceRecordSets | |
class Route53Plugin(ClusterSetup): | |
This file contains hidden or 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
license: gpl-3.0 |
This file contains hidden or 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
Vagrant.configure("2") do |config| | |
# Use Ubuntu 12.04 64-bit for now. | |
config.vm.box = "precise-server-cloudimg-amd64-vagrant-disk1" | |
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
# Provision the VM | |
config.vm.provision :shell, :path => "vagrant_data/install.sh" | |
# Configure network | |
config.vm.network :private_network, ip: "192.168.50.4" |
This file contains hidden or 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
from __future__ import division | |
import numpy as np | |
from numpy.lib.stride_tricks import as_strided as ast | |
def chunk_data(data,window_size,overlap_size=0,flatten_inside_window=True): | |
assert data.ndim == 1 or data.ndim == 2 | |
if data.ndim == 1: | |
data = data.reshape((-1,1)) | |
# get the number of overlapping windows that fit into the data |
This file contains hidden or 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
set PATH "$HOME"/bin /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/\ | |
/opt/local/bin /opt/local/sbin $PATH | |
set CDPATH . "$HOME" $CDPATH | |
set fish_greeting "" | |
function fish_user_key_bindings | |
bind \e\[1\;9A 'history-token-search-backward' | |
end |
This file contains hidden or 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
#include "cinder/app/AppBasic.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/Camera.h" | |
#include "cinder/MayaCamUI.h" | |
#if defined( CINDER_MAC ) | |
#include <OpenGL/glu.h> | |
#else | |
#include <GL/glu.h> | |
#endif |
This file contains hidden or 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
/* | |
Copyright (c) 2010, The Barbarian Group | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that | |
the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this list of conditions and | |
the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and |