### codetiger927's blog

By codetiger927, history, 2 months ago,

If a hamster was born in aquarium, does it become a fish? — Rotavirus 2021

When the hour hand is way past twelve and the sky is dark, I often find myself pondering about this question, alone.

Of course, a hamster is a hamster, and it cannot just become a fish right? But then again, if its mother gave birth to it inside an aquarium, then who's to say the hamsters didn't acquire a critical mutation that gifted them the ability to breathe underwater, transforming them into fish?

I would be awake at 3 am in the morning, frustrated and defeated by this cruel dilemma that I cannot seem to solve. But, Rotavirus must know, right? After all, he was the person that proposed this rhetorical question, so he must have the answer to his own question! If I could just ask him, maybe, just maybe...

Yet fate cheated me once again: Codeforces has permanently banned Rotavirus — I can no longer ask him. All I have left are only pieces of clues and hints scattered around his comments. If only I could somehow rebuild him out of his words, I could just ask him and he would tell me. The answer feels so close but also just far enough to be out of my reach.

On August 4th, 2021, 11:08 PM edt, I did the impossible: I trained an LSTM recurrent neural network on all of Rotavirus' previous comments and resurrected him (well ... kinda? :clown:) But before we get to the juicy parts, we must first rewind to 8 hours earlier.

I first wrote a simple python scraper to get all of rotavirus' comments. It's just a simple script with a xhtml parser:

import requests
import re
import io
import html
import re
from html.parser import HTMLParser

f = open("comments.txt", "ab")

class scraper(HTMLParser):
commentMode = False;
def handle_starttag(self,tag,attrs):
if(tag == "div" and len(attrs) > 0 and attrs[0][1] == 'ttypography'):
self.commentMode = True;
def handle_endtag(self,tag):
if(tag == "div"):
self.commentMode = False;
def handle_data(self,data):
if(self.commentMode):
if(data.rstrip() != ""):
f.write((data + "\n").encode("utf-8"));
page_number = 1

s = requests.Session();
parser = scraper()
r = s.get(url);
parser.feed(r.text)
# print(html.unescape(r.text));


However, there were still a lot of emojis and Russian characters that the network can't recognize, so I wrote a cleaner script that only accepts ASCII characters.

f = open('comments.txt','rb');
for line in lines:
fout.write('"{}"\n'.format(line.strip().decode().encode("ascii", "ignore").decode()));


Finally, I plugged everything into my ML senpai Andrej Karpathy <3's neural network, char-rnn. And after 7 hours of excruciating waiting time, I got this

Finally, let's get to the juicy text generation part :p. Unfortunately due to the extremely small sample size, 12k comments, the generation wasn't as good as I had hoped D:, but I still found a couple of comments I found funny that at least somewhat resembles rotavirus:

===================================================================================

"is it rated?"

"I hate mike"

"cheaters are noob"

"segment tree is very indian" (interesting take O_o, talk about the importance of being careful with training data to avoid AI racism)

"Greendians retarned." (okay this is a bit too dangerous :sweat:, just reminder that I did 0 subjective modification on the model or the dataset, so I have 0 endorsements on any of these comments)

"http://codeforces.com/blog/entry/408po-" (:O it seemed to pick up on how to generate codeforces blog links as well, albeit a nonexistent one)

"I believe that means stupid must complain about the segment tree." (The AI seemed to really pick up on Rotavirus' obsession with segment tree XD)

I generated 10,000 characters worth of AI generated text, so If you want to see the uncherrypicked version, here it is

===================================================================================

Finally, time for the ultimate question that we've all been waiting for :eyes:, I primed the AI with the pretext, "If a hamster was born in aquarium, does it become a fish? The answer"

THE RESPONSE IS [drumrolls please]: If a hamster was born in aquarium, does it become a fish? The answer is NO

THANK YOU GOOD NIGHT ✿✿ヽ(ﾟ▽ﾟ)ノ✿

Overall, I believe the disappointing results are caused by the small datasize. The github repository recommends a minimum of 1mb, whereas the data I collected is only 93kb, more than 10 times smaller.

BUT, I actually did find a new source to retrieve a lot more of Rotavirus' comments in the famous AC Discord Server :O

Part 2? To Be Continued...

Note that everything in this post is completely for comedic purposes. Please don't take anything here seriously >.< GOOD NIGHT FOR REALSIES

If you like this post, please consider checking out my blog https://codetiger.me/ :p

• +508

 » 2 months ago, # |   +42 Codetiger orz!
 » 2 months ago, # |   +54 lmao
 » 2 months ago, # |   +152 ButIf a fish was born outside a aquarium, does it become a hamster?
•  » » 2 months ago, # ^ |   +35 NowYou gave him another dilemma
 » 2 months ago, # |   +72 inb4 answer is "enjoy being blocked"
•  » » 2 months ago, # ^ |   +27 no komments
•  » » » 2 months ago, # ^ |   0 ok komrade stalin
 » 2 months ago, # |   +33 I remember his comments on my blogs. amazing that my shitpost about bugabooset started the biggest sitewide meme ever. Codetiger amazing shitpost I know the effort it takes to make these Codetiger ORZ
 » 2 months ago, # |   +2 Spoiler
 » 2 months ago, # |   +45 Fun title, toxic content :(
 » 2 months ago, # |   +31 So he truly believes in that, and we got someone banned for their beliefs.
 » 2 months ago, # |   0 This shitpost is poorly formatted. I demand a ban to OP.
 » 2 months ago, # |   +3 If a human was born with brain, does it become brainless?
•  » » 2 months ago, # ^ |   +3 You should answer that for us. No, really.
 » 2 months ago, # |   +10 Like most of ML, that's a lot of words for garbage in garbage out.Am I shitposting right?
 » 2 months ago, # |   0 Rotavirus be like EDITV
 » 2 months ago, # |   +21 This is why I delete all messages in AC
 » 2 months ago, # |   +3 What was the context in which this question was asked by rotavirus? Sounds like a clever insult.
•  » » 2 months ago, # ^ |   +4 If a zerg was born on Aiur, does it become a protoss?
•  » » » 2 months ago, # ^ |   0 If Zeratul was born Khalai, would Aldaris not raise a revolt against him?
•  » » 2 months ago, # ^ |   +2 Immigration, to the US specifically. It was a sophisticated discussion about nationality, ethnicity, social status of migrants, China's brain drain.He said he first heard this phrase in the context of swedish immigrants.
•  » » 2 months ago, # ^ |   +18 He stated that one of the reason he hates US is because they can't have Americans represent themselves in IOI, and said that they "import people from Chinese blood". A lot of discussion happened and Ecnerwala said that Asian Americans are Americans as well, to which he replied-"If a hamster is born in aquarium, does it become a fish?"Note-I might be missing exact phrasing, so don't quote me on the dialogues, but this is pretty accurate to what happened
 » 2 months ago, # | ← Rev. 2 →   0 part2: Darwin theory of natural selection through ML
 » 2 months ago, # |   0 Imagine rotavirus saying "long"