Re: I'm happy with Python 2.5

2011-02-27 Thread Grigory Javadyan
what the hell does that have to do with anything

On Sun, Feb 27, 2011 at 5:34 PM, n00m  wrote:
> Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
> (Intel)] on win32
>
> and Idon't move neither up nor down from it (the best & the fastest
> version)
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ImSim: Image Similarity

2011-03-05 Thread Grigory Javadyan
At least you could've tried to make the script more usable by adding
the possibility to supply command line arguments, instead of editing
the source every time you want to compare a couple of images.

On Sat, Mar 5, 2011 at 11:23 AM, n00m  wrote:
> Let me present my newborn project (in Python) ImSim:
>
> http://sourceforge.net/projects/imsim/
>
> Its README.txt:
> -
> ImSim is a python script for finding the most similar pic(s) to
> a given one among a set/list/db of your pics.
> The script is very short and very easy to follow and understand.
> Its sample output looks like this:
>
>  bears2.jpg
> 
>  bears2.jpg    0.00
>  bears3.jpg   55.33
>  bears1.jpg   68.87
>    sky1.jpg   83.84
>    sky2.jpg   84.41
>     ff1.jpg   91.35
>   lake1.jpg   95.14
>  water1.jpg   96.94
>     ff2.jpg  102.36
>  roses1.jpg  115.02
>  roses2.jpg  130.02
>
> Done!
>
> The *less* numeric value -- the *more similar* this pic is to the
> tested pic. If this value > 70 almost for sure these pictures are
> absolutely different (from totally different domains, so to speak).
>
> What is "similarity" and how can/could/should it be estimated this
> point I'm leaving for your consideration/contemplation/arguing etc.
>
> Several sample pics (*.jpg) are included into .zip.
> And of course the stuff requires PIL (Python Imaging Library), see:
> Home-page: http://www.pythonware.com/products/pil
> Download-URL: http://effbot.org/zone/pil-changes-116.htm
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ImSim: Image Similarity

2011-03-07 Thread Grigory Javadyan
Just admit that your algorithm doesn't work that well already :-)
Or give a solid formal definition of "similarity" and prove that your
algo works with that definition.

On Mon, Mar 7, 2011 at 4:22 PM, n00m  wrote:
>
> In short,
> the notion of similarity can be speculated about just endlessly.
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread Grigory Javadyan
> Moreover I'm often able to keep in mind 2 (or more) opposite ideas or
> opinions of mine.
>

"""
To know and not to know, to be conscious of complete truthfulness
while telling carefully constructed lies, to hold simultaneously two
opinions which cancelled out, knowing them to be contradictory and
believing in both of them, to use logic against logic, to repudiate
morality while laying claim to it, to believe that democracy was
impossible and that the Party was the guardian of democracy...
"""
-- 
http://mail.python.org/mailman/listinfo/python-list


Unbinding a name referenced by an enclosing scope

2011-02-20 Thread Grigory Javadyan
>From the Python Language Reference (v 3.1):

> It is illegal to unbind a name referenced by an enclosing scope; the compiler 
> will report a SyntaxError.

But when I run the following code:

a = 3
def x():
  global a
  del(a)

print(a)
x()

it works fine; and when I change the order of calls:

x()
print(a)

I get a NameError, not a SyntaxError. Apparently, I'm not
understanding the rule correctly. Can anyone explain it? Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SQLite server using execnet ?

2011-02-20 Thread Grigory Javadyan
Are you sure you'll still be able to guarantee the ACID'ity of
transactions? What about performance? Also, what kind of load are you
expecting? I believe this will choke under too much simultaneous
queries.

On Mon, Feb 21, 2011 at 4:55 AM, Stef Mientki  wrote:
> hello,
>
> knowing that SQllite is not a client/server database,
> still want to see if a simple client/server setup would solve my current 
> problems for the moment
> (because I love the simplicity of SQLlite,
> and planned to go to a client / server database in the future)
>
> Now I wonder if anyone has considered  to use Python execnet-module to 
> realize a simple SLQlite
> client / server application.
>
> If I look at the documentation of execnet,
> (and I realize that I'm a great optimist)
> it would take between 20 and 50 lines of Python code.
>
> thanks very much for your opinions.
> cheers,
> Stef Mientki
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Fwd: Python 2 or 3 ? with Django , My SQL and YUI

2011-02-22 Thread Grigory Javadyan
-- Forwarded message --
From: Grigory Javadyan 
Date: Tue, Feb 22, 2011 at 12:01 PM
Subject: Re: Python 2 or 3 ? with Django , My SQL and YUI
To: Sumit 


Python 2 only. See
http://docs.djangoproject.com/en/dev/faq/install/#can-i-use-django-with-python-3

On Tue, Feb 22, 2011 at 9:01 AM, Sumit  wrote:
> Python 2 or 3 ? with Django , My SQL and YUI
>
> For a web project We have decided to work on Python 2 or 3 ? with
> Django , My SQL and YUI, and this would be the first time to work with
> Python, just now I explored a little and found Python -2 vs 3 Stuff ,
>
> Is there experienced python dev can guide me in very simple terms
> should I go for Python 2 or 3 ?
>
> How about Python with Django and MySQL and YUI Stuff ?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python fails on math

2011-02-22 Thread Grigory Javadyan
-- Forwarded message --
From: Grigory Javadyan 
Date: Tue, Feb 22, 2011 at 5:32 PM
Subject: Re: Python fails on math
To: christian schulze 


Everybody knows you can't just compare floating point values for
equality with a simple ==.
Instead, check that the difference between them is less than some
predefined epsilon (0.001 for example, depends on how much
precision you want).
-- 
http://mail.python.org/mailman/listinfo/python-list