def generate_datafile_old(number_items=1000):
 from utils import get_names, generate_dataset
 from pprint import pprint
 filename = 'samples.py'
 dataset = generate_dataset(number_items)
 fo = open(filename, 'wb')
 fo.write('#!/usr/bin/env python\n')
 fo.write('# -*- coding: utf-8 -*-\n')
 fo.write('#Brainaetic: http://www.thenetplanet.com\n\n')
 fo.write('SAMPLES = ')
 pprint(dataset, fo)
 fo.close()
 print ('%s generated with %d samples' % (filename, number_items))

def generate_datafile_old ( number_items = 1000 ) : from utils import get_names , generate_dataset from pprint import pprint filename = 'samples.py' dataset = generate_dataset ( number_items ) fo = open ( filename , 'wb' ) fo . write ( '#!/usr/bin/env python\n' ) fo . write ( '# -*- coding: utf-8 -*-\n' ) fo . write ( '#Brainaetic: http://www.thenetplanet.com\n\n' ) fo . write ( 'SAMPLES = ' ) pprint ( dataset , fo ) fo . close ( ) print ( '%s generated with %d samples' % ( filename , number_items ) )
create the samples .