Re: How do I sample randomly based on some probability(wightage)?

2009-05-31 Thread Sumitava Mukherjee
On May 27, 8:08 pm, Scott David Daniels wrote: > Sumitava Mukherjee wrote: > > I need to randomly sample from a list where all choices have weights > > attached to them. The probability of them being choosen is dependent > > on the weights. > > I am not sure why

Re: How do I sample randomly based on some probability(wightage)?

2009-05-31 Thread Sumitava Mukherjee
On May 28, 3:52 pm, Antoon Pardon wrote: > Op 2009-05-26, Arnaud Delobelle schreef : > > > > > Sumitava Mukherjee writes: > > >> On May 26, 11:39 pm, Sumitava Mukherjee wrote: > >>> Hi all, > >>> I need to randomly sample from a list wher

Re: How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Sumitava Mukherjee
On May 26, 11:39 pm, Sumitava Mukherjee wrote: > Hi all, > I need to randomly sample from a list where all choices have weights > attached to them. The probability of them being choosen is dependent > on the weights. > If say Sample list of choices are [A,B,C,D,E] and weights of

How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Sumitava Mukherjee
Hi all, I need to randomly sample from a list where all choices have weights attached to them. The probability of them being choosen is dependent on the weights. If say Sample list of choices are [A,B,C,D,E] and weights of the same are [0.895,0.567,0.765,0.890,0.60] when I draw (say 2) samples then

How is the logical processing being done for strings like 'Dog' and 'Cat'

2008-10-20 Thread Sumitava Mukherjee
Hi all, I am a novice programmer in Python. Please could you explain me the results (regarding logical operators). I get this: >>> print bool('God' and 'Devil') True [This is ok because (any) string is True, so; (True and True) gives True] >>> print('God' and 'Devil') Devil [This is what I d

Re: Python Installation and Running on Windows Vista

2008-09-09 Thread Sumitava Mukherjee
On Sep 9, 3:46 pm, Mchizi_Crazy <[EMAIL PROTECTED]> wrote: > Please help with issue... I heard of compatimbiltity issues and would > like clarification. The win32 installer available from python.org works absolutely fine with Vista. So, go ahead and try it out. It works for all of my friends and m