This is a work in progress. In particular, the unit tests are incomplete, and I am all but certain there are bugs lurking in dual.py, I found some just prior to uploading to github. I'm not convinced I care in that I may never touch this code again. Or, I might. Who knows? I mostly wanted to get it off my hard drive and backed up to the cloud in some manner.
With that said, read dual_numbers.ipynb if you want to develop a basic understanding of how dual numbers can be used to perform automatic differentiation. Don't rely on dual.py to be correct.