(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| <?xml version="1.0" encoding="UTF-8"?> | |
| <scheme name="Solarized Dark" version="1" parent_scheme="Default"> | |
| <option name="LINE_SPACING" value="1.0" /> | |
| <option name="EDITOR_FONT_SIZE" value="14" /> | |
| <option name="EDITOR_FONT_NAME" value="Consolas" /> | |
| <colors> | |
| <option name="ADDED_LINES_COLOR" value="" /> | |
| <option name="ANNOTATIONS_COLOR" value="2b36" /> | |
| <option name="ANNOTATIONS_MERGED_COLOR" value="" /> | |
| <option name="CARET_COLOR" value="dc322f" /> |
| #! /usr/bin/env python | |
| """ Email Me. | |
| Usage: | |
| emailme <message> | |
| emailme [-s] <message> | |
| emailme [-s] <subject> <message> | |
| emailme <toaddr> <subject> <message> | |
| emailme <toaddr> <fromaddr> <subject> <message> | |
| emailme -h | --help |
| import numpy as np | |
| import scipy.ndimage as ndimage | |
| # The array you gave above | |
| data = np.array( | |
| [ | |
| [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
| from numpy.fft import fft, ifft, fft2, ifft2, fftshift | |
| import numpy as np | |
| def fft_convolve2d(x,y): | |
| """ 2D convolution, using FFT""" | |
| fr = fft2(x) | |
| fr2 = fft2(np.flipud(np.fliplr(y))) | |
| m,n = fr.shape | |
| cc = np.real(ifft2(fr*fr2)) | |
| cc = np.roll(cc, -m/2+1,axis=0) |
| import joblib | |
| import os | |
| cachedir = 'cache' | |
| if not os.path.isdir(cachedir): os.mkdir(cachedir) | |
| mem = joblib.Memory(cachedir=cachedir, verbose=True) | |
| @mem.cache | |
| def my_long_function(i): | |
| return i + i |
| -- Two dashes start a one-line comment. | |
| --[[ | |
| Adding two ['s and ]'s makes it a | |
| multi-line comment. | |
| --]] | |
| ---------------------------------------------------- | |
| -- 1. Variables and flow control. | |
| ---------------------------------------------------- |
| ''' | |
| Non-parametric computation of entropy and mutual-information | |
| Adapted by G Varoquaux for code created by R Brette, itself | |
| from several papers (see in the code). | |
| This code is maintained at https://github.com/mutualinfo/mutual_info | |
| Please download the latest code there, to have improvements and | |
| bug fixes. |