Skip to content

Instantly share code, notes, and snippets.

@lupko
lupko / result
Created April 26, 2024 11:48
urllib / ada_url bench
pip install pytest pytest-benchmark
pytest test.py
@lupko
lupko / gist:c4491df7a36247b48ba0248c2d5f9ae6
Created February 8, 2024 18:41
GeneratorStream & Acero deadlock
Thread 85 (Thread 0x7f67519fe6c0 (LWP 1204905) "python3.11"):
#0 0x00007f679a2a9169 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x7f67519fd3a0, op=137, expected=0, futex_word=0x7f679a8e7d50 <_PyRuntime+432>) at futex-internal.c:57
#1 __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7f679a8e7d50 <_PyRuntime+432>, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x7f67519fd3a0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2 0x00007f679a2a91ef in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f679a8e7d50 <_PyRuntime+432>, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x7f67519fd3a0, private=private@entry=0) at futex-internal.c:139
#3 0x00007f679a2abe72 in __pthread_cond_wait_common (abstime=0x7f67519fd3a0, clockid=1, mutex=0x7f679a2ab830 <__condvar_cleanup_waiting>, cond=0x7f679a8e7d28 <_PyRuntime+392>) at pthread_cond_wait.c:503
#4 ___pthread_cond_timedwait64 (cond=c
@lupko
lupko / gist:8b6f165a6574ef830c531c8056b20957
Last active February 7, 2024 15:45
Flight RPC + ADBC crash
import pyarrow.flight
import adbc_driver_postgresql.dbapi
_USERNAME = ".."
_PASSWORD = ".."
_DATABASE = ".."
_INIT = [
"DROP TABLE numeric_test;",
@lupko
lupko / gist:336da65b37aade5dc2433004e2720d8e
Last active January 31, 2024 18:36
NUMERIC values are corrupted in results
import adbc_driver_postgresql.dbapi
_USERNAME = "..."
_PASSWORD = "..."
_DATABASE = "..."
# tried values from 0 to 15. summary:
#
# 0 - 4: ok
# 5 - corrupt