Skip to content

Instantly share code, notes, and snippets.

View Vizonex's full-sized avatar

Vizonex Vizonex

View GitHub Profile
@Vizonex
Vizonex / fix_yaml.py
Created November 11, 2025 23:38
Fixer for pre-commit under the circumstances that were on windows and pre-commit-yaml doesn't decide to play nicely with us.
# Small mini fixer for pre-commit yaml to play nicely with windows since windows has it's own quirks unlike linux.
# This repairs and fixes the probelm.
import sys
import pathlib
if __name__ == "__main__":
if ("--help" in sys.argv) or ("-h" in sys.argv):
print(" fix_yaml.py <FILE>\n")
print(" FILE A yaml file that needs fixing")
print(" --help, -h Prints help and exits")
@Vizonex
Vizonex / http2_writer.py
Last active September 12, 2025 02:39
an http/2 writer concept for aiohttp
# Currently this is a concept as the plan for aiohttp's http2 support
# is still under some debate:
# Author: Vizonex
# Filename (If added): "aiohttp/http2_writer.py"
"""Http related parsers and protocol."""
import asyncio
import sys
from typing import ( # noqa
@Vizonex
Vizonex / _epoll.pyx
Created August 22, 2025 04:00
_epoll.pyx Original 2006 Twisted source code I have saved a copy for archiving purposes since it is a historical artifact to helping shape CPython's selectmodule epoll system. It may or may not run correctly and I have uploaded it for viewing purposes only.
# Copyright (c) 2001-2006 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Interface to epoll I/O event notification facility.
"""
# NOTE: The version of Pyrex you are using probably _does not work_ with
# Python 2.5. If you need to recompile this file, _make sure you are using
# a version of Pyrex which works with Python 2.5_. I am using 0.9.4.1 from
@Vizonex
Vizonex / wintools.ps1
Last active October 7, 2025 15:58
Aiohttp Developer Tools For windows.
# Compiler script written for windows because of the following problems.
#
# 1. `make` is not well supported on windows
#
# 2. llhttp uses a `rm` command that doesn't
# work on windows so we need to make a script
# for dealing with that that.
#
# 3. Some users prefer to using virtual enviornments so finding a rational way for using them would be an
# ideal solution
@webknjaz
webknjaz / generative-ai-llm-spam-handling.md
Last active July 19, 2026 13:35
This Gist collects opinions and pointers on fighting LLM spam on GitHub

Tip

See a fully generated Claude summary of this gist, traversing a few hundred related links: https://claude.ai/public/artifacts/de2ffa40-98dc-4458-b1b5-f3e645bf7840

Note that this document has factual errors so double-check before citing it. The general sentiment is sound, though.

Important

Folks from CHAOSS have recently started gathering similar information at their Awesome LLM Policies page and I might start contributing there instead:

@Vizonex
Vizonex / ExprNodes.pyi
Created June 28, 2023 19:09
These are some typehints I'm having to work with the Cython Compiler because of how bad it is to access a hover list in VS Code... I'm also showing also this to act as a wake-up call...
# NOTE "Some of these had to be manually added since stubgen in mypy doesn't even know that some of these items even exist." - Vizonex
# -- ExprNodes.pyi --
from Cython.Compiler import Builtin as Builtin, Future as Future, Naming as Naming, Nodes as Nodes, PyrexTypes as PyrexTypes, StringEncoding as StringEncoding, Symtab as Symtab, TypeSlots as TypeSlots
from Cython import Utils as Utils
from Cython.Debugging import print_call_chain as print_call_chain
from Cython.Compiler.Annotate import AnnotationItem as AnnotationItem
from Cython.Compiler.Builtin import basestring_type as basestring_type, bytearray_type as bytearray_type, bytes_type as bytes_type, dict_type as dict_type, list_type as list_type, set_type as set_type, slice_type as slice_type, str_type as str_type, tuple_type as tuple_type, type_type as type_type, unicode_type as unicode_type
from Cython.Compiler.Code import TempitaUtilityCode as TempitaUtilityCode, UtilityCode as UtilityCode