Skip to content

Instantly share code, notes, and snippets.

View CTimmerman's full-sized avatar

Cees Timmerman CTimmerman

View GitHub Profile
@CTimmerman
CTimmerman / Warhammer40k_notes.md
Last active November 30, 2024 13:36
Warhammer 40k notes

Craft

Buy

  • Prices keep rising due to the 350+ book lore and many games (e.g. Space Marine 2 - Doom with more brotherhood) being popular. Also shareholders and exec bonuses.
  • Bigger boxes have bigger value.
  • Terrain is easy to make.
  • Resale tends to go for 60%, but with shipping it might be cheaper to get the extra bits on sprue.
  • 400 USD can get you a Bambu A1 filament printer or supposedly more detailed but toxic Phrozen Sonic Mini 8KS resin printer.
  • Only 3rd party proxies are banned at official tournaments, so add the cost of 3D modeling, slicing, and safety gear if you opt for resin (which has to be 24-30 degre
@CTimmerman
CTimmerman / psd.ksy
Created June 9, 2024 10:20 — forked from ertaquo/psd.ksy
Photoshop format definition (incomplete) for Kaitai Struct
meta:
id: psd
file-extension: psd
endian: be
seq:
- id: file_header
type: file_header
- id: color_mode_data
type: color_mode_data
- id: image_resources
@CTimmerman
CTimmerman / FixRealtekPoppingSound.ps1
Created January 16, 2024 19:16 — forked from supermarsx/FixRealtekPoppingSound.ps1
Fix popping sound on some Realtek sound cards, realtek audio crackling patch
# Enable Realtek driver power management, this is the default value
REG ADD "HKCU\Software\Realtek\RAVCpl64\PowerMgnt" /v "Enabled" /t REG_DWORD /d 1 /f
# Disable Realtek driver power management, sometimes fixes realtek popping sound
REG ADD "HKCU\Software\Realtek\RAVCpl64\PowerMgnt" /v "Enabled" /t REG_DWORD /d 0 /f
# Replace XXXX with the corresponding key that has "Realtek" in the "DriverDesc", find using regedit
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\XXXX\PowerSettings" /v "IdlePowerState" /t REG_BINARY /d "ffffffff" /f
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\XXXX\PowerSettings" /v "PerformanceIdleTime" /t REG_BINARY /d "ffffffff" /f
# Example if class is in 0000
@CTimmerman
CTimmerman / epi_sir_basic.ipynb
Last active January 21, 2022 15:13 — forked from jph00/epi_sir_basic.ipynb
Basic SIR epidemic model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CTimmerman
CTimmerman / youtube-dl.py
Last active September 19, 2021 03:22
YouTube Stream Downloader
"""YouTube Stream Downloader
2021-08-16 v1.0 by Cees Timmerman
2021-09-18 v1.1 Better error handling. Revert to XML captions as conversion to SRT is broken in pytube 11.0.1 for https://www.youtube.com/watch?v=AOZw1tgD8dA
"""
import logging, os, re
import pytube
from pytube.cli import on_progress
@CTimmerman
CTimmerman / CollatzConjecture3n+1.py
Created July 31, 2021 10:15
Collatz conjecture
"""Collatz conjecture. Inspired by https://www.youtube.com/watch?v=094y1Z2wpJg
2021-07-31 by Cees Timmerman
"""
def collatz(n: int) -> int:
return 3*n+1 if n%2 else n//2
def collatz_count(start: int) -> int:
step = 0
while True:

Heat and power

I have district heating from a combined heat and power plant, which should be 80+% efficient. A solar air to water heat pump could be more efficient at 29% * usually 200% but sometimes 400% (For reference, traditional gas boilers only go up to 94%.) = 58% to 116%, the latter might require ground instead of air. CO2 is a relatively safe refrigerant.

According to ChatGPT: The efficiency of a typical modern steam turbine in a power plant is around 30-40%. Fuel cells can achieve efficiencies in the range of 40% to 60% or even higher for solid oxide fuel cells (SOFCs). Those and molten carbonate fuel cells (MCFCs) are used in combined hea

@CTimmerman
CTimmerman / based.py
Last active March 25, 2021 21:02
Convert floats to any base and back.
"""Converts floats to/from any base.
2021-03-25 v1.1 by Cees Timmerman"""
import math
NUMERALS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def numeral(i):
try:
@CTimmerman
CTimmerman / README-python-framework-benchmark.md
Created February 24, 2021 11:36 — forked from nhymxu/README-python-framework-benchmark.md
Flask vs Falcon vs FastAPI benchmark
gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker

Macbook Pro 2015 Python 3.7

Framework Server Req/s Max latency +/- Stdev
@CTimmerman
CTimmerman / Windows_sucks.md
Last active November 27, 2024 20:51
Windows sucks, too.

Windows sucks, too!

Audio

Apps