Python 3.9 StatsProfile — My first OSS Contribution to cPython

You can try out all of the code in this article yourself using this Google Colaboratory notebook. If you’ve ever tried to debug and optimize your python application, it’s likely that you stumbled upon Python Profiles to understand where most of the execution time is being spent. You enable the profiler at the beginning of a code segment you’re interested in profiling with pr.enable(), and call pr.create_stats() at the end. Afterwards, you can create a Stats object, and print the results in a human readable format with ps.print_stats(). ...

February 17, 2020 · 4 min · 735 words · Medium

TestIex — Easier Test Driven Development in Elixir

One of my favorite features of elixir is being able to start a shell that loads the entire context of my project: $ iex -S mix It provides easy access to all of the project’s modules so you could easily iterate on your code by compiling it directly from within the shell. You have the option to recompile the whole project or just a single module: # single module $ r MyModulesNameSpace.MyModule # whole project $ recompile The other great thing about elixir is how easy it is to run unit tests: ...

January 27, 2019 · 3 min · 529 words · Medium