1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-27 19:42:53 +03:00
Files
certbot/ProcessGoogleSTARTTLSDomains.py
Peter Eckersley eea1b0d8c5 Switch naming conventions so that modules are importable :)
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 :)
2014-06-11 09:18:56 -07:00

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