Skip to content

Instantly share code, notes, and snippets.

@bparaj
bparaj / nvidia_gpu_tools.py
Created January 31, 2018 22:49
Parse output of nvidia-smi to select the GPU with free memory
import subprocess
import re
def parse_free_memory(output):
"""
$ nvidia-smi -q -d MEMORY -i 1
==============NVSMI LOG==============
Timestamp : Wed Jan 31 14:13:22 2018
@bparaj
bparaj / howto_python_flask_iis_wfastcgi
Last active December 1, 2023 05:42
Python Flask on IIS with wfastcgi
Assume IIS is installed. My machine already had IIs 8.5.
Install Python
==============
1. Download web installer (Python 3.6.3).
2. Run as Administrator.
3. Select custom installation for all users.
4. Choose install directory such that there are no white spaces in the path. Not sure if it needs to be done. Just being cautious.
5. Check the box for "Add Python 3.6 to PATH".