mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 00:22:34 +00:00
Added some stuff, deleted some stuff, modified some stuff
This commit is contained in:
1 parent
8454515e67
commit
d76dd9c674
16 files changed
+199
-30
No files matched your search
@@ -11,7 +11,7 @@ userData = {} #hash keyed by "user" that contains an array of timestamps
|
||||
#we only care about recent chats, let's say for the past couple weeks
|
||||
oneWeek = 7 * 24 * 60 * 60
|
||||
fiveMinutes = 5 * 60
|
||||
timeCutoff = calendar.timegm(time.gmtime()) - (2 * oneWeek)
|
||||
timeCutoff = calendar.timegm(time.gmtime()) - (5 * oneWeek)
|
||||
|
||||
with open(logfile, "r") as log:
|
||||
for line in log:
|
||||
|
||||
@@ -8,12 +8,15 @@ import shutil
|
||||
|
||||
logfile = "/home/jumblesale/Code/irc/log"
|
||||
outfile = "/home/krowbar/logs/chatcloud.json"
|
||||
#outfile = "/home/krowbar/logs/chatcloud_2016_01.json"
|
||||
bannedUsersFile = "/home/krowbar/Code/python/bannedUsers"
|
||||
bannedWordsFile = "/home/krowbar/Code/python/bannedWords"
|
||||
wordData = {} # keyed by "word" that contains a count
|
||||
#we only care about recent chats, let's say for the past sixteen hours
|
||||
timeTo = calendar.timegm(time.gmtime())
|
||||
#timeTo = calendar.timegm(time.strptime("1 Feb 16", "%d %b %y"))
|
||||
timeCutoff = timeTo - (16 * 60 * 60)
|
||||
#timeCutoff = calendar.timegm(time.strptime("1 Jan 16", "%d %b %y"))
|
||||
print "Generating word cloud based off words from " + str(timeCutoff) + " to " + str(timeTo)
|
||||
minOccurance = 3 #we'll have to reduce the minOccurances if we reduce the timeCutoff
|
||||
minLength = 3 #number of letters long
|
||||
|
||||
Reference in new issue
Block a user