I have a couple of double-conversion UPSs (i.e. the good kind) powering up two racks on my experiment. These are sophisticated instruments, with inbuilt battery checks and reporting of lots of power quality parameters. The trouble is to read them out into a computer and control them with serial commands, since the serial command set appears to be proprietary.
Enter the NUT project ! It includes drivers for a huge number of UPS systems, and there's a Python wrapper around it all called PyNUT. Code coming soon ...
Monday, May 27, 2013
Wednesday, May 22, 2013
Listing primes
Naive prime testing compared to the Sieve of Eratosthenes.
cProfile says (for N = 100 000):
naive testing = 7.912 CPU seconds
sieve method = 0.064 CPU seconds
Sieving is fast !
cProfile says (for N = 100 000):
naive testing = 7.912 CPU seconds
sieve method = 0.064 CPU seconds
Sieving is fast !
Subscribe to:
Posts (Atom)