# clone it under jupyter extension path
mkdir -p $(jupyter --data-dir)/nbextensions
git clone https://github.com/lambdalisue/jupyter-vim-binding $(jupyter --data-dir)/nbextensions/vim_binding
# enable it permanently
jupyter nbextension enable vim_binding/vim_binding
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
# LaTex Makefile dependency | |
# brew update | |
# brew cask install mactex | |
SRC_FULLNAME=$(wildcard *.tex) | |
SRC_BASENAME=$(basename $(SRC_FULLNAME)) | |
all: | |
pdflatex $(SRC_FULLNAME) | |
bibtex $(SRC_BASENAME) |
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 Fast, Compact Approximation of the Exponential Function | |
// http://www.schraudolph.org/pubs/Schraudolph99.pdf | |
inline double fast_exp(double y) { | |
double d; | |
*(reinterpret_cast<int*>(&d) + 0) = 0; | |
*(reinterpret_cast<int*>(&d) + 1) = static_cast<int>(1512775 * y + 1072632447); | |
return d; | |
} |
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
cmake_minimum_required(VERSION 2.8.3) | |
project(tensorflow) | |
include(ExternalProject) | |
find_package(PythonInterp 2.7) | |
find_package(PythonLibs 2.7) | |
get_filename_component(PYTHON_LIBRARIES_DIR ${PYTHON_LIBRARIES} PATH) | |
# sudo apt-get install bazel python-numpy swig python-dev python-wheel | |
find_package(CUDA) |
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
function rosvim { | |
ROSVIM_FNAME=$1 | |
if [ ! -f $ROSVIM_FNAME ]; then | |
ROSVIM_PKGS="package1 package2 package3" | |
for PKG_NAME in $ROSVIM_PKGS; do | |
ROSVIM_PKG_PATH=$(rospack find $PKG_NAME 2> /dev/null) | |
if [ $? -eq 0 ]; then | |
ROSVIM_FNAME_FULL=$(find -L $ROSVIM_PKG_PATH -name "$ROSVIM_FNAME" | head -n1) | |
if [ ! -z $ROSVIM_FNAME_FULL ]; then | |
ROSVIM_FNAME=$ROSVIM_FNAME_FULL |
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
// 2016-08-26T21:10:13.167Z -> 1472245813167 | |
namespace bpt = boost::posix_time; | |
uint64_t ISOdate2ms_boost(const std::string timestamp_) { | |
std::string timestamp = timestamp_; | |
if (timestamp[10] == 'T') timestamp[10] = ' '; | |
if (timestamp[timestamp.size()-1] == 'Z') timestamp.resize(timestamp.size()-1); | |
bpt::ptime epoch = bpt::time_from_string("1970-01-01 00:00:00.000"); | |
bpt::ptime birthdate = bpt::time_from_string(timestamp); | |
bpt::time_duration const diff = birthdate - epoch; | |
uint64_t timestamp_numeric = diff.total_milliseconds(); |
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
#!/usr/bin/env python | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import caffe | |
caffe.set_mode_cpu() | |
path_src = 'src.caffemodel' | |
path_dst = 'dst.caffemodel' | |
net_src = caffe.Net('src.prototxt', path_src, caffe.TEST) |
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
brew install python | |
brew install wget | |
brew install protobuf | |
brew install boost-python | |
brew install lmdb | |
brew install leveldb | |
brew install snappy | |
brew install gflags | |
brew install glog | |
brew tap homebrew/science |
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
## Refer to http://caffe.berkeleyvision.org/installation.html | |
# Contributions simplifying and improving our build system are welcome! | |
# cuDNN acceleration switch (uncomment to build with cuDNN). | |
# USE_CUDNN := 1 | |
# CPU-only switch (uncomment to build without GPU support). | |
CPU_ONLY := 1 | |
# uncomment to disable IO dependencies and corresponding data layers |
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
#!/usr/bin/bash | |
iterator=1 | |
url="http://www.deeplearningbook.org/contents/" | |
array=( | |
TOC.html | |
acknowledgements.html | |
notation.html | |
intro.html | |
part_basics.html | |
linear_algebra.html |
NewerOlder