Skip to content

Instantly share code, notes, and snippets.

@beskep
beskep / mplutils.py
Last active October 14, 2024 00:45
Matplotlib-Seaborn Utils
from __future__ import annotations
import dataclasses as dc
import datetime
import inspect
from contextlib import contextmanager
from typing import TYPE_CHECKING, ClassVar, Literal, TypedDict, overload
import matplotlib as mpl
import matplotlib.dates as mdates
@beskep
beskep / polars.py
Last active August 6, 2024 05:34
misc
from collections.abc import Iterable
from dataclasses import KW_ONLY, dataclass
from pathlib import Path
import polars as pl
import polars.selectors as cs
from polars._typing import ColumnWidthsDefinition
from xlsxwriter import Workbook
DESC_COLS = ('count', 'null_count', 'mean', 'std', 'min', '25%', '50%', '75%', 'max')