sample: add total_seconds() function
sample: add total_seconds() function

Since in Python2.6 there is no method timedelta.total_seconds() in
`datetime` module, we have to add a helper function to perform the same
task.

xuanhan863/data-science-at-the-command-line,easonlv/data-science-at-the-command-line,zhmxu/data-science-at-the-command-line,ymero/data-science-at-the-command-line,nriyer/data-science-at-the-command-line,fphilipe/data-science-at-the-command-line,jcapitz/data-science-at-the-command-line,flowersw/data-science-at-the-command-line,xuanhan863/data-science-at-the-command-line,1986ks/data-science-at-the-command-line,flowersw/data-science-at-the-command-line,easonlv/data-science-at-the-command-line,flowersw/data-science-at-the-command-line,fphilipe/data-science-at-the-command-line,xuanhan863/data-science-at-the-command-line,flowersw/data-science-at-the-command-line,anfedorov/data-science-at-the-command-line,nriyer/data-science-at-the-command-line,anfedorov/data-science-at-the-command-line,jcapitz/data-science-at-the-command-line,anfedorov/data-science-at-the-command-line,zhmxu/data-science-at-the-command-line,easonlv/data-science-at-the-command-line,1986ks/data-science-at-the-command-line,zhmxu/data-science-at-the-command-line,ymero/data-science-at-the-command-line,xuanhan863/data-science-at-the-command-line,zhmxu/data-science-at-the-command-line,1986ks/data-science-at-the-command-line,fphilipe/data-science-at-the-command-line,fphilipe/data-science-at-the-command-line,nriyer/data-science-at-the-command-line,anfedorov/data-science-at-the-command-line,nriyer/data-science-at-the-command-line,easonlv/data-science-at-the-command-line,flowersw/data-science-at-the-command-line,ymero/data-science-at-the-command-line,anfedorov/data-science-at-the-command-line,1986ks/data-science-at-the-command-line,ymero/data-science-at-the-command-line,zhmxu/data-science-at-the-command-line,xuanhan863/data-science-at-the-command-line,easonlv/data-science-at-the-command-line,nriyer/data-science-at-the-command-line,jcapitz/data-science-at-the-command-line,ymero/data-science-at-the-command-line,fphilipe/data-science-at-the-command-line,1986ks/data-science-at-the-command-line,jcapitz/data-science-at-the-command-line,jcapitz/data-science-at-the-command-line