Some systems use python as a glue to make environments which are used by
professionals that are not primarily programmers.
Some egs:
Scientific prog with Scipy+matplotlib
Data analysis with pandas
Visual arts with processing (Is pyprocessing stable enough?)
Linguistics with nltk
Is there such a l
On 6 July 2013 06:19, rusi wrote:
> On Saturday, July 6, 2013 10:05:14 AM UTC+5:30, Joshua Landau wrote:
>> I never got why Vi doesn't support Ctrl-C by default -- it's not like
>> it's a used key-combination and it would have helped me so many times
>> when I was younger.
>
> Dunno what you are r
On Sat, Jul 6, 2013 at 2:40 PM, Joshua Landau
wrote:
> On 5 July 2013 08:34, Chris Angelico wrote:
>> On Fri, Jul 5, 2013 at 5:23 PM, Νίκος Gr33k wrote:
>>> Of course we all know that a serial/patch/keygen/crack can be found for this
>>> great edit very easily on warez or torrentz sites so it wa
On Saturday, July 6, 2013 10:05:14 AM UTC+5:30, Joshua Landau wrote:
> I never got why Vi doesn't support Ctrl-C by default -- it's not like
> it's a used key-combination and it would have helped me so many times
> when I was younger.
Dunno what you are referring to.
Out here C-c gets vi out of in
On 6 July 2013 04:25, Roy Smith wrote:
> In article ,
> Rustom Mody wrote:
>
>> > I'm a vi user. Once I mastered "hit ESC by reflex when you pause
>> > typing an insert" I was never confused above which mode I was in.
>> >
>> > And now my fingers know vi.
>
> All the vi you need to know:
>
> :
In article ,
Rustom Mody wrote:
> > I'm a vi user. Once I mastered "hit ESC by reflex when you pause
> > typing an insert" I was never confused above which mode I was in.
> >
> > And now my fingers know vi.
All the vi you need to know:
: q !
--
http://mail.python.org/mailman/listinfo/python
On Sat, Jul 6, 2013 at 4:36 AM, Cameron Simpson wrote:
> While I started with vi just slightly before encountering emacs
> (mid-to-late 1980s, both), my main trouble with choosing emacs was
> the heavy use of control keys. Vi's modal nature means that in
> "edit" mode, all the keystrokes are avai
On Fri, 05 Jul 2013 18:39:15 +, Helmut Jarausch wrote:
> 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 second
On Fri, 05 Jul 2013 19:12:44 +0200, Irmen de Jong wrote:
> 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
On 5 July 2013 17:25, MRAB wrote:
> For comparison, here's my solution:
Unfortunately, there are some sudokus that require guessing - your
algorithm will not solve those. A combination algorithm would be best,
AFAIK.
-
FWIW, this is my interpretation of the original algorithm:
from collec
Yes i know iam only storing the ISP's city instead of visitor's homeland
but this is the closest i can get:
try:
gi = pygeoip.GeoIP('/home/nikos/GeoLiteCity.dat')
city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] )
host = socket.gethostbyaddr( os.environ['HTTP_CF_CONNECTING_
On Fri, Jul 5, 2013 at 9:10 PM, Νίκος Gr33k wrote:
> Στις 6/7/2013 3:56 πμ, ο/η Joel Goldstick έγραψε:
>
>>
>> Your code is not finding /root/GeoIPCity.dat because your directory has
>> this file: GeoLiteCity.dat
>>
>> FileNotFoundError: [Errno 2] No such file or directory:
>> '/root/GeoI
Στις 6/7/2013 3:56 πμ, ο/η Joel Goldstick έγραψε:
Your code is not finding /root/GeoIPCity.dat because your directory has
this file: GeoLiteCity.dat
FileNotFoundError: [Errno 2] No such file or directory:
'/root/GeoIPCity.dat'
My mistake.
Is there a differnce between GeoLiteCity.dat a
On Fri, Jul 5, 2013 at 8:08 PM, Νίκος Gr33k wrote:
> Στις 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
On 05Jul2013 10:36, Oscar Benjamin wrote:
| 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
On 05Jul2013 16:59, 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):
| pa
Στις 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
Στις 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
Στις 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
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
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 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
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 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 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 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
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
? 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
Στις 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
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
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 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
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
>
> 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
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
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
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
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
>
>
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, 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 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 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
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 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
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 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 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 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 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 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 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 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 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 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 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 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 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
Στις 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 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
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
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 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
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 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 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 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
Αρχικό μήνυμα
Θέμα: 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 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
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 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 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
Στις 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
Στις 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
Νίκος 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 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:
> 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
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
Στις 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
Νίκος 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 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
Στις 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: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
Νίκος 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
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
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
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 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 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
Στις 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 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 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 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: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 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?
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 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
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)
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 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
1 - 100 of 116 matches
Mail list logo