1. Brendan Howell
  2. PyCessing

Source

PyCessing / pycessing / data / examples / pixel-static.cess

import random

def draw():
    for n in range(100):
        x = random.randint(0, pycessing.getWidth())
        y = random.randint(0, pycessing.getHeight())
		
        r = random.randint(0, 255)
        g = random.randint(0, 255)
        b = random.randint(0, 255)
		
        setPixel(x, y, r, g, b)