title: How to shuffle a list with Gaussian distribution
body: <p>I want to simulate fault on a message (Eg: 1000010011 => 1010000011). Is there a way to implement this in Python? I tried the following, which works:</p>
  
  <pre><code>import random
  a = "1011101101"
  b = [el for el in a] # b = ['1', '0', '1', '1', '1', '0', '1', '1', '0', '1']
  random.shuffle(b)
  print b # b = ['0', '1', '1', '1', '0', '1', '1', '1', '1', '0']
  random.shuffle(b, random.random)
  print b # b = ['1', '1', '0', '1', '1', '0', '1', '0', '1', '1']
  </code></pre>
  
  <p>I would like my reordering to be Normally/Gaussian distributed.
  Eg:</p>
  
  <pre><code>import random
  a = "1011101101"
  b = [el for el in a] # b = ['1', '0', '1', '1', '1', '0', '1', '1', '0', '1']
  random.shuffle(b,random.gauss(0.5,0.1))
  print b # b = ['1', '0', '1', '1', '0', '0', '1', '1', '1', '1'] &lt;= assume this is Gaussian distributed...
  # OR
  c = random.gauss(0.5,0.1)
  random.shuffle(b,c)
  print b # b = ['0', '0', '1', '1', '1', '0', '1', '1', '1', '1'] &lt;= assume this is also Gaussian distributed...
  </code></pre>
  
  <p>However, this does not work, and I get the message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\random.py", line 287, in shuffle
      j = int(random() * (i+1))
  TypeError: 'float' object is not callable
  </code></pre>
  
  <p>Any suggestion/comment would be greatly appreciated.</p>
  
  <p>Thanks</p>
  
  <p>Note: I am only asking for re-ordering error here(Eg: 1000010011 => 1010000011). However, I am also planning on simulating burst-error(Eg: 1000010011 => 1011111011), single events(Eg: 1000010011 => 1000010011), etc.</p>
  
  <p>Other related question: <a href="https://stackoverflow.com/questions/13703464/python-binary-string-error-simulation">Python: binary string error simulation</a></p>