Inicio > Documentos > Python > Herramientas

Transformador de outputs

#Programa para convertir la salida del creador de objetos
#aproximándose a entradas interpretables por una red neuronal
#de 40 nodos de entrada.
for line in open('output.txt', 'r').readlines():
(tab) num = float(line)
#A PARTIR DE AQUI TODAS LAS LINEAS LLEVAN UN TABULADO
#se abren los archivos
f=open("final.txt", "a")
if num < 0.025:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.05 and num > 0.025:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.075 and num > 0.05:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ')
if num < 0.1 and num > 0.075:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ')
if num < 0.125 and num > 0.1:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ')
if num < 0.15 and num > 0.125:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.175 and num > 0.15:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ')
if num < 0.2 and num > 0.175:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ')
if num < 0.225 and num > 0.2:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.25 and num > 0.225:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.275 and num > 0.25:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.3 and num > 0.275:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.325 and num > 0.3:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.35 and num > 0.325:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.375 and num > 0.35:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.4 and num > 0.375:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0')
if num < 0.425 and num > 0.4:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0')
if num < 0.45 and num > 0.425:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0 0')
if num < 0.475 and num > 0.45:
f.write('\n' '0 0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0')
if num < 0.5 and num > 0.475:
f.write('\n' '0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0 0')
if num < 0.525 and num > 0.5:
f.write('\n' '0 0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0')
if num < 0.55 and num > 0.525:
f.write('\n' '0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0 0')
if num < 0.575 and num > 0.55:
f.write('\n' '0 0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0')
if num < 0.6 and num > 0.575:
f.write('\n' '0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0 0')
if num < 0.625 and num > 0.6:
f.write('\n' '0 0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0')
if num < 0.65 and num > 0.625:
f.write('\n' '0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0 0')
if num < 0.675 and num > 0.65:
f.write('\n' '0 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0')
if num < 0.7 and num > 0.675:
f.write('\n' '0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0 0')
if num < 0.725 and num > 0.7:
f.write('\n' '0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0')
if num < 0.75 and num > 0.725:
f.write('\n' '0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0 0')
if num < 0.775 and num > 0.75:
f.write('\n' '0 0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0')
if num < 0.8 and num > 0.775:
f.write('\n' '0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0 0')
if num < 0.825 and num > 0.8:
f.write('\n' '0 0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0')
if num < 0.85 and num > 0.825:
f.write('\n' '0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0 0')
if num < 0.875 and num > 0.85:
f.write('\n' '0 0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0')
if num < 0.9 and num > 0.875:
f.write('\n' '0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5 0')
if num < 0.925 and num > 0.9:
f.write('\n' '0 -0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5')
if num < 0.95 and num > 0.925:
f.write('\n' '-0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 -0.5')
if num < 0.975 and num > 0.95:
f.write('\n' '-0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5')
if num < 1 and num > 0.975:
f.write('\n' '0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5')

f.close()

num = float(line)






Todas las Historias


Translate me!


Archivos

<Marzo 2024
Lu Ma Mi Ju Vi Sa Do
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
             

Documentos

  • Chorradas de internet
  • Planeta Encantado
  • Python: pruebas, cosas y demás.
  • Relatos
  • Material del juego de rol de los teletubbies.



  • Blogalia

    Blogalia








    Busca en El Asiento




    Bitácoras

    Desbarradas de Akin
    Blog de Beor
    La Biblioteca de Babel
    El Rincón de Canopus
    Ciencia 15
    Copensar
    La Cosa Húmeda
    Hazte Escuchar
    hipocondría demagógica
    JCantero
    Magonia
    diario del osito
    Por la Boca Muere el Pez
    El Paleofreak
    Segfault
    Tirando Líneas
    El Triunfo de Clío
    Una cuestión personal



    Cybergurús

    Epaminondas
    fernand0
    JJMerelo
    Joma
    Jordi
    mini-d
    mur0



    Laboratorios Virtuales

    Laboratorio Virtual de Psicología
    PsychExperiments



    Webs

    Homo Webensis
    Magufomedia
    ARP-SAPC

    Comportamental br> Neurociencias para niños
    Psicoteca







    Listed on BlogShares

    Creative Commons License



    This work is licensed under a Creative Commons License. 2003 Ctugha