I assigned classes

This commit is contained in:
Neale Pickett 2013-01-28 15:28:41 -07:00
parent 40039314be
commit ca7ee45666
2 changed files with 4508 additions and 4301 deletions

View File

@ -1,11 +1,21 @@
#! /usr/bin/python3 #! /usr/bin/python3
import sys import smtplib
smtpd = smtplib.SMTP("mail.lanl.gov")
courses = {
"net": "Network Archaeology",
"mal": "Malware Reverse-Engineering",
"hst": "Host Forensics",
"icc": "Incident Coordination",
"nil": "None",
}
limits = { limits = {
"net": 100, "net": 120,
"mal": 60, "mal": 70,
"hst": 60, "hst": 70,
"icc": 40, "icc": 40,
"nil": 9000, "nil": 9000,
":-(": 9000, ":-(": 9000,
@ -14,7 +24,10 @@ limits = {
# Read in allowed substring list # Read in allowed substring list
allowed = [] allowed = []
for line in open("approved.txt"): for line in open("approved.txt"):
allowed.append(line.strip()) line = line.strip()
if line:
allowed.append(line)
template = open("mail.txt").read()
# Read in registration data # Read in registration data
registrants = [] registrants = []
@ -56,8 +69,11 @@ for email in registrants:
oldreg = None oldreg = None
if oldreg != w: if oldreg != w:
print(w, email) #msg = template.replace("RCPT", email).replace("COURSE", courses[w])
open(email, "w").write(w) #smtpd.sendmail("neale@lanl.gov", [email], msg)
#open(email, "w").write(w)
print("%d got 1st choice, %d got 2nd choice, %d got screwed" % #print(w, email, r)
(counts[0], counts[1], counts[2]))
print("%d got 1st choice, %d got 2nd choice, %d got screwed" % (counts[0], counts[1], counts[2]))

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 807 KiB

After

Width:  |  Height:  |  Size: 788 KiB