Skip to content

Instantly share code, notes, and snippets.

View pelavarre's full-sized avatar

Pat LaVarre pelavarre

View GitHub Profile
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
@pelavarre
pelavarre / gist:a5c03d061d6c39669f44e1703335bba8
Created August 27, 2023 22:28
example of Terminal Sh Input to bring up & demo the Black & Flake8 & MyPy Bots from PyPi·Org working Python Sourcelines up or over with you
rm -fr pips/
python3 -m venv pips
source pips/bin/activate
which python3
python3 -m pip freeze
#!/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
% 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'
$ 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'