analyser_hj3415 2.9.10__tar.gz → 2.9.12__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/PKG-INFO +1 -1
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/cli.py +13 -17
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/eval.py +1 -1
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/pyproject.toml +1 -1
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/.gitignore +0 -0
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/README.md +0 -0
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/__init__.py +0 -0
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/tsa.py +0 -0
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/workroom/__init__.py +0 -0
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/workroom/mysklearn.py +0 -0
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/workroom/mysklearn2.py +0 -0
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/workroom/score.py +0 -0
- {analyser_hj3415-2.9.10 → analyser_hj3415-2.9.12}/analyser_hj3415/workroom/trash.py +0 -0
@@ -2,9 +2,9 @@ import argparse
|
|
2
2
|
import os
|
3
3
|
import pprint
|
4
4
|
|
5
|
-
from utils_hj3415 import
|
5
|
+
from utils_hj3415 import utils
|
6
6
|
from utils_hj3415.helpers import SettingsManager
|
7
|
-
from db_hj3415 import myredis,
|
7
|
+
from db_hj3415 import myredis, mymongo
|
8
8
|
|
9
9
|
class AnalyserSettingsManager(SettingsManager):
|
10
10
|
DEFAULT_SETTINGS = {
|
@@ -33,8 +33,6 @@ class AnalyserSettingsManager(SettingsManager):
|
|
33
33
|
print(f"{title}이 기본값 ({self.DEFAULT_SETTINGS[title]}) 으로 초기화 되었습니다.")
|
34
34
|
|
35
35
|
|
36
|
-
log_cli = mypeewee.LogManager('cli')
|
37
|
-
|
38
36
|
def analyser_manager():
|
39
37
|
settings_manager = AnalyserSettingsManager()
|
40
38
|
expect_earn_from_setting = settings_manager.get_value('EXPECT_EARN')
|
@@ -151,10 +149,10 @@ def analyser_manager():
|
|
151
149
|
|
152
150
|
# 원래 저장되었던 기대수익률로 다시 복원
|
153
151
|
eval.Red.expect_earn = ee_orig
|
154
|
-
|
152
|
+
mymongo.Logs.save('cli','INFO', f'run >> analyser red get {args.code}')
|
155
153
|
|
156
154
|
elif args.command == 'ranking':
|
157
|
-
|
155
|
+
mymongo.Logs.save('cli','INFO', 'run >> analyser red ranking')
|
158
156
|
result = eval.Red.ranking(expect_earn=args.expect_earn, refresh=args.refresh)
|
159
157
|
print(result)
|
160
158
|
|
@@ -172,7 +170,7 @@ def analyser_manager():
|
|
172
170
|
mil = eval.Mil(args.code)
|
173
171
|
print(f"*** Mil - {mil} ***")
|
174
172
|
pprint.pprint(mil.get(args.refresh))
|
175
|
-
|
173
|
+
mymongo.Logs.save('cli','INFO', f'run >> analyser mil get {args.code}')
|
176
174
|
|
177
175
|
elif args.type == 'blue':
|
178
176
|
if args.command == 'get':
|
@@ -188,7 +186,7 @@ def analyser_manager():
|
|
188
186
|
blue = eval.Blue(args.code)
|
189
187
|
print(f"*** Blue - {blue} ***")
|
190
188
|
pprint.pprint(blue.get(args.refresh))
|
191
|
-
|
189
|
+
mymongo.Logs.save('cli','INFO', f'run >> analyser blue get {args.code}')
|
192
190
|
|
193
191
|
elif args.type == 'growth':
|
194
192
|
if args.command == 'get':
|
@@ -204,27 +202,27 @@ def analyser_manager():
|
|
204
202
|
growth = eval.Growth(args.code)
|
205
203
|
print(f"*** growth - {growth} ***")
|
206
204
|
pprint.pprint(growth.get(args.refresh))
|
207
|
-
|
205
|
+
mymongo.Logs.save('cli','INFO', f'run >> analyser growth get {args.code}')
|
208
206
|
|
209
207
|
elif args.type == 'prophet':
|
210
208
|
if args.command == 'ranking':
|
211
209
|
myprophet = tsa.MyProphet
|
212
210
|
result = myprophet.ranking(refresh=args.refresh, expire_time_h=24)
|
213
211
|
print(result)
|
214
|
-
|
212
|
+
mymongo.Logs.save('cli','INFO', 'run >> analyser prophet ranking')
|
215
213
|
|
216
214
|
elif args.type == 'lstm':
|
217
215
|
mylstm = tsa.MyLSTM
|
218
216
|
if args.command == 'caching':
|
219
217
|
if args.top:
|
220
|
-
mylstm.caching_based_on_prophet_ranking(refresh=args.refresh, expire_time_h=
|
218
|
+
mylstm.caching_based_on_prophet_ranking(refresh=args.refresh, expire_time_h=48, top=args.top)
|
221
219
|
else:
|
222
|
-
mylstm.caching_based_on_prophet_ranking(refresh=args.refresh, expire_time_h=
|
223
|
-
|
220
|
+
mylstm.caching_based_on_prophet_ranking(refresh=args.refresh, expire_time_h=48)
|
221
|
+
mymongo.Logs.save('cli','INFO', f'run >> analyser lstm caching / top={args.top if args.top else 20}')
|
224
222
|
elif args.command == 'get':
|
225
223
|
assert utils.is_6digit(args.code), "code 인자는 6자리 숫자이어야 합니다."
|
226
|
-
result = mylstm(args.code).get_final_predictions(refresh=args.refresh, expire_time_h=
|
227
|
-
|
224
|
+
result = mylstm(args.code).get_final_predictions(refresh=args.refresh, expire_time_h=48)
|
225
|
+
mymongo.Logs.save('cli','INFO', f'run >> analyser lstm get {args.code}')
|
228
226
|
|
229
227
|
elif args.type == 'setting':
|
230
228
|
if args.command == 'set':
|
@@ -237,5 +235,3 @@ def analyser_manager():
|
|
237
235
|
|
238
236
|
else:
|
239
237
|
parser.print_help()
|
240
|
-
|
241
|
-
log_cli.close()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|