Python script for generating pixel sorting gifs