Skip to content

Instantly share code, notes, and snippets.

View FFY00's full-sized avatar
🌈
struggling to live

Filipe Laíns 🇵🇸 FFY00

🌈
struggling to live
View GitHub Profile
$ tox -e py313
.pkg: _optional_hooks> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py313: install_package> python -m pip install --no-binary coverage --force-reinstall --no-deps /home/anubis/git/wrapt/.tox/.tmp/package/201/wrapt-1.16.0.tar.gz
py313: commands[0]> python -m coverage run --rcfile /home/anubis/git/wrapt/setup.cfg -m pytest -v /home/anubis/git/wrapt/tests
===========================================
@FFY00
FFY00 / MT-L-adapter.scad
Last active September 9, 2024 12:46
Mitutoyo MT-L Mounting Adapter
$fn = 100;
// For M3 inserts
insert_diameter = 4;
insert_height = 7;
insert_boder_spacing = 3;
lens_diameter = 35 + 0.1;
lens_height = 32 + 6;
distance_to_objective = 134 - lens_height;
# SPDX-License-Identifier: MIT
import faulthandler
import sys
import PySide6 # noqa: F401, E402
import pyqtgraph as pg
import pyqtgraph.parametertree
import numpy as np
import numpy.typing as npt
#!/bin/env python
import datetime
import locale
import os
import pathlib
import sys
import zoneinfo
import urllib.parse
@FFY00
FFY00 / build.sh
Last active August 1, 2024 10:45
Out-of-tree NGINX modules build and installation scripts
#!/bin/sh
NGINX_SRC=/usr/src/nginx-1.26.1-1.fc40
ln -sf $NGINX_SRC/auto
ln -sf $NGINX_SRC/src
$NGINX_SRC/configure \
--with-compat \
--add-dynamic-module=../nginx-module-FOO \
(00000000) 0: > 255 (11111111)
(00000001) 1: > 253 (11111101)
(00000010) 2: > 251 (11111011)
(00000011) 3: > 249 (11111001)
(00000100) 4: > 247 (11110111)
(00000101) 5: > 245 (11110101)
(00000110) 6: > 243 (11110011)
(00000111) 7: > 241 (11110001)
(00001000) 8: > 239 (11101111)
(00001001) 9: > 237 (11101101)
@FFY00
FFY00 / json-schema-to-rst.py
Created June 26, 2024 06:50
PEP 739 supporting files
import argparse
import contextlib
import io
import json
import os
import pathlib
import sys
import textwrap
from typing import Iterator, Literal, Required, TypedDict
@FFY00
FFY00 / update-project.py
Created May 22, 2024 22:44
Incomplete WIP
import dataclasses
import inspect
import json
import logging
import os
import pprint
import string
import subprocess
import textwrap
import types
@FFY00
FFY00 / monitor.py
Last active February 7, 2024 01:51
from __future__ import annotations
import concurrent.futures
import contextlib
import datetime
import decimal
import functools
import time
import threading
import traceback
Platform: "linux-x86_64"
Python version: "3.11"
Current installation scheme: "posix_prefix"
Paths:
data = "/usr"
include = "/usr/include/python3.11"
platinclude = "/usr/include/python3.11"
platlib = "/usr/lib/python3.11/site-packages"
platstdlib = "/usr/lib/python3.11"