Skip to content

Instantly share code, notes, and snippets.

@TheDucker1
TheDucker1 / vid2gif.py
Last active July 3, 2024 16:53
call gifski library and ffmpeg with python (windows)
#requires:
# gifski: https://gif.ski/
# ffmpeg: https://ffmpeg.org/
import subprocess
import argparse
import ctypes
import os.path
#replace your path here
@TheDucker1
TheDucker1 / problems.txt
Created April 14, 2024 17:03
Kattis problem from cp4 book
#Retrieved from https://cpbook.net/methodstosolve
https://open.kattis.com/problems/addtwonumbers | 1.4a, I/O + Sequences Only
https://open.kattis.com/problems/aleidibio | 1.4a, I/O + Sequences Only
https://open.kattis.com/problems/ameriskur | 1.4a, I/O + Sequences Only
https://open.kattis.com/problems/betting | 1.4a, I/O + Sequences Only
https://open.kattis.com/problems/bitteeinbit | 1.4a, I/O + Sequences Only
https://open.kattis.com/problems/carrots | 1.4a, I/O + Sequences Only
https://open.kattis.com/problems/digitswap | 1.4a, I/O + Sequences Only
https://open.kattis.com/problems/echoechoecho | 1.4a, I/O + Sequences Only
https://open.kattis.com/problems/ekkidaudi | 1.4a, I/O + Sequences Only
@TheDucker1
TheDucker1 / chara.py
Last active September 19, 2021 08:42
unswizzled chara texture data in the game Yahari Game demo Ore no Seishun Love Come wa Machigatteiru.
#unswizzled texture data in the game Yahari Game demo Ore no Seishun Love Come wa Machigatteiru.
#for some reason the game didn't use the float encode for src_x and src_y like in https://github.com/AbsurdlySuspicious/sg-sprite/blob/master/lay-format.md
import cv2
import struct
import numpy as np
#i think the x and y use some mapping algorithm, but for now i will use a look up table
x_table = { #width = 2048 --> 64 x_chunks
0x3A000000: 0,