Category Archives: Programming

Code for projects hosted or discussed here, associated projects, as well as random scripts and exemplary code.

Finding Images with Python

Let’s say we wish to take a directory, the current directory in this example, and gather all the image files. This could be helpful if we were then going to use PIL or Image Magick to manipulate those files, or … Continue reading

Posted in Hacks, Programming, Python | Tagged , , , | Comments Off

Monty Hall Sneak Peak

Coming Soon: Monty Hall game player in Python. For now, here is a little teaser: The 10 billion iteration answer: >>> monty_hall.play(iter=10000000000) Ran 10000000000 iterations in 104833.082781s {‘wins’: 3333340564L, ‘losses’: 6666659436L} The code is hosted, of course, on GitHub and … Continue reading

Posted in Programming, Python | Tagged , , , , , , | Comments Off

Bash Snippet for Git Users

Keeping track of what branch you are using while in a git repository can be a bit of a pain. Adding the following code to your ~/.bashrc file can make it a bit easier since it will prepend your prompt … Continue reading

Posted in Hacks, Linux, Programming | Tagged , , , , , | Comments Off

End of an Era : Uptime FAIL!

Well, we had a huge power problem on Sunday that resulted in 2 fire trucks and 2 electric utility crews coming to the house. Long story short, this picture should sum up the sadness involved:  

Posted in Linux, Mutaku, Server/Webserver | Tagged , , , | Comments Off

Migrating to XFCE

The following was from a Google+ post that I figured I would share here as well. Well I think I’m finally switching my main desktop from KDE to XFCE. Too much flash and pizazz and having to turn off behaviors … Continue reading

Posted in Linux, Rants | Tagged , , , , | Comments Off

Python – Dynamically Printing to Single Line of Stdout

It’s that time again; code snippet time. This is a short and sweet bit of a code that has some really practical and powerful implications. When handling large amounts of data processing, it’s often desirable to keep the user informed … Continue reading

Posted in Hacks, Linux, Programming, Python | Tagged , , , , , , , | Comments Off

Installing Google Chrome in Slackware 13 (13.37)

Trying to install Google-Chrome via RPM (with rpm2tgz) will give you an error with libnss3. Don’t fret, there is already a way to build Google-Chrome without much effort. Below is a quick way using the mirror from Penn State (carroll), … Continue reading

Posted in Hacks, Linux | Tagged , , , , , , | Comments Off

Stumpy Updated – v1.4.3

The Mutaku URL shortener, Stumpy, has now been updated to version 1.4.3. You can find out more about Stumpy by clicking the first link in this post to read the initial write up on Mutaku, or you can go to … Continue reading

Posted in Mutaku, Programming, Python | Tagged , , , , , , | Comments Off

Better Trackpad Functionality with CR-48 in Ubuntu

There is a great post on patching up synaptics based on what is found in opensuse here. Takes all of 5 minutes and after patching and building the packages, a quick install, and then logging out and back in, you … Continue reading

Posted in CR-48, Hacks, Linux | Tagged , , , , , | Comments Off

Uploading Images to imgur with Python

That time again. Code snippet time. UPDATE: See the bottom of the post for the most up-to-date version of the code. Another brief one. We are going to start working on a class to upload images to imgur.com. There are … Continue reading

Posted in Hacks, Programming, Python | Tagged , , , , , , | Comments Off