Merging pdf files in Python with pyPDF

Here is a very simple python script that marges two pdf files, using the pyPDF library. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 import os.path import pyPdf   pdfOne = "C:\\a.pdf" pdfTwo = "C:\\b.pdf"   merged = "C:\\c.pdf"   […]

PIR sensor + Arduino + Processing + Skype…

This post is about a simple and interesting combination of software and hardware. Last week, I picked up a couple of PIR sensors from Ebay. PIR sensors are (usually) easy to interface with an arduino board. Red: 5V, Black: Ground, Yellow: Analog In. Could it be easier than this? After a bit of experimentation, I […]

Arduino-based keyboard for Windows

Today, on the forums, a user had the following problem: he wanted to start video in quicktime by pressing a custom button on an arduino. Basically, the arduino board should act as a simple keyboard for the computer. I found this problem interesting and I ended up solving it. Here is the link to […]

simpleDateFormat in Processing

I spent about an hour, trying to figure out how to use the simpleDateFormat java library in Processing… It seemed so straight forward, yet I couldn’t get it to work… Well, it seems that the only thing I had to add is a try/catch. So, this example works: 1 2 3 4 5 6 7 […]

Parsing files with Processing…

In the following basic example, I’m using Processing to parse a 2GB textfile. The textfile I’m using (content.rdf.u8) is from the project. You can download the compressed file here. As mentioned earlier, the size of the textfile, content.rdf.u8, is approx 2GB. For a sample of the contents and structure of the file, follow this […]

Processing, MySQL and RAM tables…

I’m currently working on a simulation model in Processing, which creates in every cycle, 350,000 lines of temporary data in chunks of 1,000 lines. I decided to save the temporary data in a MySQL table, as this allows me to easily add an extra query at the end that summarises everything and saves the final […]