Skip to content

Instantly share code, notes, and snippets.

View Teinc3's full-sized avatar
Certified Wheelchair Moment

Teinc3 Teinc3

Certified Wheelchair Moment
View GitHub Profile
@Teinc3
Teinc3 / ptblender.md
Last active March 16, 2024 16:19
ProTanki thumbnail blender

ProTanki Thumbnail Blender

Usage

$ python ptblender.py <colored_image_path> <alpha_image_path> <output_image_path>

External Dependencies

  • Pillow
@Teinc3
Teinc3 / optimalbloxx.cpp
Created August 2, 2024 17:06
A simple program to obtain an optimal city layout for City Bloxx.
#include <iostream>
#include <queue>
#include <array>
#include <set>
#include <vector>
#include <algorithm>
#include <initializer_list>
constexpr int GRID_LENGTH = 5;
constexpr int GRID_SIZE = GRID_LENGTH * GRID_LENGTH;
import os
import pdfplumber
from reportlab.pdfgen import canvas
import shutil
# Check if "io" folder exists
if not os.path.exists("io"):
os.makedirs("io")
print("The 'io' directory has been created. Please place your input PDF file in the 'io' directory and run the program again.")
exit()
@Teinc3
Teinc3 / message_forwarder.py
Created April 12, 2025 08:41
Discord Message Logging Utility Class Using Message Forwarding Feature (Requires discord.py >= 2.5)
import asyncio
from datetime import datetime
from discord import Member, User, Message, TextChannel, Thread, Embed, Color, HTTPException
from typing import TypedDict
class MessageInfo(TypedDict):
forwarded_msg: Message
author: Member | User
timestamp: datetime
/** Currency Converter App script for estimating travel finances on Google Sheets */
const rates = {
"E": 9.1,
"M": 0.77,
"G": 10.56,
"H": 1,
"U": 7.8,
"L": 2.89,
"B": 4.65