simple utility to extract digits from the MNIST database