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
| import re | |
| from enum import Enum | |
| from typing import Annotated, Any | |
| from fastapi import FastAPI, Query | |
| from pydantic import BaseModel, field_validator | |
| _CAMEL_BOUNDARY = re.compile(r"(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])") | |
| # lowerCamelCase only: no underscores, no leading capital | |
| _CAMEL_SHAPE = re.compile(r"^[a-z][a-zA-Z0-9]*$") |
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
| augroup encrypted | |
| autocmd! | |
| autocmd BufReadPre,BufWritePre *.gpg,*.asc | |
| \ setlocal binary noswapfile noundofile nobackup nowritebackup | set viminfo= | |
| autocmd BufReadPost *.gpg,*.asc | |
| \ silent execute '%!gpg -qd 2>/dev/null' | setlocal nobinary | filetype detect | |
| autocmd BufWritePre *.gpg,*.asc | |
| \ silent execute '%!gpg -qc --cipher-algo AES256 2>/dev/null' | |
| autocmd BufWritePost *.gpg,*.asc | |
| \ silent undo | setlocal nobinary |
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 -S uv run --with=pyyaml --with=jinja2 --with=fire python | |
| #s.py | |
| # python -mfire s.py | |
| # type: ignore | |
| from jinja2 import Template | |
| from functools import wraps | |
| def _clip(): | |
| from tkinter import Tk | |
| tk = Tk() |
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
| """ | |
| The MIT License (MIT) | |
| Copyright (c) 2016, Ruslan Zhenetl | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |