Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 109 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,109 @@
# SCEHack
# SCE Question App

A fun interactive application that asks "Do you like SCE?" and responds accordingly. If you answer "No", it will run a GPU stress test to show you what happens when you don't appreciate SCE! 😄

## Features

- Clean, modern GUI built with tkinter
- Interactive question with Yes/No buttons
- GPU stress test using OpenCL for the "wrong" answer
- Cross-platform compatibility (Windows, macOS, Linux)

## Requirements

- Python 3.7 or higher
- OpenCL-compatible GPU (for the stress test)
- Virtual environment support

## Quick Start

### Option 1: Double-Click to Run (macOS)

**Simply double-click `SCE Question.app` in Finder!**

The app will automatically:
- Set up the virtual environment
- Install dependencies
- Launch the GUI

### Option 2: Command Line (All Platforms)

**On macOS/Linux:**
```bash
./run.sh
```

**On Windows:**
```bash
run.bat
```

**Any platform:**
```bash
python run.py
```

### Option 3: Manual Setup

1. **Create and activate virtual environment:**
```bash
python3 -m venv venv

# On macOS/Linux:
source venv/bin/activate

# On Windows:
venv\Scripts\activate
```

2. **Install dependencies:**
```bash
pip install -r requirements.txt
```

3. **Run the application:**
```bash
python gui_app.py
```

## How It Works

1. The application opens with a simple question: "Do you like SCE?"
2. **If you click "Yes":** The app displays "Good" and closes gracefully
3. **If you click "No":** The app displays "Wrong Answer." and launches a GPU stress test that will make your computer work hard!

## Files Structure

- `gui_app.py` - Main GUI application
- `main.py` - GPU stress test using OpenCL
- `SCE Question.app/` - macOS application bundle (double-click to run!)
- `run.py` - Cross-platform setup and runner script
- `run.sh` - Unix shell script for easy execution
- `run.bat` - Windows batch file for easy execution
- `requirements.txt` - Python dependencies
- `venv/` - Virtual environment (created automatically)

## Dependencies

- `numpy` - For numerical operations in the stress test
- `pyopencl` - For GPU computing and stress testing
- `tkinter` - For the GUI (included with Python)

## Troubleshooting

**OpenCL Issues:**
- Make sure you have OpenCL drivers installed for your GPU
- On macOS, OpenCL is included by default
- On Linux, install `opencl-headers` and appropriate GPU drivers
- On Windows, install GPU manufacturer's drivers

**Virtual Environment Issues:**
- Make sure Python 3.7+ is installed
- Try running `python -m pip install --upgrade pip` before installing dependencies

**Permission Issues on macOS/Linux:**
- Make sure the run script is executable: `chmod +x run.sh`

## Warning

The GPU stress test in `main.py` will run indefinitely and use significant system resources. Use Ctrl+C to stop it if needed. Don't run this on battery power or systems with cooling issues!
53 changes: 53 additions & 0 deletions SCE Question.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>applet</string>
<key>CFBundleIconFile</key>
<string>applet</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>SCE Question</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>aplt</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<key>LSRequiresCarbon</key>
<true/>
<key>NSAppleEventsUsageDescription</key>
<string>This script needs to control other applications to run.</string>
<key>NSAppleMusicUsageDescription</key>
<string>This script needs access to your music to run.</string>
<key>NSCalendarsUsageDescription</key>
<string>This script needs access to your calendars to run.</string>
<key>NSCameraUsageDescription</key>
<string>This script needs access to your camera to run.</string>
<key>NSContactsUsageDescription</key>
<string>This script needs access to your contacts to run.</string>
<key>NSHomeKitUsageDescription</key>
<string>This script needs access to your HomeKit Home to run.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This script needs access to your microphone to run.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This script needs access to your photos to run.</string>
<key>NSRemindersUsageDescription</key>
<string>This script needs access to your reminders to run.</string>
<key>NSSiriUsageDescription</key>
<string>This script needs access to Siri to run.</string>
<key>NSSystemAdministrationUsageDescription</key>
<string>This script needs access to administer this system to run.</string>
<key>OSAAppletShowStartupScreen</key>
<false/>
</dict>
</plist>
Binary file added SCE Question.app/Contents/MacOS/applet
Binary file not shown.
1 change: 1 addition & 0 deletions SCE Question.app/Contents/PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPLaplt
Binary file not shown.
Binary file added SCE Question.app/Contents/Resources/applet.icns
Binary file not shown.
Binary file added SCE Question.app/Contents/Resources/applet.rsrc
Binary file not shown.
162 changes: 162 additions & 0 deletions SCE Question.app/Contents/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Resources/Scripts/main.scpt</key>
<data>
jCUmny8CJJuGm4Lz3Fag/Ny8q+M=
</data>
<key>Resources/applet.icns</key>
<data>
sINd6lbiqHD5dL8c6u79cFvVXhw=
</data>
<key>Resources/applet.rsrc</key>
<data>
ar5xmDs9mPpaINVXiVlVqUCB8ao=
</data>
</dict>
<key>files2</key>
<dict>
<key>Resources/Scripts/main.scpt</key>
<dict>
<key>hash</key>
<data>
jCUmny8CJJuGm4Lz3Fag/Ny8q+M=
</data>
<key>hash2</key>
<data>
7HdlX38WbikegIoy1CLrqZkHb8efHPMXwzmyOqlsoyc=
</data>
</dict>
<key>Resources/applet.icns</key>
<dict>
<key>hash</key>
<data>
sINd6lbiqHD5dL8c6u79cFvVXhw=
</data>
<key>hash2</key>
<data>
J7weZ6vlnv9r32tS5HFcyuPXl2StdDnfepLxAixlryk=
</data>
</dict>
<key>Resources/applet.rsrc</key>
<dict>
<key>hash</key>
<data>
ar5xmDs9mPpaINVXiVlVqUCB8ao=
</data>
<key>hash2</key>
<data>
NV2dNLwgykV7aWfTBywUILBA9Lidl7F51PrkQw77SbM=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
2 changes: 2 additions & 0 deletions app_launch.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fri Sep 5 14:09:27 PDT 2025: Setup script completed successfully
Fri Sep 5 14:09:27 PDT 2025: Application finished
19 changes: 19 additions & 0 deletions create_clickable_app.scpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- AppleScript to create a clickable app for SCE Question
-- This script creates an AppleScript application that can be double-clicked

tell application "Script Editor"
set appScript to "-- SCE Question App Launcher
on run
set scriptPath to (path to me as string)
set scriptFolder to do shell script \"dirname \" & quoted form of POSIX path of scriptPath

tell application \"Terminal\"
activate
do script \"cd \" & quoted form of scriptFolder & \" && python run.py\"
end tell
end run"

set newDoc to make new document with properties {text:appScript}
save newDoc in file ((path to desktop as string) & \"SCE Question.app\") as «class scpt»
close newDoc
end tell
13 changes: 13 additions & 0 deletions launcher.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- SCE Question App Launcher
on run
set scriptPath to (path to me as string)
set scriptFolder to do shell script "dirname " & quoted form of POSIX path of scriptPath

try
-- Run the Python script directly without showing Terminal
do shell script "cd " & quoted form of scriptFolder & " && /usr/bin/python3 run.py > /dev/null 2>&1 &"

on error errMsg
display dialog "Error launching SCE Question App: " & errMsg buttons {"OK"} default button "OK"
end try
end run
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy>=1.21.0
pyopencl>=2022.1
Loading