Skip to content

Instantly share code, notes, and snippets.

stared / live_loss_plot_keras.ipynb
Last active Jan 24, 2021
Live loss plot for training models in Keras (see: for a library)
View live_loss_plot_keras.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
rummanwaqar / cv::Mat.type() to string
Created Jun 8, 2016
Convert opencv mat type to string
View cv::Mat.type() to string
std::string type2str(int type) {
std::string r;
uchar depth = type & CV_MAT_DEPTH_MASK;
uchar chans = 1 + (type >> CV_CN_SHIFT);
switch ( depth ) {
case CV_8U: r = "8U"; break;
case CV_8S: r = "8S"; break;
case CV_16U: r = "16U"; break;
bastman /
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
bgreenlee /
Created Nov 29, 2011
Variant of that accepts a logger instead of stdout/stderr #python
import subprocess
import select
from logging import DEBUG, ERROR
def call(popenargs, logger, stdout_log_level=DEBUG, stderr_log_level=ERROR, **kwargs):
Variant of that accepts a logger instead of stdout/stderr,
and logs stdout messages via logger.debug and stderr messages via