Skip to content

Instantly share code, notes, and snippets.

@GorgeousOne
GorgeousOne / logo_qr_code_generator.py
Last active February 14, 2024 19:06
GUI for creating QR codes with a logo in the middle
import tkinter as tk
from tkinter import filedialog
import qrcode
from qrcode import constants as qr_const
from PIL import Image, ImageTk
import re
class MyGUI:
@GorgeousOne
GorgeousOne / summaery_scrape.py
Created July 15, 2023 15:40
Summaery 2023 calender event scraper
"""visits the event list of the summaery 2023 and scrapes all events into one big icalendar file.
update the url and year in the future"""
from datetime import datetime
import pytz
from icalendar import Calendar, Event
from selenium.webdriver.common.by import By
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
@GorgeousOne
GorgeousOne / skysphere-to-skybox.py
Last active May 9, 2023 22:50
lazy python script to convert a skysphere images to 6 skybox images. probably can't smooth pixels from small images very well
import numpy as np
from PIL import Image
def raycast_box_imgs(sphere_img, new_img_size, out_dir):
"""renders and saves all 6 sides of the skybox"""
rays = create_rays(new_img_size)
rotations = {
"ft": np.eye(3),
"lt": rot_y_mat(-.5 * np.pi),
@GorgeousOne
GorgeousOne / TreeFeller.java
Created October 22, 2020 21:54
A small algorithm that tries to chop down trees whole but also to remove only few leaves from neabry trees. I like to use it for quickly editing forests for screenshots etc.
package me.gorgeousone.treexpert;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.data.type.Leaves;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.ItemStack;
@GorgeousOne
GorgeousOne / OrbitCamera.pde
Last active June 30, 2023 05:58
A blender like 3d orbiting camera for Processing. It enables rotation and movement in the scene with LMB and RMB
import java.awt.Toolkit;
/* Example Project
OrbitCamera cam;
void settings() {
size(1200, 800, P3D);
smooth();
}
void setup() {
cam = new OrbitCamera();