Archive for July, 2007

Siddhi’s Django video in the weekly round-up

Monday, July 30th, 2007

Congratulations to Siddhi for his Django wiki video and getting it listed on the Django weekly round-up:

“Siddharta Govindaraj has recorded an excellent screencast and posted it on ShowMeDo that illustrates how a relatively inexperienced Django programmer can create a basic Wiki application in 20 minutes.”

I have my fingers crossed that we see Part II some time soon!

ShowMeDo: The ‘IPython’ Interactive Shell - Part 5

Saturday, July 28th, 2007

A usage walkthru (part 5) showing the use of the enhanced interactive shell named IPython.
Divided into five parts, this talk in the series will cover session input filtering using an example of physics units for value representation, and support for data visualization using matplotlib.

Create your own Python videos? You’ll find instructions here for how you can make your own videos in just 30 minutes.

If you want to embed this video on your blog or site, see our embedding instructions.

This is one of 127 videos in our Python tutorial section. Track new-video-announces with our video feed.

ShowMeDo: The ‘IPython’ Interactive Shell - Parts 3 and 4

Friday, July 27th, 2007

A usage walkthru (part3, part4) showing the use of the enhanced interactive shell named IPython.
Divided into five parts, these talks in the series will cover input and output history caching, viewing and editing Python source and the logging of your session, debugging and profiling your code, then look at executing long-running callables in background threads during your session.

Create your own Python videos? You’ll find instructions here for how you can make your own videos in just 30 minutes.

If you want to embed this video on your blog or site, see our embedding instructions.

This is one of 127 videos in our Python tutorial section. Track new-video-announces with our video feed.

ShowMeDo: The ‘IPython’ Interactive Shell - Parts 1 and 2

Thursday, July 26th, 2007

A usage walkthru (part 1, part 2) showing the use of the enhanced interactive shell named IPython.

Divided into five parts, these talks in the series will cover tab completion, namespace management, logging, the help system and introspection, navigation, system shell commands and the running of Python programs.

Create your own Python videos? You’ll find instructions here for how you can make your own videos in just 30 minutes.

If you want to embed this video on your blog or site, see our embedding instructions.

This is one of 127 videos in our Python tutorial section. Track new-video-announces with our video feed.

ShowMeDo: Learn Django: Create a Wiki in 20 minutes (1 video)

Thursday, July 26th, 2007

In this tutorial, I introduce the basics of Django by walking you through the development of a simple wiki application.

We’ll see how you can design your URLs, interact with the database and use the Django template library. As an added bonus, we’ll also include support for editing pages using Markdown syntax.

Create your own Python videos? You’ll find instructions here for how you can make your own videos in just 30 minutes.

If you want to embed this video on your blog or site, see our embedding instructions.

This is one of 127 videos in our Python tutorial section. Track new-video-announces with our video feed.

ShowMeDo: ‘Python for Math Teachers’ Working with Stickworks (1 video)

Friday, July 20th, 2007

Kirby’s fifth video is Working with Stickworks:

“Here’s a Python module you might want to use in your math classes. It works with VPython to provide simple vector graphics, as well as plotting capabilities. Students wouldn’t just use the module, they’d study the source code to gain a stronger understanding of the math concepts involved (”math through programming”).”

Create your own Python videos? You’ll find instructions here for how you can make your own videos in just 30 minutes.

If you want to embed this video on your blog or site, see our embedding instructions.

This is one of 122 videos in our Python tutorial section. Track new-video-announces with our video feed.

ShowMeDo: ‘Python for Math Teachers’ A First Look at RSA (1 video)

Tuesday, July 17th, 2007

Kirby’s fourth video is A First Look at RSA:

“Building on some ideas introduced earlier in this series, this easygoing lecture takes a somewhat rambling approach to a rather difficult math topic. This is background for math teachers intending to use Python as a vehicle for exploring math concepts interactively, in a hands-on setting.”

Create your own Python videos? You’ll find instructions here for how you can make your own videos in just 30 minutes.

If you want to embed this video on your blog or site, see our embedding instructions.

This is one of 122 videos in our Python tutorial section. Track new-video-announces with our video feed.

