Programming

Creating my Project Euler Solution Website

I’ve recently started going through the Project Euler problems. It’s an awesome site that basically has a list of math problems that usually need computing power to solve. There are close to 500 problems on there right now, but my OCD means I gotta do them in order! I started working on them a bit and realized I was forgetting why I did things a certain way. Many of their problems can be brute forced, but also have elegant solutions available. I wanted to keep a record of what I was doing so I decided to make a page for it. I’m still working on the site, but it’s almost done. This post is actually not about Project Euler, but about what I learned making the site, especially when I moved from jQuery to AngularJS.
Continue reading

Security Fundamental Comparison

During the last few weeks at my previous job, I was working on a little project which was originally produced in Excel; so naturally I had to make it… better. I decided it was time to put what I’d been teaching myself to the test and built up this tool using Python (SQLAlchemy, Flask), JavaScript (JQuery, D3), and MySQL.

Using a predetermined universe of companies, the app allows you to compare company fundamental data based on certain accounting figures. Eventually, this is summarized into one number for each of the 5 categories (listed below) as well as an overall figure. A higher number is better, except for those values below with an *. Each category consists of multiple figures:
Continue reading

MapReduce Emulator in R

Even with a cursory introduction to “Big Data”, you will likely see some mention of MapReduce. It provides the framework to Hadoop which in turn has been used (with some modifications) by many applications such as Facebook, Google, Twitter, and Yahoo. MapReduce is a programming model that actually abstracts the complexities of parallel computing and allows users to tap into the power without having to get into the low level architecture. I covered this in my Data Science class and was surprised at how easy it was to pick up. So I copied what they did in Python and created a MapReduce emulator in R.
Continue reading

Digit Recognizer

I had actually worked on this interactive digit recognizer a while ago. I planned to make it more comprehensive, but will do that later. The basic premise is to have a canvas for the user to write a number between 0 to 9. Then run an algorithm to guess which digit was written. This is a very common problem and has been tackled thoroughly before (For examples, see post offices, license plate reading, Google books). In fact, current methods have over 99% accuracy (but significantly lower on noisy data) when dealing with various inputs. I started with the basics and have a few ideas of my own on where I want to use it next.
Continue reading

Charitable Giving Trends: Part 2

So far part 2 of this post (Charitable Giving Trends: Part 1), I’ll focus on the tools I used to create these charts. I’ll assume a working knowledge of HTML and CSS, and ignore those parts to get to the fun part of the code. I taught myself JavaScript over the last week or two, so I wouldn’t be surprised if there is ample room for improvement in the code. But I’ll explain everything as a newbie which hopefully will make it easier to follow (and less technical). I used various web resources, and will try to remember the ones I used to help out below.

Continue reading