return current time in format of 2000-01-01 12:01:01
()
| 16 | |
| 17 | import time |
| 18 | def time_now(): |
| 19 | '''return current time in format of 2000-01-01 12:01:01''' |
| 20 | return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()) |
| 21 | |
| 22 | def get_cmap(n, name='hsv'): |
| 23 | '''Returns a function that maps each index in 0, 1, ..., n-1 to a distinct |