Dev Miscellaneous
341 subscribers
884 photos
6 videos
5 files
917 links
A channel where you can find developer tips, tools, APIs, resources, memes and interesting contents.

Join our comments chat for more.

Comments chat (friendly :D)
https://t.me/+r_fUfa1bx1g0MGRk
Download Telegram
A Heisenbug lurking in async Python

If you've ever used asyncio.create_task(...), you might have not paid attention to this problem...

https://textual.textualize.io/blog/2023/02/11/the-heisenbug-lurking-in-your-async-code

@DevMisc
#python #bug #misc
🙈4🖕1
Birthday paradox

If you have 23 people in a room, there is a 50% chance that two of them share a birthday. Let's test this theory with Python.

https://www.gkbrk.com/2022/04/birthday-paradox

@DevMisc
#math #python #extra
🤔3🖕1
Creating a JSON Serializer in Python quickly

https://www.gkbrk.com/2021/05/json-serializer

@DevMisc
#python #learn
🍌3🖕1
👍3🖕1
This media is not supported in your browser
VIEW IN TELEGRAM
NiceGUI: Let any browser be the frontend of your Python code

https://youtu.be/HiNNe4Q32U4

@DevMisc
#python #tools #web
2🍓2🖕1
👍3🖕2
Swap_8_and_9

A simple import can modify the Python interpreter.

https://kenschutte.com/python-swap-ints/

@DevMisc
#python #c #fun
🤯3🥴1
Python's many command-line utilities

Every command-line tool included with Python. These can be run with python -m module_name.

https://www.pythonmorsels.com/cli-tools/

@DevMisc
#python #utils #cli
3👍1
Python has too many package managers

- Python has a fragmented package and environment management ecosystem, with over a dozen different tools, each with their own strengths and weaknesses.
- The lack of a standardized, efficient, and user-friendly package manager in Python has been an "inexcusable pain-in-the-ass" for many years.
- Other programming languages like Rust, C#, and JavaScript have developed more cohesive and widely-loved package management solutions like Cargo, NuGet, and npm.
- Python's legacy package manager pip has historically had poor dependency resolution, only recently adding backtracking capabilities. It also lacks environment management features.
- The proliferation of various configuration files like requirements.txt, setup.py, Pipfile, environment.yml etc. has led to a lot of redundancy and lack of standardization in Python package management.
- The introduction of PEP 621 in 2020 aimed to consolidate dependencies and configuration into a single pyproject.toml file, leading to the emergence of new tools like Poetry, PDM, Flit, and Hatch.
- Poetry is currently the closest Python tool to the Cargo experience, but it suffers from slow dependency resolution, especially for large projects.
- Conda is a popular choice for data scientists and experimentalists as it can manage non-Python dependencies, but it lacks some features like lock files and can be cumbersome for production use.
- The Rust community's influence is evident in promising new Python package management tools like uv, which aims to be a fast, Cargo-like drop-in replacement for pip.
- The Python community still lacks a cohesive, standardized, and widely-adopted package management solution, but tools like uv hold promise for the future.


https://dublog.net/blog/so-many-python-package-managers/

@DevMisc
#python #pip #extra
💯3👍1👏1