A student from Duke University used his computer science skills for the best purpose: to bring the Weasley clock from "Harry Potter" to life.

For those who live under a rock and aren't familiar with "Harry Potter," the Weasley clock helps family matriarch Molly Weasley keep track of her seven children. The clock's hands will point to where her children are located at a given time.

Trey Bagley, with the help of Duke's innovation co-lab, made a real version of the clock as a Christmas gift for his parents. He shared a photo and the code he used to create the clock on imgur, and it's gone viral ever since.

Here's how it was made: