Posted by: Matt Morris
| @ January 29, 2008 04:30 PM |
It seems dict[key] is about twice as fast as dict.get(key) when the key does exist in the dict. On the other hand, dict[key] + exception handling is twice as slow as dict.get(key) when key is not in dict. Here's the extra twist: checking if the key is in dict and then getting the appropriate value is only slightly slower than simply table[key]. This is something like:
if key in dict:or, more elegantly:
value = dict[key]
else:
value = None
value = None if key not in dict else dict[key]
This method is fractionally slower than dict[key] when key is in the table, but it's considerably faster when key is not in the table. Also, this method is consistantly faster than dict.get(key) in both cases.
The script can be found [here]
The output for 100,000 iterations of each case can be found [here]
The output shows the name of each test case followed by the commands executed in the test. Total runtime for each follow each.
I may have done the cases a little naively, but I still think it shows some powerful differences.
Posted by: Chris Waters
| @ October 30, 2007 07:43 PM |
Download the GLEW source from [here]
Run the following command in the glew folder:
> GLEW_DEST=/usr/local sudo make install
Installing GLEWpy
Download the GLEWpy source from [here]
Replace the setup.py in the glewpy folder with the modified setup.py from [here]
Run the following command in the glewpy folder:
> sudo python setup.py install
Posted by: Chris Waters
| @ October 30, 2007 07:28 PM |
On local machine, create and upload the key:
> ssh-keygen -t dsa
** overwrite if you need to **
** enter empty passphrase (is this safe?) **
> scp ~/.ssh/id_dsa.pub username@server
Login to remote server and do:
> cat id_dsa.pub >> .ssh/authorized_keys
> rm id_dsa.pub
I did this a while back, but never took notes. *sigh*
Posted by: Chris Waters
| @ October 29, 2007 06:01 PM |
Posted by: Matt Morris
| @ October 26, 2007 12:01 AM |
http://www.youtube.com/watch?v=6NcIJXTlugc
Posted by: Matt Morris
| @ October 17, 2007 01:28 PM |
Posted by: Matt Morris
| @ October 03, 2007 02:23 PM |
Posted by: Matt Morris
| @ October 03, 2007 12:19 PM |
Posted by: Matt Morris
| @ October 03, 2007 12:17 PM |
Python
PyOpenGL
Python Imaging Library
Glew
Pyrex
GlewPy
Python Cryptography Toolkit
PyGame
I also have some installation/configuration notes in the works. I will add these after I get them organized.
Posted by: Matt Morris
| @ October 03, 2007 12:14 PM |
A lucid explaination of the purpose and logic behind indentation in Python.
Posted by: Dr. T.J. Jankun-Kelly
| @ September 26, 2007 01:30 PM |
def GetWXBitmap(myImage):
image = apply(wx.EmptyImage, myImage.size)
image.SetData(myImage.convert("RGB").tostring())
# if the image has an alpha channel,
# you can set it with this line:
myImage = myImage.convert("RGBA")
image.SetAlphaData(myImage.tostring()[3::4] )
return image.ConvertToBitmap()
FROM:
http://wiki.wxpython.org/WorkingWithImages#head-7aa43a4a1e066fd28640ce86066ba0617afe2a8b
Using wx.StaticBitmap (widget on the window to show the bitmap):
http://wiki.wxpython.org/wxStaticBitmap?highlight=%28Bitmap%29
Posted by: Chris Waters
| @ September 17, 2007 04:17 PM |
Posted by: Matt Morris
| @ September 14, 2007 11:18 AM |
In the new book published by Springer, Human-Centered Visualization Environments, edited by Andreas Kerren, Achim Ebert and Jörg Meyer, I co-contributed a chapter entitled "Interacting with Visualizations." My co-authors are F. Wim Fikkert (U. Twente, Netherlands), Marcos D'Ambros (U. Lugano, Switzerland), and Torsten Bierz (U. Kaiseslautern, Germany).
Posted by: Dr. T.J. Jankun-Kelly
| @ August 09, 2007 03:30 PM |
David Goodger, a member of the Python Board of Directors, has a good discussion on writing idiomatic Python. Worth a read.
Posted by: Dr. T.J. Jankun-Kelly
| @ July 26, 2007 02:15 PM |
Posted by: Miao Liu
| @ June 14, 2007 05:28 PM |
Posted by: Matt Morris
| @ April 09, 2007 02:15 PM |
ShowMeDo, a sort of YouTube video source for software tutorials, has aggregated screencasts demonstrating various Python integrated development environments. While I have not used many of these (guess I'm too old fashioned), they should be of use to new Pythonistas or folks like my wife who refuse to code without an IDE.
Posted by: Dr. T.J. Jankun-Kelly
| @ March 08, 2007 04:20 PM |
Chris Waters, Jon Howell, and I have had our work on cluster visualization accepted to ACMSE 2007. The full reference is:
Christopher Waters, Jonathan Howell, and T.J. Jankun-Kelly. "CluVis: Dual-domain Visual Exploration of Cluster/Network Metadata" In Proceedings of the 45th Annual Southeast Regional Conference (ACMSE 2007), Darina Dicheva and Paúl Pauca, eds., March 2007.
Chris will present the paper. The work grew out of a class project in my 2005 offering of Information Visualization.
Posted by: Dr. T.J. Jankun-Kelly
| @ February 14, 2007 03:38 PM |
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/glew/glew.so, 2): Symbol not found: _glewInit
Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/glew/glew.so
Expected in: dynamic lookup
Any idea why this symbol is not found in glew.so ?
Posted by: Matt Morris
| @ January 25, 2007 11:26 AM |
The second paper "Streamflow Forecasting Using the Modular Modeling System and an Object-User Interface" describes the creation of a watershed model using the MMS system.
Nasa probably want a system similar to the MMS designed and implemented for their various models. Which would be software development and not research at all.
Posted by: Donald Johnson
| @ November 29, 2006 01:25 PM |
Posted by: Donald Johnson
| @ November 29, 2006 01:06 PM |
There has been some debate on in CS circles on whether game degrees should be offered in difference to straight CS/SE degrees. As a visualization/graphics guy, I'm often asked this directly. My gut feeling is that such a degree is of little use in the real world. Non-game companies want a "real" degree while game companies do not care. It appears my feeling is right. This comment is from John Carmack, one of the big two behind Doom and many other important game developments.
Posted by: Dr. T.J. Jankun-Kelly
| @ November 17, 2006 07:09 PM |
|
|

