Thursday, June 17, 2010

Python


Python can be very frustrating. I spent quite a while watching the program crash, and waiting for results today while the window mysteriously reduced in size as results were printed. Bjoern came by though and fixed everything up, giving me some helpful hints. I also downloaded a new editor. I ran my code on the IDLE editor and it kept crashing so frequently and taking forever, really- not like..'oh no it takes 5 minutes to run, soo slow!'...more like 'oh no, it's never going to finish, at least not today, and it will probably keep going in and out of crash mode for the next hour'. But when I switched to TextMate editor..and I was expecting it to take an hour, imagine my surprise when I got all of my output in 6.79 seconds.

So what did I do today? Well, I worked more on creating interesting queries (which gets hard by the way) for analyzing the data. I thought I'd get a few graphs done today....not the case.
I had to save the results of my first working query in a csv type file, and use python to get those results, change them around replacing carats and whatnot and splitting words, and then that is stored in a dictionary or associative array, and then I want to sort it so it is no longer a dictionary but a bunch of tuples, and then finally I save those values as y values and x labels, and the last step is creating a histogram of that data.
So, in result, I didn't even finish creating 1 histogram today, but I spent a lot of time trying to debug and I guess that made me a little more familiar with python.

Also, the guy at a desk in front of me is listening to ABBA and lady GaGa. I can hear it through his headphones. :)

In other news, one of the coordinators of our program, Carol, had 2 free tickets to this Steinbeck performance at the California Shakespeare Theater. Exciting! Since I was the only one that responded, I got both tickets and I'll be going to the theater with Nikki tonight.

No comments:

Post a Comment