This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from enum import Enum | |
| from typing import Optional | |
| from pydantic import BaseModel, Field | |
| class ActionType(str, Enum): | |
| ADD = "add" | |
| DELETE = "delete" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # shellcheck disable=SC2154 | |
| # (silence shellcheck wrt $cam1 environment variable) | |
| if [[ $# -lt 4 ]]; then echo "Format: [narrow=1] [cam1=1] $0 width height framerate ms [us]"; exit; fi | |
| if [[ "$(( $1 % 2 ))" -eq 1 ]]; then echo "width has to be even"; exit; fi | |
| if [[ "$(( $2 % 2 ))" -eq 1 ]]; then echo "height has to be even"; exit; fi | |
| export SHTR=""; if [[ $# -gt 4 ]]; then SHTR="--shutter"; fi | |
| export workaround=""; if [[ "" != "$(grep '=bookworm' /etc/os-release)" ]]; then workaround="--no-raw"; fi | |
| export d=10; if [[ "" != "$(grep "Revision.*: ...17.$" /proc/cpuinfo)" ]]; then if [[ "$cam1" == "" ]]; then d=10; else d=11; fi; fi | |
| for((m=0; m<=5; ++m)) |