{"id":50913346,"url":"https://github.com/rusetiq/dishkv2","last_synced_at":"2026-06-16T12:30:33.354Z","repository":{"id":363824791,"uuid":"1246339085","full_name":"rusetiq/dishkv2","owner":"rusetiq","description":"A Django-based project for conducting hackathons with a Python code runner.","archived":false,"fork":false,"pushed_at":"2026-06-10T13:12:44.000Z","size":6327,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T15:10:05.291Z","etag":null,"topics":["hackathon","leetcode","sandboxing"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rusetiq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-22T05:22:26.000Z","updated_at":"2026-06-10T13:13:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rusetiq/dishkv2","commit_stats":null,"previous_names":["rusetiq/dishkv2"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rusetiq/dishkv2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusetiq%2Fdishkv2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusetiq%2Fdishkv2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusetiq%2Fdishkv2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusetiq%2Fdishkv2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rusetiq","download_url":"https://codeload.github.com/rusetiq/dishkv2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusetiq%2Fdishkv2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34406818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hackathon","leetcode","sandboxing"],"created_at":"2026-06-16T12:30:32.472Z","updated_at":"2026-06-16T12:30:33.342Z","avatar_url":"https://github.com/rusetiq.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dishkv2\n\nA real-time, interactive LeetCode-style hackathon platform built with Python and Django. This platform enables organizations to host programming competitions where teams can write Python solutions to algorithmic challenges, receive AI-powered hints, compete in fast-paced bonus rounds, and track their progress on a live, dynamic leaderboard.\n\n---\n\n## Features\n\n### Live Editor \u0026 Code Execution Sandbox\n- **Interactive IDE**: A fully-featured web-based code editor pre-populated with starter code templates.\n- **Custom Sandbox runner**: Safely executes python submissions against pre-defined test cases using sub-processes.\n- **LeetCode Style Driver**: Automatically parses inputs, injects helper utilities (such as `isBadVersion`), and runs solution methods on the fly.\n\n### AI Hints System\n- **Context-Aware Assistance**: Integrates with LLMs (e.g., Llama-3.3-70B, GPT-4o, Groq) to provide smart hints based on the user's current code draft.\n- **Admin Managed Limits**: Configurable token system for hints, allowing admins to enable/disable or limit the AI assistance per team.\n\n### Cheat Prevention (Tab Switch Tracking)\n- **Tab Monitoring**: Tracks when users change tabs or leave the browser window while working on a problem.\n- **Anti-Cheat Logs**: Logs tab switches in the database (`tab_switches`) to help administrators maintain competition integrity.\n\n### Dynamic Bonus Round\n- **Speed Runs**: Active timed questions launched dynamically by admins during the event.\n- **Dynamic Scoring**: Score decay rewards faster submissions (e.g. earlier finishers get up to 200 points, scaling down to 0).\n- **Fastest Finisher Bonus**: Tracking and bonus rewards for the first team to solve all bonus questions.\n\n### Live Leaderboard \u0026 Admin Dashboard\n- **Dynamic Standings**: Real-time ranks showing aggregated scores (Problem points + Bonus points + Adjustments).\n- **Score Penalties**: Time-based scoring decays points based on time elapsed before a correct submission is made.\n- **Point Adjustments**: Admin capability to grant bonuses or issue penalties to teams manually.\n- **Central Control Room**: Admins can pause, resume, start, or finish the event globally.\n\n---\n\n## Repository Structure\n\n```text\n├── hackathon_project/\n│   ├── core/\n│   │   ├── core/\n│   │   ├── platform_app/\n│   │   ├── templates/\n│   │   ├── simulate.py\n│   │   └── manage.py\n│   └── tutorial/\n├── requirements.txt\n├── users_login_status.csv\n└── README.md\n```\n\n---\n\n## Getting Started\n\n### Prerequisites\n- Python 3.10+\n- Django 4.x+\n\n### Installation \u0026 Setup\n\n1. **Clone the repository**:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd dishkv2\n   ```\n\n2. **Install dependencies**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Configure Environment Variables**:\n   Create a `.env` file inside `hackathon_project/core/` and `hackathon_project/tutorial/` with the following variables:\n   ```env\n   SECRET_KEY=your-django-secret-key\n   GROQ_API_KEY=your-groq-api-key\n   ```\n\n4. **Run Migrations \u0026 Initialize Database**:\n   ```bash\n   cd hackathon_project/core\n   python manage.py migrate\n   python manage.py shell -c \"from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@example.com', 'adminpassword') if not User.objects.filter(username='admin').exists() else None\"\n   ```\n\n5. **Start the Development Server**:\n   ```bash\n   python manage.py runserver 0.0.0.0:8000\n   ```\n   Open your browser and log in at `http://localhost:8000/`.\n\n---\n\n## Concurrency Load Testing (`simulate.py`)\n\nThe platform contains a dedicated simulation script (`simulate.py`) to benchmark the system under heavy load. It spins up 100 concurrent threads executing realistic user sessions:\n- Authenticates and logs in.\n- Interacts with the home dashboard and question pages.\n- Saves code drafts and triggers custom compiler test runs.\n- Submits solutions and fetches leaderboard stats recursively.\n- Submits active bonus round answers.\n\n### Running the Simulator\nEnsure the server is running on `http://127.0.0.1:8000` or configured appropriately in `simulate.py` (`BASE_URL`), then execute:\n```bash\npython simulate.py\n```\n\nIt will generate a detailed **Concurrency Simulation Report** showing:\n- Success rate, total runtime, and request throughput.\n- Average response time, 95th percentile (P95), and Max latency per endpoint (e.g., `/api/save/`, `/api/submit/`).\n- Performance bottlenecks analysis, highlighting SQLite write locking and subprocess compiler load limits.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frusetiq%2Fdishkv2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frusetiq%2Fdishkv2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frusetiq%2Fdishkv2/lists"}