🐍 Python software developer + coach
📘 Love books/ reading
Good reminder: the right data structure saves a lot of code. 🐍
In this case: apart from a small helper function, you get the top stock by symbol using most_common()
Clean, fast, readable. 🚀
Good reminder: the right data structure saves a lot of code. 🐍
In this case: apart from a small helper function, you get the top stock by symbol using most_common()
Clean, fast, readable. 🚀
It started simple, then grew as he hit real-world edge cases. That’s where the real dev learning happens:
⏱️ Format times
⛔ Avoid duplicates
🛠️ Handle errors clearly
What are you building this week?
It started simple, then grew as he hit real-world edge cases. That’s where the real dev learning happens:
⏱️ Format times
⛔ Avoid duplicates
🛠️ Handle errors clearly
What are you building this week?
This week I learned that uuid now supports v7 and that random + sqlite3 added command-line scripts in recent versions.
This week I learned that uuid now supports v7 and that random + sqlite3 added command-line scripts in recent versions.
And really nice: since 3.12 the uuid module can be executed as a script from the command line 📈 - so with a bit of uv we get to a pretty powerful command 😍 👇
And really nice: since 3.12 the uuid module can be executed as a script from the command line 📈 - so with a bit of uv we get to a pretty powerful command 😍 👇
It will be so nice to deploy FastAPI apps with just: `fastapi deploy` 🚀
www.youtube.com/watch?v=Q_8a...
It will be so nice to deploy FastAPI apps with just: `fastapi deploy` 🚀
www.youtube.com/watch?v=Q_8a...
uv run python -m cProfile -o profile.out -m script_or_package
uv add --dev snakeviz
uv run snakeviz profile.out
(Screenshot: me profiling slow Pandas code as a candidate to refactor using Polars 🔥)
#python #debugging
uv run python -m cProfile -o profile.out -m script_or_package
uv add --dev snakeviz
uv run snakeviz profile.out
(Screenshot: me profiling slow Pandas code as a candidate to refactor using Polars 🔥)
#python #debugging
#python
#python
Great stack for quickly prototyping a front-end, all #Python, no JS 😎
(For more serious web apps you definitely want JS and/or htmlx though 💡)
Great stack for quickly prototyping a front-end, all #Python, no JS 😎
(For more serious web apps you definitely want JS and/or htmlx though 💡)
💻 Vim + CLI
🛠 Support/troubleshooting
🚢 Building complete apps
✍️ Writing/blogging
✅ Automating tasks
🔁 Git
🤝 Mentoring/teaching
Code is just the start. These built the real foundation.
#developers #python
💻 Vim + CLI
🛠 Support/troubleshooting
🚢 Building complete apps
✍️ Writing/blogging
✅ Automating tasks
🔁 Git
🤝 Mentoring/teaching
Code is just the start. These built the real foundation.
#developers #python
📄 Write text in latin-1 ➡️ try to read as utf-8 ➡️ 💥 UnicodeDecodeError.
👨💻 Solution:
📄 Write text in latin-1 ➡️ try to read as utf-8 ➡️ 💥 UnicodeDecodeError.
👨💻 Solution:
Join our 6-week Pybites Developer Cohort (PDC Professional) and ship a real app:
✅ Clean arch + TDD
✅ CLI + FastAPI
✅ CI/CD + Cloud deploy
✅ Portfolio-ready repo
Start May 12 → pybitescoaching.com
Join our 6-week Pybites Developer Cohort (PDC Professional) and ship a real app:
✅ Clean arch + TDD
✅ CLI + FastAPI
✅ CI/CD + Cloud deploy
✅ Portfolio-ready repo
Start May 12 → pybitescoaching.com
• Ignore 𝘃𝗮𝗹𝘂𝗲𝘀 when unpacking
• Loop 𝗽𝗹𝗮𝗰𝗲𝗵𝗼𝗹𝗱𝗲𝗿
• Access 𝗹𝗮𝘀𝘁 𝗿𝗲𝘀𝘂𝗹𝘁 in REPL
• Format 𝗹𝗮𝗿𝗴𝗲 𝗻𝘂𝗺𝗯𝗲𝗿𝘀
• Define "𝗽𝗿𝗶𝘃𝗮𝘁𝗲" methods (convention)
See below 👇
• Ignore 𝘃𝗮𝗹𝘂𝗲𝘀 when unpacking
• Loop 𝗽𝗹𝗮𝗰𝗲𝗵𝗼𝗹𝗱𝗲𝗿
• Access 𝗹𝗮𝘀𝘁 𝗿𝗲𝘀𝘂𝗹𝘁 in REPL
• Format 𝗹𝗮𝗿𝗴𝗲 𝗻𝘂𝗺𝗯𝗲𝗿𝘀
• Define "𝗽𝗿𝗶𝘃𝗮𝘁𝗲" methods (convention)
See below 👇
Here's an example how we can remove or update tags, casting new + old into sets, then performing 𝘴𝘦𝘵 𝘰𝘱𝘦𝘳𝘢𝘵𝘪𝘰𝘯𝘴 🔥
Have you used them, how? 😍
(Still on the fence about 𝘸𝘢𝘭𝘳𝘶𝘴, but couldn't bear doing 𝘴𝘵𝘳𝘪𝘱() twice 😅)
Here's an example how we can remove or update tags, casting new + old into sets, then performing 𝘴𝘦𝘵 𝘰𝘱𝘦𝘳𝘢𝘵𝘪𝘰𝘯𝘴 🔥
Have you used them, how? 😍
(Still on the fence about 𝘸𝘢𝘭𝘳𝘶𝘴, but couldn't bear doing 𝘴𝘵𝘳𝘪𝘱() twice 😅)
In the example below, we first use 𝘛𝘦𝘮𝘱𝘰𝘳𝘢𝘳𝘺𝘋𝘪𝘳𝘦𝘤𝘵𝘰𝘳𝘺 to create 5 temp files.
This is a great example of using a 𝗰𝗼𝗻𝘁𝗲𝘅𝘁 𝗺𝗮𝗻𝗮𝗴𝗲𝗿 — a clean way to automatically clean up resources.
pytest makes it even easier using the 𝘵𝘮𝘱_𝘱𝘢𝘵𝘩 fixture:
In the example below, we first use 𝘛𝘦𝘮𝘱𝘰𝘳𝘢𝘳𝘺𝘋𝘪𝘳𝘦𝘤𝘵𝘰𝘳𝘺 to create 5 temp files.
This is a great example of using a 𝗰𝗼𝗻𝘁𝗲𝘅𝘁 𝗺𝗮𝗻𝗮𝗴𝗲𝗿 — a clean way to automatically clean up resources.
pytest makes it even easier using the 𝘵𝘮𝘱_𝘱𝘢𝘵𝘩 fixture:
And even trivial things can lead to interesting projects. 💡
See this emoji searcher project for example, I still use this every day to find + copy emojis 🚀
github.com/bbelderbos/e...
What are you building with #Python?
And even trivial things can lead to interesting projects. 💡
See this emoji searcher project for example, I still use this every day to find + copy emojis 🚀
github.com/bbelderbos/e...
What are you building with #Python?
That’s what we coach in our 6-week cohort starting next month.
Real apps. Real feedback. Real growth. 💪
More info: pybitescoaching.com
That’s what we coach in our 6-week cohort starting next month.
Real apps. Real feedback. Real growth. 💪
More info: pybitescoaching.com