Just some general updates to bots and such

This commit is contained in:
Russell 2017-08-04 12:06:58 +00:00
parent d9eac44b35
commit c89ac52460
9 changed files with 91 additions and 26 deletions

View File

@ -54,25 +54,27 @@ def too_recent(time1, time2):
return False
def get_positive():
return random.choice(['Yes','Yep','Correct','You got it', 'Yeah', 'Right on', 'Uh-huh', 'Positive'])
return random.choice(['Yes', 'Yep', 'Yeppers', 'Correct','You got it', 'Yeah', 'Right on', 'Uh-huh', 'Positive', 'Totally right', 'Close enough', 'That\'s it'])
def get_negative():
return random.choice(['No', 'Nope', 'Sorry', 'Wrong', 'Nuh-uh', 'Negatory', 'Incorrect', 'Not today', 'Try again', 'Maybe later'])
return random.choice(['No', 'Nope', 'Sorry', 'Wrong', 'Nuh-uh', 'Negatory', 'Incorrect', 'Not today', 'Try again', 'Maybe later', 'Probably not', 'Answer hazy', 'Not quite',\
'Not even close'])
def get_superlative(score):
if score > 4:
return random.choice(["super cool", "totally rad", "extraordinary", "dynomite", "#topdrawer", "a #TopLad", "the cat's meow", "a tilde town hero", "my favorite person", "incredibly lucky",\
"unbelievable", "a tilde town hunk", "could bring all the boys to the yard", "worth twice their weight in gold"]);
"unbelievable", "a tilde town hunk", "could bring all the boys to the yard", "worth twice their weight in gold", "the hero we need", "no ordinary townie"]);
elif score > 2:
return random.choice(["really cool", "pretty neat", "rather nice", "a dynamic doggo", "radical", "intense", "pretty lucky", "knows the territory", "has what it takes", "has mad skillz",\
"going the distance"]);
"going the distance", "a hard worker", "my sunshine", "ready to rumble"]);
else:
return random.choice(["cool", "nice", "acceptible", "good enough", "a promising pupper", "better than a horse", "swell", "a little lucky", "just credible", "my friend"]);
return random.choice(["cool", "nice", "acceptible", "good enough", "a promising pupper", "better than a horse", "swell", "a little lucky", "just credible", "my friend", "probably not a robot",\
"valuable to the team"]);
def get_bad_thing():
return random.choice(["is a meanie", "mugs me right off", "is worse than a horse", "smells like a ghost", "probably didn't bathe today", "didn't guess hard enough", "isn't lucky",\
"smells of elderberries", "should reconsider their life choices", "did't believe in the heart of the tilde", "came to the wrong chat channel", "should have stopped while they were ahead",\
"requires annotations from an authoratative source", "could have been a contender"]);
"requires annotations from an authoratative source", "could have been a contender", "spreads vicious rumors", "drank my milkshake", "is probably cheating", "is trying too hard"]);
def get_prize(user, isHuman, bonus=0):
prizes = [1] * 8 + [2] * 4 + [3] * 2 + [5] * isHuman #no 5pt prize for non-humans

View File

@ -1,20 +1,20 @@
krowbar&^%1463&^%1490909046
krowbar&^%1787&^%1501780034
karlen&^%277&^%1472020404
endorphant&^%682&^%1444775660
jumblesale&^%24&^%1426171214
marcus&^%1941&^%1490895674
marcus&^%2291&^%1501781989
papa&^%181&^%1474509971
epicmorphism&^%5&^%1421937744
audy&^%78&^%1466749239
kc&^%28&^%1480730333
vilmibm&^%13&^%1484794928
vilmibm&^%15&^%1501441899
cmr&^%2244&^%1485978592
imt&^%519&^%1424087616
cndorphant&^%788&^%1424094192
rain&^%17&^%1422310975
sl2c&^%91&^%1424847521
sl2c&^%125&^%1501538196
selfsame&^%1&^%1422230012
bear&^%414&^%1486058789
bear&^%417&^%1497642976
coaxial&^%8&^%1422325983
joe&^%8&^%1422325983
hardmath123&^%4&^%1422325983
@ -39,18 +39,28 @@ synergian&^%22&^%1458152889
dheeraj&^%5&^%1456489270
demobot&^%6&^%1454439605
premysl&^%65&^%1461768606
minerobbe&^%30&^%1485835028
minerobbe&^%104&^%1501731278
xkeeper&^%14&^%1461967961
cosnok&^%806&^%1488947964
cosnok&^%806&^%1500595904
escobar&^%1&^%1475431401
amicabot&^%30&^%1481225205
caff&^%477&^%1490733646
caff&^%665&^%1501724448
kadin&^%5&^%1479870008
desvox&^%5&^%1481632697
mankins&^%3&^%1480211581
cinch&^%2&^%1480454755
caffbot&^%533&^%1490733657
caffbot&^%741&^%1501724457
evilbot&^%4&^%1480693919
tybaltcat&^%7&^%1481076625
minerbot&^%3&^%1485835065
mio&^%4&^%1489082484
minerbot&^%69&^%1501731322
mio&^%233&^%1501802809
archangel&^%183&^%1501670693
tehfraga&^%89&^%1501596505
sushi&^%10&^%1493253212
troido&^%72&^%1498923648
gamebot&^%14&^%1498598594
nilaky&^%275&^%1501796944
bucket&^%65&^%1501802788
lolbot&^%1&^%1499116802
m455&^%3&^%1500572529
abraxas&^%3&^%1500665540

