Category: Programming

Force Selenium to not load images [Ruby]

Sometimes it is unnecessary to load images in my selenium scripts. It takes time for the images (especially large ones) to load and messes up my sleep functions. Here’s how to prevent it from loading. There are more options and it’s listed in the All Profile Options...

Final Thoughts About RelevantXKCD project

Part of my RelevantXKCD project writeup After I wrapped a simple Django server and posted it on Reddit in the subreddit /r/xkcd, I got some great feedback! For the Model As /u/drcopus helpfully enlightened me, I should’ve done data augmentation on the original training set. I could’ve...

Finding the Right Model (Multinomial NB, RNN, SGDClassifier)

Part of this entire writeup Goal Find a model to accurately predict a relevant XKCD given multiple words (a reddit comment). This essentially gave me a bunch of positively single-labeled data since each comment usually only had one “relevant XKCD” sub-comment attached. Example: Searching “Python” would return...

Retrieving Data From Google BigQuery (Reddit Relevant XKCD)

So I embarked on a machine learning quest. Here are my notes on how I obtained the data.   My first attempt a few months ago was to download the entire Reddit Corpus (in CSV form) and manually parse the comments. However, it soon became clear the my...

Reddit Relevant XKCD

So I embarked on a machine learning quest as a senior project. With all these advances in AI, I wanted to have some fun myself :P. You can view it here. I was inspired by Dan Zhang and Megan Ruthven’s Relevant XKCD finder. They used ExplainXKCD to populate...

Webscraping with Selenium [Ruby, Firefox, OSX]

This article requires knowledge of Ruby, the concept of webscraping, and HTML. Make sure you have Ruby installed (use RVM if you don’t have it yet) — I’m using 2.3.1 right now. If you want a reference sheet, I’m in the process of writing one :P. Link...

How I Program on a Chromebook

My programming environment is quite nice on a chromebook. Although my chromebook is not the top of the line, ASUS C201 11.6 Inch, it does allow me to push some quick updates and do a bit of local testing for debugging. Note: When I compile and run,...

USACO Tips and Suggestions

So you want to do USACO? Make sure you actually like it and aren’t doing it because you want it on your college resume! (See previous article) I’m going to assume that you understand USACO well enough and competed in some competitions/looked at some problems already. But here...

How Important Googling is for Programmers

I 100% admit that I don’t know any programming language 100%. I have to look at a cheat sheet every single time I program. Especially for students in high school like me, I don’t really see the point in memorizing all the functions and syntax structures for all...