Skip to content

Instantly share code, notes, and snippets.

View bhavul's full-sized avatar
👨‍💻
from sky import *

Bhavul Gauri bhavul

👨‍💻
from sky import *
View GitHub Profile
@bhavul
bhavul / code_server_install_instructions.sh
Last active December 1, 2020 07:59
Installing code-server on server
# Use install script - it's the best idea.
https://github.com/cdr/code-server/blob/v3.7.3/doc/guide.md#1-acquire-a-remote-machine
# For exposing, I've tried 'em all. The SSH forwarding method doesn't work. Caddy requires a domain name.
# Resorted to last option...self-signed certificate
# to run it on https://<instance-ip> you may need to have a self-signed certificate
# understand how to generate one
https://kifarunix.com/how-to-create-self-signed-ssl-certificate-with-mkcert-on-ubuntu-18-04/
# generate one on local
@zeyademam
zeyademam / Troubleshoot-dcnn.md
Last active January 22, 2024 05:54
Troubleshooting Convolutional Neural Nets

Troubleshooting Convolutional Neural Networks

Intro

This is a list of hacks gathered primarily from prior experiences as well as online sources (most notably Stanford's CS231n course notes) on how to troubleshoot the performance of a convolutional neural network . We will focus mainly on supervised learning using deep neural networks. While this guide assumes the user is coding in Python3.6 using tensorflow (TF), it can still be helpful as a language agnostic guide.

Suppose we are given a convolutional neural network to train and evaluate and assume the evaluation results are worse than expected. The following are steps to troubleshoot and potentially improve performance. The first section corresponds to must-do's and generally good practices before you start troubleshooting. Every subsequent section header corresponds to a problem and the section is devoted to solving it. The sections are ordered to reflect "more common" issues first and under each header the "most-eas

@JustinShenk
JustinShenk / idle-shutdown.sh
Last active January 22, 2024 20:45
Google Cloud Platform (GCP) instance idle shutdown
#!/bin/bash
# Add to instance metadata with `gcloud compute instances add-metadata \
# instance-name --metadata-from-file startup-script=idle-shutdown.sh` and reboot
# NOTE: requires `bc`, eg, sudo apt-get install bc
# Modified from https://stackoverflow.com/questions/30556920/how-can-i-automatically-kill-idle-gce-instances-based-on-cpu-usage
threshold=0.1
count=0
wait_minutes=60
while true