Skip to content

Instantly share code, notes, and snippets.

View ematvey's full-sized avatar

Matvey Ezhov ematvey

View GitHub Profile
@ematvey
ematvey / nvidia-docker-stats.py
Last active September 16, 2020 13:05
nvidia-docker-stats
#!/usr/bin/env python3
# forked from https://github.com/AllenCellModeling/nvidia-docker-stats and modified
import subprocess
import io
import csv
import collections
@ematvey
ematvey / transforms.py
Last active September 18, 2018 08:50
Affine augmentations for 3D tensors targeted at medical images
import math
from typing import Union, NamedTuple
import numpy as np
from scipy.ndimage import affine_transform
class AffineTransform(NamedTuple):
matrix: np.ndarray
offset: np.ndarray
@ematvey
ematvey / rsync-watch.py
Last active November 3, 2017 13:21
rsync-watch
#!/usr/bin/env python3
import os
import argparse
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument('source')
parser.add_argument('destination')
args = parser.parse_args()
@ematvey
ematvey / proof.md
Last active September 28, 2017 23:10
Keybase proof

Keybase proof

I hereby claim:

  • I am ematvey on github.
  • I am ematvey (https://keybase.io/ematvey) on keybase.
  • I have a public key ASDo9Z-4fYke1UNjgDjcRMv_aF5ucxOJs4un5lqGd71b-Ao

To claim this, I am signing this object:

@ematvey
ematvey / ipyhook.py
Last active December 30, 2015 21:29
ipdb except hook
import sys
from IPython import embed
def excepthook(type, value, traceback):
embed()
sys.excepthook = excepthook