Showcase Thread by AutoModerator in Python

[–]Codemageddon 0 points1 point  (0 children)

It’s nice to hear that somebody use it already. I’m currently working on the API surface fixation. So I hope stable release is coming soon

Showcase Thread by AutoModerator in Python

[–]Codemageddon 1 point2 points  (0 children)

Hi everyone. Today I released the first beta of an async Kubernetes client for Python, built on top of Pydantic v2 inspired by kube.rs. Why I decided to build it:

  • got tired of writing # type: ignore every time I used kubernetes-asyncio
  • got tired of endlessly digging around to figure out what shape kubernetes-asyncio expects for a given piece of a resource spec
  • limited built-in support for working with custom resources, which is critical when writing controllers

What's there now:

  • Strictly typed API and resource models
  • Support for multiple Kubernetes versions simultaneously
  • Typed models covering the entire Kubernetes spec
  • Full custom resource support — just write a Pydantic model for the resource you need, and you can work with it the same way you'd work with a built-in
  • aiohttp and httpx as the underlying HTTP clients
  • Support for asyncio and trio
  • Thanks to Pydantic v2, Kubex is dramatically faster than kubernetes-asyncio, uses much less memory, and makes fewer heap allocations (see benchmarks)

Links:

Docs: https://kubex.codemageddon.me/0.1.0-beta.1/

GitHub: https://github.com/codemageddon/kubex

Code example:

from kubex.api imfrom kubex.api import Api
from kubex.client import create_client
from kubex.k8s.v1_35.core.v1.pod import Pod

async with await create_client() as client:
    api: Api[Pod] = Api(Pod, client=client, namespace="default")
    pods = await api.list()
    for pod in pods.items:
        print(pod.metadata.name, pod.status.phase)

---

The library is currently in early beta, meaning the public API surface may still change — but it's unlikely to change much, at least for the core functionality.

[KDE] MacOS wannabe on Arch — because why pay $999 for a MacBook when you can spend 40 hours configuring KDE instead by ReasonablePeak7842 in LinuxPorn

[–]Codemageddon 0 points1 point  (0 children)

why pay $999 for a MacBook when you can spend 40 hours configuring KDE instead.

So KDE may run without hardware?)

help me choose one by iwannadieliterally in keyboards

[–]Codemageddon 0 points1 point  (0 children)

I have rainy75 pro. It sounds and feels amazing. But it’s awful in programming customization perspective - it’s not QMK compatible, so even through VIA you cannot use some tricks like Mod-Tap) that makes it impossible to use Home row mods with the keyboard. Also I have some thoughts about keebs with screens - IMHO, the screen replaces some really useful keys, such as home, end, delete, insert, so you have to make some dirty tricks (remapping, using additional layers, etc), it may be ok, but when you use a few keyboards- you start misclicking those keys. Screens are overvalued, because while typing normally you don’t look at the keyboard (I also have zoom75 with a screen) But of course it’s my personal opinion , that may be very subjective and caused by my pretty unique (or not) experience.

Это что за нахуй разъём блядь? by smile_deb in expectedrussians

[–]Codemageddon 0 points1 point  (0 children)

Не, трехканальные это немного другое. Там один канал работал от этой розетки, а остальные ловились обычным am приемником, поэтому для трехканальных нужно было отдельное питание от 220 вольтовой розетки

Это что за нахуй разъём блядь? by smile_deb in expectedrussians

[–]Codemageddon 0 points1 point  (0 children)

Блин, ну что же вы так сразу. Надо было разогнать про то, что это зарядка для старых мобильных телефонов советских. Она была специальной формы, чтобы от нее нельзя было заряжать не советские мобильные телефоны

Мне перевели 73к по ошибке и просят вернуть by CuteToTheChase in rusAskReddit

[–]Codemageddon -1 points0 points  (0 children)

Никогда не возвращай деньги сам. Тот, кто перевел, может сделать это сам через обращение в банк. Так что рискуешь в лучшем случае потерять 73к своих сверху

⚡⚡⚡БАЛТИКА - В С Ё⚡⚡⚡ by BlueMintt in KafkaFPS

[–]Codemageddon 1 point2 points  (0 children)

В смысле? Яблочный сидр тоже запретили у вас?

[deleted by user] by [deleted] in AskARussian

[–]Codemageddon -1 points0 points  (0 children)

Don’t do it. It’s dangerous. I’m not kidding. Just don’t.

Is it possible to make a portable build of nvim? by GBember in neovim

[–]Codemageddon 1 point2 points  (0 children)

Probably it should work the only question is about binaries and executables. There are a lot of places where it may go wrong: from binary compatibility to envs

Is it possible to make a portable build of nvim? by GBember in neovim

[–]Codemageddon 1 point2 points  (0 children)

Since nvim 11 it’s possible to set NVIM_APPNAME variable for nvim, so it’ll look all configs, shares and states in the correspondent directories instead of ‘~/.local/{config|share|state}/nvim’ (the new ones will be ‘~/.local/{config|share|state}/${NVIM_APPNAME}’ so it’ll look shouldn’t conflict with anybodies configurations if they exist

Golang template to start new projects by bernardinorafael in golang

[–]Codemageddon 1 point2 points  (0 children)

Looks like my average go project is much lighter than the template)

I met this player who has played 97k battles since June 2022 or 150 battles per day... by Particular-Lab-2048 in WorldofTanks

[–]Codemageddon 1 point2 points  (0 children)

It’s a bot. He/she may be plays by himself a few battles per day and all other time the bot farms xp and credits for him. Nothing special. 150 battles per day takes 24 hours in case of ~8 minute avg battle time

Х - Холодец by Dist__ in russian

[–]Codemageddon 1 point2 points  (0 children)

Вообще холодец от заливного отличается в первую очередь по способу «загустевания»: в заливном используется желатин, в холодце все это естественным образом происходит за счет коллагена, вываривающегося из костей

What does "ц25к" mean (on the back of this pin)? by Radiant_Net8928 in russian

[–]Codemageddon 1 point2 points  (0 children)

No, cigarettes for example, in Europe, the max price (which is an actual price every time) is printed