This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import pandas as pd | |
| from xgboost import XGBRegressor | |
| print("Loading cached data...") | |
| X_train = np.load('X_train_cache.npy') | |
| X_unlabeled = np.load('X_unlabeled_cache.npy') | |
| train_df = pd.read_csv('Hackathon_data/train.csv') | |
| test_df = pd.read_csv('Hackathon_data/test.csv') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import json | |
| import time | |
| import sys | |
| def get_mbid_from_api(artist, song_title, app_name="MyApp", app_version="1.0", contact="your-email@example.com"): | |
| api_url = "https://musicbrainz.org/ws/2/recording" | |
| query = f'artist:"{artist}" AND recording:"{song_title}"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| def get_specific_highlevel_features(mbid): | |
| url = f"https://acousticbrainz.org/api/v1/{mbid}/high-level" | |
| try: | |
| response = requests.get(url) | |
| response.raise_for_status() | |
| data = response.json() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File: local-poller-server.cjs | |
| // MODIFIED to add detailed logging | |
| const AWS = require('aws-sdk'); // Using AWS SDK v2 | |
| const WebSocketServer = require('ws').WebSocketServer; | |
| // --- Configuration --- | |
| const REGION = "us-east-2"; // Your DynamoDB table region | |
| const TABLE_NAME = "stride-gps"; // Your DynamoDB table name | |
| const POLLING_INTERVAL_MS = 5000; // Poll DynamoDB every 5 seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File: src/components/BusMap_2.tsx | |
| import React, { useState, useEffect, useRef, useCallback } from 'react'; | |
| import { GoogleMap, useJsApiLoader, Marker } from '@react-google-maps/api'; | |
| import { | |
| mapContainerStyle, | |
| mapOptions as defaultMapOptions, // Rename to avoid conflict with dynamic options | |
| libraries, | |
| GOOGLE_MAPS_API_KEY | |
| } from './map/constants'; // Assuming constants are defined here |