James McCool
commited on
Commit
·
43e7adb
1
Parent(s):
8848042
adding db args
Browse files
src/sim_func_hold/regular_functions.py
CHANGED
|
@@ -4,7 +4,7 @@ import numpy as np
|
|
| 4 |
from pymongo import MongoClient
|
| 5 |
|
| 6 |
@st.cache_data(ttl = 600)
|
| 7 |
-
def init_DK_seed_frames(slate_var, sharp_split):
|
| 8 |
|
| 9 |
collection = db['DK_NFL_name_map']
|
| 10 |
cursor = collection.find()
|
|
@@ -23,7 +23,7 @@ def init_DK_seed_frames(slate_var, sharp_split):
|
|
| 23 |
return DK_seed
|
| 24 |
|
| 25 |
@st.cache_data(ttl = 599)
|
| 26 |
-
def init_FD_seed_frames(slate_var, sharp_split):
|
| 27 |
|
| 28 |
collection = db['FD_NFL_name_map']
|
| 29 |
cursor = collection.find()
|
|
@@ -43,7 +43,7 @@ def init_FD_seed_frames(slate_var, sharp_split):
|
|
| 43 |
return FD_seed
|
| 44 |
|
| 45 |
@st.cache_data(ttl = 599)
|
| 46 |
-
def init_baselines(slate_var):
|
| 47 |
collection = db["DK_NFL_ROO"]
|
| 48 |
cursor = collection.find()
|
| 49 |
|
|
|
|
| 4 |
from pymongo import MongoClient
|
| 5 |
|
| 6 |
@st.cache_data(ttl = 600)
|
| 7 |
+
def init_DK_seed_frames(slate_var, sharp_split, db):
|
| 8 |
|
| 9 |
collection = db['DK_NFL_name_map']
|
| 10 |
cursor = collection.find()
|
|
|
|
| 23 |
return DK_seed
|
| 24 |
|
| 25 |
@st.cache_data(ttl = 599)
|
| 26 |
+
def init_FD_seed_frames(slate_var, sharp_split, db):
|
| 27 |
|
| 28 |
collection = db['FD_NFL_name_map']
|
| 29 |
cursor = collection.find()
|
|
|
|
| 43 |
return FD_seed
|
| 44 |
|
| 45 |
@st.cache_data(ttl = 599)
|
| 46 |
+
def init_baselines(slate_var, db):
|
| 47 |
collection = db["DK_NFL_ROO"]
|
| 48 |
cursor = collection.find()
|
| 49 |
|
src/sim_func_hold/showdown_functions.py
CHANGED
|
@@ -4,7 +4,7 @@ import numpy as np
|
|
| 4 |
from pymongo import MongoClient
|
| 5 |
|
| 6 |
@st.cache_data(ttl = 599)
|
| 7 |
-
def init_DK_SD_seed_frames(slate, split):
|
| 8 |
if slate == 'Main Slate':
|
| 9 |
collection = db[f"DK_NFL_SD_seed_frame"]
|
| 10 |
elif slate == 'Secondary Slate':
|
|
@@ -21,7 +21,7 @@ def init_DK_SD_seed_frames(slate, split):
|
|
| 21 |
return DK_seed
|
| 22 |
|
| 23 |
@st.cache_data(ttl = 599)
|
| 24 |
-
def init_FD_SD_seed_frames(slate, split):
|
| 25 |
if slate == 'Main Slate':
|
| 26 |
collection = db[f"FD_NFL_SD_seed_frame"]
|
| 27 |
elif slate == 'Secondary Slate':
|
|
@@ -38,7 +38,7 @@ def init_FD_SD_seed_frames(slate, split):
|
|
| 38 |
return FD_seed
|
| 39 |
|
| 40 |
@st.cache_data(ttl = 599)
|
| 41 |
-
def init_SD_baselines(slate_var):
|
| 42 |
collection = db['DK_SD_NFL_ROO']
|
| 43 |
cursor = collection.find()
|
| 44 |
|
|
|
|
| 4 |
from pymongo import MongoClient
|
| 5 |
|
| 6 |
@st.cache_data(ttl = 599)
|
| 7 |
+
def init_DK_SD_seed_frames(slate, split, db):
|
| 8 |
if slate == 'Main Slate':
|
| 9 |
collection = db[f"DK_NFL_SD_seed_frame"]
|
| 10 |
elif slate == 'Secondary Slate':
|
|
|
|
| 21 |
return DK_seed
|
| 22 |
|
| 23 |
@st.cache_data(ttl = 599)
|
| 24 |
+
def init_FD_SD_seed_frames(slate, split, db):
|
| 25 |
if slate == 'Main Slate':
|
| 26 |
collection = db[f"FD_NFL_SD_seed_frame"]
|
| 27 |
elif slate == 'Secondary Slate':
|
|
|
|
| 38 |
return FD_seed
|
| 39 |
|
| 40 |
@st.cache_data(ttl = 599)
|
| 41 |
+
def init_SD_baselines(slate_var, db):
|
| 42 |
collection = db['DK_SD_NFL_ROO']
|
| 43 |
cursor = collection.find()
|
| 44 |
|