On 2013-07-04, Aseem Bansal wrote:
> I have been searching all over google but couldn't find any IDE that
> has drag-and-drop feature for Python GUI development.
If you want something like Visual Studio, you could try IronPython:
http://www.ironpython.net/tools/
For any moderatley complex cros
On Fri, Jul 5, 2013 at 11:41 AM, Steven D'Aprano
wrote:
> If you know C, that's like:
>
> ?(condition-being-tested, value-if-true, value-if-false)
Or to be precise:
condition-being-tested ? value-if-true : value-if-false
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
Νίκος Gr33k writes:
> try:
> host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
> except Exception as e:
> host = "Reverse DNS Failed"
>
> How can the above code not be able to reeverse dns any more and it
> falls back to the failed string?
The only way to know is actually
Στις 5/7/2013 10:06 πμ, ο/η Lele Gaifax έγραψε:
try:
host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
except:
host = "Reverse DNS Failed"
Yes i uses to had it like that, until i was looking for ways to make it
hold the error
except Exception as e:
Στις 5/7/2013 9:55 πμ, ο/η Lele Gaifax έγραψε:
Ferrous Cranus writes:
host = gethostbyaddr() or "UnResolved"
This will return the first argument that define the evaluation as
being true or untrue.
if function returns false the the 2nd argument.
Nut if the function gives an exception wil
On Fri, Jul 5, 2013 at 4:47 PM, zoom wrote:
> Probably...
>
> http://en.wikipedia.org/wiki/Aaron_Swartz#JSTOR
Things are always more complicated than any simple Usenet post can do
justice to, and it'll often come down to who has the biggest legal
budget. Since he was never actually found guilty (
Στις 5/7/2013 10:18 πμ, ο/η Chris Angelico έγραψε:
On Fri, Jul 5, 2013 at 4:47 PM, zoom wrote:
Probably...
http://en.wikipedia.org/wiki/Aaron_Swartz#JSTOR
Things are always more complicated than any simple Usenet post can do
justice to, and it'll often come down to who has the biggest legal
On Jul 5, 2013 12:12 AM, "Lele Gaifax" wrote:
>
> Νίκος Gr33k writes:
>
> > try:
> > host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
> > except Exception as e:
> > host = "Reverse DNS Failed"
> >
> > How can the above code not be able to reeverse dns any more and it
> > fa
On 7/4/2013 2:52 PM, Ferrous Cranus wrote:
Like you never downloaded serials/keygens/patch/cracks for warez and
torrents websites.
Morality aside, why would I? Today I bought 8 games on GOG.com for about
$22 - drm and virus free and easy download and install. If I get 10
hours of fun from 2
Programmability comes to my mind, before anything else. I'd suggest
to find out about designs of Emacs and Vi(m).
On Thu, Jul 4, 2013 at 10:32 AM, cutems93 wrote:
> I am researching on editors for my own reference. I found that each of them
> has some features that other don't, but I am not sur
On Fri, Jul 5, 2013 at 5:23 PM, Νίκος Gr33k wrote:
> Chris i just wanted to offer some help to you guys because i received a lot
> for help here myself.
Hey guys, I really appreciate what you've done, so here's what I'll
do: I'm robbing the Last National Bank on Tuesday, and you can all
join me!
Στις 4/7/2013 10:59 πμ, ο/η Νίκος έγραψε:
Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε:
I am researching on editors for my own reference. I found that each of
them has some features that other don't, but I am not sure which
features are significant/necessary for a GOOD editor. What features do
yo
hello , good morning
how i can pùt one python file in website ?
--
http://mail.python.org/mailman/listinfo/python-list
On 07/05/2013 02:51 AM, Νίκος Gr33k wrote:
Please help because i just happened to noticed that after having this code:
try:
host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
except Exception as e:
host = "Reverse DNS Failed"
Don't ever catch a bare Exception class.
Στις 5/7/2013 10:50 πμ, ο/η Dave Angel έγραψε:
The line started as:
> host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
refactor that to:
remadd = os.environ('REMOVE_ADDR')
tuple3 = socket.gethostbyaddr(remadd)
host = tuple3[0]
and see which one throws
Hi,
I have coded a simple algorithm to solve a Sudoku (probably not the first one).
Unfortunately, it takes 13 seconds for a difficult problem which is more than
75 times slower
than the same algorithm coded in C++.
Is this to be expected or could I have made my Python version faster ***
without
On 07/05/2013 03:13 AM, Νίκος Gr33k wrote:
Στις 5/7/2013 10:06 πμ, ο/η Lele Gaifax έγραψε:
try:
host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
except:
host = "Reverse DNS Failed"
Yes i uses to had it like that, until i was looking for ways to make it
h
Am Donnerstag, 4. Juli 2013 11:14:38 UTC+2 schrieb Νίκος Gr33k:
> ...
>> On 07/04/2013 03:59 AM, Νίκος wrote:
>>> ...
>>> Download Sublime Text v3
>>> Is a great editor
>>> ...
>
> If you guys want to use it i can send you a patch for it.
> I know its illegal thing to say but it will help you use
On 07/05/2013 04:00 AM, Νίκος Gr33k wrote:
Στις 5/7/2013 10:50 πμ, ο/η Dave Angel έγραψε:
The line started as:
> host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
refactor that to:
remadd = os.environ('REMOVE_ADDR')
tuple3 = socket.gethostbyaddr(remadd)
On Fri, 05 Jul 2013 17:05:49 +1000, Chris Angelico wrote:
> On Fri, Jul 5, 2013 at 11:41 AM, Steven D'Aprano
> wrote:
>> If you know C, that's like:
>>
>> ?(condition-being-tested, value-if-true, value-if-false)
>
> Or to be precise:
>
> condition-being-tested ? value-if-true : value-if-fal
Am Freitag, 5. Juli 2013 10:00:21 UTC+2 schrieb Νίκος Gr33k:
> ...
> I'am not sure how iam supposed to write this: i just tried this:
> try:
> remadd = os.environ('REMOVE_ADDR')
> tuple3 = socket.gethostbyaddr(remadd)
> host = tuple3[0]
> except:
> host = type(remadd) + " :
On Fri, 05 Jul 2013 09:48:09 +0200, bill papanastasiou wrote:
> hello , good morning
>
> how i can pùt one python file in website ?
The same way you would put any other file in a website.
Can you be more specific? What website do you want to put it on? Is it
your website or somebody else's?
Στις 5/7/2013 11:35 πμ, ο/η Dave Angel έγραψε:
On 07/05/2013 04:00 AM, Νίκος Gr33k wrote:
Στις 5/7/2013 10:50 πμ, ο/η Dave Angel έγραψε:
The line started as:
> host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
refactor that to:
remadd = os.environ('REMOVE_ADDR')
On 07/05/2013 03:48 AM, bill papanastasiou wrote:
hello , good morning
how i can pùt one python file in website ?
Whose website? If it's your own, log into the server, and use cp. Or if
you're remote with ssh access, use scp. And if you really have a bunch
of files to remotely transfer, u
Στις 5/7/2013 11:27 πμ, ο/η Dave Angel έγραψε:
Or if the problems cannot be recreated outside the cgi environment, use
the log files you've been logging other problems into. Or simply open a
text file for writing, and add a file= keyword parameter to the print
function call.
print(repr(e
On 07/05/2013 04:49 AM, Νίκος Gr33k wrote:
I don't think running it via 'cli' would help much, since its a
cgi-script and ip addr function have no meaning calling them in plain
our of a cgi environment but here it is:
No idea how to parse "have no meaning calling them in plain our of
Στις 5/7/2013 12:21 μμ, ο/η Dave Angel έγραψε:
On 07/05/2013 04:49 AM, Νίκος Gr33k wrote:
I don't think running it via 'cli' would help much, since its a
cgi-script and ip addr function have no meaning calling them in plain
our of a cgi environment but here it is:
No idea how to pa
On 5 July 2013 02:24, Cameron Simpson wrote:
> On 04Jul2013 16:03, Oscar Benjamin wrote:
> |
> | Is there some reason you're responding to a post from 5 years ago?
>
> Is there some reason not to, if no newer solutions are available?
No, I was genuinely curious. My way of accessing this
forum/ne
On 5 Jul 2013 09:29, "Helmut Jarausch" wrote:
>
> Hi,
>
> I have coded a simple algorithm to solve a Sudoku (probably not the first
one).
> Unfortunately, it takes 13 seconds for a difficult problem which is more
than 75 times slower
> than the same algorithm coded in C++.
> Is this to be expected
On Fri, 05 Jul 2013 10:38:35 +0100, Fábio Santos wrote:
> [Skipping to bottleneck]
>
>> def find_good_cell() :
>
> In this function you are accessing global variables a lot of times. Since
> accessing globals takes much more time than accessing locals, I advise you
> to assign them to local name
On 5 July 2013 09:22, Helmut Jarausch wrote:
> Hi,
>
> I have coded a simple algorithm to solve a Sudoku (probably not the first
> one).
> Unfortunately, it takes 13 seconds for a difficult problem which is more than
> 75 times slower
> than the same algorithm coded in C++.
> Is this to be expec
Benjamin Kaplan writes:
>> FYI, your code above is (almost) exactly equivalent to the simpler
>
> They aren't equivalent. "except Exception" won't catch KeyboardInterrupt or
> SystemExit or a few others that you really don't want to catch in a generic
> error handler. You should almost never have
Νίκος Gr33k writes:
> You can view the error in the very first line here:
>
> http://superhost.gr/?show=log&page=index.html
No, visiting that page simply emit the standard Apache error page,
without details.
>
> which yields: TypeError("'_Environ' object is not callable",)
Dave already told yo
Στις 5/7/2013 12:25 μμ, ο/η Νίκος Gr33k έγραψε:
try:
remadd = os.environ('REMOTE_ADDR')
tuple3 = socket.gethostbyaddr(remadd)
host = tuple3[0]
except Exception as e:
host = repr(e)
which yields: TypeError("'_Environ' object is not callable",)
Any thoufgs as to why os.env
Στις 5/7/2013 1:24 μμ, ο/η Lele Gaifax έγραψε:
Νίκος Gr33k writes:
You can view the error in the very first line here:
http://superhost.gr/?show=log&page=index.html
No, visiting that page simply emit the standard Apache error page,
without details.
which yields: TypeError("'_Environ' obj
Στις 5/7/2013 12:21 μμ, ο/η Dave Angel έγραψε:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.3/os.py", line 669, in __getitem__
value = self._data[self.encodekey(key)]
KeyError: b'REMOTE_ADDR
Wait!
Are you saying that the ip address is being re
Νίκος Gr33k writes:
> Στις 5/7/2013 12:25 μμ, ο/η Νίκος Gr33k έγραψε:
>>
>> try:
>> remadd = os.environ('REMOTE_ADDR')
>> tuple3 = socket.gethostbyaddr(remadd)
>> host = tuple3[0]
>> except Exception as e:
>> host = repr(e)
>
>> which yields: TypeError("'_Environ' object is no
Στις 5/7/2013 1:36 μμ, ο/η Lele Gaifax έγραψε:
Νίκος Gr33k writes:
Στις 5/7/2013 12:25 μμ, ο/η Νίκος Gr33k έγραψε:
try:
remadd = os.environ('REMOTE_ADDR')
tuple3 = socket.gethostbyaddr(remadd)
host = tuple3[0]
except Exception as e:
host = repr(e)
which yields: Typ
On Fri, 05 Jul 2013 11:13:33 +0100, Oscar Benjamin wrote:
> My one comment is that you're not really making the most out of numpy
> arrays. Numpy's ndarrays are efficient when each line of Python code
> is triggering a large number of numerical computations performed over
> the array. Because of t
Νίκος Gr33k writes:
> Looks now when i print( repr(e)) i get
>
> UnicodeDecodeError('utf-8', b'\xb6\xe3\xed\xf9\xf3
>
> but what string does it try to decode and jeeps failing?
Reasonably it's the second one, as the first clearly seems the tag of
the decoder that tried to translate it to Unicode
Στις 5/7/2013 1:59 μμ, ο/η Lele Gaifax έγραψε:
Νίκος Gr33k writes:
Looks now when i print( repr(e)) i get
UnicodeDecodeError('utf-8', b'\xb6\xe3\xed\xf9\xf3
but what string does it try to decode and jeeps failing?
Reasonably it's the second one, as the first clearly seems the tag of
the de
Νίκος Gr33k writes:
> Στις 5/7/2013 1:59 μμ, ο/η Lele Gaifax έγραψε:
>> Νίκος Gr33k writes:
>>
>>> UnicodeDecodeError('utf-8', b'\xb6\xe3\xed\xf9\xf3
>>>
>>> but what string does it try to decode and jeeps failing?
>>
>> Reasonably it's the second one, as the first clearly seems the tag of
>> th
Στις 5/7/2013 2:05 μμ, ο/η Νίκος Gr33k έγραψε:
Thats what i'm trying to do.
If i completely remove the gethostbyaddr fucntion adds function then
there is nor problem.
The problem is recreating when the script tries to decode a hostname.
For some bizarre reason if i exclude my domain from CloudF
Στις 5/7/2013 2:16 μμ, ο/η Lele Gaifax έγραψε:
UnicodeDecodeError('utf-8', b'\xb6\xe3\xed\xf9\xf3
first string---^^^
second string---^^
Hold on please!
From where do these dashes and carets characters come from?
Also from where do you see 2 strings?
L
Am Freitag, 5. Juli 2013 12:33:05 UTC+2 schrieb Νίκος Gr33k:
> ...
> Wait!
> Are you saying that the ip address is being returned as a byte string
> which then i have to decode with something like:
>
> host = socket.gethostbyaddr( os.environ['REMOTE_HOST'].decode('utf-8') )[0]
Wait!
I get a deco
On Fri, 05 Jul 2013 10:53:35 +, Helmut Jarausch wrote:
> Since I don't do any numerical stuff with the arrays, Numpy doesn't seem
> to be a good choice. I think this is an argument to add real arrays to
> Python.
Guido's time machine strikes again:
import array
By the way, I'm not exactly
Am Freitag, 5. Juli 2013 13:27:25 UTC+2 schrieb Νίκος Gr33k:
> Στις 5/7/2013 2:16 μμ, ο/η Lele Gaifax έγραψε:
>> UnicodeDecodeError('utf-8', b'\xb6\xe3\xed\xf9\xf3
>> first string---^^^
>> second string---^^
>
> Hold on please!
> From where do these dashes
On Thursday, July 4, 2013 1:37:10 PM UTC+5:30, Göktuğ Kayaalp wrote:
> Programmability comes to my mind, before anything else. I'd suggest
> to find out about designs of Emacs and Vi(m).
There's one reason I prefer emacs -- and I guess some people prefer Idle -- the
interpreter and editor are ti
Am Freitag, 5. Juli 2013 12:33:05 UTC+2 schrieb Νίκος Gr33k:
> ...
> Wait!
> Are you saying that the ip address is being returned as a byte string
> which then i have to decode with something like:
>
> host = socket.gethostbyaddr( os.environ['REMOTE_HOST'].decode('utf-8') )[0]
Wait!
I get a deco
Αρχικό μήνυμα
Θέμα: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in
position 0: invalid start byte
Ημερομηνία: Fri, 05 Jul 2013 15:16:45 +0300
Από:Νίκος Gr33k
Προς: feedthetr...@gmx.de
Στις 5/7/2013 3:06 μμ, ο/η feedthetr...@gmx.de έγραψε:
Am
On 5 Jul 2013 11:58, "Helmut Jarausch" wrote:
>
> On Fri, 05 Jul 2013 11:13:33 +0100, Oscar Benjamin wrote:
>
> > My one comment is that you're not really making the most out of numpy
> > arrays. Numpy's ndarrays are efficient when each line of Python code
> > is triggering a large number of numer
On 07/05/2013 06:33 AM, Νίκος Gr33k wrote:
Στις 5/7/2013 12:21 μμ, ο/η Dave Angel έγραψε:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.3/os.py", line 669, in __getitem__
value = self._data[self.encodekey(key)]
KeyError: b'REMOTE_ADDR
Wait!
Ar
On 2013-07-04, Dave Angel wrote:
> On 07/04/2013 01:32 AM, Steven D'Aprano wrote:
>
>> Well, if I ever have more than 63,000,000 variables[1] in a
>> function, I'll keep that in mind.
>>
>
>>
>> [1] Based on empirical evidence that Python supports names
>> with length at least up to
On 5 July 2013 11:53, Helmut Jarausch wrote:
> I even tried to use dictionaries instead of Numpy arrays. This version is a
> bit
> slower then the lists of lists version (7.2 seconds instead of 6 second) but
> still
> much faster than the Numpy array solution.
When you switched to dictionaries
On Fri, Jul 5, 2013 at 11:24 PM, Neil Cerutti wrote:
> Python provides deterministic destruction with a different
> feature.
You mean 'with'? That's not actually destruction, it just does one of
the same jobs that deterministic destruction is used for (RAII). It
doesn't, for instance, have any in
Dave Angel writes:
> You're quoting from my error output, and that's caused because I don't
> have such an environment variable. But you do.
Dave, maybe you already know, but that variable is "injected" by the CGI
mechanism, is not coming from the OP shell environment.
As Νίκος discovered, whe
On 2013-07-04, Ferrous Cranus wrote:
> 4/7/2013 9:40 , ??/?? Grant Edwards :
>> On 2013-07-04, ?? wrote:
>>>
>>> If you guys want to use it i can send you a patch for it. I know its
>>> illegal thing to say but it will help you use it without buying it.
>>
>> A ne
On Fri, 05 Jul 2013 14:41:23 +0100, Oscar Benjamin wrote:
> On 5 July 2013 11:53, Helmut Jarausch wrote:
>> I even tried to use dictionaries instead of Numpy arrays. This version is a
>> bit
>> slower then the lists of lists version (7.2 seconds instead of 6 second) but
>> still
>> much faster
Στις 5/7/2013 5:11 μμ, ο/η Lele Gaifax έγραψε:
Dave Angel writes:
You're quoting from my error output, and that's caused because I don't
have such an environment variable. But you do.
Dave, maybe you already know, but that variable is "injected" by the CGI
mechanism, is not coming from the
On 5 July 2013 15:28, Helmut Jarausch wrote:
> On Fri, 05 Jul 2013 14:41:23 +0100, Oscar Benjamin wrote:
>
>> On 5 July 2013 11:53, Helmut Jarausch wrote:
>>> I even tried to use dictionaries instead of Numpy arrays. This version is a
>>> bit
>>> slower then the lists of lists version (7.2 secon
On Fri, 05 Jul 2013 12:02:21 +, Steven D'Aprano wrote:
> On Fri, 05 Jul 2013 10:53:35 +, Helmut Jarausch wrote:
>
>> Since I don't do any numerical stuff with the arrays, Numpy doesn't seem
>> to be a good choice. I think this is an argument to add real arrays to
>> Python.
>
> Guido's t
On Fri, 05 Jul 2013 13:44:57 +0100, Fábio Santos wrote:
May I suggest you avoid range and use enumerate(the_array) instead? It
might be faster.
How does this work?
Given
Grid= [[0 for j in range(9)] for i in range(9)]
for (r,c,val) in (Grid) :
Helmut
--
http://mail.python.org/mailman/lis
On 5 Jul 2013 15:59, "Helmut Jarausch" wrote:
>
> On Fri, 05 Jul 2013 13:44:57 +0100, Fábio Santos wrote:
> May I suggest you avoid range and use enumerate(the_array) instead? It
> might be faster.
>
> How does this work?
>
> Given
>
> Grid= [[0 for j in range(9)] for i in range(9)]
>
> for (r,c,v
On Fri, 05 Jul 2013 15:45:25 +0100, Oscar Benjamin wrote:
> Presumably then you're now down to the innermost loop as a bottle-neck:
>
> Possibilities= 0
> for d in range(1,10) :
> if Row_Digits[r,d] or Col_Digits[c,d] or Sqr_Digits[Sq_No,d] :
> continue
> Possibilitie
On 5 July 2013 15:48, Helmut Jarausch wrote:
> On Fri, 05 Jul 2013 12:02:21 +, Steven D'Aprano wrote:
>
>> On Fri, 05 Jul 2013 10:53:35 +, Helmut Jarausch wrote:
>>
>>> Since I don't do any numerical stuff with the arrays, Numpy doesn't seem
>>> to be a good choice. I think this is an argu
On 2013-07-05, Chris Angelico wrote:
> On Fri, Jul 5, 2013 at 11:24 PM, Neil Cerutti
> wrote:
>> Python provides deterministic destruction with a different
>> feature.
>
> You mean 'with'? That's not actually destruction, it just does
> one of the same jobs that deterministic destruction is used
On 5 July 2013 16:17, Helmut Jarausch wrote:
>
> I've tried the following version
>
> def find_good_cell() :
> Best= None
> minPoss= 10
> for r,c in Grid :
> if Grid[(r,c)] > 0 : continue
Sorry, I think what I meant was that you should have a structure
called e.g. Remaining which is th
On Fri, 05 Jul 2013 16:18:41 +0100, Fábio Santos wrote:
> On 5 Jul 2013 15:59, "Helmut Jarausch" wrote:
>>
>> On Fri, 05 Jul 2013 13:44:57 +0100, Fábio Santos wrote:
>> May I suggest you avoid range and use enumerate(the_array) instead? It
>> might be faster.
>>
>> How does this work?
>>
>> Given
On Fri, 05 Jul 2013 16:38:43 +0100, Oscar Benjamin wrote:
> On 5 July 2013 16:17, Helmut Jarausch wrote:
>>
>> I've tried the following version
>>
>> def find_good_cell() :
>> Best= None
>> minPoss= 10
>> for r,c in Grid :
>> if Grid[(r,c)] > 0 : continue
>
> Sorry, I think what I mea
On Fri, 05 Jul 2013 14:54:26 +, Helmut Jarausch wrote:
> On Fri, 05 Jul 2013 13:44:57 +0100, Fábio Santos wrote: May I suggest
> you avoid range and use enumerate(the_array) instead? It might be
> faster.
>
> How does this work?
>
> Given
>
> Grid= [[0 for j in range(9)] for i in range(9)]
On 05/07/2013 16:17, Helmut Jarausch wrote:
On Fri, 05 Jul 2013 15:45:25 +0100, Oscar Benjamin wrote:
Presumably then you're now down to the innermost loop as a bottle-neck:
Possibilities= 0
for d in range(1,10) :
if Row_Digits[r,d] or Col_Digits[c,d] or Sqr_Digits[Sq_No,d]
On Fri, 05 Jul 2013 16:07:03 +, Helmut Jarausch wrote:
> The solution above take 0.79 seconds (mean of 100 calls) while the
> following version take 1.05 seconds (mean of 100 calls):
1) How are you timing the calls?
2) Don't use the mean, that's the wrong statistic when you are measuring
so
On Fri, 05 Jul 2013 15:47:45 +, Helmut Jarausch wrote:
> > for r, row_lst in enumerate(Grid):
> > for c, val in enumerate(row_lst):
>
> I assume the creation of the temporary lists "row_list" is a bit
> expensive.
No temporary list is being created. The pre-existing list is just being
gr
I have a pool of worker threads, created like this:
threads = [MyThread(*args) for i in range(numthreads)]
for t in threads:
t.start()
I then block until the threads are all done:
while any(t.isAlive() for t in threads):
pass
Is that the right way to wait for the threads to be done? S
On Sat, Jul 6, 2013 at 2:59 AM, Steven D'Aprano
wrote:
> I then block until the threads are all done:
>
> while any(t.isAlive() for t in threads):
> pass
>
Using the threading module, I assume. Is there any reason you can't
simply join() each thread in succession?
ChrisA
--
http://mail.pyth
On 5-7-2013 18:59, Steven D'Aprano wrote:
> I then block until the threads are all done:
>
> while any(t.isAlive() for t in threads):
> pass
>
>
> Is that the right way to wait for the threads to be done? Should I stick
> a call to time.sleep() inside the while loop? If so, how long should
On Fri, Jul 5, 2013 at 10:59 AM, Steven D'Aprano
wrote:
> I have a pool of worker threads, created like this:
>
> threads = [MyThread(*args) for i in range(numthreads)]
> for t in threads:
> t.start()
>
>
> I then block until the threads are all done:
>
> while any(t.isAlive() for t in threads
On Fri, 05 Jul 2013 16:50:41 +, Steven D'Aprano wrote:
> On Fri, 05 Jul 2013 16:07:03 +, Helmut Jarausch wrote:
>
>> The solution above take 0.79 seconds (mean of 100 calls) while the
>> following version take 1.05 seconds (mean of 100 calls):
>
> 1) How are you timing the calls?
I've p
On Fri, 05 Jul 2013 17:25:54 +0100, MRAB wrote:
> For comparison, here's my solution:
Your solution is very fast, indeed.
It takes 0.04 seconds (mean of 1000 runs) restoring "grid"
in between.
But that's a different algorithm which is IMHO more difficult to understand.
Many thanks,
Helmut
>
>
Is there a way to extract out of some environmental variable the Geo
location of the user being the city the user visits out website from?
Perhaps by utilizing his originated ip address?
--
What is now proved was at first only imagined!
--
http://mail.python.org/mailman/listinfo/python-list
Hello All,
I have a table with a column of type date, with dates and time combined (like
'1/6/2013 3:52:69PM'), that spans many months. How would I pull out records
that are the first and last entries per day?
Also, if I wanted to find time clusters per day (or per week) -- like if an
entry i
On 2013-07-05, noydb wrote:
> Hello All,
>
> I have a table with a column of type date, with dates and time
> combined (like '1/6/2013 3:52:69PM'), that spans many months.
> How would I pull out records that are the first and last
> entries per day?
>
> Also, if I wanted to find time clusters per
> I have a table with a column of type date, with dates and time combined (like
> '1/6/2013 3:52:69PM'), that spans many months. How would I pull out records
> that are the first and last entries per day?
You mentioned "table" and "column", which leads me to think you are
dealing with data in a
Hi,
FYI, There's a soap-specific python.org list: s...@python.org
On 07/04/13 20:57, robert.wink...@bioprocess.org wrote:
> Thanks to the OSA library, which works for SOAP requests with Python 3.x, I
> can now use SOAP services at http://www.chemspider.com.
>
> The results structure is
>
On 7/5/2013 3:18 PM, noydb wrote:
I have a table with a column of type date, with dates and time
This is a datetime in Python parlance.
combined (like '1/6/2013 3:52:69PM'), that spans many months. How
would I pull out records that are the first and last entries per
day?
Sort on that colu
On 2013-07-05 22:08, Νίκος Gr33k wrote:
> Is there a way to extract out of some environmental variable the
> Geo location of the user being the city the user visits out website
> from?
>
> Perhaps by utilizing his originated ip address?
Yep. You can get an 11MB database (17MB uncompressed)
http
On 07/05/2013 12:18 PM, noydb wrote:
Hello All,
I have a table with a column of type date, with dates and time combined (like
'1/6/2013 3:52:69PM'), that spans many months. How would I pull out records
that are the first and last entries per day?
Also, if I wanted to find time clusters per d
Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε:
On 2013-07-05 22:08, Νίκος Gr33k wrote:
Is there a way to extract out of some environmental variable the
Geo location of the user being the city the user visits out website
from?
Perhaps by utilizing his originated ip address?
Yep. You can get an
? Gr33k wrote:
>
>Is there a way to extract out of some environmental variable the Geo
>location of the user being the city the user visits out website from?
>
>Perhaps by utilizing his originated ip address?
It is possible to look up the geographic region associated with a block of
IP addre
Hi all,
What is the best approach to writing a concurrent daemon that can
execute callbacks for different types of events (AMQP messages, parsed
output of a subprocess, HTTP requests)?
I am considering [twisted][1], the built-in [threading][2] module, and
[greenlet][3]. I must admit that I a
On 07/05/2013 04:44 PM, Tim Roberts wrote:
? Gr33k wrote:
Is there a way to extract out of some environmental variable the Geo
location of the user being the city the user visits out website from?
Perhaps by utilizing his originated ip address?
It is possible to look up the geographic r
On 2013-07-05 22:59, Support by Νίκος wrote:
> Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε:
> > On 2013-07-05 22:08, Νίκος Gr33k wrote:
> >> Is there a way to extract out of some environmental variable the
> >> Geo location of the user being the city the user visits out
> >> website from?
> >>
> >
On 2013-07-05, ?? Gr33k wrote:
> Is there a way to extract out of some environmental variable the Geo
> location of the user being the city the user visits out website from?
No.
> Perhaps by utilizing his originated ip address?
There is a very poor correlation between IP address and g
On 07/04/2013 06:09 AM, Antoon Pardon wrote:
> Op 03-07-13 19:11, ru...@yahoo.com schreef:
>> On 07/03/2013 03:21 AM, Antoon Pardon wrote:
>>> Op 03-07-13 02:30, ru...@yahoo.com schreef:
If your going to point out something negative about someone
then do so politely. Ask yourself if you
On 07/04/2013 02:50 AM, feedthetr...@gmx.de wrote:
> Am Mittwoch, 3. Juli 2013 19:01:23 UTC+2 schrieb ru...@yahoo.com:
>[...]
Any questions?
>> Yes.
>[...]
>> I know the answers to all these questions are obvious
>> to everyone else here but I am not sure about them.
>
> Then I hope, I was
from itertools import count, repeat, izip, starmap
def binomial(n):
"""Calculate list of Nth-order binomial coefficients using itertools."""
l = range(2)
for _ in xrange(n):
indices = izip(count(-1), count(1), repeat(1, len(l) + 1))
slices = starmap(slice, indices)
On 05Jul2013 05:12, rusi wrote:
| On Thursday, July 4, 2013 1:37:10 PM UTC+5:30, Göktuğ Kayaalp wrote:
| > Programmability comes to my mind, before anything else. I'd suggest
| > to find out about designs of Emacs and Vi(m).
|
| There's one reason I prefer emacs -- and I guess some people
| pref
Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε:
On 2013-07-05 22:08, Νίκος Gr33k wrote:
Is there a way to extract out of some environmental variable the
Geo location of the user being the city the user visits out website
from?
Perhaps by utilizing his originated ip address?
Yep. You can get an
Στις 6/7/2013 2:55 πμ, ο/η Νίκος Gr33k έγραψε:
Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε:
On 2013-07-05 22:08, Νίκος Gr33k wrote:
Is there a way to extract out of some environmental variable the
Geo location of the user being the city the user visits out website
from?
Perhaps by utilizing h
Στις 6/7/2013 2:58 πμ, ο/η Νίκος Gr33k έγραψε:
Στις 6/7/2013 2:55 πμ, ο/η Νίκος Gr33k έγραψε:
Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε:
On 2013-07-05 22:08, Νίκος Gr33k wrote:
Is there a way to extract out of some environmental variable the
Geo location of the user being the city the user
1 - 100 of 116 matches
Mail list logo