One #python tip per day. Do you have any? Send it to https://nitter.cf/t.co/AIPDodWr5i. Edited by @simecek, @karlafej, and... you?

Joined February 2017
Last week, two versions of litellm package (3.4M downloads/day) contains malicious code due to previous compromise of maintainer's PyPI credentials. This seems as a cool trick to be less vulnerable to such attacks (found on LinkedIn / Hacker news) πŸ‘‡
1
2
19
3,216
Still digesting #EuroPython2024, but #DjangoConEU 2024 videos just appeared on YouTube! youtube.com/playlist?list=PL… My favorites: - AnΕΎe's "Django, SQLite, and Production" youtube.com/watch?v=GTDYwEXv… - @scriptogre's "Functional Chatbots" tutorial (not on YT) github.com/scriptogre/functi…
1
5
1,502
Struggling to remember which classes correspond to which methods? 🐍 This is a handy summary table: docs.python.org/3/library/co…
1
12
3,120
Did you know that a simple import can modify the Python interpreter? Import a custom module and suddenly, 8 becomes 9, and 9 becomes 8. kenschutte.com/python-swap-i…
5
14
5,042
Python 3.12 released today: * Type parameter syntax, the type statement and type aliases 🐍 * Syntactic formalization of f-strings πŸŽ‰ * A per-interpreter GIL πŸ”“ * Improved Did you mean … suggestions πŸ’‘ * Performance improvements in the asyncio package πŸš€ docs.python.org/3.12/whatsne…
50
1
98
18,996
BTW both of us (@karlafej & @simecek) are here at #EuroPython2023. If you run into us, feel free to say hello and what would you like to read as #pythontip. Greetings from Prague! πŸ‡¨πŸ‡Ώ
9
2,534
List comprehension exercise! Guess what will be the value in 'results' after running the code below πŸ‘‡πŸ‘‡ Try it on Colab gist.github.com/simecek/4c94… Or watch it on #EuroPython2023 Day1 ⚑ talk youtube.com/live/HHvm_TYhG14…
1
2
11
3,960
#EuroPython season! πŸπŸ’» You can watch most of the talks online, ep2023.europython.eu/live/fo… (note you can move the video back in time) (currently, @_inesmontani is closing Day1 with her fascinating keynote "Large Language Models: From Prototype to Production") ✨🎀 #EuroPython2023
3
13
3,809
survey = simple library for creating beautiful interactive prompts github.com/Exahilosys/survey
2
1
15
3,298
Something I was not aware of - (Ana)conda is not free for commercial use! You must either purchase a commercial license (~$150/year) or use alternative solutions like (mini)conda or mamba - see the comparison πŸ‘‡
3
9
4,328
PyAutoGUI helps you to to programmatically control the mouse & keyboard. github.com/asweigart/pyautog… Save a screenshot with three lines of code:
5
1
34
5,210
Use more_itertools library to access more advanced itertools functions, e.g. - split data into chunks - get sliding window over data - compress the sequence with run-length encoding
1
8
2
24
5,899