Skip to content

Instantly share code, notes, and snippets.

View RonnyPfannschmidt's full-sized avatar
🦖
catching up with backlog

Ronny Pfannschmidt RonnyPfannschmidt

🦖
catching up with backlog
View GitHub Profile
@RonnyPfannschmidt
RonnyPfannschmidt / example_widget.py
Created July 28, 2021 08:50
initial wild brainstorm for components that textual could provide
from ... import ...
class MyComonent(Component)
close = Text.as_part("close"):
async def on__close__click(self, ...):
await self.close()
@RonnyPfannschmidt
RonnyPfannschmidt / compare-table.txt
Created February 14, 2021 19:58
pytest benchmark example for impl compare
benchmarks | dataclass | attrs | zokusei
-------------------+------------------+----------------------+------------------
test_repr | 737.6109 (1.0) | 1,503.2417 (2.04) | 2,468.6994 (3.35)
test_make_instance | 320.6658 (1.01) | 317.8374 (1.0) | 831.7211 (2.62)
test_make_class | 238.7450 (19.83) | 4,727.8656 (392.77) | 12.0371 (1.0)
@RonnyPfannschmidt
RonnyPfannschmidt / apispec.json
Created February 3, 2021 10:30
example openapiapi spec for unknown base type issue
{
"openapi": "3.0.0",
"info": {
"title": "example",
"description": "example",
"version": "1.2.3",
"contact": {}
},
"servers": [
{
@RonnyPfannschmidt
RonnyPfannschmidt / Spread-Branch.ipynb
Created October 8, 2018 05:46
Spread-Branch.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
the parametersets of the different fixtures create a dependency tree,
so the test using only foo gets executed 3 times,
the test using bar gets executed 9 times
and the test using baz gets executed 27 times
simply generating the runs in order of the tests would mean that for each test all fxtures of all scopes would have to be set up and tear down
so foo would setup 39 times instead of 3 times
BAD_MATCH = re.compile(r"""
(\.git/annex)
| (home/\w+/\.(config|local|mozilla|macromedia|thunderbird)/)
| (\.wine/drive_c/)
| (Dropbox/)
| (\.env/lib/python2.7.env/lib/python2.7/)
| (home/\w+/\.eclipse/)
| (home/\w+/\.local/opt/pyenv/)
$ git fsck --strict
Prüfe Objekt-Verzeichnisse: 100% (256/256), Fertig.
Prüfe Objekte: 100% (54196/54196), Fertig.
error: 1a61125992aed2e6d0434b233ab7318d7bdf5804: invalid sha1 pointer in cache-tree
broken link from commit 464117b4725b853feb15c965732526448128a45a
to tree 1a61125992aed2e6d0434b233ab7318d7bdf5804
dangling tree 0f00c68542c730c82449add7f054e71db03bb882
dangling commit 6006e6abd1e76e979850f433d8554bca815b188e
dangling blob 840c10e02ca122f756dcc70e525ce053c692ba49
dangling commit ac1cc2f6801a31188ff15fc1840a3394184bad00
@RonnyPfannschmidt
RonnyPfannschmidt / functions.pseudo.py
Created February 6, 2018 09:36
pseudocode for refactoring moves of partial match, not tested
# step 1 - evil __new__, maybe unnecessary
class partial_match(object):
def __new__(cls, str_to_match):
if str_to_match is None:
return None
return cls(str_to_match)
# step2 constructor function, may need protection against regression
@RonnyPfannschmidt
RonnyPfannschmidt / keybase.md
Created November 23, 2017 09:29
keybase.md

Keybase proof

I hereby claim:

  • I am ronnypfannschmidt on github.
  • I am ronnyp (https://keybase.io/ronnyp) on keybase.
  • I have a public key ASDaVw33h5A4VZb91Hfct1OkguFONgDgx5qU_NgQ7JkUeAo

To claim this, I am signing this object:

$ md5sum /boot/EFI/nixos/* /boot/kernels/*|sort
0aa43089982ffee8b14e78e2c7c58c04 /boot/EFI/nixos/w5vaz3h9zadvflc5dpyykgfwsdq4305r-linux-4.4.39-bzImage.efi
0aa43089982ffee8b14e78e2c7c58c04 /boot/kernels/w5vaz3h9zadvflc5dpyykgfwsdq4305r-linux-4.4.39-bzImage
1a511bbd38c54e4bf75c746c97f4d432 /boot/EFI/nixos/nps1wsc1m31p1rdhq3bkpq39l25df79a-initrd-initrd.efi
2ec9e2160426cae263080005ebda37d5 /boot/EFI/nixos/y69k12dv269snlc888mmszqnhdv68p6p-linux-4.4.35-bzImage.efi
30ad7c18df60ac8d30cbd8a6c72e13f9 /boot/EFI/nixos/04m0bsp1fw91gzc1jys7r98qbfv9w34g-initrd-initrd.efi
30ad7c18df60ac8d30cbd8a6c72e13f9 /boot/kernels/04m0bsp1fw91gzc1jys7r98qbfv9w34g-initrd-initrd
3b2f9d1302928404eac93e5ee28780ad /boot/EFI/nixos/9nm8anfl8b69jrvvrhhq0dzcg9d4y4yn-initrd-initrd.efi
4d9f18207824b32472a7478f5a194751 /boot/EFI/nixos/cafxh4c0xnx7hs7cwpzrcab5n15i8bpc-linux-4.4.39-bzImage.efi
4d9f18207824b32472a7478f5a194751 /boot/kernels/cafxh4c0xnx7hs7cwpzrcab5n15i8bpc-linux-4.4.39-bzImage