mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 00:22:34 +00:00
Periodic git commit
This commit is contained in:
1 parent
0b5a4fcfb8
commit
94127052c9
15 files changed
+169
-85
No files matched your search
@@ -0,0 +1,2 @@
|
||||
endorphant&^%68
|
||||
krowbar&^%60
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
nohup ./wangbot.py -s 127.0.0.1 -n numberwang_bot -c \#tildetown >> wanglog 2>> wanglog &
|
||||
nohup ./wangbot.py -s 127.0.0.1 -n numberwang_bot -c \#bots >> wanglog 2>> wanglog &
|
||||
#nohup ./wangbot.py -s 127.0.0.1 -n numberwang_bot -c \#bot_test >> wanglog 2>> wanglog &
|
||||
@@ -1,20 +1,20 @@
|
||||
krowbar&^%225&^%1438182841
|
||||
krowbar&^%238&^%1444399178
|
||||
karlen&^%271&^%1426779321
|
||||
endorphant&^%630&^%1438131263
|
||||
endorphant&^%676&^%1444741627
|
||||
jumblesale&^%24&^%1426171214
|
||||
marcus&^%616&^%1440424356
|
||||
marcus&^%787&^%1444392035
|
||||
papa&^%179&^%1438878499
|
||||
epicmorphism&^%5&^%1421937744
|
||||
audy&^%76&^%1431897326
|
||||
audy&^%78&^%1442345315
|
||||
kc&^%18&^%1422326056
|
||||
vilmibm&^%9&^%1423247508
|
||||
cmr&^%864&^%1440424361
|
||||
cmr&^%1006&^%1444701265
|
||||
imt&^%519&^%1424087616
|
||||
cndorphant&^%788&^%1424094192
|
||||
rain&^%17&^%1422310975
|
||||
sl2c&^%91&^%1424847521
|
||||
selfsame&^%1&^%1422230012
|
||||
bear&^%208&^%1438015446
|
||||
bear&^%213&^%1443668443
|
||||
coaxial&^%8&^%1422325983
|
||||
joe&^%8&^%1422325983
|
||||
hardmath123&^%4&^%1422325983
|
||||
@@ -23,7 +23,7 @@ cel&^%11&^%1430162676
|
||||
quote_bots&^%3&^%1424737471
|
||||
bave&^%1&^%1427591141
|
||||
scellef&^%13&^%1428707074
|
||||
cndorphbot&^%8&^%1438044694
|
||||
cndorphbot&^%11&^%1441299746
|
||||
reppard&^%11&^%1437512059
|
||||
jesse&^%6&^%1437569027
|
||||
khoi&^%3&^%1438044039
|
||||
|
||||
@@ -13,3 +13,6 @@
|
||||
1426455418&^%endorphant&^%http://tilde.town/~wiki/ircbots.html | !golem
|
||||
1429088209&^%jumblesale&^%
|
||||
1429628571&^%endorphant&^%http://tilde.town/~wiki/ircbots.html
|
||||
1443998388&^%cmr&^%http://tilde.town/~wiki/ircbots.html
|
||||
1443998393&^%cmr&^%http://tilde.town/~wiki/ircbots.html
|
||||
1444203916&^%cmr&^%http://tilde.town/~wiki/ircbots.html | cndorphbot:
|
||||
@@ -108,3 +108,13 @@
|
||||
1439443352&^%vilmibm&^%let's talk bout html and feels | congrats ~joe
|
||||
1440076665&^%krowbar&^%Let's Play Factorio together! Community event *this* Saturday 1pm-3pm GMT. Ask ~krowbar or ~jumblesale for details
|
||||
1440363401&^%krowbar&^%Welcome to tilde.town! A place where creativity abounds!
|
||||
1440688887&^%krowbar&^%Welcome to tilde.town! Visit tilde.town/~krowbar/chatcloud to visualize the last 12 hours.
|
||||
1440766704&^%krowbar&^%Tilde.town internet game social event. Indicate your availability at this poll: http://doodle.com/7q2dd74nfm2aqwcf
|
||||
1442236331&^%krowbar&^%If you could take back something hurtful you've once said to someone, what would it be?
|
||||
1442243124&^%krowbar&^%Is the milk glass half full or half empty and why?
|
||||
1442243139&^%krowbar&^%What do you think the most ultimate gift of the world is.
|
||||
1442255293&^%vilmibm&^%let's talk about html and feels
|
||||
1442257397&^%vilmibm&^%what should we do for tilde.town's birthday?? | tilde.town turns 1 on October 11th
|
||||
1442498441&^%krowbar&^%YAR! Happy Talk Like A Pirate Day on this fine September the 17th! Avast, ye scallywags!
|
||||
1442502425&^%krowbar&^%what should we do for tilde.town's birthday?? | tilde.town turns 1 on October 11th
|
||||
1444587668&^%vilmibm&^%~~~~~~~~~~~~HAPPY BIRTHDAY~~~~~~~~~~
|
||||
@@ -1,4 +1,6 @@
|
||||
krowbar&^%0&^%6
|
||||
vilmibm&^%0&^%6
|
||||
krowbar&^%0&^%13
|
||||
vilmibm&^%0&^%9
|
||||
hardmath123&^%0&^%6
|
||||
joe&^%0&^%1
|
||||
joe&^%0&^%1jumblesale&^%1&^%0
|
||||
audiodude&^%1&^%0
|
||||
cmr&^%0&^%3
|
||||
+1
-1
@@ -164,7 +164,7 @@ def save_scores():
|
||||
score = line.strip("\n").split("&^%")
|
||||
if(score[0] == name):
|
||||
line = score[0] + "&^%" + str(int(score[1]) + currentScores[name]) + "\n"
|
||||
currentScores.remove(name)
|
||||
del currentScores[name]
|
||||
break
|
||||
scorefile.write(line)
|
||||
|
||||
|
||||
@@ -197,3 +197,34 @@ there
|
||||
doing
|
||||
even
|
||||
does
|
||||
theres
|
||||
theyve
|
||||
were
|
||||
using
|
||||
could
|
||||
should
|
||||
wont
|
||||
way
|
||||
though
|
||||
being
|
||||
while
|
||||
cant
|
||||
only
|
||||
well
|
||||
very
|
||||
didnt
|
||||
hes
|
||||
quite
|
||||
havent
|
||||
weant
|
||||
might
|
||||
say
|
||||
mean
|
||||
still
|
||||
come
|
||||
will
|
||||
used
|
||||
want
|
||||
roll
|
||||
dice
|
||||
length
|
||||
@@ -8,8 +8,10 @@ import shutil
|
||||
logfile = "/home/jumblesale/Code/irc/log"
|
||||
outfile = "/home/krowbar/logs/userData.json"
|
||||
userData = {} #hash keyed by "user" that contains an array of timestamps
|
||||
#we only care about recent chats, let's say for the past two weeks
|
||||
timeCutoff = calendar.timegm(time.gmtime()) - (2 * 7 * 24 * 60 * 60)
|
||||
#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)
|
||||
|
||||
with open(logfile, "r") as log:
|
||||
for line in log:
|
||||
@@ -19,8 +21,12 @@ with open(logfile, "r") as log:
|
||||
except ValueError:
|
||||
continue #There are some bad lines in the log file that we'll ignore if we can't parse
|
||||
if time > timeCutoff:
|
||||
#standardize all times into a single "week"
|
||||
#time %= oneWeek
|
||||
#if the user already exists in the list
|
||||
if user in userData:
|
||||
if time < userData[user][-1] + fiveMinutes:
|
||||
continue #only record times that are at least five minutes apart
|
||||
userData[user].append(time) #append the new time
|
||||
else: #if they are new
|
||||
userData[user] = [time] #create a new list
|
||||
|
||||
Regular → Executable
+17
-6
@@ -8,12 +8,17 @@ import shutil
|
||||
|
||||
logfile = "/home/jumblesale/Code/irc/log"
|
||||
outfile = "/home/krowbar/logs/chatcloud.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 two weeks
|
||||
timeCutoff = calendar.timegm(time.gmtime()) - (2 * 7 * 24 * 60 * 60)
|
||||
minOccurance = 10
|
||||
#we only care about recent chats, let's say for the past sixteen hours
|
||||
timeTo = calendar.timegm(time.gmtime())
|
||||
timeCutoff = timeTo - (16 * 60 * 60)
|
||||
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
|
||||
bannedWords = open(bannedWordsFile).read().splitlines()
|
||||
bannedUsers = open(bannedUsersFile).read().splitlines()
|
||||
|
||||
with open(logfile, "r") as log:
|
||||
for line in log:
|
||||
@@ -22,9 +27,13 @@ with open(logfile, "r") as log:
|
||||
time = int(time)
|
||||
except ValueError:
|
||||
continue #There are some bad lines in the log file that we'll ignore if we can't parse
|
||||
if time > timeCutoff:
|
||||
for word in re.sub('[\'\";:,.?!*&^\-()\[\]]', '', message).lower().split():
|
||||
if word in bannedWords:
|
||||
if user in bannedUsers:
|
||||
continue #We don't care what they say
|
||||
if time >= timeCutoff and time <= timeTo:
|
||||
#print "Processing line from " + user + " at " + str(time)
|
||||
for word in re.sub('[\'\"\`\/\\;:,.?!*&^\-()<>|_\[\]0-9]', '', message).lower().split():
|
||||
if len(word) < minLength or word in bannedWords:
|
||||
#print "Rejecting " + word
|
||||
continue
|
||||
#if the word already exists in the list
|
||||
if word in wordData:
|
||||
@@ -33,6 +42,8 @@ with open(logfile, "r") as log:
|
||||
wordData[word] = 1
|
||||
#print "Added word: " + word
|
||||
wordData = {i:wordData[i] for i in wordData if wordData[i] >= minOccurance }
|
||||
if(len(wordData) == 0):
|
||||
wordData = {"NOTHING": 1, "INTERESTING": 1, "TODAY": 1}
|
||||
with open(outfile + ".tmp", "w") as tmpFile:
|
||||
tmpFile.write(json.dumps(wordData))
|
||||
shutil.move(outfile + ".tmp", outfile)
|
||||
Reference in new issue
Block a user