#!/usr/bin/python -Wall # ================================================================ # John Kerl # 2007-07-02 # kerl.john.r@gmail.com # ================================================================ # This software is released under the terms of the GNU GPL. # Please see LICENSE.txt in the same directory as this file. # ================================================================ from __future__ import division # 1/2 = 0.5, not 0. import random import sys N = 100 m = -3.4 b = -10.2 s = 1.1 if (len(sys.argv) == 5): N = int(sys.argv[1]) m = float(sys.argv[2]) b = float(sys.argv[3]) s = float(sys.argv[4]) for x in range(0, N): y = m*x + b + random.gauss(0, s) print x, y