Ctrl+a
c
-> Create new windowCtrl+a
A
-> Set window nameCtrl+a
w
-> Show all windowCtrl+a
1|2|3|
… -> Switch to window nCtrl+a
"
-> Choose windowCtrl+a
Ctrl+a
-> Switch between window
This file contains hidden or 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
\documentclass{article} | |
\usepackage{array} | |
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} | |
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} | |
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} | |
\begin{document} |
This file contains hidden or 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
"""Useful short snippets in Python.""" | |
# Return the list of all the file names in the given directory | |
import os | |
def get_file_list(file_path): | |
files = [] | |
for root, dirs, files in os.walk(file_path): |
Ctrl
+W
: Close Nautilus windowCtrl
+T
: Open a new tab (same as chrome)Ctrl
+H
: Toggle the hidden file displayCtrl
+Q
: Quit NautilusCtrl
+L
: Show path to current directoryCtrl
+1
/2
: Toggle between list view (1) and icon view (2)Ctrl
+Shift
+W
: Close all Nautilus windows, =Ctrl
+Q
Ctrl
+Shift
+N
: Create new folder
This file contains hidden or 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
" I put these commands in a '.vimrc' file, but this is not my actually '.vimrc'. | |
" change the syntax highlight of the current buffer | |
:set syntax=c | |
" no syntax highlight | |
:set syntax=off | |
" .vimrc. Bind the syntax option to a specific file extension | |
autocmd BufNewFile,BufRead *.your_ext set syntax=json |
non_empty_row_df = df.filter('your_column_name is not NULL')
This file contains hidden or 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
# Fastest way: | |
WARN = '\033[93m[WARN]\033[00m' | |
INFO = '\033[92m[INFO]\033[00m' | |
ERR = '\033[91m[ERR]\033[00m' | |
DBG = '\033[94m[DBG]\033[00m' | |
print(INFO, "hello") # Usage | |
print(WARN, ERR, DBG, "your words here") |
This file contains hidden or 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
# Prevent the notification "Device or resource busy" when the STM32 is connected to the System for the first 10 seconds. | |
# Put the file under /etc/udev/rules.d/ | |
# Reload the rules with: | |
# $ sudo udevadm control --reload | |
# $ sudo udevadm trigger | |
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ENV{ID_MM_DEVICE_IGNORE}="1"\ | |
MODE:="0666", \ | |
SYMLINK+="stm32_vcp_%n" |
This file contains hidden or 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://www.activestate.com/resources/quick-reads/how-to-update-all-python-packages/ | |
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U |
This file contains hidden or 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
% Style 1 (default) | |
\begin{figure}[!t] | |
\centering | |
\includegraphics[width=0.5\columnwidth]{./fig1.pdf} | |
\caption{Figure caption here.} | |
\label{fig:fig_label} | |
\end{figure} | |