Programming Merit Badge presentation (2020)

This year, my elder son graduated from Cub Scouts to Scouts (time flies very fast!) and I signed up to be a counselor for Programming (and Public Health) in his troop. Today, February 1st, 2020, was Merit Badge Day and I taught 6 scouts what is programming and the basics of programming in Python (and Scratch - but they all knew that already) (and nobody chose Public Health …). I am now sharing my presentation and a few tips and tricks. Feel free to re-use, improve and give me any feedback to make it better. ...

February 2, 2020 · 3 min · jepoirrier

Installing Pwytter on Fedora 11

This morning, it was impossible to post tweets on Twitter so I finally gave in to install a Twitter client. Amongst many software available, Pwytter seemed interesting to try: free software, written in Python were my two criteria. Unfortunately, the installation process is not straightforward (although its use of the general python setup procedure). Here is how to install it on Fedora 11 from the command line: Download Pwytter, unzip it, enter directory pwytter-0.8 Install ImageTK: as root, type " yum install python-imaging-tk" ( in Fedora, ImageTK was renamed python-imaging-tk) Install simplejson: as root, type " yum install python-simplejson" (optional) launch: python setup.py build launch: python setup.py install Complete the installation by copying some files with the 4 lines below (type them as root too) ( a comment in pwytter blog helps to solve the pwCache installation bug): cp pwCache.py /usr/lib/python2.6/site-packages/pwytter-0.8-py2.6.egg cp pwCache.pyc /usr/lib/python2.6/site-packages/pwytter-0.8-py2.6.egg cp -r media/ /usr/lib/python2.6/site-packages/pwytter-0.8-py2.6.egg cp -r theme/ /usr/lib/python2.6/site-packages/pwytter-0.8-py2.6.egg Now you can launch pwytter from any user! In addition, since the source code is available and Identi.ca supports a Twitter-compatible API, let’s see if it’s easy to modify pwytter for Identi.ca :-) ...

August 8, 2009 · 1 min · jepoirrier

Short script to add a timestamp on pictures

Here is a short script (1.6kb) to add a timestamp on all PNG pictures in a directory. It requires Python and the Python Image Library ( PIL). In order to use it, modify some parameters in the beginning to suit your needs (images directory, font file and size, etc.) and launch ./timestampFiles.py. Here is a before/after example (size of pictures is reduced to fit in this blog): ...

November 23, 2008 · 1 min · jepoirrier

Watch your webcam with mplayer

A small post just to keep this command at hand: mplayer -fps 30 -tv driver=v4l:width=640:height=480:device=/dev/video1 tv:// This allows you to watch what your webcam “sees” (provided it uses a video4linux webcam). Btw, Cheese is funny to use too! I was also trying to find a decent Python library for video4linux but I only found outdated ones ( libfg, 2003, and pyv4l, 2002). I guess I’ll have to use some C library for a small project I’ll tell you about later ;-)

September 19, 2008 · 1 min · jepoirrier

GUI version of pyP2B

My python script pyP2B was command-line only. Tonight, I played for the first time with Tk, re-wrote pyP2B as a class and thus added a GUI. Its webpage is updated ; the archive containing both command-line and GUI versions is here: pyP2B.tar.gz (3kb).

February 15, 2007 · 1 min · jepoirrier