Skip to content

Instantly share code, notes, and snippets.

View cdeil's full-sized avatar

Christoph Deil cdeil

View GitHub Profile
log.ts:460 ERR [158] potential listener LEAK detected, having 210 listeners already. MOST frequent listener (10):: Error
at gEi.create (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:27:11906)
at $Be.q [as onDidChange] (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29:1377)
at Object.u [as onWillAddFirstListener] (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:409:115047)
at pce.q [as onDidChange] (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29:1565)
at Zps.r (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:679:20320)
at Zps.n (vscode-file://vscode-app/Applications/Vi
WARNI [root] DATABASE_URL='postgresql+psycopg://admin:admin@localhost:9876/stocadro_alembic9'
WARNI [root] If this is not the URL that you expect, check if your env variable of the system is not set (echo $POSTGRES_CONNECTION_STRING)
INFO [sqlalchemy.engine.Engine] select pg_catalog.version()
INFO [sqlalchemy.engine.Engine] [raw sql] {}
DEBUG [sqlalchemy.engine.Engine] Col ('version',)
DEBUG [sqlalchemy.engine.Engine] Row ('PostgreSQL 16.8 (Debian 16.8-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit',)
INFO [sqlalchemy.engine.Engine] select current_schema()
INFO [sqlalchemy.engine.Engine] [raw sql] {}
DEBUG [sqlalchemy.engine.Engine] Col ('current_schema',)
DEBUG [sqlalchemy.engine.Engine] Row ('public',)
/*
* Copyright (c) 2000-2010 Apple Inc.
* All rights reserved.
*/
#ifndef _STDINT_H_
#define _STDINT_H_
#if __LP64__
#define __WORDSIZE 64
(memray-crash) (base) cdeil@Kryvoff-MBP memray-crash % lldb -- python -m pytest test_example.py --memray
(lldb) target create "python"
Current executable set to '/Users/cdeil/temp/memray-crash/.venv/bin/python' (arm64).
(lldb) settings set -- target.run-args "-m" "pytest" "test_example.py" "--memray"
(lldb) process handle SIGILL --stop true --pass false --notify true
NAME PASS STOP NOTIFY
=========== ======= ======= =======
SIGILL false true true
(lldb) bt
error: Command requires a current process.
"""Snake in Arcade.
# Learnings
1. Key input handling and update time delta is tricky.
Creating `snake.direction_commands` to keep track works well.
The `time_to_move` solution here works OK.
A simpler alternative could be to use `Window.update_rate` which
is passed to `on_update` as `delta_time` directly.
2. Grid vs pixel coordinates can litter the code.
"""
Solar system simulation. Visualisation with Arcade.
"""
import collections
import dataclasses
import math
import time
import arcade
"""
Solar system simulation. Visualisation with Arcade.
"""
import arcade
class Vec2d:
def __init__(self, x: float, y: float):
self.x = x
@cdeil
cdeil / ms.md
Created January 4, 2025 08:23
asdf

Demo:

version: 5
environments:
default:
channels:
- url: https://conda.anaconda.org/conda-forge/
indexes:
- https://pypi.org/simple
packages:
osx-arm64:
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/bzip2-1.0.8-h99b78c6_7.conda
{
"build": "hf2054a2_0",
"build_number": 0,
"depends": [
"pthread-stubs",
"xorg-libxau >=1.0.11,<2.0a0",
"xorg-libxdmcp"
],
"license": "MIT",
"license_family": "MIT",