Things ive coded! Github here!
Spotify Stats Calculator

What does the code do?

This Python script is designed to analyze a user's Spotify streaming history. It scans the user's Downloads folder for a file named "my_spotify_data.zip", extracts it, and then reads the JSON files within it to gather data about the user's listening habits.

Step-by-step breakdown:

  1. The script first asks for the user's permission to scan their Downloads folder.
  2. It then scans the specified directories (in this case, the Downloads folder) and counts the total number of files in each directory.
  3. The script searches for a file named "my_spotify_data.zip" in the directories. If found, it extracts the zip file.
  4. The script then reads all the JSON files in the directories that match the pattern 'Streaming_History_Audio_*.json'.
  5. The data from these JSON files is read into a pandas DataFrame, which is a 2-dimensional labeled data structure with columns of potentially different types.
  6. The script then performs various calculations on the DataFrame to gather statistics about the user's listening habits, such as total streams, total minutes streamed, total hours streamed, different tracks, and different artists.
  7. It also calculates the top 10 most streamed artists and tracks.
  8. Finally, the script writes these statistics to a text file named 'Stats.txt'.

Pylint Ratings

Created - February 27, 2024

Commits - 141 Commits (+ 3)

Last updated - April 8, 2024

Apple Music Stats Calculator

What does the code do?

This Python script is used to analyze the user's Apple Music listening history. It first locates the "Apple Music - Play History Daily Tracks.csv" file in the user's Downloads folder. If the file is not found, it prompts the user to place the file in the correct location and re-run the script.

Step-by-step breakdown:

  1. The script iterates over each row in the DataFrame, extracting the main artist from the 'Track Description' column and calculating the play duration in minutes. These values are then added to new columns in the DataFrame.
  2. The script groups the DataFrame by artist and track, calculating the total play duration in minutes for each. It then sorts these groups and selects the top 50 artists and tracks.
  3. It calculates some overall statistics, such as total streams, total minutes streamed, total hours streamed, number of different tracks, and number of different artists. The script then prints out the top 10 most streamed artists and tracks.
  4. The user is given the option to customize the output file, Stats.txt. They can choose how many artists and songs to include in the file.
  5. The script writes the statistics, top artists, and top tracks to the Stats.txt file. For each artist, it also includes the first date they were listened to, the first song streamed, the total listening time, and the most streamed song. For each track, it includes the total listening time and the first date it was listened to.
  6. Finally, the script prints out the location of the Stats.txt file and what it contains.

Pylint Rating

pylint rated my code a 7.45/10

Created - February 22, 2024

Commits - 78 Commits (+ 1)

Last updated - May 2, 2024

Google Wifi Bypass

What does the code do?

This Python script exploits a vulnerability within the pausing system which calls administrative devices starting with the "DE" Mac Address of Google Wifi routers. It automates the process of bypassing the pause feature with minimal human interaction required. The script changes the Network Address of the network interface, which effectively bypasses the pause feature of Google Wifi routers.

Step-by-step breakdown:

  1. The script first checks if it's running with administrative privileges. If not, it attempts to run itself as an administrator.
  2. It retrieves the transport names (identifiers for network interfaces) from the system.
  3. The user is prompted to select a transport name from the list provided.
  4. The script searches the Windows Registry for instances of the selected transport name.
  5. For each instance found, it checks if a Network Address is already set. If not, the user is prompted to create one. If a Network Address is already set, the user is given the option to change it.
  6. The Network Address is a 12-character hexadecimal value (starting with DE to abusing the exploit). The script generates a random Network Address and sets it in the Registry.
  7. Finally, the user is instructed to restart their computer for the changes to take effect.

Additional Information:

The script only works for Google Wifi routers and has only been tested on Wifi connections. It may or may not work on Ethernet connections. If the Wifi gets paused again, the user will need to re-run the program to bypass the pause feature again.

Pylint Ratings

pylint rated my code a 7.69/10

Created - Dec 9, 2023

Commits - 44 Commits (+ 10)

Last updated - May 20, 2024