Skip to content

Instantly share code, notes, and snippets.

@neocxi
neocxi / ok.py
Created November 18, 2015 00:33
def fuse(fn):
impl = select_impl()
out = impl.get(fn.__name__)
out.__doc__ = "%s\nImpl specifics: %s" % (fn.__doc__, out.__doc__)
return out
# in common api
@fuse
def prod(x, axis=None):
"""Product of tensor"""
@neocxi
neocxi / gist:f0020ff895b29488940f
Last active April 15, 2016 12:02
Install cuda 7.0 & docker on ec2
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb
sudo apt-get update
# Note that we do upgrade and not dist-upgrade so that we don't install
# new kernels; this script will install the nvidia driver in the *currently
# running* kernel.
# sudo apt-get upgrade -y
sudo apt-get install -y git python-pip vim htop
sudo apt-get clean