I chalked some of it up to "suspension of disbelief" much like an episode of CSI, though I'd also argue there's nothing like learning under extreme conditions either, you'd be surprised what you can do/learn when your life or job depends on getting something done. In pretty much any IT field, you've got to be able to adapt and learn on your feet quickly. That being said, it seems like Stacy focused on AI programming as what she wanted to learn specifically, that's quite a bit different from hacking. Who knows, maybe Stacy already played extensively with a copy of Kali and had a good skillset in that end already, she was established as already being good at programming after the programming placement test, anyways.
EDIT: This is an actual hacker presentation, from a pretty experienced hacker, this stuff isn't as exciting as it sounds!