Everything interesting that have done in Python. Python is my programming language of choice, so any idea for a game or if I find something interesting in mathematics that I want to code, I do in Python.
- Linear Algebra (see README in that directory for more details)
- Prime checker and Prime list generator
- Fibonacci sequence generator
- GCD calculator
- Convert a number in base 10 to binary
- Using the "repeated squares" method to calculate the a^b (mod n) of large numebrs
- Checking if a number is a perfect square without a sqrt function
I have code many sorting algorithms in C, which are avaiable in the repository labeled C. Using NumPy and MatPlotLib, I have animated a subset of these sorting algorithms. I have animated
- Bubble Sort
- Cocktail Sort
- Insertion Sort
- Selection Sort
- Slow Sort
- Merge Sort
- Heap Sort
- Quick Sort
- Radix Sort
TSP stands for "Traveling Salesman Problem". It is a famous problem in graph theory, which asks how to efficiently find the shortest path between two nodes in a graph. In this directory I have included my implementation of a graph in Python as well as the following solutions to the TSP
- Nearest Neighbor
- Dijkstra
Games are always fun things to code in your free time. I have coded the following games.
Turtle is a crude drawing tool in Python. I have coded a few things using it just for fun. I enjoy the intellectual excercise of figuring out the geometry to make everything connect. There is not much useful about any of this code however.
There are many things that just require memorizing the syntax of the programming language in order to do.
- Reading files
- Writing files
- Getting arguments from the terminal
- Sorting a CSV file
- Parallel processing
- Timing code
- HTTP requests
- Writing to a mysql database
I have implemented many data structures in C, which are available in the repository labeled C. I have coded a subset of them in python as well.
- Stack
- Queue
- Heap
- Graph
- General Tree
- Binary Tree
- General Search Tree
- Encryption
- Solution to Optimal Scheduling Problem
Python has lambda notation for list generation, which can be very useful and the purpose is to make code more concise and readable. However, I think some people tend to over-use this notation in complicated ways sacraficing readability for brevity. I generally value readability of code, so I would never actually use these one-liners. However, I do enjoy the intellectual excercise of trying to figure out how to make them.