Advertisement
Guest User

Script for Processing

a guest
May 18th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. f = open('runandtime_results.txt')
  2. lines = f.read().splitlines()
  3.  
  4. times = []
  5. for line in lines:
  6.     line = line.split('computing_neighbors: ')[1]
  7.     line = line.split('s ')[0]
  8.     times.append(float(line[0:-1]))
  9.  
  10. import numpy as np
  11. defaulttimes = np.array(times[0:40]).reshape(10, 4).transpose()
  12. tunedtimes = np.array(times[40:]).reshape(10, 4).transpose()
  13.  
  14. print "times = ["
  15. for row in defaulttimes:
  16.     for time in row:
  17.         print time,
  18.     print ";"
  19. for row in tunedtimes:
  20.     for time in row:
  21.         print time,
  22.     print ";"
  23. print "];"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement