Determine sun azimuth and elevation for shading a window throughout the year
You can use a package such as the pyephem package for python. It can calculate the position of any astronomical object.

However for the sun since it moves along the ecliptic, roughly at a uniform rate, you can approximate the position by doing coordinate transformations. The sun's longitude moves by 365.24/360 degrees a day from 0 at the vernal equinox and has an ecliptic latitude of 90 degrees. This can be converted into equatorial coordinates (right ascension and declension), and then, given the hour, the alt and az positions can be found. The formulae can all be found on https://en.wikipedia.org/wiki/Celestial_coordinate_system