Monitor Windows CPU usage with Python

This little Python script lets you monitor the average CPU-load on a Windows machine. Needs WMI to be present.

import os

def get_cpu_load():
    """ Returns a list CPU Loads"""
    result = []
    cmd = "WMIC CPU GET LoadPercentage "
    response = os.popen(cmd + ' 2>&1','r').read().strip().split("\r\n")
    for load in response[1:]:
       result.append(int(load))
    return result

if __name__ == '__main__':
    print get_cpu_load()
Published in:  on June 8, 2009 at 10:25 am Comments (2)

Relaunched: www.beyond-content.de

After months of intensive work and lots of fun with the django framework, we released the new version of our corporate website, beyond content, a Nuremberg based internet agency.

Literally “navigate” through an archipelago of islands with the innovative site navigation.

wwwbeyond-contentde

We already announced this relaunch on DjangoSites.org.

Published in:  on November 25, 2008 at 9:02 am Leave a Comment
Tags: , ,

Firefox very slow on localhost connections on Vista

Doing web development on my local machine – a Vista box – I was wondering why page rendering was so slow. First I thought my web application was not well done. But then I figured out that the pages rendered lightning fast on IE 7. And again later, I experienced, that the web application rendered pretty fast even in Firefox, when published to the live server.

Doing some research I found this blog entry, which was quite helpful.

The change of the Firefox setting network.dns.disableIPv6 to true did the trick. See screenshot below:

sshot.png

More information about this setting is to be found in the MozillaZine Knowledge Base.

Published in:  on March 27, 2007 at 11:45 am Comments (28)

Ask the select[or]racle

This is a nice tool, which translates you CSS selector syntax:  selectorracle. The site says:

Ever wondered what a particularly complex CSS selector really means? Here’s your chance to find out! Simply enter one or more semi-colon separated selectors or rulesets into the following “Direct Input” area, or provide the URL of a stylesheet in the “URL Input” area. Best of all, the SelectORacle will flag potential errors and other problems, and it won’t choke on any actual rules. You’ve always wanted to know what makes those line-noise posers tick– now you can.

http://gallery.theopalgroup.com/selectoracle/

Published in:  on February 21, 2007 at 6:24 pm Leave a Comment

Cheat Sheet Central

Find a very useful overview of numerous “cheat sheets” at Smashing Magazine’s website. CSS, XHTML, C# and Python are only a few languages which are covered here.

The Apache Cheat Sheet is quite useful:

or the Regular Expressions cheat sheet: 

Published in:  on December 17, 2006 at 5:59 pm Comments (3)

Finally found: THE Python IDE

As an old Zoper, I have been looking for a nice Python IDE over the last couple of years. I tried a few of the existing IDEs Komodo, Pydev and Wing IDE. There was always something “missing” – at least performance.

The other day my coworker ran into the free IDE Pyscripter, which from the first second looked very promising. The vendor says about it:

PyScripter is a Python IDE built in Python for Delphi(P4D) components and created with the ambition to become competitive in functionality with commercial Windows-based IDEs available for other languages. Being built in a compiled language is rather snappier than some of the other Python IDEs and provides an extensive blend of features that make it a productive Python development environment.

This IDE is my “tool of the week”. The performance is great and the functionality more or less the same as the other IDEs mentioned above.

To get it running you need a Python standalone installation on your system to be found on python.org.

To get access to the Zope INSTANCE_HOME and SOFTWARE_HOME packages you need to add those pathes to the python path in the IDE. Unfortunately we made the experience, that Pyscripter tends to forget this setting. A workaround seems to be to add the Zope pathes to the python path in the registry.

Just open regedit.exe, if you use Python 2.4, find the path HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.4\PythonPathHKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.4\PythonPath
and add the pathes. The restart PyScripter, and this is it.

sshot.gif

Published in:  on at 12:29 pm Comments (1)

Need an Icon?

Find an interesting list of icon libraries here.

Published in:  on December 11, 2006 at 11:05 pm Leave a Comment

IE 7 standalone installation

Find a nice HowTo for the standalone installation of IE 7 here.

ie7ie6.gif

Published in:  on November 7, 2006 at 2:45 pm Leave a Comment

Invent a Word

When I first heard the word “travelocity” I thought it was a clever combination of two existing words (“travel” + “velocity”) that yielded a new and meaningful word. I wondered how difficult it would be to come up with more clever words like “travelocity”. Invent-a-Word was born …

Invent-a-Word Website

Published in:  on October 25, 2006 at 7:00 am Leave a Comment

Rearrange your taskbar

If you are someone like me, who usually has a 3 storyed Windows taskbar, then you might appreciate this nice little utility: Taskbar Shuffle lets you rearrange the programs in your taskbar.

No hotkey, no extra steps, drag and drop the programs on your Windows taskbar by simply… well, dragging and dropping them! Neat concept, huh?No need to get all nervous when a program crashes or if you wanna reboot; you can reorder the programs/buttons on your taskbar exactly how you like.

The Taskbar Shuffle Website.

Published in:  on at 6:50 am Comments (1)