Learning Python

After scanning through the archive Python articles at Clark’s Tech Blog I noticed a link to MIT’s MIT 6.00 Intro to Computer Science & Programming, Fall 2008

This subject is aimed at students with little or no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems. It also aims to help students, regardless of their major, to feel justifiably confident of their ability to write small programs that allow them to accomplish useful goals. The class will use the Python™ programming language. Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: http://ocw.mit.edu/6-00F08 License: Creative Commons BY-NC-SA More information at http://ocw.mit.edu/terms More courses at http://ocw.mit.edu

I have downloaded the episodes from iTunes Uni and the first lecture was quite good.
It brings back old memories of sitting in lecture theatres listening to the same concepst. The only difference is we used Pascal, which shows my age.

Ripping CD’s

I have just finished ripping these

Box of CDs

Ripping CD's.jpg

my CD collection, into Apple lossless audio files. Now I will never need to rip my music again because unlike MP3 or AAC files there is no compression, so converting from Apple lossless to another future lossless format means no audio quality is lost.

Converting to Apple lossless has blown out my music folder from around 120 gb to just under 160 gb

Screendump of my itunes folder

As you can see I am a huge fan of Podcasts and have a few audiobooks as well.
Itunes University is pretty good as there is a lot of good free stuff to watch and listen too.

OpenCL

After installing Snow Leopard on my Macbook I was excited to see if I could use OpenCL.
OpenCL is a technology to use your graphics card to do tasks that are traditionally done by the CPU

The most common example given is encoding videos. A video card, a GPU is substantially faster for some tasks.
For example in the benchmark below it gives an example of a Core 2 Duo (C2D) running at 3gz takes 12 seconds to perform the benchmark vs 0.93 seconds using the GPU!

My Mac being slightly older is slower still.

OpenCL introduces hardware decoding of H264 streams. That is instead of maxing out your CPU when playing a BlueRay disc it now offloads the work to the GPU, making your computer more responsive.

But, you need a Nividia 9600GT, my 8600M GT does not cut it 🙁

……………… OpenCL Bench V 0.25 by mitch ………..
…… C2D 3GHz = 12 sec vs Nvidia 9600GT = 0,93 sec ……

Number of OpenCL devices found: 2

OpenCL Device # 0 = GeForce 8600M GT
Device 0 is an: GPU with max. 940 MHz and 32 units/cores
Now computing – please be patient….
time used: 2.971 seconds

OpenCL Device # 1 = Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
Device 1 is an: CPU with max. 2500 MHz and 2 units/cores
Now computing – please be patient….
time used: 15.817 seconds
Now checking if results are valid – please be patient….
🙂 Validate test passed – GPU results=CPU results 🙂

Python on Snow Leopard

I have just installed Snow Leopard and came upon some excellent sites which have inspired me to learn the programming language Python

The first site is Clark’s Tech Blog

The articles listed below are excellent examples of using Python to manage your itunes library, well worth the read.

and a nice little article about the new version of python and some useful modules to install – Upgrading to Snow Leopard Part 1: Python

Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin

The second blog which has a plethora of scripts for automation is And now it’s all this

Installing Snow Leopard

Snow Leopard install disk, originally uploaded by Stephen Hucker.

I am in the process of installing Snow Leopard.

But I forgot to back up my #$%$@ itunes library file
– no fracking favorites or ratings

Hopefully I have backedup my vmware windows xp image or more work 🙁

UPDATE: My vmware images are all fine ..  that saved my a lot of work
Quicktime is a mixed bag, you can now save videos and make screencasts without paying for the professional version, but it is a typical Apple strategy. Make the basic stuff easy which fits mosts consumers, but take out some of the useful power user features that were in Quicktime 7

  • In my case that would be the ability to extract H264 video and AC3 audio from an MKV container and store it in a MP4 file that is playable on a Playstation 3.

On the plus side:

    One last thing, with Snow Leopard there is no way to do an archive and install. I liked this option b/c you can do a clean install of the operating system and then when you remembered you forgot to backup an important  setting …no stress, it’s in the archive.

    Harry Potter

    Finished listening to all 7 Harry Potter audio books,

    Harry Potter 1: The Sorcerer’s Stone 08h 17m

    Harry Potter 2: Harry Potter and The Chamber of Secrets 09h 02m

    Harry Potter 3: The Prisoner of Azkaban 11h 47m

    Harry Potter 4: The Goblet of Fire 20h 35m

    Harry Potter 5: The Order of the Phoenix 26h 23m

    Harry Potter 6: The Half-Blood Prince 18h 22m

    Harry Potter 7: Harry Potter And The Deathly Hallows 21h 37m

    The narration by Jim Dale was excellent. thoroughly recommended

    Listening to Harry Potter Audio Books

    It’s magic!

    Yesterday I used up my download allowance, all 200gb for a month. I still had a whole seven hours with slow internet! So what to do?

    – get a life? … nah, too much trouble

    I have an iPhone and a two year contract with Vodaphone Australia (AUD$69 / Month). So I turned on internet tethering, something American’s aren’t allowed to do with AT&T.
    Speed was OK, but nothing special. The iPhone 3GS donwloaded anywhere between 30kb/s to 160 kb/s.

    Birthday

    What to do for my birthday?

    well, ride into the city, eat Fish Tempura for brunch,

    Then I watched Transformers 2, very noisy !!! I liked it, but the first one was better

    Then dinner,

    and riding back home in a shower, knew I should have taken my raincoat.

    Happy Birthday, Me!

    Birthday today, so happy birthday me!

    Have just finished listening to the first Harry Potter Audio book and have nearly finished the second. I love these books nearly as much as the Lord of the Rings.

    I am listening to the US version, narrated by Jim Dale, who I prefer over the UK version narrated by the excellent Stephen Fry. Normally anything with Stephen Fry I adore, but in this case I have to go with Jim Dale because he has so many excellent voices for all the characters.

    Getting old :-(

    Did my third lesson in Aikido last night.
    I love the break fall techniques, very different to how you do it in Hapkido. I think it is going to take a long time for my body to adjust to this style.