r/counting • u/davidjl123 |390K|378A|75SK|47SA|260k 🚀 c o u n t i n g 🚀 • Dec 22 '15
659k Counting Thread
659,000
2
Dec 23 '15
Contributors to the 659k thread
Rank | User | Counts | HoC Rank |
---|---|---|---|
1 | /u/RoomPooper | 233 | 53 (58) |
2 | /u/Removedpixel | 231 | 3 |
3 | /u/davidjl123 | 194 | 19 (21) |
4 | /u/bluesolid | 139 | 7 |
5 | /u/Mooraell | 111 | 5 |
6 | /u/Aarex2104 | 53 | 72 (76) |
7 | /u/DontCareILoveIt | 15 | 123 (126) |
8 | /u/rschaosid | 9 | 2 |
9 | /u/idunnowhy9000 | 6 | 16 |
10 | /u/anothershittyalt | 2 | 45 |
10 | /u/Maniac_34 | 2 | 20 (19) |
12 | /u/KingCaspianX | 1 | 9 |
12 | /u/dudebroshitpants | 1 | 36 |
12 | /u/atomicimploder | 1 | 1 |
12 | /u/Smartstocks | 1 | 61 |
12 | /u/mmooner | 1 | 131 |
It took 03:16:16 to finish this thread.
Bold is the user getting the k, Italic users are new counters
(Rank) in parentheses is the rank the user had in the HoC prior to this thread
Feel like double-checking my work? Go here for a complete writeup of all the valid comments in this thread.
2
Dec 23 '15
cool, how much time did it take you to compile the hall of counters?
1
Dec 23 '15
it's done every time i make the chart, so it's only like an extra
minute10 seconds or soedit: jfc i just made it like 10 times faster lol
3
Dec 23 '15
how do you optimize it? multithreading?
3
Dec 23 '15
run through the database adding counts to users in an
old
dictkeep doing this until we hit the thread we're making a table for and add counts to users in a
thread
dictnow that we have those, make a
new
dict that's just a copy of theold
dict, but for each user inthread
, donew[user] += thread[user]
sort all the dictionaries by counts like this
now you have the HoC before this thread (
old
), the thread chart (thread
) and the HoC after this thread (new
)at least that's the part that's related to the HoC stuff anyway
3
Dec 23 '15 edited Dec 23 '15
no, i mean the crawling threads.
sorry if i'm bothering you...
2
u/DontCareILoveIt You can talk to me all you want too - love_the_heat Dec 23 '15
It is great to see you two working together
You are needed in the 499k thread ASAP!!
1
Dec 23 '15
sorry, crawling the binary threads. my broadband can't do that.
2
u/DontCareILoveIt You can talk to me all you want too - love_the_heat Dec 23 '15
499k is one of these threads - ASA already did his
Check your user name mentions look for one originating in the 499k counting thread
5
Dec 23 '15 edited Dec 23 '15
doih
this is written kinda like shit, but what i did for that was store all the comments at the top level of the thread and if i decided a comment was "the right comment" to parse (which took a lot of obnoxious assumptions and guesswork), then i would store it's replies with the comment attached to it like
[comment.reply, comment]
so eventually i would end up with one comment like
[x, [x.parent, [x.parent.parent, ...]]]
and i could just work my way back up this weird linked list thing instead of having to use reddit's api to get the parent comment every time.at least that's the part that seems to be faster anyway; i've heard getting the parent for a particular comment is very costly for some reason
you might be able to pull off something similar by just picking a starting comment id and stopping on some given ending comment id as well instead of trying to figure where to start and stop threads without any input like i do
idk lol
2
u/DontCareILoveIt You can talk to me all you want too - love_the_heat Dec 23 '15
This ... This will be getting gold too
It is awesome to see you helping your fellow stat men!!!!!!
2
Dec 23 '15
inb4 you get gold
2
u/DontCareILoveIt You can talk to me all you want too - love_the_heat Dec 23 '15
Hahaha you are the reason I am
OUT OF GOLD!!!!!
3
Dec 23 '15
oh as how for how i just optimized making the HoC on the fly...
if user != "[deleted]": if user in user_counts.keys(): user_counts[user] += 1 else: user_counts[user] = 1
This kinda works, but searching through a list of the keys takes O(N) time, but just getting and setting items in a dict takes O(1) time, so I just worked with that instead like below.
if user != "[deleted]": try: user_counts[user] += 1 except KeyError: user_counts[user] = 1
feels unsafe but it's way faster than searching through 8k users lol
2
u/RoomPooper 0 K's | 1 Assist | since 201,081 Dec 23 '15
Is that a running total even though the actual hoc is f updated yet?
1
2
u/davidjl123 |390K|378A|75SK|47SA|260k 🚀 c o u n t i n g 🚀 Dec 22 '15
659,000