Note
このドキュメントは LLM によって生成され、人間による校正を経て公開されています。
Caution
このツールは現在開発中で、オープンソースとして公開される予定はありません。
PostgreSQL の SQL クエリファイルから、型安全なコードを生成するツールです。
| % uv run examples/capture.py --video-device "Elgato Facecam MK.2" --resolution 720p --fps 120 --capture-format yuy2 --duration 10 --player --native-buffer | |
| === Available Devices === | |
| [0] Elgato Facecam MK.2 | |
| [1] MX Brio | |
| [2] OBS Virtual Camera | |
| === Opening device 0 (0x32100000fd90094) === | |
| Device: Elgato Facecam MK.2 | |
| === Supported Formats === |
| #!/usr/bin/env python3 | |
| """ | |
| webcodecs-py は絶賛開発中です。 | |
| blend2d-py でダミー映像を生成し、webcodecs-py で AV1 エンコードして mp4-py で MP4 ファイルに出力するサンプル | |
| 必要な依存関係: | |
| uv add blend2d-py mp4-py | |
| 使い方: |
| #!/usr/bin/env python3 | |
| """アニメーション版四角形 | |
| 半透明の四角形が画面内を移動し、端に当たると跳ね返るアニメーションサンプルです。 | |
| """ | |
| import random | |
| import cv2 | |
| from blend2d import Image, Context, CompOp |
| Run uv run pytest tests/test_network.py -v -s | |
| ============================= test session starts ============================== | |
| platform linux -- Python 3.12.11, pytest-8.4.0, pluggy-1.6.0 -- /__w/fault-injection-testing/fault-injection-testing/.venv/bin/python | |
| cachedir: .pytest_cache | |
| rootdir: /__w/fault-injection-testing/fault-injection-testing | |
| configfile: pyproject.toml | |
| plugins: asyncio-1.0.0 | |
| asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function | |
| collecting ... collected 1 item |
| import asyncio | |
| import errno # Added for e.code == errno.ENOENT | |
| import os | |
| import sys | |
| import time | |
| import traceback | |
| from pyroute2 import ( | |
| AsyncIPRoute, # IPRoute を AsyncIPRoute に変更 | |
| NetlinkError, |
| import duckdb | |
| import torch | |
| from transformers import AutoModel, AutoTokenizer | |
| tokenizer = AutoTokenizer.from_pretrained( | |
| "pfnet/plamo-embedding-1b", trust_remote_code=True | |
| ) | |
| model = AutoModel.from_pretrained("pfnet/plamo-embedding-1b", trust_remote_code=True) | |
| device = "cuda" if torch.cuda.is_available() else "cpu" |