A collection of coding projects, snippets, and classwork

 

I have been coding on and off for 6 years now, with expertise in Python, C-based languages, Node, React, HTML/CSS/JS stack, Django, SQL, and Bash. I am also interested in learning new languages and their applications due to the fast-paced nature of the tech-industry. On this page I highlight some of my favorite programs that I’ve worked on over the years.

AirTracker

On the left side is a test run of my text-based flight tracker AirTracker using the OpenSky Python API. My program allows users to add currently flying planes to a list, check whether flights are flying over a desired country, and determine the dist…

On the left side is a test run of my text-based flight tracker AirTracker using the OpenSky Python API. My program allows users to add currently flying planes to a list, check whether flights are flying over a desired country, and determine the distance between two planes. There are some input inconsistencies visible within the demo as seen by my program not catching the user testing if USA is a country, as the full package is still under construction. The test run highlights the use of bounding boxes to check whether current flights are within a country’s given bounding box. A more sophisticated version of this program will involve adding more points to this bounding box, along with a 3D visualization tool that allows users to see planes flying over a 3D model of Earth. A fun part of this project was learning about distances of objects located on a sphere, as I implemented this equation to find the spherical distance between two given planes.

 
Screen Shot 2019-11-30 at 3.09.38 PM.png

Haversine Formula

This is my implementation of the Haversine Formula within the AirTracker program. Below you can see the formula I used from Wikipedia.

Automated Chess Project

If you’ve seen my Assorted Classwork Page, you’ll find the mechanical engineering side of the Automated Chess Board Project. This is a small display of the code that first allows users to play text-based chess that I implemented, with another progra…

If you’ve seen my Assorted Classwork Page, you’ll find the mechanical engineering side of the Automated Chess Board Project. This is a small display of the code that first allows users to play text-based chess that I implemented, with another program that takes the game as input and outputs byte-code to a Raspberry Pi in order to correctly move the queried pieces. The current status of my implementation is close to the correct version of chess, but currently my version is missing some mate criteria, as well as the ability to tie a game.

 

File Hierarchy:

chess_board.py -- populates a new board
player.py -- class for one player
piece_rules.py -- movement rules for each piece
directional_output.py -- implementations of valid diagonal and
                         row/column based movement over an 8x8 board
in_check.py -- Implementation to test whether the king is in check
chess_game.py -- Main program wrapper. Uses all the above python
                 scripts to run a game of text-based chess.
 

A Sample Text File holding Chess Data:

Screen Shot 2019-11-30 at 3.51.02 PM.png

I have been working on trying to incorporate my text-based chess program to work alongside my Raspberry Pi (using its 4 cores to multithread movement of motors and running the chess game simultaneously). Below you can find a sample text file used to convert the ASCII text to Arduino-readable data.

 

Converting the Text File:

Screen Shot 2019-11-30 at 3.51.25 PM.png

PolyHack 2019

At PolyHack 2019, my friend, Jamie Weiss, and I both worked on a very ambitious project. “Not My Finder” is an upcoming project that will attempt to 3D visualize an entire file system. We hope that Not My Finder can become an add-on for Terminal and…

At PolyHack 2019, my friend, Jamie Weiss, and I both worked on a very ambitious project. “Not My Finder” is an upcoming project that will attempt to 3D visualize an entire file system. We hope that Not My Finder can become an add-on for Terminal and Command Prompt, acting as a visual HUD for users to interact with as they work in their respective shells. During the hackathon, we tried to come up with valid test data using multiple different file systems (we used a Kali Linux VM directory tree, along with both of our Macs’ directories), used Plotly’s 3D ScatterPlot library, and built a small clustering algorithm that grouped files based on metrics that we believed could signify user activity.

A simple ls command that outputs all subdirectories and files from a desired location:

Screen Shot 2019-11-30 at 4.15.00 PM.png
 

Our first goal was to extract data from our computers’ directories and convert the information into a .csv file that can be interpreted by our clustering script. A piece of the conversion code is shown below:

The final step was to use Plotly to create .html files of our 3D visualization. Here’s the final result given a directory size of around 5,000 files:

A Sample Terminal Output from running a shell script:

.:
total 204
drwxr-xr-x 24 root root  4096 Oct 12 13:55 .
drwxr-xr-x 19 root root  4096 Oct 11 21:15 ..
-rw-r--r--  1 root root   808 Jul 23 17:52 arp:oneway
-rw-r--r--  1 root root   834 Jul 23 17:49 arp:remote
-rw-------  1 root root 22696 Oct 12 04:45 .bash_history
-rw-r--r--  1 root root  3391 May  8 04:20 .bashrc
drwx------  4 root root  4096 Jul 24 15:46 .BurpSuite
drwx------ 13 root root  4096 Aug 12 18:36 .cache

./.BurpSuite:
total 28
drwx------  4 root root 4096 Jul 24 15:46 .
drwxr-xr-x 24 root root 4096 Oct 12 13:55 ..
drwxr-xr-x  3 root root 4096 Jul 24 15:46 burpbrowser
drwxr-xr-x  2 root root 4096 Jul 24 15:46 ConfigLibrary
-rw-------  1 root root 8803 Jul 24 16:00 UserConfigCommunity.json

Converting the output to a .csv file:

Screen Shot 2019-11-30 at 4.22.49 PM.png
 

After the .csv conversion, we used the data to run a K-means algorithm with date modified, file size, and other metrics to cluster our data:

Screen Shot 2019-11-30 at 4.29.55 PM.png
Previous
Previous

Blender 2.8 Projects

Next
Next

Assorted Classwork