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
| { | |
| "colorcolumn": 100, | |
| "colorscheme": "monokai-dark", | |
| "keepautoindent": true, | |
| "softwrap": true, | |
| "tabstospaces": true, | |
| "wordwrap": true | |
| } |
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
| QT_QPA_PLATFORMTHEME=kde # not gtk2 | |
| QT_STYLE_OVERRIDE=Breeze |
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
| # SPDX-FileCopyrightText: 2026 geisserml <geisserml@gmail.com> | |
| # SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause | |
| # This is essentially a copy of https://github.com/pypdfium2-team/pypdfium2/blob/11c67012f256abd3c402c47e9abe26bfbc3d182e/utils/dev/git_net_additions.py | |
| # Please check pypdfium2's main branch for possible updates. | |
| # Augment `git diff --numstat` with a delta column (net additions, i.e. additions-deletions), and sort the output by that column. | |
| # This helps maintainers analyze net growth (or degrowth) between refs on a per file basis, ordered by relevance, with the highest net additions shown first. (Author's note: AOTW, neither git itself, nor GitHub, nor any other tool I'm aware of seemed to offer that functionality.) | |
| # For completeness, this script also adds a churn column (absolute additions+deletions) as in `git diff --stat`. Validates the final result against `git diff --shortstat`. |
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, sys | |
| pattern = sys.argv[1] | |
| out_pattern = sys.argv[2] | |
| string = sys.argv[3] | |
| match = re.search(pattern, string) | |
| result = out_pattern % match.groups() | |
| print(result, end="") |
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
| class layereddict (dict): | |
| def __init__(self, layer, **kwargs): | |
| super().__init__(**kwargs) | |
| self._layer = layer | |
| def __missing__(self, key): | |
| return self._layer[key] |
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
| # SPDX-FileCopyrightText: 2026 geisserml <geisserml@gmail.com> | |
| # SPDX-License-Identifier: MPL-2.0 | |
| import stl # local | |
| from typing import TYPE_CHECKING | |
| if TYPE_CHECKING: | |
| from functools import cached_property as cached_prop_typehint | |
| else: | |
| def cached_prop_typehint(func): |
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
| # SPDX-FileCopyrightText: 2026 geisserml <geisserml@gmail.com> | |
| # SPDX-License-Identifier: MPL-2.0 | |
| from typing import TYPE_CHECKING | |
| from stl import cached_property | |
| if TYPE_CHECKING: | |
| from functools import cached_property | |
| def _func_visitor(cp_map): |
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
| # SPDX-FileCopyrightText: 2026 geisserml <geisserml@gmail.com> | |
| # SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause | |
| # See also | |
| # https://github.com/pypdfium2-team/pypdfium2/blob/950aeb49b8aa1b5e9bc248b1ff293d4e586bf41b/src/pypdfium2_stl/shared/stl.py | |
| # https://stackoverflow.com/a/78825819/15547292 | |
| # https://gist.github.com/mara004/076e3110aba8e8a3f8a6f2c84af350ee | |
| class cached_property: | |
| """ |
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
| # Dump your /usr/share/X11/locale/en_US.UTF-8/Compose below and save as ~/.XCompose | |
| <Multi_key> <minus> <numbersign> : "β" U2011 # NONBREAKING HYPHEN |
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
| # SPDX-FileCopyrightText: 2025 geisserml <geisserml@gmail.com> | |
| # SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause | |
| import functools | |
| class finally_decorator: | |
| def __init__(self, callback): | |
| self._callback = callback | |
NewerOlder