Skip to content

Instantly share code, notes, and snippets.

View mthuurne's full-sized avatar

Maarten ter Huurne mthuurne

View GitHub Profile
@mthuurne
mthuurne / twisted-dependencies-typeinfo.md
Last active December 10, 2019 00:26
What is the type annotation status for Twisted's dependencies?

Twisted's Dependencies

What is the type annotation status for Twisted's dependencies?

Core

attrs

@mthuurne
mthuurne / rotating_framebuffers.md
Last active December 20, 2019 14:39
Rotating framebuffers

Goals:

  • support vsynced double and triple buffering
  • zero buffer copies

User space execution flow:

  1. acquire buffer handle (can block if none is available yet)
  2. map buffer into virtual memory region
  3. draw into buffer
  4. unmap buffer
  5. queue buffer for display
@mthuurne
mthuurne / gist:d838bdc7453b2d039ace2a2b7bd5af13
Last active December 7, 2020 19:40
Suggested fix for plugins annotation
diff --git a/src/twisted/application/twist/_options.py b/src/twisted/application/twist/_options.py
index d19395d78b..f0b9e48888 100644
--- a/src/twisted/application/twist/_options.py
+++ b/src/twisted/application/twist/_options.py
@@ -170,21 +170,21 @@ class TwistOptions(Options):
self["reactor"] = self.installReactor(self["reactorName"])
@property
- def plugins(self) -> Mapping[Optional[str], IServiceMaker]:
+ def plugins(self) -> Mapping[str, IServiceMaker]:
#!/usr/bin/env python3
from pathlib import Path
import re
import sys
from sphinx.ext.intersphinx import fetch_inventory
docs_dir = Path('docs')
@mthuurne
mthuurne / poetry-install-log.txt
Created March 27, 2023 15:25
Error with `poetry install` in CI
• Updating requests (2.28.1 -> 2.28.2)
• Updating sentry-sdk (1.12.1 -> 1.16.0)
CalledProcessError
Command '['/usr/local/bin/python', '-m', 'pip', 'install', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/usr/local', '--upgrade', '--no-deps', '/root/.cache/pypoetry/artifacts/36/7a/3b/d0e4b6704694b3433d4b3abafe864f67d8454838dc5879096d75e5e440/sentry_sdk-1.16.0-py2.py3-none-any.whl']' returned non-zero exit status 2.
at /usr/local/lib/python3.10/subprocess.py:526 in run
522│ # We don't call process.wait() as .__exit__ does that for us.
523│ raise