Wednesday, November 14, 2012

Buried temple Turkey

Here are some pointers to info about that cool ancient temple that was found intentionally buried somewhere in Turkey. It's called Göbekli Tepe. It turns out that what was so amazing about this temple is that it predates the Sumerian civilization; the conclusion that has been reached is that it was built by hunter-gatherer civilizations although that barely makes sense. Another thing that I can't really wrap my brain around is that this grey, dusty, desert location is known to have been much more fertile in the past, and was the northern part of the "fertile crescent" which had the Euphrates Valley as the southern part. Apparently this is the result of human deforestation. Also interesting from the various narratives is some confusion over the temple burial timeline. Was is buried from the outside in, or were the whole temples buried with the side temples started after each burial? The pictures that I've found of this place simultaneously disappoint (there has been so little excavation to see the entire finding) and amaze (the reliefs and other details of pillars are remarkably clear).

Here of course is the Wikipedia article:

http://en.wikipedia.org/wiki/G%C3%B6bekli_Tepe

Here is a National Geographic article that has a humorously flip tone while still being fact-rich:

http://ngm.nationalgeographic.com/print/2011/06/gobekli-tepe/mann-text

Here is one guy's photostream of his personal visit there:

http://www.flickr.com/photos/rstiller/6372438647/in/photostream/


Monday, November 12, 2012

Replacement glass for Andersen SKS skylight

Here I go, having to get replacement glass for this skylight YET AGAIN. I installed the Andersens 5 years ago thinking that a respected brand name like that would be available for decades. Nope. They discontinued selling skylights the next year and I missed the memo from Home Depot. Fortunately they do have a parts department. Sadly, they want everything to be a difficult as possible and want measurements despite the fact that I have the part number of both the skylight and sash.

The skylights that I originally bought were SKS 2438 and 2446.

A pdf of the replacement parts catalog is here:

https://docs.google.com/viewer?a=v&q=cache:gT5lLBuraZIJ:www.andersenwindows.com/homeowner/pdfs/Skylight.pdf+&hl=en&gl=us&pid=bl&srcid=ADGEESiB0FRpA24VfZvvzk4U9n3D5iDzqVl3_uUeWQWjjY3G1nnlrfmWX57LxunbEMCcvyKp74XMB090-W25t8WiUq9t3G_JUirH0FFIP4arJlJ9PsbLt9LFfyleieh6gcmcbVibtf-w&sig=AHIEtbQHZddrMQM7Gum9j38W_wpK5QjhVw

That's right, I have to read the google doc because Andersen pulled it from here: www.andersenwindows.com/homeowner/pdfs/Skylight.pdf

It can also be found here:

http://www.windowparts.com/v/vspfiles/files/PDFs/Skylight.pdf

The part number for my replacement sash is 1880404

They don't have a way to buy it online, of course, but they apparently still do staff their parts phone center at 877-835-9090

Saturday, November 10, 2012

Python how to get a list of files in a directory

Python has really nice utilities for getting a directory listing inside a program!

I used os.listdir, but there are many other methods. Some are not available in python 2.5.

Source:

http://stackoverflow.com/questions/2225564/python-get-a-filtered-list-of-files-in-directory

Python length of a "string"

len(object)

Python for-next loops

Here is an absolutely delightful summary of the python syntax for all the different kinds of loops:

http://wiki.python.org/moin/ForLoop

This is from wiki.python.org, which I should just go to from now on with all basic syntax questions.

Python open and read integers from binary file

How embarassing that I had to look this up. Here is the syntax in python for opening a binary file:

f = open("filename", "rb")
.
.
f.close()

From this example:

http://stackoverflow.com/questions/4971413/how-to-read-a-binary-file

This was part of a larger search where I was working on pulling values out of a (packet, obviously) binary file. The horrific answer was to read bytes from the file into a "string", then bust out each 8-bit (or other size) value as an integer. So what I ended up doing was reading in 6 "characters", yanking out the packet size from this primary header, and then using that value to read in another "string" of that many characters + 1.

Here is one example site, in which the read() command is used and the result is cast to different sizes of integers:

http://stackoverflow.com/questions/1163459/reading-integers-from-binary-file-in-python

Here is another example where bytes are read in one or chunksize at a time with a loop:

http://stackoverflow.com/questions/1035340/reading-binary-file-in-python

Python wait or pause

All examples that I've found for how to do this involve using the sleep() function from the time library. Here are two example pages:

http://www.pressthered.com/how_to_sleep_pause_wait_stop_your_python_code/

http://ubuntuforums.org/showthread.php?t=715907