Skip to content

Instantly share code, notes, and snippets.

@bmschmidt
Last active August 29, 2015 14:25
Show Gist options
  • Save bmschmidt/d1cc49066f775992f275 to your computer and use it in GitHub Desktop.
Save bmschmidt/d1cc49066f775992f275 to your computer and use it in GitHub Desktop.
import math
import random
"""
This script does nothing, but uses up processor speed doing it.
"""
swatch = False
while True:
if swatch:
p = math.sqrt(random.random())
swatch = False
else:
swatch = True
all:
find ~ | parallel -n 1 -P 4 python dummy.py
from subprocess import call
call("make",shell=True)
@bmschmidt
Copy link
Author

Running master.py uses multiple cores. Phew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment