Skip to content

Instantly share code, notes, and snippets.

View mattiebw's full-sized avatar

Matt Ware mattiebw

View GitHub Profile
@mattiebw
mattiebw / CuteBot.py
Created September 10, 2024 16:45
Small python script to send telegram messages to people at an interval - for example, tell someone he's cute every single day >:(
from telethon import *
import asyncio
import json
import os
import time
import dataclasses
import sys
import datetime
from dataclasses import dataclass
@mattiebw
mattiebw / video_splitter.py
Created June 6, 2023 22:46
Quick python script to split up a video based on timestamps. Bodged at the moment, only supports writing it as audio
import os
from moviepy.editor import VideoFileClip
# Utility function to peek the next line of a file (read without incrementing line iterator)
def peek_line(f):
pos = f.tell()
line = f.readline()
f.seek(pos)
@mattiebw
mattiebw / Config.cs
Last active April 2, 2025 23:34
Basic attribute-based config system
using System.Reflection;
using System.Diagnostics;
using Tomlet;
using Tomlet.Models;
namespace Config;
public enum ConfigLogLevel
{
Info,
@mattiebw
mattiebw / words_filtered.txt
Created November 3, 2021 17:18
words_alpha.txt filtered through a spellchecker and sorted alphabetically
a
aardvark
aardvarks
ab
aba
aback
abacus
abacuses
abaddon
abaft
@mattiebw
mattiebw / filter_word_list.py
Last active November 3, 2021 17:16
Python script to filter a word list using pyspellchecker
import os
import sys
from spellchecker import SpellChecker
def get_int_input(prompt, error="Input must be an integer!"):
valid = False
while not valid:
try:
x = int(input(prompt))