Skip to content

Instantly share code, notes, and snippets.

View encse's full-sized avatar

Dávid Németh Cs. encse

View GitHub Profile
@encse
encse / xmas_puzzle.txt
Last active December 27, 2025 06:15
Xmas 2025 - a puzzle
# The elves have bolted two tiny monochrome status panels onto the front of
# Santa’s workshop router — one stacked above the other — to show diagnostics
# during sleigh-season load spikes.
# Unfortunately, the firmware team “optimized” everything into raw I2C traffic
# logs, and now the only way to see what the panels displayed is to replay the
# messages and reconstruct the pixels yourself.
# You’re given a transcript of I2C messages sent to both screens.
@encse
encse / iq_demod.py
Last active July 30, 2025 21:18
iq demodulation
import matplotlib.pyplot as plt
import numpy as np
from scipy import signal
# Source: https://github.com/guillaume-chevalier/filtering-stft-and-laplace-transform
def butter_lowpass_filter(data, cutoff_freq, sampling_freq, order=4):
nyq_freq = 0.5 * sampling_freq
normal_cutoff = float(cutoff_freq) / nyq_freq
b, a = signal.butter(order, normal_cutoff, btype='lowpass')