As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
# https://stackoverflow.com/questions/6910641/how-to-get-indices-of-n-maximum-values-in-a-numpy-array | |
import numpy as np | |
top_n = 3 | |
arr = np.array([1, 3, 2, 4, 5]) | |
arr.argsort()[-top_n:][::-1] | |
# array([4, 3, 1]) |
re1 = re.compile(r' +') | |
def fixup(x): | |
x = x.replace('#39;', "'").replace('amp;', '&').replace('#146;', "'").replace( | |
'nbsp;', ' ').replace('#36;', '$').replace('\\n', "\n").replace('quot;', "'").replace( | |
'<br />', "\n").replace('\\"', '"').replace('<unk>','u_n').replace(' @.@ ','.').replace( | |
' @-@ ','-').replace('\\', ' \\ ') | |
return re1.sub(' ', html.unescape(x)) | |
# https://github.com/fastai/fastai/blob/master/courses/dl2/imdb.ipynb |
# Stop all running containers | |
docker stop $(docker ps -aq) | |
# Remove all containers | |
docker rm $(docker ps -aq) | |
# Remove all images | |
docker rmi $(docker images -q) |
!find source_folder -name '*.jpg' -exec mv {} target_folder \; | |
# Solve "mv: Argument list too long" error when using "mv *.jpg" |