This commit is contained in:
dosangyoon
2022-08-18 00:44:30 +09:00
parent c7b5599911
commit ea7e886b58
4 changed files with 90 additions and 75 deletions

View File

@@ -45,56 +45,43 @@ if __name__ == "__main__":
labelMaker = LabelMaker(RESOURCE_PATH)
stock_codes = {
"252670": ['20220701', '20220704', '20220705', '20220706', '20220707',
'20220708', '20220711', '20220712', '20220713', '20220714',
'20220715', '20220718', '20220719', '20220720', '20220721',
'20220722', '20220725', '20220726', '20220727', '20220728',
'20220729', '20220801', '20220802', '20220803', '20220804',
'20220805', '20220808', '20220809', '20220810', '20220811',
'20220812', '20220816', '20220817'],
"122630": ['20220701', '20220704', '20220705', '20220706', '20220707',
'20220708', '20220711', '20220712', '20220713', '20220714',
'20220715', '20220718', '20220719', '20220720', '20220721',
'20220722', '20220725', '20220726', '20220727', '20220728',
'20220729', '20220801', '20220802', '20220803', '20220804',
'20220805', '20220808', '20220809', '20220810', '20220811',
'20220812', '20220816', '20220817'],
}
MODE = "WRITE"
if MODE == "UPDATE":
# 매일 입력하면서 정답 셋 만들기
stock_code = "252670"
ymd = '20220817'
stock_code = "122630"
ymd = '20220801'
labelMaker.clearLabel(stock_code, ymd)
labelMaker.update(stock_code, ymd, "0915", 2)
labelMaker.update(stock_code, ymd, "0916", 2)
labelMaker.update(stock_code, ymd, "0917", 2)
labelMaker.update(stock_code, ymd, "0918", 2)
labelMaker.update(stock_code, ymd, "0919", 2)
labelMaker.update(stock_code, ymd, "0920", 2)
labelMaker.update(stock_code, ymd, "0921", 2)
#labelMaker.clearLabel(stock_code, ymd)
#labelMaker.update(stock_code, ymd, "0933", 1)
#labelMaker.update(stock_code, ymd, "0935", 2)
labelMaker.update(stock_code, ymd, "1124", 1)
labelMaker.update(stock_code, ymd, "1125", 1)
labelMaker.update(stock_code, ymd, "1126", 1)
labelMaker.update(stock_code, ymd, "1127", 1)
labelMaker.update(stock_code, ymd, "1330", 1)
labelMaker.update(stock_code, ymd, "1331", 1)
labelMaker.update(stock_code, ymd, "1332", 1)
labelMaker.showLabels(stock_code, ymd)
elif MODE == "WRITE":
for stock_code in stock_codes:
fileName = os.path.join(RESOURCE_PATH, "tmp", "check_"+stock_code+".txt")
outFp = open(fileName, "w")
for ymd in stock_codes[stock_code]:
labelMaker.write(stock_code, ymd, outFp)
outFp.close()
else:
stock_codes = {
"252670": ['20220701', '20220704', '20220705', '20220706', '20220707',
'20220708', '20220711', '20220712', '20220713', '20220714',
'20220715', '20220718', '20220719', '20220720', '20220721',
'20220722', '20220725', '20220726', '20220727', '20220728',
'20220729', '20220801', '20220802', '20220803', '20220804',
'20220805', '20220808', '20220809', '20220810', '20220811',
'20220812', '20220816', '20220817'],
"122630": ['20220701', '20220704', '20220705', '20220706', '20220707',
'20220708', '20220711', '20220712', '20220713', '20220714',
'20220715', '20220718', '20220719', '20220720', '20220721',
'20220722', '20220725', '20220726', '20220727', '20220728',
'20220729', '20220801', '20220802', '20220803', '20220804',
'20220805', '20220808', '20220809', '20220810', '20220811',
'20220812', '20220816', '20220817'],
}
labelMaker.check(stock_codes)
if MODE == "WRITE":
for stock_code in stock_codes:
fileName = os.path.join(RESOURCE_PATH, "tmp", "check_"+stock_code+".txt")
outFp = open(fileName, "w")
for ymd in stock_codes[stock_code]:
labelMaker.write(stock_code, ymd, outFp)
outFp.close()
else:
labelMaker.check(stock_codes)