Re: queue versus list

2020-03-20 Thread Antoon Pardon
Op 20/03/20 om 02:10 schreef Cameron Simpson: On 20Mar2020 00:37, duncan smith wrote: Thread safety is unimportant (for my purposes), but the docs at https://docs.python.org/2/library/collections.html#collections.deque state "Deques support thread-safe, memory efficient appends and pops from

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-20 Thread Robin Becker
On 16/03/2020 17:38, Orges Leka wrote: This would reduce the waiting queue at the supermarket and possibly the contact to other people thus would help a little bit in slowing down the spread of the Corona virus. Unfortunately, I suspect nothing will alter the number of people in queues in British

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-20 Thread Orges Leka
Dear Robin, I am sad to hear this. The same thing is / will happen(ing) in Germany I suspect. But after the panic buys has gone, the supermarkets will leave only a handful of people in, as it is happening in Italy. The app is meant to inform others of those queues. But maybe it is just a silly ide

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-20 Thread joseph pareti
> the supermarkets will leave only a handful of people better later than never :-) meanwhile folks are staging idiotic things like (NOT EVEN 2 WEEKS AGO) a leipzig vs. tottenhame match with FULL STADION, or bragging about their social stupidities on facebook and co. I always thought (and I am get

Re: queue versus list

2020-03-20 Thread Dan Stromberg
On Thu, Mar 19, 2020 at 6:11 PM Cameron Simpson wrote: > >> 4. If it doesn't need to be thread-safe, why not try deques instead? > > > >Bingo. Performance is indistinguishable from that of the list. > > A deque is implement using a list. > Actually, I think a deque is a doubly linked list of pyt

Re: queue versus list

2020-03-20 Thread Dan Sommers
On Fri, 20 Mar 2020 06:50:29 -0700 Dan Stromberg wrote: > On Thu, Mar 19, 2020 at 6:11 PM Cameron Simpson wrote: > > > >> 4. If it doesn't need to be thread-safe, why not try deques instead? > > > > > >Bingo. Performance is indistinguishable from that of the list. > > > > A deque is implement u

Re: [EXTERNAL] A simple probabilistic model for COVID-19

2020-03-20 Thread Barraclough, Dominic (ext. 414) via Python-list
Hi Pierre, I'm interested in your Lea project and notice it is in a mercurial repo on bitbucket, what are your plans for the repo given that bitbucket are dropping support for mercurial repos in the summer? https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket [https://rlmr51w5rw

A simple probabilistic model for COVID-19

2020-03-20 Thread pie.denis
Hi! I've created a Jupyter notebook that presents a simple probabilistic model linking diseases (cold, flu, COVID-19) to symptoms (fever, cough): http://mybinder.org/v2/gh/piedenis/lea_mini_tutorials/master?filepath=Lea_CO VID19.ipynb Assuming that this model is accurate (which is probably not!)

Re: queue versus list

2020-03-20 Thread Barry
> On 20 Mar 2020, at 00:42, duncan smith wrote: > > Bingo. Performance is indistinguishable from that of the list. Thread > safety is unimportant (for my purposes), but the docs at > https://docs.python.org/2/library/collections.html#collections.deque > state "Deques support thread-safe, memor

datepicker fails to find firstweekday in calendar

2020-03-20 Thread Rich Shepard
I'm running Python3-3.8.2 on Slackware-14.2/x86_64 and I tried to run Miguel Martinez Lopez's datepicker.py (version 1.0.7) before learning how I can use it in my application. It fails to find the attribute in the imported calendar module: $ python3 datepicker.py Traceback (most recent call last

Re: queue versus list

2020-03-20 Thread Cameron Simpson
On 20Mar2020 06:50, Dan Stromberg wrote: Actually, I think a deque is a doubly linked list of python lists. On 20Mar2020 09:45, Antoon Pardon wrote: This doesn't seem correct. A deque is used to simulate a stack or a queue. It doesn't use heappush or heappop. You are both correct; brain fa

Re: datepicker fails to find firstweekday in calendar

2020-03-20 Thread MRAB
On 2020-03-20 22:43, Rich Shepard wrote: I'm running Python3-3.8.2 on Slackware-14.2/x86_64 and I tried to run Miguel Martinez Lopez's datepicker.py (version 1.0.7) before learning how I can use it in my application. It fails to find the attribute in the imported calendar module: $ python3 datep

Re: queue versus list

2020-03-20 Thread duncan smith
On 20/03/2020 21:57, Barry wrote: > > >> On 20 Mar 2020, at 00:42, duncan smith wrote: >> >> Bingo. Performance is indistinguishable from that of the list. Thread >> safety is unimportant (for my purposes), but the docs at >> https://docs.python.org/2/library/collections.html#collections.deque >

Re: datepicker fails to find firstweekday in calendar [FIXED]

2020-03-20 Thread Rich Shepard
On Sat, 21 Mar 2020, MRAB wrote: Is there another file called "calendar.py" somewhere? MRAB, Mea culpa! There was a 'calendar.py' file I had downloaded in the past in the same directory. I assumed that Python would use the built-in one before the one in the directory. Removing that file solve