A C++ encapsulation of the Linux inotify API

The inotify API allows you to monitor a file or directory for various events such as file creation, modification, and deletion. It is part of the Linux kernel and the glibc userspace library, however its C API can be cumbersome to use in a C++ application. A C++ binding of inotify does exist, but it still requires the application developer to write an unsightly wait-and-handle loop. My goal for this project was to create an asynchronous event-driven API through which filesystem events can be processed.

Continue reading A C++ encapsulation of the Linux inotify API

RIOT OS ported to TI Tiva C Connected Launchpad

My current project is porting RIOT OS to the EK-TM4C1294XL evaluation board. RIOT is an embedded operating system aimed at the Internet of Things, developed primarily by Free University of Berlin. The EK-TM4C1294XL is a pretty powerful board, featuring an ARM Cortex M4 MCU and built-in Ethernet MAC. So far, I have implemented only the most basic support for the CPU – just timers and UART. However, I’m currently working on the Ethernet drivers (almost done) and my next focus will be drivers for an XBee add-in.

Continue reading RIOT OS ported to TI Tiva C Connected Launchpad

A dumb SVM classifier for Python

Tonight I got bored and implemented a linear SVM in Python. Though Python has its own facilities for solving quadratic programming problems, I chose to write a module which interfaces with Octave instead. My implementation simply writes an Octave script then runs it in order to solve the QP. All other aspects of the SVM are implemented in pure Python.

Continue reading A dumb SVM classifier for Python