Created
September 27, 2018 10:02
-
-
Save khajer/cd29e85846378a315ce6c5cfd1f94575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from datetime import datetime, timedelta | |
| import random | |
| def main(): | |
| print "generate time attendant" | |
| for i in range(30): | |
| t = random.randrange(45) | |
| dStart = datetime(2009, 1, 6, 9, t+15, 24, 78915) | |
| mi = random.randrange(30) | |
| dEnd = dStart + timedelta(hours=9, minutes=mi) | |
| # print dStart, dEnd | |
| print '{:%H:%M}'.format(dStart), ",",'{:%H:%M}'.format(dEnd) | |
| if __name__ == '__main__': | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment