Close server in finally block.
Remove excess parenthesis.
Pass dataMatrix and dataLabels as parameters.
Rename ocrNN to ocrNeuralNetwork and add a comment explaining class functionality.
Add const WIDTH_IN_PIXELS
Rename b1 and b2 to input_layer_bias and hidden_layer_bias respectively.
Rename sigmoid and sigmoidPrime functions for clarity.
Move __init__ to the beginning of the class.
Use NN_FILE_PATH where appropriate.
Add '_' to function names to indicate them as private.
Add parens to be explicit about op order.
Use a context manager for loading the neural network file.
Use a context manager for saving the neural network file.
Remove unused '_normalize' function.
Removed unused function do_HEAD.
Use 'self' when referencing dataLabels and dataMatrix.
Add Content-type header to POST response.
Add option to create a non-persistent neural network and pass trainingIndices as a parameter to init.
Update trained network file.
Move testing function ocr.py and into a design script.