While writing a python program, I came upon the need to convert a string to title case, or to capitalize the initial character of each word. Although PHP has ucwords(), Python does not partake in the “two methods for everything anyone has ever thought about”. Here’s a small function to give you title cased strings: This […]
There are tons of services out there that will monitor the status of a website for you. Pingdom, Uptime Robot, etc all will watch a site and inform you if it is down. Since it’s trivial to check a site’s status, I wrote my own equivalent using Python. Here it is: Site Checker with Python […]
Sometimes there is a simple command line utility program that I want to use within a Python script. To do this, I use an interface called “sh”. To use sh, just install it with pip or easy_install:pip install sh#or#easy_install sh And then import any command line program with it in your Python code:>>> from sh […]
This is a recursive binary search algorithm in Python. You might also be interested in the iterative algorithm for binary search in Python.
You might also be interested in the recursive algorithm for binary search in Python.
After getting annoyed by the subtle handcuffs of the various CMS and blog platforms out there, I decided I would build something myself. Since a blog is generally text and images, I figured a static site would be great. I wanted something that I could dynamically rebuild and modify on a whim. I ended up […]