Skip to content

Instantly share code, notes, and snippets.

@minhoryang
minhoryang / install_git_cspro.sh
Last active June 24, 2017 19:58
RELEASE Tiny Lecture: INSTALL GIT BINARY WITHOUT ROOT/SUDOER @ UBUNTU
mkdir /tmp/git
pushd /tmp/git
# 1. download git
apt-get source git
pushd git-*
# 2. build and install git
./configure --prefix=$HOME/.local/`uname -m`/ # want to install git for my home directory.
make
@fmder
fmder / elastic_transform.py
Last active August 22, 2021 14:54
Elastic transformation of an image in Python
import numpy
from scipy.ndimage.interpolation import map_coordinates
from scipy.ndimage.filters import gaussian_filter
def elastic_transform(image, alpha, sigma, random_state=None):
"""Elastic deformation of images as described in [Simard2003]_.
.. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for
Convolutional Neural Networks applied to Visual Document Analysis", in