Welcome to the most vibrant, mind-expanding record selection tool you've ever encountered! This isn't just code—it's a journey through the kaleidoscope of musical possibilities!
This Python script dances through Google Sheets to:
- 🌊 Flow through data streams to gather names and records
- 🎲 Bend probability into beautiful patterns to select a person
- 🎯 Pluck a record from their collection like a flower from a garden
- ⚖️ Transform the weight matrix in a dazzling rebalancing act
- 🔄 Create harmony through mathematical equilibrium
- Python 3.6+ (the more recent, the more vivid the experience)
- Google Sheets API credentials (your backstage pass to the data concert)
- These magical packages:
- google-api-python-client (your translator to the Google dimension)
- google-auth (your security blanket)
- pandas (not the animal, but equally fascinating)
- numpy (because numbers should never be boring)
- python-dotenv (for environment variable magic)
pip install -r requirements.txt
- Copy the example environment file:
cp env.example .env- Edit
.envfile with your actual values:
# Google Sheets API Configuration
GOOGLE_SHEET_ID=your_actual_google_sheet_id_here
GOOGLE_APPLICATION_CREDENTIALS=cred/credentials.json
DEBUG=False # Set to True to see the multiverse of possibilities- Set up Google Sheets API credentials:
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google Sheets API
- Create Service Account credentials
- Download the JSON file and save it as
cred/credentials.json
Your sheet should be structured like this beautiful pattern:
- Row 1: Names of the magnificent participants
- Rows 2-6: A tapestry of records, each one a universe of sound
- Row 7: Weight values - the gravitational forces of selection
- Row 8: Attendance status - "TRUE" for those present in this dimension
Run the script and watch the colors explode:
python src/main.pyThe chosen one is: [A name appears like a shooting star] The record is: [A record materializes from the void] New weights are: [Numbers dance and rearrange themselves]
When DEBUG = True, witness 1000 parallel universes of selection unfold before your eyes, each one a unique possibility in the grand tapestry of probability!
- Only those present can be chosen - you must exist in this reality to participate
- Selection follows the flowing rivers of weighted probability
- After selection, the chosen one's gravitational pull weakens
- Everyone else's pull strengthens - a perfect balance in the universe
- Over time, patterns emerge from chaos, ensuring fairness through mathematics
Watch as points flow like liquid between participants:
- The chosen one shares their energy with the group
- The collective receives this gift of probability
- The amount shared depends on the current energy state and attendance
- This creates a self-balancing ecosystem of selection
"In the swirling patterns of randomness, we find the most beautiful order." 🌀