File: convert_to_cactusplot.py

package info (click to toggle)
cryptominisat 5.11.4%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,432 kB
  • sloc: cpp: 55,148; ansic: 9,642; python: 8,899; sh: 1,336; php: 477; sql: 403; javascript: 173; xml: 34; makefile: 15
file content (29 lines) | stat: -rwxr-xr-x 478 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env python

import sys
of = sys.argv[1]
f = open(of, "r")
text = f.read()
mylines = text.splitlines()
i = 0;
time = []
for line in mylines :
  #print("line:", line)
  time.append(float(line.split()[0]))
  #print "t:%f" %(time[i])
  i += 1

lastnum = -1
for a in range(0, 4999, 1):
  num = 0
  for t in time:
    #print "t: %f a: %d" %(t, a)
    if (t < a) :
      num += 1

  if (lastnum != num) :
      print("%d \t%d" %(num, a))
  lastnum = num

f.close();
exit(0)