Spaces:
Runtime error
Runtime error
Download simulator/schema.py from autodrive/dq-simulator: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/spaces/autodrive/dq-simulator/resolve/main/simulator/schema.py
- Command line
-
hf download hf://spaces/autodrive/dq-simulator/simulator/schema.py
-
curl -L -o schema.py https://huggingface.co/spaces/autodrive/dq-simulator/resolve/main/simulator/schema.py
1.41 kB
| """User events schema definition.""" | |
| EVENT_TYPES = [ | |
| "click", "page_view", "purchase", "login", "logout", | |
| "search", "add_to_cart", "checkout", "refund", "scroll", | |
| ] | |
| DEVICE_TYPES = ["desktop", "mobile", "tablet"] | |
| OS_VALUES = ["Windows", "macOS", "iOS", "Android", "Linux"] | |
| BROWSER_VALUES = ["Chrome", "Firefox", "Safari", "Edge", "IE"] | |
| COUNTRY_CODES = [ | |
| "US", "GB", "DE", "FR", "CA", "AU", "IN", "JP", "BR", "MX", | |
| "IT", "ES", "NL", "SE", "NO", "DK", "FI", "PL", "RU", "CN", | |
| ] | |
| # Valid device/OS combos | |
| DEVICE_OS_COMPAT = { | |
| "desktop": ["Windows", "macOS", "Linux"], | |
| "mobile": ["iOS", "Android"], | |
| "tablet": ["iOS", "Android", "Windows"], | |
| } | |
| # Valid OS/browser combos (IE not on macOS/Linux) | |
| OS_BROWSER_COMPAT = { | |
| "Windows": ["Chrome", "Firefox", "Safari", "Edge", "IE"], | |
| "macOS": ["Chrome", "Firefox", "Safari", "Edge"], | |
| "iOS": ["Chrome", "Firefox", "Safari"], | |
| "Android": ["Chrome", "Firefox"], | |
| "Linux": ["Chrome", "Firefox"], | |
| } | |
| SCHEMA_COLUMNS = [ | |
| "event_id", | |
| "user_id", | |
| "session_id", | |
| "event_type", | |
| "timestamp", | |
| "page_url", | |
| "referrer_url", | |
| "ip_address", | |
| "device_type", | |
| "os", | |
| "browser", | |
| "country_code", | |
| "city", | |
| "duration_seconds", | |
| "revenue", | |
| "product_id", | |
| "quantity", | |
| "search_query", | |
| "user_agent", | |
| "is_authenticated", | |
| "user_age", | |
| "email", | |
| "user_registration_date", | |
| ] | |