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
gistup |
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
gistup |
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
gistup |
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 "share/atspre_define.hats" | |
#include "share/atspre_staload.hats" | |
datatype list0 (a:t@ype) = | |
| list0_nil (a) of () | |
| list0_cons (a) of (a, list0 a) | |
#define :: list0_cons | |
fun{a: t@ype}{b: t@ype} |
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
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt-get --purge remove "nvidia*" | |
sudo apt-get --purge remove "cuda*" | |
wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install cuda |
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
// fork : https://github.com/thrust/thrust/blob/master/examples/lambda.cu | |
#include <thrust/device_vector.h> | |
#include <thrust/functional.h> | |
#include <thrust/transform.h> | |
// allows us to use "_1" instead of "thrust::placeholders::_1" | |
using namespace thrust::placeholders; |
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
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
import Prelude hiding (Functor, fmap, | |
Applicative, (<*>), (<$>), pure, | |
Monad, return, (>>=), (>>), fail, join | |
) | |
-- 型クラス |
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
######### | |
# Torch # | |
######### | |
source /opt/torch/install/bin/torch-activate | |
####### | |
# C++ # |
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
# setup zsh (asks passwd) | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
wget https://gist.githubusercontent.com/ShigekiKarita/06338298b0e0833e39ea/raw/6a6b774dd70f040bf9bfdb5226409d5a51b7e661/.zshenv | |
# setup python (pythonz & virtualenv) | |
PY_VER=2.7.11 # set latest | |
VENV=py${PY_VER} |
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
import h5py | |
import numpy | |
dataset_path = "./dataset.hdf5" | |
def save_h5py(name, data): | |
f = h5py.File(dataset_path) | |
f.create_dataset(name, data=data, compression="gzip") | |
f.close() |