# LINK https://segmentfault.com/a/1190000005356779
#!/usr/bin/env python
# coding=utf-8
import sys
import time
start = time.time()
lines = 0
for each_line in sys.stdin:
lines += 1
stop = time.time()
print 'The total lines:', lines, ', it\'s takes', stop - start, 'seconds'
# TIPS bash commands
data du - sh access.log
# 3.1G access.log
data cat access.log | python filter.py
# The total lines: 11024424, it's takes 87.4551298618 seconds