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 | |
| """Create printable Nitrokey 3 PIN sheets (one A4 page per UUID). | |
| Setup: python3 -m pip install reportlab | |
| Usage: python3 nitrokey_pin_sheet.py UUID [UUID ...] [-o output.pdf] | |
| python3 nitrokey_pin_sheet.py --help | |
| Output: nitrokey-pin-recovery-sheet.pdf in the current directory (overwritten). | |
| The first five hexadecimal characters become the device label. | |
| Names, dates, PINs and secrets stay blank for handwriting. |
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
| """A quick benchmark comparing the performance of: | |
| - msgspec: https://github.com/jcrist/msgspec | |
| - pydantic V1: https://docs.pydantic.dev/1.10/ | |
| - pydantic V2: https://docs.pydantic.dev/dev-v2/ | |
| The benchmark is modified from the one in the msgspec repo here: | |
| https://github.com/jcrist/msgspec/blob/main/benchmarks/bench_validation.py | |
| I make no claims that it's illustrative of all use cases. I wrote this up |