Initial commit

Porting all the code from Qiita and extending the tests.
Can you add to the docstring why this needs `{0}`