Taken from the Anime: Aldnoah Zero Episode 1 – Princess of VERS, Time: 19:24. The code appears to be JavaScript but I don’t know the origin of the code.

Continuum, season 1, episode 3: Tracing a GPS tracking device with some C/C++ includes.

The photo is from “The listener 5x05”, and it comes from a “Unity 3D” code.

In the chapter, the cops says that is a code from an complex mathematical formula. And the programmer is debugging the code.

Shown in Person of Interest, season 2, episode 15. They “hacked” a firewall with this code…

The code is js  from a facebook XSS attack, here: https://gist.github.com/tysontate/968060 (4. line) is an example.

Here is some HTML and JavaScript from the movie “Goodbye World” when the character is hacking into someone’s computer.

In “Real Humans” (Äkta Människor) some Common Lisp code from the perfom-plan method in poiu.lisp, appears (with some other misplaced code added it, c’mon.. make-dog???) in season 2 episode 6 around 17:59.     

Everyone knows the Anime “Serial Experiments Lain” has a famous scene with Conway’s Game of Life, the next code snippet shown is less famous for some reason and uses parts of http://ftp.sunet.se/pub/lang/lisp/code/codewalk/walk/new_walk.cl, a portable code walker for Common Lisp programs, written in Common Lisp. Since being meta is part of the series, I’d say it’s at least semi-relevant.

The Anime Captain Earth features code on various displays, some of the Python code in this screenshot seems to have been taken from a USB library.

In Episode 13, the season finale of The Americans the spying for a program called “Echo” plays a role. In the show universe Echo computes the strange angles of stealth planes, reflecting Radar rays somewhere else but not to the sending radar station. 

Searching for phrases in the program links to this code snippet, a file from “MATLAB Simulations for Radar Systems Design”, from 2003. I’m far from being an expert, but it seems that the program is generalized signal analysis of radar signals, nothing stealth-related. 

Also: MATLABs version 1.0 was in 1984 but the current timeline of the show should be somewhere in 1982.