~fkfd/badgrader

Play Bad Apple on your EECS 281 autograder
Update .gitignore
Add demo image
Turns out srht doesn't render <video>

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~fkfd/badgrader
read/write
git@git.sr.ht:~fkfd/badgrader

You can also use your local clone with git send-email.

#Bad Grader!!

Green and red cells form a table resembling the Bad Apple!! PV

Video (MP4, 35.1 MiB)

#How to use

  • Install the Tampermonkey browser extension
  • Download, install and enable badgrader.js
  • Refresh autograder
  • Click any table (warning: plays music)

#How it's made

  • Step 1: download music video
  • Step 2: extract frames at 10fps:
mkdir frames
ffmpeg -i [VIDEO FILE] -r 10 frames/frame%04d.png

Frames are saved to frames/frame0001.png up to 2192.png.

  • Step 3: run frame.py, which

    • resizes each frame to 20×20
    • thresholds each pixel to one bit
    • converts each row of pixels into an int (rightmost pixel is LSB)
    • builds an int array out of 20 rows in a frame
    • builds a 2d int array out of 2192 frames
    • saves said array to ./frames.js
  • Step 4: add logic: basically the inverse of step 3, except

    • each frame rewrites the entire innerHTML of the table
    • frames are rendered at 100 ms intervals
    • check out badgrader.js:2192 for actual code

idk fair use or smth im not american