random.gammavariate()

random.gammavariate(alpha, beta) Gamma distribution. (Not the gamma function!) Conditions on the parameters are alpha > 0 and beta > 0. The probability distribution function is: x ** (alpha - 1) * math.exp(-x / beta) pdf(x) = -------------------------------------- math.gamma(alpha) * beta ** alpha

random.normalvariate()

random.normalvariate(mu, sigma) Normal distribution. mu is the mean, and sigma is the standard deviation.

quopri.encode()

quopri.encode(input, output, quotetabs, header=False) Encode the contents of the input file and write the resulting quoted- printable data to the output file. input and output must be binary file objects. quotetabs, a flag which controls whether to encode embedded spaces and tabs must be provideda and when true it encodes such embedded whitespace, and when false it leaves them unencoded. Note that spaces and tabs appearing at the end of lines are always encoded, as per RFC 1521. header is a

random.choice()

random.choice(seq) Return a random element from the non-empty sequence seq. If seq is empty, raises IndexError.

random.betavariate()

random.betavariate(alpha, beta) Beta distribution. Conditions on the parameters are alpha > 0 and beta > 0. Returned values range between 0 and 1.

random.expovariate()

random.expovariate(lambd) Exponential distribution. lambd is 1.0 divided by the desired mean. It should be nonzero. (The parameter would be called “lambda”, but that is a reserved word in Python.) Returned values range from 0 to positive infinity if lambd is positive, and from negative infinity to 0 if lambd is negative.

quopri.encodestring()

quopri.encodestring(s, quotetabs=False, header=False) Like encode(), except that it accepts a source bytes and returns the corresponding encoded bytes. By default, it sends a False value to quotetabs parameter of the encode() function.

quopri.decodestring()

quopri.decodestring(s, header=False) Like decode(), except that it accepts a source bytes and returns the corresponding decoded bytes.

queue.Queue.qsize()

Queue.qsize() Return the approximate size of the queue. Note, qsize() > 0 doesn’t guarantee that a subsequent get() will not block, nor will qsize() < maxsize guarantee that put() will not block.

quopri.decode()

quopri.decode(input, output, header=False) Decode the contents of the input file and write the resulting decoded binary data to the output file. input and output must be binary file objects. If the optional argument header is present and true, underscore will be decoded as space. This is used to decode “Q”-encoded headers as described in RFC 1522: “MIME (Multipurpose Internet Mail Extensions) Part Two: Message Header Extensions for Non-ASCII Text”.