Archive
All published posts
The week ofJan 17 – Jan 23, 2022
Featured this weekLink
The week ofJan 10 – Jan 16, 2022
Featured this weekWriting
functools.total_ordering makes adding all of six of the rich comparison operators to your custom classes much easier, and more likely that you remember all of them.
From the Docs: The class must define one of __lt__(), __le__(), __gt__(), or __ge__ In addition, the class should supply an __eq__() method.
one of these
- lt()
- le()
- gt()
- ge()
and required to have this one
- eq()
Here is an example using the Enum I was working on the other day.
from enum import Enum, auto
from functools import total_ordering
@total_ordering
class LifeCycle(Enum):
configure = auto()
glob = auto()
load = auto()
pre_render = auto()
render = auto()
post_render = auto()
save = auto()
def __lt__(self, other):
try:
return self.value < other.value
except AttributeError:
return self.value < other
def __eq__(self, other):
try:
return self.value == other.value
except AttributeError:
return self.value == other
Link
Link
The week ofJan 3 – Jan 9, 2022
Featured this weekLink
Link
The week ofDec 27 – Jan 2, 2022
Featured this weekLink
Link
Link
The week ofDec 20 – Dec 26, 2021
Featured this weekWriting
Smoother Python with automatic imports | pyflyby
Link
Link
The week ofDec 13 – Dec 19, 2021
Featured this weekLink
The week ofDec 6 – Dec 12, 2021
Featured this weekWriting
You must use augroup with autocmd in vim | Here’s how
Link
The week ofNov 29 – Dec 5, 2021
Featured this weekWriting
Code Review from the comfort of vim | Diffurcate
Writing
Setup a yaml schema | yamlls for a silky smooth setup
Writing
Open files FAST from zsh | or bash if thats your thing
Writing
How linux users install a text editor
Writing
30 days dotfile ricing
Link
Link
Link
Link
The week ofNov 15 – Nov 21, 2021
Featured this weekWriting
JUT | Read Notebooks in the Terminal
Writing
Waylon Walker
Writing
kedro catalog create
Link
The week ofNov 8 – Nov 14, 2021
Featured this weekLink
The week ofNov 1 – Nov 7, 2021
Featured this weekLink
Link
The week ofOct 25 – Oct 31, 2021
Featured this weekWriting
nvim conf 2021 | IDE’s are slow | Waylon Walker
Link
Link
Link
Link
The week ofOct 18 – Oct 24, 2021
Featured this weekLink
Link
Link
Link
The week ofOct 11 – Oct 17, 2021
Featured this weekLink
Link
Link
Link
Link
Link
The week ofOct 4 – Oct 10, 2021
Featured this weekWriting
Just Ask Ipython for help
Writing
Hacktoberfest 2021?
Writing
I made a neovim plugin
Calendar data could not load. Try again.