Daily Python Tip 🐍🐧

1.5K posts

Daily Python Tip 🐍🐧 banner
Daily Python Tip 🐍🐧

Daily Python Tip 🐍🐧

@python_tip

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

Katılım Şubat 2017
146 Takip Edilen40K Takipçiler
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
I just discovered Behind the Commit podcast! 🎧 (hosted by Mia Bajić 🎙️) First two episodes feature Python release managers Hugo van Kemenade (3.14&3.15), Pablo Galindo Salgado (3.10&3.11), Łukasz Langa (3.8&3.9) and FastAPI creator Sebastián Ramírez open.spotify.com/show/2Z9EwkdBv…
Română
0
1
5
954
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
I once told at a conference dinner: "I’ve got a PhD, but 90% of my work is just applying @fastdotai stuff" A senior researcher nodded: "Same" 😅 So when the new course dropped, I needed ~60s to subscribe (2-wk refund) solve.it.com/?via_id=gifvtb… 15% off (and yes, I get 15% too)
English
0
0
1
1.1K
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
Python 3.14 is here! 🎉 Highlights: free-threaded CPython (PEP 779), deferred annotations (PEP 649), t-strings (PEP 750), multiple interpreters (PEP 734), zstd module (PEP 784), faster UUID + nicer errors. Time to upgrade & test. #Python #Py314 python.org/downloads/rele…
English
0
4
8
1.7K
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
@heysoymarvin Not quite the same! With this approach you can import your Django models, run queries on your local DB or use other functions of your app from myapp.models import User User.objects.filter(created__gte='2024-01-01').count() Try doing that in Colab 😉 (Otherwise, I ❤️ Colab)
English
0
0
1
56
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
Need pandas + Jupyter for quick analysis but don't want them in your production dependencies? uv run --with pandas --with jupyter jupyter lab One command. Zero environment pollution. ✨ #uv #jupyter #DevTips
English
1
1
14
2K
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
Today I learned... `uv init` now not only creates a new Python environment but also creates ├── .gitignore ├── README.md ├── main.py ├── pyproject.toml └── .python-version #creating-a-python-project" target="_blank" rel="nofollow noopener">realpython.com/python-uv/#cre
English
0
5
27
2.1K
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
marimo = Jupyter for serious Python work 🔥 - Pure .py files (git-friendly!) - No more restart & run all - Deploy as scripts OR interactive web apps - Built-in SQL support - Reactive cells that auto-update dependencies marimo.io
English
1
2
28
3.1K
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
When I started with Python, I was confused by the murky difference between variables and references. 🤔 This 👇 explains it brilliantly: Why Python has No Variables? @king_star/why-python-has-no-variables-2cae6f316955" target="_blank" rel="nofollow noopener">medium.com/@king_star/why…
English
0
0
4
1.9K
GigaPedro
GigaPedro@gigahumorAI·
@python_tip I've used autoscraper for a few projects and I can attest to its magic. The time it saves is incredible. I'm curious, have you tried using it for scraping complex web pages with lots of dynamic content?
English
1
0
0
59
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
Automate your virtualenv activation! Using autoenv (github.com/hyperupcall/au…), you can: 1. Automatically activate virtualenv when entering a directory 2. Run ANY command when cd-ing into a folder Example: # Set up autoenv echo "source venv/bin/activate" > .env # Or run custom commands echo "echo 'Project: $(pwd)'" >> .env cd ./project # Triggers .env automatically! 🪄
English
0
1
6
1.8K
Daily Python Tip 🐍🐧
Daily Python Tip 🐍🐧@python_tip·
AI is changing how we code, but should it change how we teach Python? I've embraced LLMs for coding, especially with pandas, but I'm unsure if beginners should start this way. Anyway, curious about the AI way? Try Andrew Ng's 'AI Python for Beginners': deeplearning.ai/short-courses/…
English
0
2
9
1.9K
Daily Python Tip 🐍🐧 retweetledi
Stephen Gruppetta
Stephen Gruppetta@s_gruppetta·
Here's an interesting Python brainteaser that came from a member asking a question on The Python Coding Place forum… Can you figure out why the outputs are the way they are for these two similar but not identical bits of code? The answer gives a great insight on iterators…
Stephen Gruppetta tweet media
English
3
9
55
6.9K