Py淡

Python, Python, Python! In the spirit of "import antigravity"

English

One liner for choosing a nice matplotlib colormap

Memo for myself...Since jet is becoming less and less popular these days and the default color styles will be revamped in the comming release of MPL, I also tend to avoid jet. When choosing a nice colormap for data that needs only several …

How to record the panda3d app screen as avi file using ffmpeg

# It's better to use base.movie() instead of this code. see belowHere is an example script I wrote today. To run this on your PC, at least the model in the script needs to be replaced with your egg file. Panda3d has a nice facility to save…

Making 3D model from 2D side view image with Smoothie-3D

Smoothie-3D: squirrel modeling - YouTubeI made a 3d fish model for my current project. As you can see in the above Youtube demo video, they made making 3d model really easy. It would have been quite a lot of work if I did this in blender f…

Using buffer protocol to dynamically texture with 2D numpy array in Panda3d

I followed this official blog post "Buffer protocol support" and came up with a short example of simple video player in panda3d using numpy 2d array as texture. The trick was to use setRamImage on Texture object. To do that, we have to set…

Geany 1.25 is out! Overview plugin is now included in Geany-Plugins!

There was an announcement in the Geany-Users email list that Overview plugin is now officially included in the Geany-Plugins! Overview plugin is a plugin that provides sublime text minimap like feature for Geany. I had built it from source…

"import antigravity" actually works!

Wow. I did not expect it to work but I just tried it for fun. And guess what! It actually works! Fire up your python console and try importing "antigravity". It brings you to that xkcd page http://www.xkcd.com/353/. The history behind how …