Python code for GIST card reader