Compiling ffmpeg on RedHat

Monday, July 16th, 2007

Most of the instructions needed to compile ffmpeg on RedHat are here and here. This builds upon my previous post Compiling LAME on RedHat.

[Includes update below for libfaac/libfaad]

Following these I first tried:

./configure --disable-debug --disable-network --disable-ffserver --disable-ffplay --enable-libmp3lame --enable-gpl --enable-shared --log=log.txt

but I received the following error:

ffmpeg: error while loading shared libraries: libavformat.so.51: cannot open shared object file: No such file or directory

Note the ‘–log=log.txt’ - a handy way of having the makefile dump out a log file which tells you exactly where things have failed.

For the makefile to see the source and libs for libmp3lame I had to read-up on adding cflags and ldflags to the configure line:

./configure --disable-debug --disable-network --disable-ffserver --disable-ffplay --enable-libmp3lame --enable-gpl --extra-cflags=-I/$HOME/include/ --extra-ldflags=-L/$HOME/lib --prefix=$HOME --enable-shared

Finally it is necessary to export an ‘LD_LIBRARY_PATH’ so that ffmpeg can see the shared libraries for LAME. I chose to add the following to my .bash_profile:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/$HOME/lib

The final steps are to build ffmpeg:

make
make install

The result is a working ffmpeg that can encode to the FLV format that we use inside ShowMeDo.

Update to enable mp4a (libfaad/libfaac):

Our version of ffmpeg didn’t support libfaac/libfaad for mp4 audio/video support. To fix that first I compiled the libfaac and libfaad libraries, then updated our ffmpeg src:

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

The configuration had to change to include libfaac and libfaad:

./configure --disable-debug --disable-network --disable-ffserver --disable-ffplay --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-gpl --extra-cflags=-I/$HOME/include/ --extra-ldflags=-L/$HOME/lib --prefix=$HOME --enable-shared
make
make install

and next we have a working ffmpeg.

There is one change in usage - previously we had ‘-acodec mp3′ which had to be changed to ‘-acodec libmp3lame’.

Oddly the mp4a stream is recognised as ‘Stream #0.0(eng): Audio: mpeg4aac, 44100 Hz, stereo’ - but it works just fine.

Compiling LAME on RedHat

Monday, July 16th, 2007

LAME (also known as libmp3lame) is a GPL library for mp3 encoding and decoding. It is used by ffmpeg to generate the FLV files which we use in ShowMeDo.

The follow-on to this article is Compiling ffmpeg on RedHat.

Compiling LAME is fairly straight-forward if your environment is already configured, but that wasn’t as obvious as I’d hoped. I share here the steps I went through to get LAME compiled and installed on a RedHat system.

First you need to run ‘configure’ which builds a makefile specific to your environment:

./configure

but annoyingly I had a failure:

checking build system type... mkdir: cannot create directory `./tmp/cg28625-18078': No such file or directory
config.guess: cannot create a temporary directory in ./tmp

The solution was to make a ‘tmp’ directory in my HOME directory:

mkdir ~/tmp

and export a TMPDIR so that the makefile knew where to find ‘tmp’:

export TMPDIR=~/tmp

After this I added $HOME as the directory for installing the compiled libraries (I already had a ‘bin’ and ‘lib’ in my $HOME):

./configure --prefix=$HOME

Next it was as simple as:

make
make install

and the LAME libraries were installed in my ‘$HOME/lib’ ready for use by ffmpeg.

ShowMeDo: ‘Python for Math Teachers’ - Subclassing for Beginners (1 video)

Monday, July 16th, 2007

Kirby’s third video is Subclassing for Beginners in his Python for Math Teachers series:

“Let’s define a simple Dog class and show how we make instances (dogs). Then let’s add a stomach attribute so our dogs can eat and poop (kids love scatology). It’s a dog eat dog world! Then we refactor the code to show how Dog and Monkey classes might both inherit from the Animal class.”

Create your own Python videos? You’ll find instructions here for how you can make your own videos in just 30 minutes.

If you want to embed this video on your blog or site, see our embedding instructions.

This is one of 122 videos in our Python tutorial section. Track new-video-announces with our video feed.