Created
October 24, 2014 20:35
-
-
Save benbrittain/851041c83a9e6f9ea4d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
log = urllib2.urlopen('http://geneious.ginkgobioworks.com/log.txt').read().split("\n") | |
active_users = dict() | |
for line in log: | |
line = line.split(' ') | |
if len(line) > 4: | |
print(line) | |
time = line[0] | |
status = line[2] | |
user = line[4] | |
if status == "IN:": | |
active_users[user] = time | |
print("user: " + user) | |
elif status == "OUT:": | |
if user in active_users: | |
del active_users[user] | |
for user in active_users.keys(): | |
print(user + " has been using geneious since " + active_users[user]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment