Python Gotchas!
Python behaving in ways you might not expect¶
All credit goes to Amy Hanlon for original talk given at PyCon 2015
Make your own blog with Github Pages and Nikola
Today, we're going to start by taking a look at how to make a blog using the static website generation framework called Nikola.
Secondly, we're going to see how we can easily host our blog on the interwebs using github pages.
Last, we'll look at how we can create our content using Jupyter notebooks.
Parsing XML with the lxml module
What is XML?¶
XML stands for Extensible Markup Language.
XML was designed to store and transport data.
XML was designed to be both human and machine-readable
Counter and namedtuple
Collections¶
- Counter - For counting the number of things in a thing :)
- namedtuple - For writing self-documenting code!
FUNctional Python
Why functions?¶
- Pure functions can make your programs easier to understand and debug, especially if you use sane variable names and write good docstrings.
- You can 'decorate' functions to change a function's behavior without changing the original function.
- Writing functional programs can reduce the amount of state floating around in your programs, which is good, because state is bad.