Skip to content

Instantly share code, notes, and snippets.

@danbri
Created August 5, 2011 08:18
Show Gist options
  • Save danbri/1127115 to your computer and use it in GitHub Desktop.
Save danbri/1127115 to your computer and use it in GitHub Desktop.
# check required arguments were inputted
if radial is None:
print "No radial."
usage()
sys.exit
if numClusters < 0 or numPoints < 0 or minDistance < 0:
print "numClusters, numPoints and minDistance must all be 0 or more"
usage()
sys.exit
if maxValue < 1 or minClusterVariance < 0 or maxClusterVariance < 0:
print "maxValue should be 1 or more; minclusters and maxClusterVariance 0 or more"
usage()
sys.exit
if minDistance * numClusters > maxValue:
print "mindistance * numclusters is > maxvalue: ", minDistance * numClusters, " " , maxValue
usage()
sys.exit
if output is None:
print "no output specified"
usage()
sys.exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment