Ross Ridge 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 up the thread one more p
In article ,
Ross Ridge wrote:
>Aahz wrote:
>>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.
>>
>>As stated previously, my suspicion is that at least some is caused by a
>>problem with MIME
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.
Aahz wrote:
>As stated previously, my suspicion is that at least some is caused by a
>problem with MIME messages and the mail->news gateway on python.org
In article ,
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.
As stated previously, my suspicion is that at least some is caused by a
problem with MIME messages and the mail->news gateway on python.org
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
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
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 that I am replying to (but I
break the thread on purpose). For example the posting with Message-ID:
reference
On Sun, Jun 21, 2009 at 5:25 AM, 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 that I am replying to (but I
As addressed in an earlier thread, Mr. Bieb
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 that I am replying to (but I
break the thread on purpose). For example the posting with Message-ID:
references:
<77e831100906192220y553
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)
retryNo
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 l
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:
>
> 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, normal
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 <=
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
(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 it
> # 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
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 distri
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 th
19 matches
Mail list logo