analyser_hj3415 2.9.6__py3-none-any.whl → 2.9.7__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- analyser_hj3415/cli.py +6 -2
- analyser_hj3415/tsa.py +6 -4
- {analyser_hj3415-2.9.6.dist-info → analyser_hj3415-2.9.7.dist-info}/METADATA +1 -1
- {analyser_hj3415-2.9.6.dist-info → analyser_hj3415-2.9.7.dist-info}/RECORD +6 -6
- {analyser_hj3415-2.9.6.dist-info → analyser_hj3415-2.9.7.dist-info}/WHEEL +0 -0
- {analyser_hj3415-2.9.6.dist-info → analyser_hj3415-2.9.7.dist-info}/entry_points.txt +0 -0
analyser_hj3415/cli.py
CHANGED
@@ -55,6 +55,7 @@ def analyser_manager():
|
|
55
55
|
# caching 파서
|
56
56
|
caching_parser = lstm_subparser.add_parser('caching', help='lstm 랭킹 책정 및 레디스 저장')
|
57
57
|
caching_parser.add_argument('-r', '--refresh', action='store_true', help='래디스 캐시를 사용하지 않고 강제로 재계산 할지')
|
58
|
+
caching_parser.add_argument('-t', '--top', type=int, help='prophet ranking 몇위까지 작업을 할지')
|
58
59
|
caching_parser.add_argument('-n', '--noti', action='store_true', help='작업 완료 후 메시지 전송 여부')
|
59
60
|
# red - get 파서
|
60
61
|
lstm_get_parser = lstm_subparser.add_parser('get', help='lstm get 책정 및 레디스 저장')
|
@@ -224,9 +225,12 @@ def analyser_manager():
|
|
224
225
|
noti.telegram_to('manager', "오늘의 prophet ranking을 레디스캐시에 저장했습니다.(유효 24시간)")
|
225
226
|
elif args.type == 'lstm':
|
226
227
|
if args.command == 'caching':
|
227
|
-
|
228
|
+
if args.top:
|
229
|
+
tsa.MyLSTM.caching_based_on_prophet_ranking(refresh=args.refresh, top=args.top)
|
230
|
+
else:
|
231
|
+
tsa.MyLSTM.caching_based_on_prophet_ranking(refresh=args.refresh)
|
228
232
|
if args.noti:
|
229
|
-
noti.telegram_to('manager', "오늘의 lstm caching을 레디스캐시에 저장했습니다.(유효 24시간)")
|
233
|
+
noti.telegram_to('manager', f"오늘의 lstm caching(top={args.top if args.top else 20})을 레디스캐시에 저장했습니다.(유효 24시간)")
|
230
234
|
elif args.command == 'get':
|
231
235
|
assert utils.is_6digit(args.code), "code 인자는 6자리 숫자이어야 합니다."
|
232
236
|
result = tsa.MyLSTM(args.code).get_final_predictions(refresh=args.refresh)
|
analyser_hj3415/tsa.py
CHANGED
@@ -661,14 +661,16 @@ class MyLSTM:
|
|
661
661
|
plt.title('Stock Price Prediction with LSTM Ensemble')
|
662
662
|
plt.show()"""
|
663
663
|
|
664
|
-
|
664
|
+
@staticmethod
|
665
|
+
def caching_based_on_prophet_ranking(refresh: bool, top=20):
|
665
666
|
ranking_topn = OrderedDict(itertools.islice(MyProphet.ranking().items(), top))
|
666
667
|
tsa_logger.info(ranking_topn)
|
668
|
+
mylstm = MyLSTM('005930')
|
667
669
|
print(f"*** LSTM prediction redis cashing top{top} items ***")
|
668
670
|
for i, (code, _) in enumerate(ranking_topn.items()):
|
669
|
-
|
670
|
-
|
671
|
-
|
671
|
+
mylstm.code = code
|
672
|
+
print(f"{i+1}. {mylstm.code}/{mylstm.name}")
|
673
|
+
mylstm.get_final_predictions(refresh=refresh, num=5)
|
672
674
|
|
673
675
|
|
674
676
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
analyser_hj3415/.DS_Store,sha256=S5yjTP1issWmV5kF2CFjGHm5OJHgkuTaZHuxjIwSkfc,6148
|
2
2
|
analyser_hj3415/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
analyser_hj3415/cli.py,sha256=
|
3
|
+
analyser_hj3415/cli.py,sha256=92vcSQG150RbcIOcCBhta5hq6iC0d68ZK2TeDOIQhMU,13989
|
4
4
|
analyser_hj3415/eval.py,sha256=WWIvB4BebjW9GNGcF8rMd-MLL-lPXUBOH01_FpSq95I,38811
|
5
|
-
analyser_hj3415/tsa.py,sha256=
|
5
|
+
analyser_hj3415/tsa.py,sha256=XXmFfCpVMZKjVGebB4yGl5WM0TqfW_VueFpS17Wz_OA,26828
|
6
6
|
analyser_hj3415/workroom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
analyser_hj3415/workroom/mysklearn.py,sha256=wJXKz5MqqTzADdG2mqRMMzc_G9RzwYjj5_j4gyOopxQ,2030
|
8
8
|
analyser_hj3415/workroom/mysklearn2.py,sha256=1lIy6EWEQHkOzDS-av8U0zQH6DuCLKWMI73dnJx5KRs,1495
|
9
9
|
analyser_hj3415/workroom/score.py,sha256=P6nHBJYmyhigGtT4qna4BmNtvt4B93b7SKyzdstJK24,17376
|
10
10
|
analyser_hj3415/workroom/trash.py,sha256=zF-W0piqkGr66UP6-iybo9EXh2gO0RP6R1FnIpsGkl8,12262
|
11
|
-
analyser_hj3415-2.9.
|
12
|
-
analyser_hj3415-2.9.
|
13
|
-
analyser_hj3415-2.9.
|
14
|
-
analyser_hj3415-2.9.
|
11
|
+
analyser_hj3415-2.9.7.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
|
12
|
+
analyser_hj3415-2.9.7.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
13
|
+
analyser_hj3415-2.9.7.dist-info/METADATA,sha256=C0x6TlTEVB-Af3mY4yi6PFeTWoVq5VIEBejyzc681wA,6524
|
14
|
+
analyser_hj3415-2.9.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|