Skip to content

Instantly share code, notes, and snippets.

@luke-jr
Created May 5, 2017 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luke-jr/333479252069bf6a6711046e6731d730 to your computer and use it in GitHub Desktop.
Save luke-jr/333479252069bf6a6711046e6731d730 to your computer and use it in GitHub Desktop.
size_statistics.py
import sys
sizes = []
count = 0
for line in sys.stdin:
fields = line.split()
tx_count = int(fields[3])
if tx_count < 16:
continue
segwit_size = int(fields[2])
sizes.append(segwit_size)
count = count + 1
sizes.sort()
print("25th pct: %s" % (sizes[count // 4],))
print("Average: %s" % (sum(sizes) / count,))
print("90th pct: %s" % (sizes[-(count // 10)],))
print("Largest: %s" % (sizes[-1],))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment