start new:
tmux
start new with session name:
tmux new -s myname
| # The script illustartes stunning difference on my machine with processing of signal with multiprocessing and joblib. | |
| # The slowness of multiprocessing is likely caused by oversubscription | |
| import time | |
| import numpy as np | |
| import librosa | |
| from joblib import Parallel, delayed | |
| from functools import partial | |
| from multiprocessing import Pool |
| def gm_mads_two_seasons(ds1, ds2): | |
| """ | |
| Feature layer function for production run of | |
| eastern crop-mask | |
| """ | |
| def fun(ds, era): | |
| #normalise SR and edev bands | |
| for band in ds.data_vars: | |
| if band not in ['sdev', 'bcdev']: | |
| ds[band] = ds[band] / 10000 |
Let's say you have a Pull Request from myBranch to master with 3 commits, and you want them to appear as a single commit in master.
If you're merging on the command line, this is trivial:
git checkout master
git merge --squash myBranch
git commit| Country | Alpha-2 code | Alpha-3 code | Numeric code | Latitude (average) | Longitude (average) | |
|---|---|---|---|---|---|---|
| Afghanistan | AF | AFG | 4 | 33 | 65 | |
| Albania | AL | ALB | 8 | 41 | 20 | |
| Algeria | DZ | DZA | 12 | 28 | 3 | |
| American Samoa | AS | ASM | 16 | -14.3333 | -170 | |
| Andorra | AD | AND | 20 | 42.5 | 1.6 | |
| Angola | AO | AGO | 24 | -12.5 | 18.5 | |
| Anguilla | AI | AIA | 660 | 18.25 | -63.1667 | |
| Antarctica | AQ | ATA | 10 | -90 | 0 | |
| Antigua and Barbuda | AG | ATG | 28 | 17.05 | -61.8 |
| import pandas as pd | |
| import numpy as np | |
| import matplotlib | |
| import matplotlib.pyplot as plt | |
| import seaborn as sns | |
| import missingno | |
| import warnings | |
| warnings.filterwarnings("ignore") | |
| %matplotlib inline |
| (def ^:private inf (Long/MAX_VALUE)) | |
| (defn neighbors | |
| "Returns n's neighbors, optionally filtered if unvisited" | |
| ([g n] (get g n {})) | |
| ([g n uv] (select-keys (neighbors g n) uv))) | |
| (defn update-costs | |
| "Returns costs updated with any shorter paths found to curr's unvisisted | |
| neighbors by using curr's shortest path" |