Ross Ridge rri...@csclub.uwaterloo.ca wrote:
I'm not sure what MIME would have to do with it, but Piet van Oostrum's
problem is almost certainly as result of the python.org mail to news
gateway mangling the References header. The missing postings he's looking
for don't actually exist. Just go
In article h1o1dk$hm...@rumours.uwaterloo.ca,
Ross Ridge rri...@csclub.uwaterloo.ca wrote:
Aahz a...@pythoncraft.com wrote:
Piet van Oostrum p...@cs.uu.nl wrote:
I notice that I see several postings on news:comp.lang.python that are
replies to other postings that I don't see.
As stated
Piet van Oostrum p...@cs.uu.nl wrote:
I notice that I see several postings on news:comp.lang.python that are
replies to other postings that I don't see.
Aahz a...@pythoncraft.com wrote:
As stated previously, my suspicion is that at least some is caused by a
problem with MIME messages and the
I notice that I see several postings on news:comp.lang.python that are
replies to other postings that I don't see. Examples are the postings by
Dennis Lee Bieber wlfr...@ix.netcom.com that I am replying to (but I
break the thread on purpose). For example the posting with Message-ID:
On Sun, Jun 21, 2009 at 5:25 AM, Piet van Oostrump...@cs.uu.nl wrote:
I notice that I see several postings on news:comp.lang.python that are
replies to other postings that I don't see. Examples are the postings by
Dennis Lee Bieber wlfr...@ix.netcom.com that I am replying to (but I
As
Piet van Oostrum wrote:
I notice that I see several postings on news:comp.lang.python that are
replies to other postings that I don't see. Examples are the postings by
Dennis Lee Bieber wlfr...@ix.netcom.com that I am replying to (but I
break the thread on purpose). For example the posting with
Piet van Oostrum wrote:
I notice that I see several postings on news:comp.lang.python that are
replies to other postings that I don't see.
I see the same problem.
I suspect it's because of over-vigorous spam filtering from Usenet
providers. Some even block everything from anyone using Google
Dennis Lee Bieber wrote:
unless one is reading from a server
that interprets X-no-archive to mean delete before reading.
Can't be too careful with security. Destroy it,
memorize it and then read it!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
In article m21vpddb9y.fsf...@cs.uu.nl,
Piet van Oostrum p...@cs.uu.nl wrote:
I notice that I see several postings on news:comp.lang.python that are
replies to other postings that I don't see.
As stated previously, my suspicion is that at least some is caused by a
problem with MIME messages and
While there are a lot of valid ways to do it, anything you do will change
the outcome of the probability anyway. I'm assuming you are just looking to
clamp the values.
Try this:
http://codepad.org/NzlmSMN9 (it runs the code, too)
==
# Clamp a normal
# Clamp a normal distribution outcome
import random
class applicant():
def __init__(self, x, y):
self.randomnum = clamp(random.normalvariate(x, y), 0, 100)
def clamp(input, min=0, max=100):
Clamps the input between min and max.
if input min, returns min
(sorry Vincent, I sent it to you but not the mailing list.)
Good luck, here are my answers:
Why not have clamp in the class? Because Clamp itself is a reusable
function. I was rather surprised it's not in the standard math module.
if __name__ == __main__ is only meaningful when the .py file
Vincent Davis wrote:
I currently have something like this.
class applicant():
def __int__(self, x, y):
self.randomnum = normalvariate(x, y)
then other stuff
x, y are only used to calculate self.randomnum and this seems to
work. But I want self.randomnum to be 0 = randomnum = 100.
Vincent Davis wrote:
I currently have something like this.
class applicant():
def __int__(self, x, y):
self.randomnum = normalvariate(x, y)
then other stuff
x, y are only used to calculate self.randomnum and this seems to
work. But I want self.randomnum to be 0 =
def __int__(self, x, y):
x = -1
while not 0 = x = 100:
x = normalvariate(x, y)
# do other stuff
That is the correct way to truncate a normal distribution.
Thanks for the response. But why would you set the mean to -1 to begin?
x = max(0, min(100, normalvariate(x,
Vincent Davis wrote:
# Clamp a normal distribution outcome
I don't know who you are quoting -- you should give attribution to them.
def clamp(input, min=0, max=100):
...
if input min:
return min
elif input max:
return max
else:
return input
An easier way to do this:
return min(100,
Quoting Steven,
Truncating with a while loop will result in something closer to this:
000: *
010: *
020: **
030:
040: ***
050: *
060: **
070:
080: *
090: **
100: *
which is far less distorted.
That is why I was thinking of a while loop.
Quoting Dennis Lee Bieber
limitedNormal ( 75, 20 )
computed statistics: mu = 75.5121294828 sigma = 8.16374859991
Note how computing the input sigma such that 3*sigma does not exceed
boundaries results in a narrow bell curve (hmm, and for this set, no one
scored 95-100)
I currently have something like this.
class applicant():
def __int__(self, x, y):
self.randomnum = normalvariate(x, y)
then other stuff
x, y are only used to calculate self.randomnum and this seems to
work. But I want self.randomnum to be 0 = randomnum = 100. The only
way I can
19 matches
Mail list logo