On 25/04/18 03:26, Evuraan wrote:
> Please consider this situation :
> Each line in "massive_input.txt" need to be churned by the
> "time_intensive_stuff" function, so I am trying to background it.
What kind of "churning" is involved?
If its compute intensive threading may not be the right
answer
On 25/04/18 09:27, Alan Gauld via Tutor wrote:
>> for i in $(< massive_input.file); do
>> time_intensive_stuff_in_bash i & disown
>> :
>> done
>
> Its the same except in bash you start a whole
> new process so instead of using threading you
> use concurrent.
concurrent -> multiprocessin
Hello,
Im creating a progress bar for applications that can keep track of a
download in progress. The progress bar will be on a separate thread and
will communicate with the main thread using delegates.
Ive made the download and the progress bar part, all that remains is the
connection between the
class Barber: barberWorkingEvent = Event() def sleep(self):
self.barberWorkingEvent.wait() def wakeUp(self):
self.barberWorkingEvent.set() def cutHair(self, customer): #Set barber as
busy self.barberWorkingEvent.clear() print '{0} is having a haircut from
barber\n'.format(customer.name) HairCutting
Hi Michael and welcome.
In future, please leave the Subject line as a BRIEF summary, and put the
description of your problem in the body of the email.
You said:
> I'm attempting to code the barbershop problem in OS except
> with 3 barbers instead of one. Can anyone help rewrite my Barber1 and
>
> What's the barbershop problem?
a classic computer science puzzle which is essentially a process
synchronization problem.
it does help to spell out the problem you are trying to solve, however -
we don't have the context the original poster is operating in.
Hello everybody,
I'm coming from a Perl background and try to parse some Exim Logfiles into a
data structure of dictionaries. The regex and geoip part works fine and I'd
like to save the email adress, the countries (from logins) and the count of
logins.
The structure I'd like to have:
result = {
On 25/04/18 14:22, Kai Bojens wrote:
> The structure I'd like to have:
>
> result = {
> 'f...@bar.de': {
> 'Countries': [DE,DK,UK]
> 'IP': ['192.168.1.1','172.10.10.10']
> 'Count': [12]
> }
> }
> ...
> for line in logfile:
>
hi again
when I #print (self.organismA) under the for x in self.results: , it
results in what it is supposed to be.
But when i print it in the below function, it gives some garbage value.
Kindly let me know what is wrong. :)
import functools
import csv
import time
start =time.time()
class B
On 12/31/1969 05:00 PM, wrote:
> Hello everybody,
> I'm coming from a Perl background and try to parse some Exim Logfiles into a
> data structure of dictionaries. The regex and geoip part works fine and I'd
> like to save the email adress, the countries (from logins) and the count of
> logins.
>
On 25/04/2018 –– 18:35:30PM +0100, Alan Gauld via Tutor wrote:
> > ...
> > for line in logfile:
> > result = pattern.search(line)
> Doesn't this overwrite your data structure?
> I would strongly advise using another name.
You are of course right. I accidentally shortened this name as
On 25/04/2018 –– 12:19:28PM -0600, Mats Wichmann wrote:
> I presume that's pseudo-code, since it's missing punctuation (commas
> between elements) and the country codes are not quoted
Yes, that was just a short pseudo code example of what I wanted to achieve.
> you don't actually need to ch
Hi,
I've come up with an idea for a new protocol I want to implement in
Python using 3.6 (or maybe 3.7 when that comes out), but I'm somewhat
confused about how to do it in an async way.
The way I understand it is that you have a loop that waits for an
incoming request and then calls a function/m
On 04/25/2018 05:14 PM, Simon Connah wrote:
Hi,
I've come up with an idea for a new protocol I want to implement in
Python using 3.6 (or maybe 3.7 when that comes out), but I'm somewhat
confused about how to do it in an async way.
The way I understand it is that you have a loop that waits for a
14 matches
Mail list logo