serhii.net
In the middle of the desert you can say anything you want
Home page
Blog
Work log
Journal
Link blog
Projects
About
tags: Py
Black unstable features
mypy notes
Setting up pylint as external tool in pycharm
Seaborn barplot ordering gotcha
Locally debugging Huggingface Dataset scripts
Huggingface dataset build configs
python random sample vs random choices
Pandas adding prefix to columns and making metadata out of column subsets
Spacy has both Token.lemma_ and Token.norm_
rich inspect
Spacy has an attribute_ruler to force specific changes in matches
pytest approx as almostequal
Yet another jupyter pandas template thing
More adventures plotting geodata
Perceptual image hashes
poetry running scripts after building python package
Pytest logging output through CLI
Tenacity: a retrying library for python
requests and urllib333 exceptions adventures
Passing booleans to python argparse as str
pytest and lru_cache
python progressbar2
llm python module for CLI llm or chatGPT use
Tqdm and logging
tqdm for iterators with known lengths; manual updating
poetry add version requirements
poetry and pyenv
python library for parsing human dates dateparser
Custom ordering-sorting in pandas
Pandas aggregation with multiple columns and/or functions
Pandas formatting, suppressing scientific notation and display()-ing stuff
Matplotlib extend limits to fit text
seaborn label bars in histogram plot
Everything I know about saving plots in matplotlib, seaborn, plotly, as PNG and vector PDF/EPS etc.
Vaex iterate through groups
Using a virtual environment inside jupyter
Vaex as faster pandas alternative
jupyter notebook, lab etc. installing extensions magic, paths etc.
Radar plots
Seaborn matplotlib labeling data points
Black for jupyter notebook
Pandas seaborn pretty correlation code
Seaborn how-to guide
Seaborn distributions and KDE plots
Huggingface datasets can become pandas dataframes
More matplotlib color fun with cycler package
matplotlib datetime axes indexing
Pandas seaborn plotting groupby can be used without reset_index
Seaborn setting titles and stuff through matplotlib's axis .set() function
seaborn things built on FacetGrid for easy multiple plots
Black failing with error about safe mode
matplotlib labeling pie-charts
HF token-classification pipeline prediction text
Python typing annotating functions and callables
Python logging filters
Python logging to file and screen with different loglevels
Pycharm ideavimrc adding closing and reopening tabs
Python logging change level through context manager
Python pattern fail on multiple conditions
Python pathlib Path check if directory is empty
Spacy custom tokenizer rules
Python fnmatch glob invalid expressions
Running modules with pdbpp in python
Huggingface utils ExplicitEnum python bits
Creating representative test sets
Pycharm pytest logging settings
Python dataclass libraries, pydantic and dataclass-wizard
Python typing classmethods return type
Python argparse pass multiple values for argument
Huggingface Datasets metadata
Python unpacking operator to get list of dictionary keys from dict_keys
Pycharm drop into the debugger on failed tests
Pytest fixtures that yield instead of return for better cleanup code
pytest-print to print strings when running pytests
Three libraries for explaining/inspecting/debugging/diagnosing ML
HF datasets intro google colab
pycharm nagging me about TODOs before committing might actually be useful
Using pytest markers in pycharm
pytest temporary files
Pycharm explicitly calling breakpoint() during debugging
Pycharm use requirements.txt
Use tqdm only if the list is large
pytest sharing data between test files through pytest.configure
python run pdb on exception
Setting up pycharm for poetry, black etc.
Taskwarrior python bindings
pytest fixture to make pytest-datafiles return a pathlib.Path
pytest use conftest.py to run python code before the tests
Using pytest-datafiles for assets in pytest
Easier python logging setup with argparse's 'dest' parameter
poetry pytest takes too long to collect + tell it to ignore certain directories
python logging explanation of the relationship between root logger and submodule ones
python pdb stops on keyboard interrupt
pdppp instead of pdb and ipdb for python debugging
Python expanding a list by assigning multiple elements to a slice
First use of python 3.8 walrus operator!
python None in slice notation
representing empty strings in ini files
mypy disabling individual warnings
Python best practices for 2021
Python click getting default values from config file
IPDB move through individual frames
IPython
Python Union typing
Python pytest workshop part 2
211209-1354 Python testing basics with poetry and pytest
211206-0353 Python multiline regexes
211201-1637 mypy and python typing
211124-1744 argparse notes
211123-2348 poetry for package management