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
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
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:
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:
PolyHack 2019
A simple ls command that outputs all subdirectories and files from a desired location:
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:
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: