Skip to content

Instantly share code, notes, and snippets.

View saeedizadi's full-sized avatar

Saeed Izadi saeedizadi

  • Simon Fraser University
  • Vancouver, BC
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@dwf
dwf / patches.py
Created April 14, 2010 19:49
Some patch extraction code I'm using to process images.
import os
import numpy as np
import scipy.ndimage as ndimage
import matplotlib
import matplotlib.pyplot as plt
def frac_eq_to(image, value=0):
return (image == value).sum() / float(np.prod(image.shape))
def extract_patches(image, patchshape, overlap_allowed=0.5, cropvalue=None,