mirror of
https://github.com/certbot/certbot.git
synced 2026-01-27 19:42:53 +03:00
It turns out that python won't import modules with hyphens in their names. It seems that CamelCase is most consistent with our Class naming. However feel free to do something different instead :)
19 lines
571 B
Python
Executable File
19 lines
571 B
Python
Executable File
#!/usr/bin/python
|
|
import csv
|
|
import codecs
|
|
import sys
|
|
from collections import defaultdict
|
|
|
|
csvreader = csv.reader(codecs.open(sys.argv[1], "rU", "utf-8"), delimiter=',', quotechar='"')
|
|
d = defaultdict(set)
|
|
for (address_suffix, hostname_suffix, direction, region, fraction_encrypted) in csvreader:
|
|
if direction == "outbound":
|
|
try:
|
|
d[address_suffix].add(float(fraction_encrypted))
|
|
except ValueError:
|
|
pass
|
|
|
|
for address_suffix, fraction_encrypted in d.iteritems():
|
|
if min(fraction_encrypted) >= 0.50:
|
|
print min(fraction_encrypted), address_suffix
|