<s> from MySQLdb import connect <EOL> import numpy as np <EOL> import cPickle as pickle <EOL> pth = '<STR_LIT>' <EOL> db = connect ( host = '<STR_LIT:localhost>' , user = '<STR_LIT>' , db = '<STR_LIT>' ) <EOL> cursor = db . cursor ( ) <EOL> cursor . execute ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> cat = np . array ( [ map ( float , row ) for row in cursor . fetchall ( ) ] ) <EOL> with open ( pth , '<STR_LIT:w>' ) as outfile : <EOL> pickle . dump ( cat , outfile ) </s>
