Python

Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive.

Python face.com library

Description: A Python interface for face.com REST API (face.com offers free REST API for face detection and recognition).

Github URL: http://github.com/Kami/python-face-client

Other: README, EXAMPLE

SD Agent Latency Monitor plugin (2010)

Description: A server density agent plugin for monitoring network latency which mimics the behavior of SmokePing.

Github URL: http://github.com/Kami/sd-agent-plugin-latency-monitor (README)

rc.conf syntax checker (2010)

Description: A tool which checks for syntax errors in the /etc/rc.conf file on the FreeBSD / NetBSD systems.

If you FreeBSD / NetBSD user I am pretty sure you are familiar with the rc.conf file and probably got yourself stuck in the single user mode on boot because of syntax errors in this file for countless of times.

Currently the script is very simple and similar effect could be achieved by just executing the /etc/rc.conf file (it's just a shell script), but I plan to extend it and among other things add "smart" correction suggestions when a syntax error is encountered.

Github URL: http://github.com/Kami/rc-conf-syntax-checker
Other: More information and discussion at FreeBSD forums
Requirements:

  • FreeBSD / NetBSD
  • Python >= 2.6

Advanced YubiKey PAM module (2010)

Description: Yubikey is a security device from the innovative Swedish startup Yubico.
It is a very small piece of hardware, in the form of a USB key that fits on your key chain. The intended use is for secure and efficient authentication of users to services over the Internet. It works just like a computer keyboard connected to a USB slot. In fact, it is more or less a computer keyboard, since all it does is to simulate a keyboard in order to enter long passwords into textboxes when you want to login to for example a web site.

This is an improved version of my YubiKey PAM module which among online mode also supports the failback and offline mode.

In the failback mode, if the internet connection is available, the token is validated against the Yubico or your own validation server and if the connection is down of unavailable it fails back to the offline mode (the token is validated locally - only the AES key must be specified).

Github URL: http://github.com/Kami/advanced-yubico-pam-module (README)

Documentation: http://kami.github.com/advanced-yubico-pam-module/
Requirements:

YubiKey PAM module (2010)

Description: Yubikey is a security device from the innovative Swedish startup Yubico.
It is a very small piece of hardware, in the form of a USB key that fits on your key chain. The intended use is for secure and efficient authentication of users to services over the Internet. It works just like a computer keyboard connected to a USB slot. In fact, it is more or less a computer keyboard, since all it does is to simulate a keyboard in order to enter long passwords into textboxes when you want to login to for example a web site.

This module is a basic recreation of the original Yubico PAM module written in C.

I have created a Python version, because the original module did not work and was causing segfaults.

I know that using Python for a PAM module is not really the best and most efficient way, but it servers me (and probably some other users who have problems with the original C extension) well.

For more information about the configuration options, visit the original C module website at http://code.google.com/p/yubico-pam/wiki/ReadMe.

Github URL: http://github.com/Kami/yubico-pam-module/
Requirements:

Twisted binary file transfer demo (2010)

Description: Simple demo which shows how you can transfer binary files using the Twisted framework.

Github URL: http://github.com/Kami/python-twisted-binary-file-transfer-demo
Requirements:

Asset Deflator (2010)

Description: This script can help you reduce your website loading times by minimizing the size of your website static resources.

It can minify CSS files (using YUI compressor), compile JavaScript files (using Google Closure Compiler) and compress images (using jpegoptim and optipng).

Not only it can compile external JavaScript files, but it can also find and automatically compile blocks of inline JavaScript and internal CSS code located in your templates / html files.

It would ideally be used some where in your website deployment process.

Github URL: http://github.com/Kami/Asset-Deflator (README)
Downloads URL: http://github.com/Kami/Asset-Deflator/downloads
Requirements:

Changelog:
  • Asset Deflator 1.1.1 - (23.01.2010)
    • Now multiple instances can run at once, but only if they are working on different paths (—path option)
  • Asset Deflator 1.1.0 - (19.01.2010)
    • Added support for minification of inline (internal) CSS styles (—minify-inline-css)
    • Only one instance of program is allowed to run at once
    • Tweaked regular expressions for matching CSS and JavaScript blocks
    • Size of all assets before and after compression process is displayed if using —statistics option
  • Asset Deflator 1.0.0 - (17.01.2010)
    • First release

Google Calendar Sync (2009)

Description: Google Calendar Sync allows you to synchronize events matching the defined criteria between two Google calendars.

Github URL: http://github.com/Kami/gCal-sync
Download URL: gCal_sync_v1.1.0.zip, gCal_sync_v1.0.0.zip
Requirements:

Changelog:
  • Google Calendar Sync 1.1.0 - (30.12.2009)
    • Events which are deleted from the source calendar (orphans) are now deleted from the target calendar as well
  • Google Calendar Sync 1.0.0 - (21.12.2009)
    • Initial release

Fabric Django Deployment script (2009)

Description: This is a Fabric script for deploying your Django applications to one or more servers.

Script assumes that you are using Apache and mod_wsgi for serving your Django application and lighttpd for serving static files (style-sheets, images, etc.).

Script also assumes that you are using Git version control system, since it downloads the latest version of your code / application from the local Git repository, but this can easily be changed if you are using SVN or any other version control system.

For more information and usage examples, please refer to the comments inside the script.

Requirements:

Github URL: http://github.com/Kami/django-deployment-script
Documentation: check the in-line comments :)

punBB to DjanboBB Migration Tool (2009)

Description: punBB to DjangoBB is a simple tool for migrating from punBB to DjangoBB (actually, it is a PHP script which generates Python script + custom Django authentication backend).

Github URL: http://github.com/Kami/punBB-to-DjangoBB
Wiki URL (documentation): http://wiki.github.com/Kami/punBB-to-DjangoBB
Notes: This script has been tested and confirmed to work with punBB 1.3 and DjangoBB revision 8ece372ccd76.

Timetable Parser (2009)

Description: This application was primary written for my personal use, for exporting my faculty timetable to iCal, but I decided to clean it up a bit and share it with others who might find it useful.

Application parses the FERI timetable and allows you to save the output as iCal, txt or pdf.

PDF output is currently very unoptimized and "ugly", because my priority was iCal output.

Requirements:

Source code (github): http://github.com/Kami/Timetable-Parser

Server Density agent modifications (2009)

Description: Server Density is a web application that monitors important server metrics such as load average and memory usage alerting you via e-mail or SMS when things go wrong.

My work: I made a few modifications to the data monitoring agent so it now supports FreeBSD (officially, the client currently only supports Linux and Mac OS X).

On FreeBSD, data can be collected using both "native" and "non-native" mode. The native mode uses native FreeBSD tools and utilities, where the non-native mode uses Linux process file system (procfs) and binaries. For the non-native mode to work, Linux binary compatibility must be enabled and Linux like procfs file system mounted.

I also implemented the network latency monitor and the command line option "status" which allows you to check if the agent is running. The network latency monitor, which should currently work on Linux and FreeBSD supports monitoring the latency of multiple IPv4 or IPv6 addresses (this feature is not (yet?) supported by Server Density, but some people might still find it useful and you can use it at your own applications).

Source code (github): http://github.com/Kami/sd-agent
Wiki (github): http://wiki.github.com/Kami/sd-agent
Official repository (github): http://github.com/boxedice/sd-agent

Dropbox Screen Grabber (2009)

Description: Dropbox Screen Grabber is a simple application which sits in the system tray and allows you to capture the screenshot of the whole desktop or the currently active window and save it to the Dropbox public folder.
If you specify your Dropbox user ID in the settings, application can also automatically copy your public file URL to the clipboard after taking the screenshot.
Details (Dropbox wiki): Dropbox Screen Grabber
Download URL: dropbox_screen_grabber_2.0_binary.zip (binary)
Sorce code (GitHub): http://github.com/Kami/Dropbox-Screen-Grabber
Other: thread @ Dropbox forums
Requirements:

Notes: If you use the binary, you don't need any dependencies from 3 to 6, because they are already bundled in the .exe file.

Screenshots:

Changelog:
  • Dropbox Screen Grabber 2.0 - (24.05.2010)
    • Added ability to automatically grab screenshots at defined time intervals
    • Added ability to export and import settings
    • Added ability to restore settings to default
    • If Dropbox installation cannot be detected automatically, user can now manually set the location of the "My Dropbox" folder
    • New taskbar menu icons
  • Dropbox Screen Grabber 1.6 - (22.05.2010)
    • Fixed the application / taskbar icon title issue
    • Screenshot filename prefix can now be changed in the settings
    • Reorganized the settings dialog and made it more user friendly
    • Reorganized the settings dialog and made it more user friendly
  • Dropbox Screen Grabber 1.5 - (19.05.2010)
    • Changed the public URL from getdropbox.com to dropbox.com
    • User can now specify image quality when the JPEG format is selected
    • User can now select to automatically shorten the URLs which are copied to the clipboard using the is.gd service
  • Dropbox Screen Grabber 1.4 - (16.05.2010)
    • Better Dropbox path detection - it should now work on both 0.7 and 0.8 branches
    • User can now choose in which format the captured screenshots are saved (PNG, JPG)
  • Dropbox Screen Grabber 1.3 - (05.11.2009)
    • Fixed a bug which caused the wrong public file URL to be saved to the clipboard if user has set the custom screenshot save directory
  • Dropbox Screen Grabber 1.2 - (27.10.2009)
    • User can choose arbitrary folder inside Dropbox public folder where the screenshots are saved
    • Simple update check system, which allows you to check if there is a new version available
    • Other minor fixes
  • Dropbox Screen Grabber 1.1 - (24.10.2009)
    • Only one instance of the program is allowed to run
    • System wide hot-keys can be customized
    • Automatic public file URL copying to clipboard after taking the screenshot can be enabled or disabled
    • Add system-tray menu icons
    • New application icon
    • Other minor code improvements
  • Dropbox Screen Grabber 1.0 - (20.10.2009)
    • Initial release

Temperature monitor (2009)

Description: I wrote this simple script for monitoring my Unix server temperature. It can monitor multiple sensors and send you a warning via a short text message (SMS) if the threshold values defined in the config file were reached.
For this script to work, your computer needs to support IPMI specification and have ipmitools installed (you obviously need to have ipmi kernel module loaded).

Text message warnings / notifcations are sent using the Slovene mobile operator's (Mobitel) web service, so you need to have an account there if you want to use this feature. If you have a subscription plan with free monthly short text messages you can also enable the feature which checks your free message quota and only sends you a warning if the quota wasn't reached.
Download URL: tempmonitor_v1.0.zip

Requirements:
  • Python >= 2.5 (< 3.0)
  • SUDS package
  • loaded ipmi kernel module (kldload ipmi / modprobe ipmi / whatever) - I only tested it on FreeBSD
  • ipmitools (with some minor modifications it should probably work with openipmi as well)

<< Back to category list

Get in touch

From my library