The latest mypy release includes performance improvements, yay! https://github.com/python/mypy/blob/master/CHANGELOG.md
=> More informations about this toot | View the thread
I've started reading Sebastian Raschka's "Build a Large Language Model (From Scratch)" and I'm loving it. Great descriptions, newbie-friendly math, and lots of Python.
https://amzn.to/3DLBDmk
=> More informations about this toot | View the thread
I'm running GitHub actions on Python 3.13 now, and seeing really slow install times from uv.
Not sure if it's a fluke from this run, or something to do with 3.13?
15 minutes and counting...
https://github.com/Azure-Samples/azure-search-openai-demo/actions/runs/12657091764/job/35271122592?pr=2238
=> More informations about this toot | View the thread
New blog post: how to add speech input and output to your app, using the built-in browser speech APIs and custom HTML elements:
https://blog.pamelafox.org/2024/12/add-browser-speech-inputoutput-to-your.html
=> More informations about this toot | View the thread
Check out https://github.com/tweag/FawltyDeps to identify unused imports and undeclared imports in your Python projects.
=> More informations about this toot | View the thread
Is there something like a dead-import detector for Python? I just realized we have a package in our requirements that never gets imported anymore, which I didn't notice for months.
=> More informations about this toot | View the thread
I'm confused about the Pycon CFP for tutorials: the webpage says descriptions should be 300 chars, whereas pretalks says 300 words. Anyone know which one it is? words and chars are pretty different.
=> More informations about this toot | View the thread
I've now made custom HTMLElement's for both speech input and output, using the built-in free browser SDKs.
Updated PR @ https://github.com/Azure-Samples/openai-chat-vision-quickstart/pull/30
=> More informations about this toot | View the thread
I prettied up the speech input with a CSS animation, inspired by the speech input button for GitHub Copilot chat, and I think it's looking real cute! Do GIFs work here?
=> More informations about this toot | View the thread
And if you want to try out the speech input, there's a test deployment here: https://pf-vision-t5hmp6ocr-ca.happyground-ae776626.westus.azurecontainerapps.io/
=> More informations about this toot | View the thread
I'm adding speech input to my LLM chat samples to improve accessibility, and am using a custom HTMLElement. I'm really not liking how the shadow dom means I have to re-embed Bootstrap CSS, should I just not use shadow dom?
https://github.com/Azure-Samples/openai-chat-vision-quickstart/pull/30/files
=> More informations about this toot | View the thread
I'm curious what style mocks y'all prefer! should i be magic mocking more??
=> More informations about this toot | View the thread
So I eventually modified most tests to "my style" with monkeypatch.setattr whenever possible.
I'm still grateful for Copilot's help since:
=> More informations about this toot | View the thread
I had a lot of tricky tests to write today that needed mocks against an async SDK.
To get started, I tried out GitHub Copilot "generate tests".
Observations:
=> More informations about this toot | View the thread
TIL: tuple[float] isn't the way to convey a tuple of floats, because tuples commonly contain different types. instead you must do tuple[float,float,float] for 3 floats or tuple[float,...] for any length
https://docs.python.org/3/library/typing.html#annotating-tuples
=> More informations about this toot | View the thread
Sometimes I'm writing a unit test against an SDK and think, "oh no, I am the first person in the history of humanity to have ever mocked this class. what if it's impossible"
and then I think
"do it for humanity, pamela!!"
=> More informations about this toot | View the thread
its far easier to add tests for a new feature when the existing code has coverage!
write tests from the start!
=> More informations about this toot | View the thread
i always cringe when I find myself reaching for "nonlocal" in python. it looks gross, it feels gross, but it works, sooo... :-/
=> More informations about this toot | View the thread
My 5-yr-old apparently believes in Santa again, despite us telling her the truth last year.
She also says "we should vote for a new santa!!" and "mommy, can girls be santas?"
I told her it was a great idea and I'd run for next Santa, but then she said it'd be boring watching me make gifts. :(
=> More informations about this toot | View the thread
I love being able to test against local emulators instead of prod accounts, so I made a dev container for Azurite (local Azure Blob storage):
https://github.com/pamelafox/azurite-python-playground
And here's a blog post about how it works:
https://blog.pamelafox.org/2024/11/running-azurite-inside-dev-container.html
=> More informations about this toot | View the thread
=> This profile with reblog | Go to pamelafox@fosstodon.org account This content has been proxied by September (ba2dc).Proxy Information
text/gemini