To create an anchor to a heading in github flavored markdown.
Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:
[create an anchor](#anchors-in-markdown)
| 1. Check Python3 root | |
| >>> import sys | |
| >>> import os | |
| >>> sys.executable | |
| '/usr/local/bin/python3' | |
| OR | |
| $ which python3 | |
| /usr/local/bin/python3 |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| """ | |
| Python implementation of the color map function for the PASCAL VOC data set. | |
| Official Matlab version can be found in the PASCAL VOC devkit | |
| http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html#devkit | |
| """ | |
| import numpy as np | |
| from skimage.io import imshow | |
| import matplotlib.pyplot as plt | |
| def color_map(N=256, normalized=False): |
| import sys, getopt | |
| import tensorflow as tf | |
| usage_str = 'python tensorflow_rename_variables.py --checkpoint_dir=path/to/dir/ ' \ | |
| '--replace_from=substr --replace_to=substr --add_prefix=abc --dry_run' | |
| def rename(checkpoint_dir, replace_from, replace_to, add_prefix, dry_run): | |
| checkpoint = tf.train.get_checkpoint_state(checkpoint_dir) |
Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:
TensorFlow is now distributed under an Apache v2 open source license on GitHub.
On Ubuntu 16.04LTS+:
Step 1. Install NVIDIA CUDA:
To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:
| import argparse | |
| import sys | |
| from tensorflow.examples.tutorials.mnist import input_data | |
| from time import time | |
| t0 = time() | |
| import tensorflow as tf | |
| tf.summary.FileWriterCache.clear() |
| import datetime | |
| import linecache | |
| import os | |
| import pynvml3 | |
| import torch | |
| print_tensor_sizes = True | |
| last_tensor_sizes = set() | |
| gpu_profile_fn = f'{datetime.datetime.now():%d-%b-%y-%H:%M:%S}-gpu_mem_prof.txt' |
| #!/bin/bash | |
| # add the GPG key for the official Docker repository to the system | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| # add the Docker repository to APT sources | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
| # update the package database with the Docker packages from the newly added repo | |
| sudo apt-get update |