![Daily Python Tip ππ§ Profile](https://pbs.twimg.com/profile_images/1252138962556256257/UXshR51x_x96.jpg)
Daily Python Tip ππ§
@python_tip
Followers
41K
Following
1K
Statuses
2K
One #python tip per day. Do you have any? Send it to https://t.co/AIPDodWr5i. Edited by @simecek, @karlafej, and... you?
Joined February 2017
Happy (20 + 25)**2 Happy sum(i**3 for i in range(10)) Happy sum(i for i in range(10))**2 #HappyNewYear!
0
2
5
@AIWondersPed No, just basic examples. I recommended it to my students for a homework assignment and I am curious how they apply it.
0
0
0
π Python environments got easier! uv is the new rust-powered packaging tool that might finally solve the XKCD-famous dependency puzzle Quick start: * `uv run` for most cases * `uv venv` for virtual envs * `uv pip` for packages (don't mix with regular pip!) Fast, simple, cargo-like π For more, read * *
0
2
10
Automate your virtualenv activation! Using autoenv (, 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! πͺ
0
1
7
"Tired of scrolling through Jupyter notebooks on GitHub? Try π Just replace 'github' with 'nbsanity' in the URL to get much cleaner view π For example #JupyterNotebook
0
1
7
#EuroPython2024 videos are live! πΊ My top 3 ML talks: 1) "From Text to Context..." about combining semantic & traditional search 2) "Scikit-LLM..." because of beginner-friendly NLP with dynamic few-shots 3) "Representation is King": quality dialog embeddings by Adam Zika
0
1
7
RT @s_gruppetta_ct: Here's an interesting Python brainteaser that came from a member asking a question on The Python Coding Place forumβ¦ Cβ¦
0
9
0
Use "named constructors" to create multiple ways to initialize objects class PaperSize: @classmethod def iso_a4(cls): return cls(210, 297) def __init__(self, width_mm, height_mm): self.width_mm = width_mm self.height_mm = height_mm Try it: Inspired by @austin_bingham (@sixty_north) β‘talk at #EuroPython2024
2
1
12
Still digesting #EuroPython2024, but #DjangoConEU 2024 videos just appeared on YouTube! My favorites: - AnΕΎe's "Django, SQLite, and Production" - @scriptogre's "Functional Chatbots" tutorial (not on YT)
0
1
5
#EuroPython2024 Day 1 π·π Someone on Hacker News described Python type hints as "lipstick on a pig." I kind of agree, but sometimes a pig with lipstick is better than just a pig. Jakub BerΓ‘nek: Writing Python like it's Rust... slides: One package I did not know - beartype = static runtime type checker, easy to use with @beartype decorator
0
1
9
πLive from #iclr2024 in Vienna! Exploring the booth area, two #Jupyter-like tools have caught my eye: 1οΈβ£ CoCalc: A scientist-designed platform for collaborative computation. Thanks for the great intro, @BlaecBejarano! π 2οΈβ£ Lightning AI Studios: If you love Google Colab but crave better GPUs and a persistent environment, this is for you. Plus, get 22 free GPU hours on signup! Check it out π
0
1
6