Skip to content

Instantly share code, notes, and snippets.

View mweinelt's full-sized avatar
❄️

Martin Weinelt mweinelt

❄️
View GitHub Profile
Core was generated by `/nix/store/kl9jl9x0ldrr68pz6dc8xwvcmmf1wvdx-lix-2.94.0-pre20251020-dev_5346b2b/bin/nix-daemon --stdio'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
warning: 44 pthread_kill.c: No such file or directory
[Current thread is 1 (Thread 0x7fe95c06d140 (LWP 233920))]
(gdb) thread apply all bt full
Thread 17 (Thread 0x7fe9536d46c0 (LWP 233936)):
#0 0x00007fe95dfb8389 in __futex_abstimed_wait_common64 (private=0, futex_word=0x7fe95e4ce740 <mark_cv+32>, expected=0, op=393, abstime=0x0, cancel=true) at futex-internal.c:57
@mweinelt
mweinelt / scrape-prs.py
Created October 8, 2025 23:20 — forked from Mic92/scrape-prs.py
Scrape all nixpkgs pull requests
#!/usr/bin/env python3
import http.client
import json
import os
import time
import urllib.parse
import urllib.request
from pathlib import Path
from typing import Any
❯ nix fmt
INFO config: searching for tree root using tree-root-file: .git-blame-ignore-revs
INFO config: tree root: /home/hexa/git/nixos/python-updates
INFO formatter | keep-sorted: 1024 file(s) processed in 135.640148ms
INFO formatter | keep-sorted: 1024 file(s) processed in 141.894676ms
INFO formatter | keep-sorted: 1024 file(s) processed in 155.844334ms
INFO formatter | keep-sorted: 1024 file(s) processed in 136.154208ms
INFO formatter | keep-sorted: 1024 file(s) processed in 130.170439ms
INFO formatter | keep-sorted: 1024 file(s) processed in 152.565164ms
INFO formatter | keep-sorted: 1024 file(s) processed in 136.251439ms
@mweinelt
mweinelt / gist:75c5f47a2c14fd2c68709746444b6528
Created August 6, 2025 23:28
openai 1.99.1, inline-snapshot 0.25.0
pytest flags: -m pytest --ignore-glob=tests/api_resources -k not\ \(test_copy_build_request\)\ and\ not\ \(test_basic_attribute_access_works\)\ and\ not\ \(test_multi_byte_character_multiple_chunks\) -Wignore::DeprecationWarning --numprocesses=10
============================= test session starts ==============================
platform linux -- Python 3.13.5, pytest-8.4.1, pluggy-1.6.0
rootdir: /build/source
configfile: pyproject.toml
testpaths: tests
plugins: inline-snapshot-0.25.0, asyncio-0.26.0, mock-3.14.1, xdist-3.8.0, respx-0.22.0, anyio-4.10.0
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=session, asyncio_default_test_loop_scope=function
10 workers [462 items] 1m
...................................................F.E.F.E...F.E..F..E.. [ 14%]
@mweinelt
mweinelt / gist:4cd988122a3609f2f74b16c113c3a37b
Created June 24, 2025 23:33
pynndesecent, python 3.13, test failures
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
@mweinelt
mweinelt / doveconf.nix
Created May 27, 2025 11:45
Dovecot Config Rendering from Nix Attribute
let
pkgs = import <nixpkgs> { };
lib = pkgs.lib;
pr388463 = import (pkgs.fetchFromGitHub {
owner = "jappie3";
repo = "nixpkgs";
rev = "03a9aef5bf5584b96f6e9460861b97da8c546dfd";
hash = "sha256-/2SZpYuRbpNaM84MNstorwSYgrobXp4sGK5O/8TU9As=";
django-crispy-bootstrap3> ____________________ test_form_show_errors_non_field_errors ____________________
django-crispy-bootstrap3>
django-crispy-bootstrap3> @pytest.mark.skipif(
django-crispy-bootstrap3> __version__[0] == "1", reason='#1262 fixed required attributes and empty for="".'
django-crispy-bootstrap3> )
django-crispy-bootstrap3> @override_settings(CRISPY_CLASS_CONVERTERS=CONVERTERS)
django-crispy-bootstrap3> def test_form_show_errors_non_field_errors():
django-crispy-bootstrap3> form = SampleForm({"password1": "wargame", "password2": "god"})
django-crispy-bootstrap3> form.helper = FormHelper()
django-crispy-bootstrap3> form.helper.form_show_errors = True
diff --git a/custom_components/calendar_export/api.py b/custom_components/calendar_export/api.py
index e42a23c..21a941d 100644
--- a/custom_components/calendar_export/api.py
+++ b/custom_components/calendar_export/api.py
@@ -1,6 +1,7 @@
"""API for calendar export."""
from datetime import datetime, timedelta
+from hashlib import sha256
from http import HTTPStatus
@mweinelt
mweinelt / gist:0ea6b98b7ea0af9b38c73b88a102051d
Created March 7, 2025 11:22
Count commits/committers between nixos releases
# commit count measured from branch-off of the previous release to the final release of the new release
function count_commits() {
OLD="$1"
NEW="$2"
git log "${OLD}-beta..${NEW}" --no-merges --format=%an | wc -l
}
count_commits 19.09 20.03
count_commits 20.03 20.09
copying path '/nix/store/4zi1rifwl450yfwm9kigpd7y2w1hdr37-source' from 'https://cache.nixos.org'...
copying path '/nix/store/kannwnws02w1dvzafvfpagajaqb7haqq-python3.12-pytest-asyncio-0.25.2' from 'https://cache.nixos.org'...
copying path '/nix/store/w7vzs90i31gd4kg5vm2lx27yx8r24bjg-python3.12-poetry-core-2.0.1' from 'https://cache.nixos.org'...
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook