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
# Add deadsnake package archive | |
# https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
# Install specific python version e.g. 3.9 | |
sudo apt install python3.9 python3.9-dev python3.9-venv | |
# Create a venv with a specific python version e.g. 3.9 | |
python3.9 -m venv venv |
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
# pip install debugpy | |
python -m debugpy --listen 5678 --wait-for-client my_python_script.py | |
# VS Code -> Run and Debug -> Remote -> localhost:5678 |
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
# Activate your venv | |
source venv/bin/activate | |
# Install ipykernel inside your venv | |
pip install ipykernel | |
# Add the kernel from within your venv | |
ipython kernel install --user --name=name-of-my-kernel | |
# You can now select the kernel from your notebook editor. |
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
# nvidia-smi stats with continuously updated output | |
watch -d -n 0.1 nvidia-smi |
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
# make the .AppImage file executable | |
chmod +x obsidian.AppImage | |
# create a .desktop file (https://wiki.ubuntuusers.de/.desktop-Dateien/) | |
cd ./local/share/applications | |
nano obsidian.desktop | |
# add the following content to the file | |
# [Desktop Entry] |
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
# list all active screen sessions | |
screen -ls | |
# start a screen session a) without and b) with a name | |
screen | |
screen -S <session_name> | |
# now start whatever is supposed to run in the screen session | |
# detach from the screen session |