Skip to content

Instantly share code, notes, and snippets.

View thomasthaddeus's full-sized avatar
:dependabot:
Building things to make life easier

Thaddeus Thomas thomasthaddeus

:dependabot:
Building things to make life easier
View GitHub Profile
@thomasthaddeus
thomasthaddeus / contractions.json
Created January 6, 2024 13:15
Collection of useful lists
{
"are not": "aren't",
"cannot": "can't",
"could not": "couldn't",
"did not": "didn't",
"do not": "don't",
"does not": "doesn't",
"had not": "hadn't",
"have not": "haven't",
"he had": "he'd",
@thomasthaddeus
thomasthaddeus / create_animation.py
Last active February 3, 2024 13:37
This creates a program that uses pygame
"""create_intro_animation.py
This module provides functionalities to create a basic intro animation using
Pygame. It includes functions to initialize Pygame, load resources, apply text
effects, create frames, save frames, play sound, create a video from frames,
and a main function to orchestrate the creation of the intro animation.
"""
import os
import pygame
@thomasthaddeus
thomasthaddeus / PCA.ipynb
Last active May 31, 2024 03:36
PCA analysis in ML programs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thomasthaddeus
thomasthaddeus / README.md
Created June 2, 2024 07:08
This gist is here to answer a question from a user on reddit

Email Autoreply

Setup

By following these steps, you will have an email rule that moves emails containing "unfortunately" to a specific folder and marks them as read, along with sending an auto-reply of "k" to the sender.

Setting Up the Rule (for Outlook)

  1. Open Outlook and go to the Home tab.
  2. Click on Rules and then Manage Rules & Alerts.
@thomasthaddeus
thomasthaddeus / hashing_programatically.py
Created June 24, 2024 16:56
This is a quick implementation of how to get the hashes for everything in the HASHES list for all of the hashes types in the hashesTYPES
import hashlib
HASHES = ["BilboBaggins2012", "SamGamgee2013", "GandalfGrey2014"]
def print_hashes(data_list, hash_name):
hash_func = getattr(hashlib, hash_name)
digests = list(map(lambda data: hash_func(data.encode('utf-8')).hexdigest(), data_list))
print(f"\n{hash_name.upper()} Hashes:")
print("\n".join(f"{data}: {digest}" for data, digest in zip(data_list, digests)))
import plotly.graph_objects as go
import plotly.subplots as sp
# Example data
k_values = list(range(1, 11))
wss_values = [1000, 800, 650, 500, 450, 400, 350, 330, 320, 310] # Elbow plot data
silhouette_scores = [
0.1,
0.3,
0.45,