Schedule
In this talk we'll explore the more advanced Object Oriented features of Python. We'll talk about:
- Attribute access and how you can change it
__slots__
- Name mangling
- static and class methods
- Abstract base classes (abc and collections.abc)
- Speical methods such as
__len__
,__getitem__
,__iter__
and others - Metaclasses
A common style of development in Lisps and Lisp-likes is writing code along a running stateful Lisp machine process, and evaluating bits of code every time a change is made. In practice, I find it most useful when authoring scripts, and the workflow looks like this:
- I load up some data; be it from a database or a remote site.
- I'm not entirely sure how I use the data to achieve the goal of the script, so I start wrangling with it interactively, exploring its methods and nested fields.
- I write some functions in my editor, evaluate them in the running IPython process (which holds the state, e.i. the data I fetched), and pass the data from the process' memory to the function I just evaluated.
- Inspect the result, rewrite the function, inspect the data in memory some more, and so on
This isn't groundbreaking, and can be achieved with TDD as well (or just temporarily storing fetched data in a file). I just personally like this approach as it is very low friction. I have written about this two years ago. Not a whole lot has changed: Attempting REPL-Driven Development in Python
I'm Maor Kadosh, I'm a relatively new DevOps person – been a Sysadmin at the military, working at the industry for two years. I have a soft spot for Python and scripting in general. Spare time is spent on both redundant hacking and fruitful hacking – and also making some music:) Website
In this session, we'll delve into the world of Python profiling, covering timeit, cPofile and snakeviz. We'll explore how to leverage these tools to optimize our programs and make them run smoother and see practical examples.
Agenda:
- What is Profiling?
- Time and execution profiling ⌛️
- Profiling tools 🛠️
- Profiling with cProfile module 🕵️
- Interpreting profiling results with snakeviz 🐍
- Optimizing code with profiling insights 👩 💻
- Real life example 😲
- Conclusion
- Profiling in runtime 🏃 ♀️
About Christina Beletskaya
Im Christina Beletskaya, a fullstack engineer working as a freelancer for almost 2 years now. I love learning new things and passionate about sharing knowledge with others.