- Command palette (Ctrl-shift-p)
- Select interpreter
- Select terminal shell
- Go to symbol (Ctrl-t)
- Find references (Shift-F12)
- Go to definition (F12)
- Go back (alt-left)
- View documentation
- Hide sidebar (Ctrl-b)
- Zen mode (Ctrl-k,z)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!find source_folder -name '*.jpg' -exec mv {} target_folder \; | |
# Solve "mv: Argument list too long" error when using "mv *.jpg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
- s / n / c
- u / d
- p
- l
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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]) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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: