This file contains 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 argparse | |
import dataclasses | |
import functools | |
@dataclasses.dataclass | |
class MainArgs: | |
q: int | None | |
v: int | None |
This file contains 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
Q = git checkout | |
QA = git add | |
QAV = git apply -v p.patch | |
QB = git rev-parse --abbrev-ref HEAD | |
QB0 = git branch | |
QC = git commit | |
QCA = git commit --amend | |
QCAA = git commit --all --amend | |
QCAF = git commit --all --fixup | |
QCAM = git commit --all -m wip |
This file contains 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
rm -fr pips/ | |
python3 -m venv pips | |
source pips/bin/activate | |
which python3 | |
python3 -m pip freeze |
This file contains 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 | |
""" | |
usage: p.py | |
calling Python 'termios.tcsetattr' via 'tty.setraw' or 'tty.setcbreak' | |
wrongly changes the Type of 'mode[CC][VMIN]' and 'mode[CC][VTIME]' | |
to Int, from a Bytes of Length 1 | |
diff'ing the 'termios.tcgetattr' shows this, at my macOS & at my Linux |
This file contains 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
% python3 p.py | |
2023-08-19 14:53:03.789681 | |
Darwin | |
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/termios.cpython-311-darwin.so | |
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tty.py | |
tty.setraw | |
Original vs 'tty.setraw' samples of 'termios.tcgetattr' |
This file contains 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
$ python3 p.py | |
2023-08-19 15:52:58.582689 | |
Linux | |
/usr/lib/python3.10/lib-dynload/termios.cpython-310-x86_64-linux-gnu.so | |
/usr/lib/python3.10/tty.py | |
tty.setraw | |
Original vs 'tty.setraw' samples of 'termios.tcgetattr' |