Initial commit

Porting all the code from Qiita and extending the tests.
I think it would be useful to pull the conditional logic out into a private function given the number of things that need to be checked. There are some pathological cases that can still slip through too. For instance:

```python
09:05:48 (mcdonadt@rl1-1-220-168-dhcp):/Users/mcdonadt
> s = "{}"

09:07:25 (mcdonadt@rl1-1-220-168-dhcp):/Users/mcdonadt
> int(s[1:-1])
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-4-43aa2b0e4d33> in <module>()
----> 1 int(s[1:-1])

ValueError: invalid literal for int() with base 10: ''
```