I have used numpy.allclose to test for approximate equality in Python for years, but I recently found pytest.approx better, because it lets Pytest interpret the result. For example, with numpy.allclose:
> assert np.allclose(result, 3.061, atol=1e-3, rtol=1e-3)
E assert False
E + where False = <function allclose at 0x7f8fea7efa60>(1.4872, 3.061, atol=0.001, rtol=0.001)
E + where <function allclose at 0x7f8fea7efa60> = np.allclose
also, now with #gpt4o, latency is going to be critical if you’re doing streaming audio/video, so #python may start looking less appealing. what’s the new #LLM language? #rust? #go? #cpp? #fortran?
i predict that there’s always going to be strong advantages to using #python for #ai, but with streaming audio & video of #gpt4o, there’s not enough latency slack for python.
i think a framework will emerge, similar to pyspark, where you can write python code that gets compiled into a steaming plan, and executed as highly optimized low level #rust code with the possibility of python UDFs. i figure it’s still a couple of years from being really usable rn
The problem with using a lot of computer languages is trying not to get them mixed up. Today I used a Python ‘F’ formatted string in JavaScript and it took quite a while to figure out why the IDE was complaining. #Python#JavaScript
Check out Dr. Albert Rapp's latest YouTube video on mastering the great_tables Python package! From raw data to polished displays, learn about custom fonts, nanoplots, conditional formatting, and the steps to great a lovely looking data display table with great_tables. https://www.youtube.com/watch?v=ESyWcOFuMQc&ab_channel=AlbertRapp
Before I start churning out my pre-PyCon releases, how about a build-and-inspect-python-package that adds GitHub-style build provenance attestations by just adding one setting (and one permission)!? #python
(1/2) Google released a new foundation model for time series forecasting 🚀
The TimeFM (Time Series Foundation Model) is a foundation model for time series forecasting applications. This pre-trained model was developed by the Google Research team. It joins the recent trend of leveraging foundation models for time series forecasting, which includes Salesforce's Moirai and Amazon's Chronos.
you know hacking kubernetes manifests is so much more comfortable in python... is there any drive to get a yaml processor into the python standard lib?
Are you coming to #PyCon US this week in Pittsburgh? I am!
I put together a helpful custom #map 📍 with the recommended local places from the PyCon US website to help me navigate - hope it helps you too in some way.
Thanks to @dimitribouniol and @glacials, we're much closer to the next Cork release! I was finally able to implement the first version of a self-compiled check, which was the only requirement left for the next release.
As promised, both Dimitri and Ben will be getting either a free Cork license or the cash equivalent, as well as a special shoutout in the contributors sections once the feature is fully implemented.
@davidbures I think the pricing model for #opensource software wherein the compiled version is a one-time purchase but people can compile it themselves is smart. However, I imagine this isn't possible with interpreted languages like #Python and #JavaScript.
If you couldn't charge for compiled versions of Cork, how else would you monetize it whilst keeping the code open source?