Models
Pydantic Docs Ā· docs.pydantic.dev [1]
I came accross from_attributes today it allows creation of pydantic models from objects such as a sqlalchemy Base Model or while nesting pydantic models. I believe in the past I have ran into some inconsistencies with nesting pydantic models and Iāll bet one had from_attributes set and another did not.
Arbitrary class instances¶
(Formerly known as āORM Modeā/from_orm).
Pydantic models can also be created from arbitrary class instances by reading the instance > attributes corresponding to the model field names. One common application of this functionality is integration with object-relational mappings (ORMs).
To do this, set the from_attributes config value to True (see the documentation on Configuration for more details).
The example here uses SQLAlchemy, but the same approach should work for any ORM.
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://docs.pydantic.dev/latest/concepts/models/#rebuilding-model-schema
[2]: /thoughts/
Publishing rhythm
-
Dang strong stance that tmux and zellij should not exist. I really do get his point though. Theres a good number of terminal features I often miss out on because I run tmux. Its an app that runs apps, and doesnāt let all of the signals back to the host. But its fantastic at what it does, and brings so much to the table that the little bit of downside it brings is well worth it to me. The other thing missing in this discussion is that I can take my hotkeys and session workflow to any machine just by running tmux. I do not need to run a certain terminal, or install it headlessly on a server to get special features just for it.
Note
This post is a thought [1]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: /thoughts/
Check out veekaybee [1] and their project gitfeed [2].
Feed of posts from Bluesky that have a GitHub link
References:
[1]: https://github.com/veekaybee
[2]: https://github.com/veekaybee/gitfeed
I came across llama.vim [1] from ggml-org [2], and itās packed with great features and ideas.
Vim plugin for LLM-assisted code/text completion
References:
[1]: https://github.com/ggml-org/llama.vim
[2]: https://github.com/ggml-org
Top Python libraries of 2024
Dive into our 10th annual Python Libraries roundup for 2024, now featuring separate curated lists for General Use and AI / ML / Data tools. Discover this year's most innovative additions to the eco...
Tryolabs Ā· tryolabs.com [1]
Really good listicle of new modern top python libraries from 2024. Very well done article with images, links, and an actually quality listicle with many things Iāve never even heard of.
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://tryolabs.com/blog/top-python-libraries-2024
[2]: /thoughts/
[1]
Good overview of seaborn color palettes. They have all sorts of different types, some designed to purposfully give each color the same weight for catecorization. Some designd to give linear differences in value, some have a parabolic feel with a diverging nature.
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: /static/https://seaborn.pydata.org/tutorial/color_palettes.html
[2]: /thoughts/
ublue-os [1] has done a fantastic job with ucore [2]. Highly recommend taking a look.
An OCI base image of Fedora CoreOS with batteries included
References:
[1]: https://github.com/ublue-os
[2]: https://github.com/ublue-os/ucore
Just starred bazzite [1] by ublue-os [2]. Itās an exciting project with a lot to offer.
Bazzite is a cloud native image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld.
References:
[1]: https://github.com/ublue-os/bazzite
[2]: https://github.com/ublue-os
poolers.postgresql.cnpg.io CRD metadata.annotations Too long Ā· Issue #325 Ā· cloudnative-pg/charts
Unable to deploy helm chart using ArgoCD. Getting following error Failed sync attempt to : one or more objects failed to apply, reason: CustomResourceDefinition.apiextensions.k8s.io "poolers.postgr...
GitHub Ā· github.com [1]
Iāve never seen or needed to use a serversideapply in kubernetes before, but I ran into this same issue in my k3s homelab [2] while installing cloudnative-pg.
You can do it with argo
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
syncOptions:
- ServerSideApply=true
and you can do it with kubectl
kubectl apply --server-side --force-conflicts -f cnpg-1.25.0.yaml
Note
This post is a thought [3]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://github.com/cloudnative-pg/charts/issues/325
[2]: /homelab/
[3]: /thoughts/
I built out a tool for myself to manage my nvim configuration, and I wanted to
quickly see which one I am running in my starship prompt. Hereās the config I
ended up with. It warns if the NVIM_APPNAME environment variable is not set, and
it shows which nvim I am using if it is set.
[custom.nvim-manager-system]
when = '[[ ! -n "${NVIM_APPNAME}" ]]'
style = "bold yellow"
symbol = '[ī® ](fg:#15AABF)'
format = '$symbol[USING SYSTEM NVIM]($style)'
[env_var.NVIM_APPNAME]
style = "green"
symbol = '[ī® ](fg:#15AABF)'
format = '[$symbol${env_value}]($style)'
variable = "NVIM_APPNAME"
snorlax [1] by moonbeam-nyc [2] is a game-changer in its space. Excited to see how it evolves.
wake and sleep Kubernetes deployments on a schedule
References:
[1]: https://github.com/moonbeam-nyc/snorlax
[2]: https://github.com/moonbeam-nyc
I came across headlamp [1] from kubernetes-sigs [2], and itās packed with great features and ideas.
A Kubernetes web UI that is fully-featured, user-friendly and extensible
References:
[1]: https://github.com/kubernetes-sigs/headlamp
[2]: https://github.com/kubernetes-sigs
Just starred headlamp [1] by headlamp-k8s [2]. Itās an exciting project with a lot to offer.
A Kubernetes web UI that is fully-featured, user-friendly and extensible
References:
[1]: https://github.com/headlamp-k8s/headlamp
[2]: https://github.com/headlamp-k8s
If youāre into interesting projects, donāt miss out on gitui [1], created by gitui-org [2].
Blazing š„ fast terminal-ui for git [3] written in rust š¦
References:
[1]: https://github.com/gitui-org/gitui
[2]: https://github.com/gitui-org
[3]: /glossary/git/
The work on gitui [1] by extrawurst [2].
Blazing š„ fast terminal-ui for git [3] written in rust š¦
References:
[1]: https://github.com/extrawurst/gitui
[2]: https://github.com/extrawurst
[3]: /glossary/git/
Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher
Iconic font aggregator, collection, & patcher: 9,000+ glyph/icons, 60+ patched fonts: Hack, Source Code Pro, more. Popular glyph collections: Font Awesome, Octicons, Material Design Icons, and more
Nerd Fonts Ā· nerdfonts.com [1]
Nerdfont cheatsheet is a fantastic way to copy paste icons into your shell. I just used it to juice up my starship prompt with my current $NVIM_APPNAME managed by nvim-manager [2]
[3]
Note
This post is a thought [4]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://www.nerdfonts.com/cheat-sheet
[2]: /nvim-manager/
[3]: https://dropper.waylonwalker.com/api/file/3635351b-c006-4cff-8011-85c3b14bfc8f.webp
[4]: /thoughts/
I recently noticed that my og [1] images were missing emoji. They were taken using
headless chrome in a container. I fixed it by adding an emoji font in the
containerfile / dockerfile.
RUN apt-get update && apt-get install -y \
# Add fonts with emoji support
fonts-noto-color-emoji \
&& rm -rf /var/lib/apt/lists/*
Before # [2]
Hereās what they were looking like with broken emoji fonts.
[3]
After # [4]
And now with the fixed emoji font.
[5]
I put thought bubbles on my thoughts posts and stars on my github stars posts
References:
[1]: /og/
[2]: #before
[3]: https://dropper.waylonwalker.com/api/file/6e9060f2-0e15-4f22-88b6-b6ec5ddb34de.webp
[4]: #after
[5]: https://dropper.waylonwalker.com/api/file/8ed5e338-50c2-4130-8cce-549ecc802f01.webp
one2nc [1] has done a fantastic job with cloudlens [2]. Highly recommend taking a look.
k9s like CLI for AWS and GCP
References:
[1]: https://github.com/one2nc
[2]: https://github.com/one2nc/cloudlens
I like dlvhdrās [1] project gh-dash [2].
A beautiful CLI dashboard for GitHub š
References:
[1]: https://github.com/dlvhdr
[2]: https://github.com/dlvhdr/gh-dash
I recently discovered kube-no-trouble [1] by doitintl [2], and itās truly impressive.
Easily check your clusters for use of deprecated APIs
References:
[1]: https://github.com/doitintl/kube-no-trouble
[2]: https://github.com/doitintl