12.07.2015 Views

METODOLOGIA DE MINERAÇÃO DE DADOS PARA ANÁLISE DO ...

METODOLOGIA DE MINERAÇÃO DE DADOS PARA ANÁLISE DO ...

METODOLOGIA DE MINERAÇÃO DE DADOS PARA ANÁLISE DO ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

h2 = string.splitfields(rec[k+1], ':')data2 = datetime.datetime(int(d2[0]),int(d2[1]),int(d2[2]),int(h2[0]),int(h2[1]),int(h2[2]))delta1 = data2 - data1if delta1.days 0 or delta1.seconds < 0:print 'Erro: inconsistencia de datas!!!'delta0 = data1 - data0saida.write(str(nid) + ' ' + str(delta0.seconds) + ' ' + str(delta1.seconds) + ' ' + rec[i+2] + '\n')gravado = gravado + 1data1 = data2delta0 = data1 - data0saida.write(str(nid) + ' ' + str(delta0.seconds) + ' ' + str(delta0.seconds/(qtde-1)) + ' ' + rec[k+2])# nao precisa de new line pois eh o ultimo e jah tem o caractergravado = gravado + 1entrada.close()else:print 'Arquivo ' + arqin + ' nao encontrado...'saida.close()print '--------------------------'print 'Lidos = ', totalprint 'Gravados = ', gravadoprint ''print 'Sucesso...'print time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())191

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!