Created
June 13, 2017 07:43
-
-
Save emakryo/4b5d9307ce5fa631bdc5c1b03ce39fb4 to your computer and use it in GitHub Desktop.
This file contains 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
# general code for experiments | |
import time | |
from datetime import datetime | |
from progressbar import ProgressBar | |
import pandas as pd | |
def main(): | |
timeid = datetime.now().strftime('%Y%m%d%H%M%S') | |
countMax = 100 | |
pb = ProgressBar(max_value=countMax) | |
with open('meta%s.txt'%timeid, 'w') as f: | |
print('countMax=', countMax, file=f) | |
result = [] | |
for x in range(countMax): | |
pb.update(x+1) | |
time.sleep(1) | |
result.append({'hoge': x}) | |
pd.DataFrame(result).to_csv('result%s.csv'%timeid) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment