Justin Leung //home

I'm a Computer Science student at the University of Waterloo. I previously worked at Software Analysis and Intelligence Lab (SAIL), where I applied traditional machine learning techniques to provide insights to academic software engineering. I love programming unique and novel solutions to a variety of domains - take a look at the work and projects I've done throughout the years.

Work

  • Software Analysis and Intelligence Lab (Queen's University)

    Apr. ā€” Sept. 2020
    Research Intern

    Led project on data mining of Medium. Built a robust web crawler to mine a network of 6+ million articles totalling 109GB in size. Applied machine learning models (logistic regression, support vector machines) using Python (pandas and scikit-learn) to study 6 million Software Engineering articles. Implemented multiprocessing techniques to increase feature extraction performance by 8-fold. Wrote SQL queries on Google BigQuery to assess Medium's usage on Stack Overflow.

  • Software Analysis and Intelligence Lab (Queen's University)

    Jul. ā€” Oct. 2019
    Research Intern

    Used R and Python to preprocess and extract 100+ features from 19.3 million messages to study the Stack Overflow chat platform. Trained logistic regression models on 86K chat rooms, evaluated with established evaluation metrics such as AUC/ROC, AIC, Wald statistics.

Projects

I'm a maker at heart. Over the years, I've worked on a variety of projects in my spare time. Check out my Github to see more.

  • Paper Trader | Interactive Portfolio Simulator [demo] [code]

    A stock simulator made with PERN stack (PostgreSQL, Express, React, Node) + data visualizations with D3.js, with site deployed on Heroku. Trades and transactions are handled through REST APIs to the Node server, which send SQL queries to the Postgres DB. I also run a Python child process to fetch live stock data from Yahoo Finance, which is processed using Pandas.

    Keywords: fullstack, webdev, node.js, react.js, d3.js, pandas, sql, rest-apis

  • Universe Maker | Android App [demo] [code]

    A 2D universe simulation app which numerically solves a n-body system with Euler integration of gravitational forces. Features asteroids, planets, stars, black holes, white holes, AI satellites, and a player-controllable spaceship. Published on the Google Play Store.

    Keywords: java, android-studio, kotlin

  • Cellular Automata Explorer [demo] [code]

    A full-fledged cellular automata simulation built with React and styled with Bootstrap, complete with 28 rule variants, various customizable parameters, a time machine, 3D rendering using three.js with the option to download model as .obj, and live graphing of cell population with d3.js. Completed as part of the Harvard CS50X final project.

    Keywords: react, bootstrap, three.js, d3.js, webapp, p5.js

  • Turtl3D - Logo Programming Language Interpreter [code]

    An experimental C# lexer+parser+eval interpreter for a modified Logo programming language extended to 3D, with graphics with Unity 3D. The interpreter is comprised of three parts. The lexer takes in the raw text and generates tokens. These tokens are processed by a parser, which produces an abstract syntax tree (AST). The evaluator traverses this tree and executes each command to the turtle. Currently, the language supports looping, primitive commands (up, down, left, right, forward, backward), and (possibly recursive) functions.

    Keywords: c#, unity3D, interpreter, programming-languages

  • Emoji Ninja | P2P AI-Powered Fitness Webgame [demo] [code]

    A peer-to-peer kinect-like fitness game that requires only your webcam. Destroy and avoid the enemies, and move quickly within 60 seconds to win against your friends, while getting a workout! Frontend created using React app and Material-UI for styling. Websocket server run through Node.js (Express). Smooth video calling between two peers is achieved through simple-peer, a WebRTC Javascript library. Project deployed on Heroku. The game is built using p5.js, and I implemented a quadtree to improve collision detection time complexity to O(nlogn) from O(nĀ²).

    Keywords: javascript, node.js, react, express, p5.js, simple-peer, posenet

  • When Vaccine? | MERN stack webapp [demo] [code]

    Predict when you'll receive the COVID-19 vaccine in Ontario using a simple questionnaire and crowdsourced data. Created with a team of three other uWaterloo students for Hack the North 2021. Built with MERN (MongoDB, Express, React, Node.js) stack, with data visualizations using Chart.js.

    Keywords: mongodb, express, react, node.js, chart.js, javascript

  • Visoeis - Integer Sequence Visualization Dashboard [demo] [code]

    A React / d3.js webapp that visualizes 330,000+ integer sequences, scraping data from oeis.org. Contains interactive option to view in linear/logarithmic scale, search specific sequences in OEIS, view a curated list of interesting sequences, and browse random sequences.

    Keywords: react, javascript, d3.js, math

  • PixelPaper: Infinite Wallpaper Generator App [demo] [code]

    An app that generates essentially an infinite combination of patterned phone wallpapers using procedural generation techniques. Published on the Google Play Store.

    Keywords: java, android, procedural-generation, personalization

  • Druglike Molecule Generation with Variational Autoencoders [code]

    A variational autoencoder trained to generate unique druglike organic molecules using Tensorflow. I used a training set of 100K molecules, convnets for the encoder and GRUs for the decoder. I used RDKit to plot and verify generated molecules and used QED and SAS to quantify the druglikeness of a molecule.

    Keywords: python, tensorflow, keras, rdkit, deep-learning, chemistry

  • Magnetic Pendulum [code]

    A unique method of generating fractals by simulating the chaotic behaviour of a swinging pendulum that is attracted to various magnets on the board. The physics simulation using numerical integration of spring and magnetic forces (Hooke's Law and Coulomb's Law). The colour of the pixel depends on the magnet that the pendulum landed on starting at the pixel's location, and the brightness of the colour corresponds to how quickly it lands on that magnet (blacker corresponds to less time required).

    Keywords: python, numerical-integration, chaos-theory

  • Epicycle (Fourier Series) Simulator [demo] [code]

    A web implementation of epicycles (essentially a sum of sine and cosine waves) which is capable of generating beautiful flower-like shapes and approximating any function via Fourier series (e.g. the square wave shown). Epicycles are in your electronics (sort of), the classic Spirograph toys, and were the backbone of the geocentric model of the solar system.

    Keywords: javascript, p5.js, math

  • Snake Neural Network with Genetic Algorithms [code]

    A neural network built from scratch using Numpy matrices and trained to play Snake, generalizable to any game tile size. The neural network is trained using genetic algorithm concepts and techniques (tournament selection, random mutation, and fitness)

    Keywords: python, numpy, neural-network, genetic-algorithm

  • Cookie or Donut Neural Network [code]

    A vanilla neural network that classifies a doodle (a 256x256 grayscale bitmap) as a cookie, a donut, or neither. Trained using backpropagation algorithm on doodles from Google Quick, Draw! dataset (~1M images). Runs on Android. Neural network implemented from scratch using Numpy linear algebra module, weights transferred to a Java implementation of a prediction-only neural network I made using the ojAlgo library.

    Keywords: python, java, neural-network, multiclass-classification

  • DIY VR Styrofoam Headset [code]

    A VR headset built from scratch. Head tracking was done using the MPU-6050 gyroscope and accelerometer sensor (~$30), which is sent to the Arduino Micro and converted into mouse input. Fully compatible with all SteamVR games (I'm playing VRChat in the video). The headset display is my phone, which streams video from my desktop.

    Keywords: vr, arduino, c++, hardware, openvr, steamvr

  • Arduino Pen Plotter [code]

    A 2D printer that works on the size of a sticky note. The printer moves in the XY axis using the motors of old CD drives, and the pen is controlled with a servo motor. Supports printing any image up to a grand resolution of 64x64.

    Keywords: arduino, hardware, gcode

  • Mulander: A Lunar Lander Clone [code]

    A clone of the classic lunar lander game, where the objective is to safely land on landing zones while being mindful of speed, gravity, alignment, and fuel (it's harder than it looks!). Features an infinite landscape using the midpoint displacement algorithm. Made for my Grade 11 Computer Science final project, which I took in Grade 10.

    Keywords: actionscript, gamedev, lunar-lander

  • Procedural Landscapes [code]

    An implementation of the midpoint displacement algorithm, used to create random landscapes. Features vivid, randomized colours and starry skies to simulate the aesthetic of sci-fi planetscapes.

    Keywords: c++, sfml, midpoint-displacement

  • Pong Clone in C++ [code]

    My first project: a Pong clone implemented in C++ using the SFML graphics library. The ball speeds up every time it is hit, and the bounce angles were calculated using fancy trigonometry.

    Keywords: c++, gamedev, sfml