Coding Projects

Please note that academic integrity guidelines prohibit me from publicly sharing code for school projects
Please contact me at psmit703@outlook.com to request a private copy
Additionally, some projects may not have any available code
Static Site Generator (Python, HTML, JSON)(Mar 2024 - Present)

This is a static website generator written in Python. The goal of the project is to create a tool that allows me to easily update my portfolio website as needed in an algorithmic way.

The program takes in a JSON object and a template HTML page; the JSON object contains all of the customizable information necessary to build each page of the site, and the program uses that data to populate specified fields in the template. The JSON is structured in a way that allows me to easily update both individual pages and the entire site structure without having to worry about manually (and accurately) updating the navbar in every HTML file or other similar things.

This project was originally inspired by Hakyll, ( https://jaspervdj.be/hakyll/ ) a tool that uses Haskell to generate static sites. (Although, without having actually used Hakyll, I imagine it is much more robust than my project.) I have much less experience using Haskell, however, and in fact I originally attempted to make this using OCaml, but I felt that the functional side of things was getting a little too far away from me. While I love functional programming, sometimes I just want to use Python because of how intuitive it is.

GitHub Repo
Comet Observations (Python, SQL)(Apr 2024 - Apr 2024)

Modified a script for the NASA Planetary Data System Small Bodies Node at the University of Maryland that determines "single" observations of a comet from an observatory.

The original script was created by Nikki Tjiputra for the Small Bodies Node. It uses data from SBN's local PostgreSQL database and, based on time elapsed between observations of a single object, determines whether or not those groupings of observations should be considered one single observation. This was originally only done for observatory C51-NEOWISE.

My task was to generalize the script to do the same thing for every observatory separately. Due to the way data is represented in SBN's database, this required many modifications in order to process the data correctly while maintaining differences between observatories. Given the much larger amount of data being processed, I also had to make numerous optimizations to the added code to ensure that the script completes in a reasonable amount of time.

This project is associated with the NASA Planetary Data System Small Bodies Node at the University of Maryland.

(Code currently unavailable)
MiniDafny - Verification Conditions (Haskell, Dafny)(Apr 2024)

Implemented verification conditions for MiniDafny, a subset of Dafny as defined by course faculty. This primarily involved creating functions that compute weakest preconditions based on Hoare Logic. The project implements this through substitution and recursion as determined by Hoare Logic and based on parsed MiniDafny input and goes on to implement verification conditions for while loops, blocks, and methods, and is compatible with MiniDafny's pre-conditions, post-conditions, and loop invariants.

This project is associated with CMSC433: Programming Language Technologies and Paradigms at the University of Maryland.

Contact for access to code
MiniDafny - Parsing (Haskell, Dafny)(Apr 2024)

Implemented parsing for MiniDafny, a subset of Dafny as defined by course faculty. This complements the previous project, MiniDafny - Printing, and is designed in a way that allows outputs from this project to easily be passed in as inputs to the previous project. This project implemented a slightly modified grammar from the previous project and is able to handle MiniDafny code in a similar way, albeit reverse, way.

This project is associated with CMSC433: Programming Language Technologies and Paradigms at the University of Maryland.

Contact for access to code
Life Expectancy Data Processing (Python)(Apr 2024)

This project uses a TSV (tab seperated value) file as its input. It processes the table, which contains information on life expectancy with respect to country, continent, year, population, and per capita GDP. I used several different ways of visualizing this data, notably scatter plots, violin plots, and regression lines. These were all useful in showing different interpretations of the given data and allowed me to better complete the overall goal of the project, which was to show to what extent life expectancy, country, continent, year, population, and per capita GDP are correlated and to determine potential insights from that.

This project is associated with CMSC320: Introduction to Data Science at the University of Maryland.

Contact for access to code
Comet Numbering Automation (Python)(Jan 2024 - Apr 2024)

Created a script for the NASA Planetary Data System Small Bodies Node at the University of Maryland that converts from the "new" IAU comet designation system to the "old" IAU comet designation system.

The script uses Central Bureau Electronic Telegrams (CBETs) in order to obtain the necessary data. The CBETs were downloaded automatically by an existing IDL script provided by the project leader and subsequently parsed by this Python script.

The script iterates through each CBET and looks for specific words or combinations of words in order to determine the relevancy of each file. Then, based on relevancy, it parses each CBET for various orbital element information that is then used to determine whether a comet should be listed as periodic or not and to propose what name should be given to that comet under the old designation system's rules.

This script serves to automate part of the process of converting designations; while making the process fully automatic would likely be impossible, the upcoming first lights of the Vera C. Rubin Observatory and NEO Surveyor are expected to result in an influx of comet discoveries that will make this process overwhelmingly difficult to continue doing entirely manually. This script will automate a significant part of this work in order to make the rest of the process manageable for one person to continue to do. This project will allow researchers to continue to cross-reference comet names between the new and old systems well into the future.

This project is associated with the NASA Planetary Data System Small Bodies Node at the University of Maryland.

(Code currently unavailable)
MiniDafny - Printing (Haskell, Dafny)(Mar 2024)

Implemented pretty printing for MiniDafny, a subset of Dafny as defined by course faculty. This involved implementing numerous functions that input parsed Dafny code and output Dafny code as it would be written by a programmer. With larger pieces of grammar such as Dafny methods, this became increasingly complicated due to the increasing number of cases that had to be accounted for.

This project is associated with CMSC433: Programming Language Technologies and Paradigms at the University of Maryland.

Contact for access to code
Haskell Basics (Haskell)(Mar 2024)

Implemented numerous functions in Dafny, making use of the language's syntax for runtime verification. This involved writing function pre- and post-conditions and loop invariants that allowed Dafny to properly use its runtime verification tools.

This project is associated with CMSC433: Programming Language Technologies and Paradigms at the University of Maryland.

Contact for access to code
Moneyball Data Processing (Python)(Mar 2024)

Used SQLite to process data from Sean Lahman's baseball database. After processing and cleaning data, I created numerous graphs that visualized statistics such as payroll over time, spread in payroll over time, and winning percentage over payroll. It also involved displaying regression lines. All of this was done in an attempt to show to what extent Billy Beane's "moneyball" strategy with the Oakland Athletics was effective.

This project is associated with CMSC320: Introduction to Data Science at the University of Maryland.

Contact for access to code
Dafny Verification (Dafny)(Feb 2024)

Implemented numerous functions in Dafny, making use of the language's syntax for runtime verification. This involved writing function pre- and post-conditions and loop invariants that allowed Dafny to properly use its runtime verification tools.

This project is associated with CMSC433: Programming Language Technologies and Paradigms at the University of Maryland.

Contact for access to code
Solar Flare Data Processing (Python)(Feb 2024)

Processed, visualized, and interpreted solar flare data. This project firstly involved downloading solar flare data via a webdriver and extensively sanitizing bad data. It then created and displayed four graphs. The first two were scatter plots, showing starting frequency over time and ending frequency over time, respectively. The third plot was a bar plot and showed all four combinations of the number of solar flares with halos and the top fifty solar flares. The fourth plot showed the number of strong and weak solar flares over time in an attempt to establish whether or not they formed a pattern.

This project is associated with CMSC320: Introduction to Data Science at the University of Maryland.

Contact for access to code
Comet Discovery Verification (Python, SQL)(Dec 2023 - Feb 2024)

Created a script for the NASA Planetary Data System Small Bodies Node at the University of Maryland that verifies data and finds inconsistencies in existing databases regarding the way comet observations are recorded.

For numerous reasons, comet discovery observations have not always been historically been recorded as discoveries. This script interacts with SBN's local PostgreSQL database and with the Minor Planet Center's comet orbital elements table in order to find these discrepancies. It outputs the results to four different text files based on how exactly the observations are recorded internally.

This project is associated with the NASA Planetary Data System Small Bodies Node at the University of Maryland.

(Code currently unavailable)
Minecraft (Java Edition) Auto Backups (Python)(Jan 2024)

This is a utility for automatically creating backups of various Minecraft data. It reads in user-specified configuration data that determines which data to back up and has options to automatically delete old backups and display a GUI upon completion.

This program is designed to be used in conjunction with automation tools such as Windows Task Scheduler.

GitHub Repo
This website! (HTML, CSS, JavaScript)(Jun 2023 - Dec 2023)

My personal website! Yay! This is a static site hosted by GitHub Pages. In addition to the standard HTML, CSS, and JavaScript, it makes use of Bootstrap along with custom CSS for stylization and JavaScript for various functionalities such as displaying a random image on the home page, toggleable dark mode, and navigation bar animations. The site uses structured data (Schema.org / JSON-LD) to better interact with search engines and incorporates Plausible Analytics and Clicky Website Analytics, which are both privacy-friendly alternatives to Google Analytics, to track viewing statistics. It also makes use of GitHub's REST API to display a recent changelog on the site itself.

GitHub Repo
CMSC430 Final Project: Multiple Return Values (Racket, x86)(Dec 2023)

This is the final project for CMSC430: Introduction to Compilers. The project extends on cumulative knowledge and experience from the entire semester. Through considering material from each of the previous projects, Racket's multiple return values feature, specifically the "values" and "let-values" expressions, were implemented.

This project is associated with CMSC430: Introduction to Compilers at the University of Maryland.

Contact for access to code
Comet Statistics (HTML, CSS, JavaScript, Python, SQL)(Jun 2023 - Dec 2023)

Created a comet statistic site for the NASA Planetary Data System Small Bodies Node at the University of Maryland. The site's frontend uses Plotly.js to render comet discovery, orbital element, and unique object observation statistics in graph form in real-time in the user's browser. The site also includes an option for the user to input an observatory code(s) to see statistics from a specific observatory for unique object observations, however this is not currently possible for discovery or orbital element statistics due to discrepancies in the data from one of our sources.

The site's backend uses a Python script to pull data from the local PostgreSQL database and multiple external databases using a PostgreSQL Python library and HTTP requests, respectively. The script then processes the data while accounting for numerous inconsistencies in the way comet data has historically been recorded. Error checking is used where appropriate in order to resolve any issues in the data or, if necessary, to make a graceful exit.

On November 8, 2023, I presented the site as a contributed talk at the thirty-third annual ADASS conference.

This project is associated with the NASA Planetary Data System Small Bodies Node at the University of Maryland.

Site Link (Code currently unavailable) Associated conference paper
Squid Games (Racket)(Nov 2023)

This project extends on the knowledge of the previous project, Fraud Plus. For Squid Games, we had to write a Racket program that breaks all of the compilers that were submitted for Fraud Plus, while at the same time working on the reference machine.

This project is associated with CMSC430: Introduction to Compilers at the University of Maryland.

Contact for access to code
Fraud Plus: Interpreter and Compiler (Racket, x86)(Oct 2023 - Nov 2023)

Fraud Plus is an extension of Fraud, a programming language created by the CMSC430 course faculty. Fraud was discussed in lecture, and Fraud Plus is an extension of it; both Fraud and Fraud Plus are subsets of Racket, which the project was implemented in.

This project dealt heavily with the notion of compile-time environments and variable scoping. In order to implement the differences between Racket's "let" and "let*" expressions, specific attention had to be given to proper use of the stack in order to avoid any memory-related issues and to ensure consistency of features with Racket's implementations. Careful attention also had to be given to stack discipline regarding other parts of the project; to avoid being overwritten, values were often placed in the stack. Additionally, features implemented in "Dupe Plus" (a previously-completed project in CMSC430) had to be altered in order to work with these new environments.

This project is associated with CMSC430: Introduction to Compilers at the University of Maryland.

Contact for access to code
Dupe Plus: Parser, Interpreter, and Compiler (Racket, x86)(Sep 2023 - Oct 2023)

Dupe Plus is an extension of Dupe, a programming language created by the CMSC430 course faculty. Dupe was discussed in lecture, and Dupe Plus is an extension of it; both Dupe and Dupe Plus are subsets of Racket, which the project was implemented in.

The project involved an extensive use of pattern matching to allow for parsing, interpreting, and compiling code such as "cond" and "case" (with slightly different behaviors from Racket, as outlined by course faculty) which each allow for an arbitrary number of clauses. Parsed code was compiled into a86, a subset of Intel's x86 assembly language, as defined by course faculty.

This project is associated with CMSC430: Introduction to Compilers at the University of Maryland.

Contact for access to code
Intro to Racket (Racket)(Sep 2023)

This is a collection of short Racket functions intended to familiarize programmers with the language. It makes significant use of features such as pattern matching and recursion, along with concepts such as lambda calculus.

This project is associated with CMSC430: Introduction to Compilers at the University of Maryland.

Contact for access to code
Bloom Filter (Python)(May 2023)

Implemented insert, hash, rebuild, and search functions for a Bloom Filter. Allows for arbitrary bit array length, number of hash functions, and max false-positive probability. Automatically rebuilds the Bloom Filter when the false-positive probability is greater than the threshold as determined by a simplified, approximate probability formula.

This project is associated with CMSC420: Advanced Data Structures at the University of Maryland.

Contact for access to code
Ghostbusters/Inference (Python)(May 2023)

Implemented several functions relating to Bayes' Nets for a Ghostbusters-themed Pacman game. Functions included calculating probabilities based on given data, updating belief distributions based on different conditions, particle filters, and joint distributions.

This project is associated with CMSC421: Introduction to Artificial Intelligence at the University of Maryland and is from UC Berkeley's CS188: Introduction to Artificial Intelligence.

Contact for access to code
Reinforcement Learning (Python)(Mar 2023 - Apr 2023)

Implemented reinforcement learning algorithms. Included value iteration, asynchronous value iteration, prioritized sweeping value iteration, q-learning, epsilon-greedy action selection, and approximate q-learning. Also specified discount, noise, and living reward values along with epsilon and learning rate values to create effective policies for several predetermined grid worlds that each utilized different reinforcement learning algorithms.

This project is associated with CMSC421: Introduction to Artificial Intelligence at the University of Maryland and is from UC Berkeley's CS188: Introduction to Artificial Intelligence.

Contact for access to code
AVL Tree (Python)(Feb 2023 - Mar 2023)

Implemented insertion, bulk delete, and search functions for an AVL Tree. Insertion included recursively checking balance factors and left- or right-rotating where needed. Bulk delete included inorder traversal, deletion, and reinsertion per project guidelines. Search combined binary search and recursive backtracking to return a path-value tuple.

This project is associated with CMSC420: Advanced Data Structures at the University of Maryland.

Contact for access to code
DFS, BFS, UCS, and A* Search (Python)(Feb 2023)

Implemented Depth-First, Breadth-First, Uniform Cost, and A* Search algorithms for a predesigned, non-adversarial Pacman simulation. Also designed heuristic functions for specific problems.

This project is associated with CMSC421: Introduction to Artificial Intelligence at the University of Maryland and is from UC Berkeley's CS188: Introduction to Artificial Intelligence.

Contact for access to code
"MicrOCaml" Lexer, Parser, and Interpreter (OCaml)(Nov 2022)

Implemented a lexer, recursive descent parser, and interpreter for "MicrOCaml", a simplified version of OCaml defined by course faculty. Also implemented MicrOCaml's REPL, "mutop". This project makes significant use of pattern matching and recursion.

This project is associated with CMSC330: Organization of Programming Languages at the University of Maryland.

Contact for access to code