View File

@ -31,3 +31,4 @@
1475761589&^%krowbar&^%Test bots and play games. Use !rollcall to list bot's abilities
1475761599&^%krowbar&^%Test bots and play games. Use !rollcall to list bot's abilities
1475765914&^%cmr&^%Test bots and play games. Use !rollcall to list bots' abilities
1493646477&^%krowbar&^%Name your favorite song.

View File

@ -185,3 +185,17 @@
1487317602&^%vilmibm&^%what would you change about the town? | checkout #starbound | contrib 2 zine https://github.com/tildetown/zine/tree/master/issue_2
1488837030&^%vilmibm&^%what made you feel good today? | checkout #starbound | contrib 2 zine https://github.com/tildetown/zine/tree/master/issue_2
1490764617&^%vilmibm&^%let's make some stuff | check out #starbound, #dev | zine! https://github.com/tildetown/zine/tree/master/issue_2
1491342709&^%vilmibm&^%~insom made a mastodon node <3 https://tiny.tilde.website | #music, #dev, #starbound | zine! https://github.com/tildetown/zine/tree/master/issue_2
1493950583&^%vilmibm&^%happy bday elly and tehfraga!! | masto: https://tiny.tilde.website
1494265286&^%vilmibm&^%masto if u wanna https://tiny.tilde.website <3
1494574585&^%vilmibm&^%cyberhugs
1496174080&^%vilmibm&^%we saw the streets weeping neon
1499453068&^%vilmibm&^%HAPPY T+1000!!!!!!!!!!!!!!
1499891664&^%vilmibm&^%how are you?
1499966909&^%vilmibm&^%DREAM PASSPORT
1500917519&^%vilmibm&^%how are you?
1501091494&^%vilmibm&^%not gonna say it's gonna be ok, but i'll say we'll make it as ok as we can
1501210773&^%vilmibm&^%new! we have a discord server. talk with yr townfriends! https://discord.gg/gas4mcM
1501608305&^%vilmibm&^%fill out the Town Census Survey! https://goo.gl/forms/XHVHSa9iEI2c9OVI2
1501612028&^%vilmibm&^%fill out the Town Census Survey! https://goo.gl/forms/XHVHSa9iEI2c9OVI2 | we have a duolingo club!!!! use code QEJZS9
1501614893&^%vilmibm&^%fill out the Town Census Survey! https://goo.gl/forms/XHVHSa9iEI2c9OVI2 | new channels! #duolino , #gaming

View File

@ -1,5 +1,5 @@
krowbar&^%17&^%29
vilmibm&^%0&^%70
krowbar&^%17&^%30
vilmibm&^%0&^%84
hardmath123&^%0&^%6
joe&^%1&^%1jumblesale
audiodude&^%1&^%0
@ -9,3 +9,4 @@ premysl&^%0&^%1marcus&^%1&^%0
marcus&^%1&^%1
papa&^%1&^%0
desvox&^%1&^%0
mio&^%2&^%0

View File

@ -228,3 +228,5 @@ want
roll
dice
length
https
com

View File

@ -14,6 +14,7 @@ rejectRegexp = "http[s]?://|[0-9]{2}[;:][0-9]{2}"
happyRegexp = ":[-]?[])}]"
sadRegexp = ":[-]?[[({]"
nameFix = {
'archangel': 'archangelic',
'jumblesal': 'jumblesale',
'hardmath1': 'kc',
'hardmath123': 'kc',

View File

@ -4,11 +4,21 @@
<div>
<select id="series">
<option value="">Today</option>
<option value="_2017_07">Jul 2017</option>
<option value="_2017_06">Jun 2017</option>
<option value="_2017_06">Jun 2017</option>
<option value="_2017_05">May 2017</option>
<option value="_2017_04">Apr 2017</option>
<option value="_2017_03">Mar 2017</option>
<option value="_2017_02">Feb 2017</option>
<option value="_2017_01">Jan 2017</option>
<option value="_2016_12">Dec 2016</option>
<option value="_2016_11">Nov 2016</option>
<option value="_2016_10">Oct 2016</option>
<option value="_2016_09">Sep 2016</option>
<option value="_2016_08">Aug 2016</option>
<option value="_2016_07">July 2016</option>
<option value="_2016_06">June 2016</option>
<option value="_2016_07">Jul 2016</option>
<option value="_2016_06">Jun 2016</option>
<option value="_2016_05">May 2016</option>
<option value="_2016_04">Apr 2016</option>
<option value="_2016_03">Mar 2016</option>
@ -19,8 +29,8 @@
<option value="_2015_10">Oct 2015</option>
<option value="_2015_09">Sep 2015</option>
<option value="_2015_08">Aug 2015</option>
<option value="_2015_07">July 2015</option>
<option value="_2015_06">June 2015</option>
<option value="_2015_07">Jul 2015</option>
<option value="_2015_06">Jun 2015</option>
<option value="_2015_05">May 2015</option>
<option value="_2015_04">Apr 2015</option>
<option value="_2015_03">Mar 2015</option>

View File

@ -21,7 +21,6 @@
data.addColumn('number', 'Disk Usage');
data.addColumn('number', 'File Count');
var pieoptions = {
title: 'Tilder Disk Usage',
subtitle: 'in kb',
@ -48,15 +47,39 @@
//Draw LineChart
linedata.addColumn('date', 'Date');
var userData = {};
var userInterest = {};
var cutoffDate = new Date(); cutoffDate.setMonth(cutoffDate.getMonth() - 6); cutoffDate = cutoffDate.getTime() / 1000; //the last 3 months
var cutoffDate = new Date(); cutoffDate.setMonth(cutoffDate.getMonth() - 6); cutoffDate = cutoffDate.getTime() / 1000; //the last 3 monthsa
var interestQuotent = 0.005;
_.forEach(json, function(set, idx) { //generate the 'interest quotent' for each user as a value of change
if(set.date < cutoffDate) return;
_.forEach(set.data, function(point) {
if(!userInterest[point.user]) {
userInterest[point.user] = { absChange: 0, lastValue: point.du, count: 1 };
} else {
userInterest[point.user].absChange = userInterest[point.user].absChange
+ Math.abs(point.du - userInterest[point.user].lastValue) / userInterest[point.user].lastValue;
userInterest[point.user].lastValue = point.du;
userInterest[point.user].count = userInterest[point.user].count + 1;
}
})
})
function isInteresting(point) {
if($("#onlyInteresting").is(":checked")) {
return userInterest[point.user].absChange / userInterest[point.user].count > interestQuotent;
} else {
return point.du > 5000; //the 'interesting' threshold is set at 5000kb
}
}
_.forEach(json, function(set, idx) {
//only display 1/8 the points. (every 2 days instead of every 6 hours) page is loading too slow
//maybe i could add something to show more points but we're not losing too much granularity for the speed we gain
if(idx % 4 != 0 || set.date < cutoffDate) return;
_.forEach(set.data, function(point) {
if(point.du > 5000) { //the 'interesting' threshold is set at 5000kb
if(isInteresting(point)) {
if(!userData[point.user]) { //if the current user has not been initialized yet
userData[point.user] = []; //create an empty array
var size = json.length;
@ -89,5 +112,6 @@
</script>
<body>
<div id="donutchart" style="width: 700px; height: 400px;"></div>
<input id="onlyInteresting" type="checkbox" onClick="drawCharts()">Only Interesting Data</input>
<div id="linechart" style="width: 120%; height: 130%; margin-left: -10%"></div>
</body>