There is a mix of stuff, but the two interesting components are OnlinePythonTutor[1], called "CodeLens" and Skulpt[2].
OPT actually sends data to a server and has a program inspecting a debugger which sends data back.
The other exercises rely on Skulpt, which is a JS-based reimplementation of Python.
1. https://github.com/pgbovine/OnlinePythonTutor/blob/master/v3... 2. http://www.skulpt.org