Spaces:
Sleeping
Sleeping
Delete config.py
Browse files
config.py
DELETED
|
@@ -1,51 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
from dotenv import load_dotenv
|
| 3 |
-
|
| 4 |
-
if os.path.exists('.env'):
|
| 5 |
-
load_dotenv('.env')
|
| 6 |
-
|
| 7 |
-
if not os.getenv('BUCKET_PATH'):
|
| 8 |
-
os.environ['BUCKET_PATH'] = '/data'
|
| 9 |
-
|
| 10 |
-
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 11 |
-
LOGIN_URL = 'https://www.betpawa.cm/login'
|
| 12 |
-
DEPOSIT_URL = 'https://www.betpawa.cm/deposit'
|
| 13 |
-
AVIATOR_URL = 'https://www.betpawa.cm/casino?gameId=aviator&filter=all'
|
| 14 |
-
DESKTOP_VIEWPORT = {'width': 1920, 'height': 950}
|
| 15 |
-
|
| 16 |
-
ADMIN_USER = os.getenv('ADMIN', 'admin')
|
| 17 |
-
ADMIN_PASS = os.getenv('PASSWORD', 'admin')
|
| 18 |
-
BETPAWA_PHONE = os.getenv('BETPAWA_PHONE')
|
| 19 |
-
BETPAWA_PASSWORD = os.getenv('BETPAWA_PASSWORD')
|
| 20 |
-
KEEP_AWAKE_URLS = [
|
| 21 |
-
"https://deep-weather-sim-dws.hf.space/",
|
| 22 |
-
"https://deep-weather-sim-meteo.hf.space/",
|
| 23 |
-
"https://deep-weather-sim-meteo-2.hf.space/"
|
| 24 |
-
]
|
| 25 |
-
|
| 26 |
-
BUCKET_BASE = os.path.abspath(os.getenv('BUCKET_PATH', './data'))
|
| 27 |
-
|
| 28 |
-
DATASETS_DIR = os.path.join(BUCKET_BASE, 'datasets')
|
| 29 |
-
MODELS_DIR = os.path.join(BUCKET_BASE, 'models')
|
| 30 |
-
SESSION_DIR = os.path.join(BUCKET_BASE, 'betpawa_session')
|
| 31 |
-
DATASETS_REG_DIR = os.path.join(DATASETS_DIR, 'regression')
|
| 32 |
-
DATASETS_BIN_DIR = os.path.join(DATASETS_DIR, 'classification_binary')
|
| 33 |
-
MODELS_REG_DIR = os.path.join(MODELS_DIR, 'regression')
|
| 34 |
-
MODELS_BIN_DIR = os.path.join(MODELS_DIR, 'classification_binary')
|
| 35 |
-
STATE_PATH = os.path.join(SESSION_DIR, 'state.json')
|
| 36 |
-
|
| 37 |
-
WINDOWS = [10, 20, 30, 50, 100]
|
| 38 |
-
THRESHOLDS = [2.0, 3.0, 5.0, 10.0, 100.0]
|
| 39 |
-
|
| 40 |
-
def get_label(cote, threshold):
|
| 41 |
-
return 0 if cote > threshold else 1
|
| 42 |
-
|
| 43 |
-
def init_folders():
|
| 44 |
-
folders = [
|
| 45 |
-
BUCKET_BASE,
|
| 46 |
-
DATASETS_DIR, MODELS_DIR, SESSION_DIR,
|
| 47 |
-
DATASETS_REG_DIR, DATASETS_BIN_DIR,
|
| 48 |
-
MODELS_REG_DIR, MODELS_BIN_DIR
|
| 49 |
-
]
|
| 50 |
-
for folder in folders:
|
| 51 |
-
os.makedirs(folder, exist_ok=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|