I like Textualize’s [1] project rich-cli [2].
Rich-cli is a command line toolbox for fancy output in the terminal
References:
[1]: https://github.com/Textualize
[2]: https://github.com/Textualize/rich-cli
Publishing rhythm
If you’re into interesting projects, don’t miss out on jupyterlite [1], created by jupyterlite [2].
Wasm powered Jupyter running in the browser 💡
References:
[1]: https://github.com/jupyterlite/jupyterlite
[2]: https://github.com/jupyterlite
I’m really excited about nbterm [1], an amazing project by davidbrochart [2]. It’s worth exploring!
Jupyter Notebooks in the terminal.
References:
[1]: https://github.com/davidbrochart/nbterm
[2]: https://github.com/davidbrochart
I came across stylish.nvim [1] from sunjon [2], and it’s packed with great features and ideas.
Stylish UI components for Neovim
References:
[1]: https://github.com/sunjon/stylish.nvim
[2]: https://github.com/sunjon
If you’re into interesting projects, don’t miss out on dynaconf [1], created by dynaconf [2].
Configuration Management for Python ⚙
References:
[1]: https://github.com/dynaconf/dynaconf
[2]: https://github.com/dynaconf
Check out neovim-grimoire [1] by alanwsmith [2]. It’s a well-crafted project with great potential.
No description available.
References:
[1]: https://github.com/alanwsmith/neovim-grimoire
[2]: https://github.com/alanwsmith
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
Check out ipython [1] and their project ipython [2].
Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
References:
[1]: https://github.com/ipython
[2]: https://github.com/ipython/ipython
Check out sharkdp [1] and their project pastel [2].
A command-line tool to generate, analyze, convert and manipulate colors
References:
[1]: https://github.com/sharkdp
[2]: https://github.com/sharkdp/pastel
If you’re into interesting projects, don’t miss out on asdf [1], created by asdf-vm [2].
Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
References:
[1]: https://github.com/asdf-vm/asdf
[2]: https://github.com/asdf-vm
I came across outputformat [1] from delestro [2], and it’s packed with great features and ideas.
Python library to decorate and beautify strings
References:
[1]: https://github.com/delestro/outputformat
[2]: https://github.com/delestro
pyenv [1] has done a fantastic job with pyenv [2]. Highly recommend taking a look.
Simple Python version management
References:
[1]: https://github.com/pyenv
[2]: https://github.com/pyenv/pyenv
pyenv [1] has done a fantastic job with pyenv-installer [2]. Highly recommend taking a look.
This tool is used to install pyenv and friends.
References:
[1]: https://github.com/pyenv
[2]: https://github.com/pyenv/pyenv-installer
vim-abolish [1] by tpope [2] is a game-changer in its space. Excited to see how it evolves.
abolish.vim: Work with several variants of a word at once
References:
[1]: https://github.com/tpope/vim-abolish
[2]: https://github.com/tpope
I came across Talkpython.fm-Notable-Packages [1] from xandrade [2], and it’s packed with great features and ideas.
[unofficial] Talkpython.fm podcast notable PyPI packages compilation
References:
[1]: https://github.com/xandrade/Talkpython.fm-Notable-Packages
[2]: https://github.com/xandrade
Smoother Python with automatic imports | pyflyby
This is not a flaky works half the time kind of plugin, it’s a seriously smooth
editing experience. I’ve just started using pyflyby, and it is solid so far.
I have automatic imports on every save of a python file in neovim, and
automatic imports on every command in ipython.
I can’t tell you how pumped I am for this, and how good its felt to use over
the past few weeks. It’s glorious.
YouTube video # [1]
Listen to me rant on how great pyflyby is
https://youtu.be/2QW5DJiEJH4
Give the video a watch, I did not have noise-cancelling on in obs. My
apologies for the background hum and the mic stand bumps. I did my best to fix
them up.
Installation # [2]
How to install pyflyby for automatic python imports
pyflyby is hosted on pypi, so you can get it with pip. I have had no issues
installing it on 3.8+ so far.
pip install pyflyby
Configuration setup with stow # [3]
always stow your dotfiles
If you’re going to configure any of your tools the first thing you should do is
set it up w...
Check out aoc-2021-kedro-playground [1] by pypeaday [2]. It’s a well-crafted project with great potential.
No description available.
References:
[1]: https://github.com/pypeaday/aoc-2021-kedro-playground
[2]: https://github.com/pypeaday
Looking for inspiration? dotfiles [1] by elnappo [2].
my .files - powered by Ansible
References:
[1]: https://github.com/elnappo/dotfiles
[2]: https://github.com/elnappo
You must use augroup with autocmd in vim | Here's how
If you are running vim autocmd’s without a group, you’re killing your
performance. Granted your probably not sourcing your vimscript files with
autocmd’s too often, but every time you source that vimscript you are adding
another command that needs to run redundantly.
https://youtu.be/2ITTn4Dl0lc
This is what I had # [1]
Not silky smooth
For WAAY too long I have had something like this in my vimrc or init.vim.
It formats my python for me on every save, works great except if I source my
dotfiles more than once I start adding how many times black runs.
autocmd bufwritepre *.py execute 'Black'
Why is a bare autocmd bad # [2]
let me demonstrate
Lets create a new file called format.vim and give it the :so %. Works
great, it starts telling me that its formatting.
autocmd bufwritepre *.py :echo("formatting with black")
too-many-formats [3]
BUT as every time I give it the :so % it formats an extra time on every
single save.
Setting up an augroup # [4]
I’ve been told I need an aug...
Code Review from the comfort of vim | Diffurcate
I often review Pull requests from the browser as it just makes it so easy to see
the diffs and navigate through them, but there comes a time when the diffs get
really big and hard to follow. That’s when its time to bring in the comforts of
vim.
https://youtu.be/5NKaZFavM0E
Plugins needed # [1]
This all stems from the great plugin by
AndrewRadev [2]. It breaks a down
into a project. So rather than poping into a pager from git [3] diff,
you can pipe to diffurcate and it will setup a project in a tmp
directory for you and you can browse this project just like any
other except it’s just a diff.
Plug 'AndrewRadev/diffurcate.vim'
My aliases # [4]
First to quickly checkout PR’s from azure devops I have setup an alias to fuzzy
select a pr and let the az command do the checkout.
alias azcheckout='az repos pr checkout --id $(az repos pr list --output table | tail -n -2 | fzf | cut -d " " -f1)'
Next I have a few aliases setup for checking diffs. The first one checks what
is staged vs the...