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?

๊ฐ€์ž…์ผ ลžubat 2017
146 ํŒ”๋กœ์ž‰40K ํŒ”๋กœ์›Œ
Daily 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 ๐Ÿ๐Ÿง
@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 ๐Ÿ๐Ÿง
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 ๐Ÿ๐Ÿง
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 ๐Ÿ๐Ÿง
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 ๐Ÿ๐Ÿง
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 ๐Ÿ๐Ÿง ๋ฆฌํŠธ์œ—ํ•จ
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