From 3b96fdf4ed668c3f843313b1d284837bef428634 Mon Sep 17 00:00:00 2001 From: Anson Date: Tue, 14 Apr 2020 19:32:18 -0700 Subject: [PATCH] markdown_v2 support removed --- functions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions.py b/functions.py index 08ec9fa..f83e53e 100644 --- a/functions.py +++ b/functions.py @@ -48,7 +48,7 @@ class Symbol: Returns: List of Tuples -- A list tuples of every stock sorted in order of how well they match. Each tuple contains: (Symbol, Issue Name). """ - if self.symbol_ts - datetime.now() > timedelta(hours=12): + if self.symbol_ts - datetime.now() > timedelta(hours=3): self.symbol_list, self.symbol_ts = self.get_symbol_list() symbols = self.symbol_list @@ -62,8 +62,9 @@ class Symbol: lambda x: fuzz.partial_ratio(search.lower(), x["Issue_Name"].lower()), axis=1, ) - symbols.sort_values(by="Match", ascending=False, inplace=True) + symbols.sort_values(by="Match", ascending=False, inplace=True) + symbols = symbols.head(10) return list(zip(list(symbols["Symbol"]), list(symbols["Description"]))) def find_symbols(self, text: str):