Skip to content

Instantly share code, notes, and snippets.

@victorhcm
victorhcm / argparse_example.py
Created December 2, 2015 00:34 — forked from elmotec/bootstrap_cmdline.py
Minimal python program with logging and argparse.
#!/usr/bin/env python
# encoding: utf-8
"""Minimal python commad line."""
import sys
import argparse
import logging
@victorhcm
victorhcm / annotate_image.py
Created November 19, 2015 00:02
overlay image with annotations.
# coding: utf-8
import matplotlib.pyplot as plt
import Image
img = Image.open('truman-stairs.jpg')
fig, ax = plt.subplots(figsize=(12,12))
ax.imshow(img, aspect='equal')
ax.add_patch(
@victorhcm
victorhcm / docker_cheat_sheet.sh
Last active July 19, 2018 11:56
(small) docker cheat sheet
#################################################################################
# Authors: Keiller Nogueira, Victor de Melo
#################################################################################
# nvidia-docker seems more stable now and several images are starting to adopt it (including
# [kaixhin](https://github.com/NVIDIA/nvidia-docker/issues/85).
# hence, we suggest to use it instead, as it solves a few issues with gpu passthrough.
# usage: it is only required when creating a container, i.e, with `run` and related arguments
# you're not required to provide $DOCKER_NVIDIA_DEVICES as it will find the devices itself