Skip to content

Instantly share code, notes, and snippets.

@kwanUm
kwanUm / requirements.txt
Last active March 28, 2023 07:00
requirements file
pandas
numpy
matplotlib
scipy
ipymol
seaborn
dm-tree
py3Dmol
nglview
biopython
@kwanUm
kwanUm / gist:da18ffc2819bf0a007129dbbe889f45d
Last active February 25, 2024 11:50
Stop an idle GCP machine! This script assumes that you're connected through ssh with tmux to the machine, and when logging out usually the tmux session gets to the state detached. this script notices that and shuts down the machine
#!/bin/bash
# Initial timeout in seconds to wait before checking the SSH sessions
SLEEP_DURATION=300 # 5 minutes
# Additional wait time for the final check
FINAL_CHECK_DELAY=600 # 10 minutes
# Function to check tmux sessions
check_tmux_sessions() {