Tag Archives: randomization

Generate list of random integers in Python.

I use this for testing and that is about it. import random def randomArr(length, max): arr = [] for i in range(0, length): arr.append(random.randint(0, max)) return arr
Posted in Programming | Also tagged , | Leave a comment

Randomize cron entries with python.

I use this to prevent network brownouts when heavy bandwidth usage is expected. The script only randomizes the minute and hour fields of the cron entry, but can very easily be modified so that it randomizes all or selected entries. The script also only modifies entries that use the commands in the target list – [...]
Posted in Programming | Also tagged , | Leave a comment