Skip to content

Instantly share code, notes, and snippets.

@Chuzzy
Chuzzy / images_builder.py
Created November 23, 2024 11:05
Countdown timer
import subprocess
import glob, os
def seconds_to_formatted_time(seconds):
minutes = seconds // 60
seconds = seconds - (minutes * 60)
return f"{int(minutes)}:{seconds:05.2f}"
for minutes in range(2,5):
@Chuzzy
Chuzzy / rollDieRoutine.lua
Created January 27, 2021 16:40
Rolls a die in Tabletop Simulator by launching it across the table
function rollDieRoutine()
local twopi = 2 * math.pi
-- First, generate a random angle
local angle = math.random() * 2 * twopi
-- Calculate position based on the angle
local x = die_launch_radius * math.cos(angle)
local z = die_launch_radius * math.sin(angle)
@Chuzzy
Chuzzy / dictionary.lua
Created July 29, 2020 15:41
Scrabble dictionary as a Lua table
This file has been truncated, but you can view the full file.
dictionary = {AA="(Hawaiian) a volcanic rock consisting of angular blocks of lava with a very rough surface",
AAH="an interjection expressing surprise / to exclaim in surprise",
AAHED="AAH, to exclaim in surprise",
AAHING="AAH, to exclaim in surprise",
AAHS="AAH, to exclaim in surprise",
AAL="(Hindi) the Indian mulberry tree, aka noni",
AALII="(Hawaiian) a tropical tree",
AALIIS="AALII, (Hawaiian) a tropical tree",
AALS="AAL, (Hindi) the Indian mulberry tree, aka noni",
@Chuzzy
Chuzzy / ChessOpeningScraper.py
Last active October 18, 2017 20:04
Encyclopedia of Chess Openings, scraped from chessopenings.com
from bs4 import BeautifulSoup
import requests
import re
import time
# Create a list of all ECO codes
eco_codes = []
for letter in ["A", "B", "C", "D", "E"]:
eco_codes.extend([letter + str(number).zfill(2) for number in range(0, 100)])
[Event "Local Event"]
[Site "Local Site"]
[Date "2017.04.24"]
[Round "1"]
[White "PyChess.py"]
[Black "Stockfish 8 64"]
[Result "0-1"]
[TimeControl "300+0"]
[Time "23:58:00"]
[WhiteClock "0:02:38.099"]
''' <summary>
''' Represents the gender of a person.
''' </summary>
''' <remarks>Courtesy of https://ageofshitlords.com/list-of-all-tumblr-genders-so-far/ </remarks>
Public Enum Gender
'''<summary>
''' A gender which is profound, deep, and infinite.
'''</summary>
Abimegender
'''<summary>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SumOfDigitsSequence
{
class Program
{