Skip to content

Instantly share code, notes, and snippets.

View gangiman's full-sized avatar

Alexandr Notchenko gangiman

  • London
View GitHub Profile
@gangiman
gangiman / blame_the_resource_waster.py
Created September 10, 2020 01:05
A script to find who hoarded all GPU memory on a shared server
#!/usr/bin/env python
import pwd
from time import sleep
from importlib import import_module
from collections import defaultdict
import psutil
import docker
import pandas as pd
#!/bin/bash
NVIDIA_DRIVER=/tmp/NVIDIA-Linux-x86_64-410.78.run
DRIVER_URL=http://us.download.nvidia.com/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run
BLACKLIST_FILE=/etc/modprobe.d/blacklist-nvidia-nouveau.conf
if [ ! -f $BLACKLIST_FILE ]; then
echo "Disabling nouveau driver and then rebooting..."
bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
#!/usr/bin/python3
import argparse
import os
import io
import numpy as np
from string import ascii_lowercase
from random import sample
from PIL import Image
import moviepy.editor as mpy
@gangiman
gangiman / Refining_uMatrix_rules.ipynb
Created September 24, 2018 12:17
Refining uMatrix rules
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gangiman
gangiman / grid_search.py
Last active May 6, 2016 13:49
grid search for different architectures of SparseConvNet
from __future__ import print_function
import os
import sys
PSCN_DIR = '/var/workplace/PySparseConvNet/'
sys.path.insert(0, PSCN_DIR)
from glob import glob
import math