From 9543a2f445b5875bfeaeeebeac1417f3b82d6e58 Mon Sep 17 00:00:00 2001 From: sina <20732540+SinaKhalili@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:14:48 -0700 Subject: [PATCH] Remove VAT lib --- src/lib/vat.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/lib/vat.py diff --git a/src/lib/vat.py b/src/lib/vat.py deleted file mode 100644 index cdd2b71..0000000 --- a/src/lib/vat.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -VAT (Virtual Account Table) Loading -""" - -import asyncio -import os -import time - -import streamlit as st -from driftpy.drift_client import DriftClient - -from utils import load_newest_files, load_vat - - -@st.cache_data() -def cached_load_vat(dc: DriftClient): - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) - newest_snapshot = load_newest_files(os.getcwd() + "/pickles") - vat = loop.run_until_complete(load_vat(dc, newest_snapshot)) - loop.close() - return vat - - -def get_vat(dc: DriftClient): - start_load_vat = time.time() - vat = cached_load_vat(dc) - print(f"loaded vat in {time.time() - start_load_vat}") - return vat