analyser_hj3415 2.9.13__py3-none-any.whl → 2.9.14__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
analyser_hj3415/tsa.py CHANGED
@@ -193,7 +193,7 @@ class MyProphet:
193
193
  Exception("to 인자가 맞지 않습니다.")
194
194
 
195
195
  @classmethod
196
- def ranking(cls, refresh = False, expire_time_h = 24) -> OrderedDict:
196
+ def ranking(cls, refresh = False, expire_time_h = 24, top='all') -> OrderedDict:
197
197
  """
198
198
  가장 최근 날짜의 랭킹 분석
199
199
  :param refresh:
@@ -228,7 +228,14 @@ class MyProphet:
228
228
 
229
229
  data_dict = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_ranking, timer=expire_time_h * 3600)
230
230
 
231
- return OrderedDict(sorted(data_dict.items(), key=lambda item: item[1], reverse=True))
231
+ ranking = OrderedDict(sorted(data_dict.items(), key=lambda item: item[1], reverse=True))
232
+ if top == 'all':
233
+ return ranking
234
+ else:
235
+ if isinstance(top, int):
236
+ return OrderedDict(list(ranking.items())[:top])
237
+ else:
238
+ raise ValueError("top 인자는 int 형이어야 합니다.")
232
239
 
233
240
  @dataclass
234
241
  class LSTMData:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: analyser_hj3415
3
- Version: 2.9.13
3
+ Version: 2.9.14
4
4
  Summary: Stock analyser and database processing programs
5
5
  Requires-Python: >=3.6
6
6
  Description-Content-Type: text/markdown
@@ -1,13 +1,13 @@
1
1
  analyser_hj3415/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  analyser_hj3415/cli.py,sha256=a4oUwfPFEdd3r2Fq2EMHBITcp6lbXUjZvVWvCHIvCUQ,12540
3
3
  analyser_hj3415/eval.py,sha256=eNrcbpVyj7SZJevWqatlj_gJ2EQTmLZAz2nPG5qNv6k,38811
4
- analyser_hj3415/tsa.py,sha256=p_4COG10QacfkT3kQ-jcpEUpXjxWkYGHFLyiBoj-ElA,27188
4
+ analyser_hj3415/tsa.py,sha256=fc1jd4b-04Xm77i2800QOV8xw6AWJsDSARwOTQJa1zI,27465
5
5
  analyser_hj3415/workroom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  analyser_hj3415/workroom/mysklearn.py,sha256=wJXKz5MqqTzADdG2mqRMMzc_G9RzwYjj5_j4gyOopxQ,2030
7
7
  analyser_hj3415/workroom/mysklearn2.py,sha256=1lIy6EWEQHkOzDS-av8U0zQH6DuCLKWMI73dnJx5KRs,1495
8
8
  analyser_hj3415/workroom/score.py,sha256=P6nHBJYmyhigGtT4qna4BmNtvt4B93b7SKyzdstJK24,17376
9
9
  analyser_hj3415/workroom/trash.py,sha256=zF-W0piqkGr66UP6-iybo9EXh2gO0RP6R1FnIpsGkl8,12262
10
- analyser_hj3415-2.9.13.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
11
- analyser_hj3415-2.9.13.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
12
- analyser_hj3415-2.9.13.dist-info/METADATA,sha256=BZVXDFQthdUoj4oEcy54IkW2_NeLCBBCZvL3UIICTUc,6777
13
- analyser_hj3415-2.9.13.dist-info/RECORD,,
10
+ analyser_hj3415-2.9.14.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
11
+ analyser_hj3415-2.9.14.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
12
+ analyser_hj3415-2.9.14.dist-info/METADATA,sha256=v4p_RcYiGXPYA-3qAkZMnMeAeoG03O4s_-DEfdXcd7Q,6777
13
+ analyser_hj3415-2.9.14.dist-info/RECORD,,