pytest-2.4: may better fixtures be with you
The just released pytest-2.4.0 brings many improvements and numerous bug fixes while remaining plugin- and test-suite compatible apart from a few supposedly very minor incompatibilities. See below for a full list of details. A few feature highlights: - new yield-style fixtures `pytest.yield_fixture http://pytest.org/latest/yieldfixture.html`_, allowing to use existing with-style context managers in fixture functions. - improved pdb support: ``import pdb ; pdb.set_trace()`` now works without requiring prior disabling of stdout/stderr capturing. Also the ``--pdb`` options works now on collection and internal errors and we introduced a new experimental hook for IDEs/plugins to intercept debugging: ``pytest_exception_interact(node, call, report)``. - shorter monkeypatch variant to allow specifying an import path as a target, for example: ``monkeypatch.setattr(requests.get, myfunc)`` - better unittest/nose compatibility: all teardown methods are now only called if the corresponding setup method succeeded. - integrate tab-completion on command line options if you have `argcomplete http://pypi.python.org/pypi/argcomplete`_ configured. - allow boolean expression directly with skipif/xfail if a reason is also specified. - a new hook ``pytest_load_initial_conftests`` allows plugins like `pytest-django http://pypi.python.org/pypi/pytest-django`_ to influence the environment before conftest files import ``django``. - reporting: color the last line red or green depending if failures/errors occured or everything passed. The documentation has been updated to accomodate the changes, see `http://pytest.org http://pytest.org`_ To install or upgrade pytest:: pip install -U pytest # or easy_install -U pytest **Many thanks to all who helped, including Floris Bruynooghe, Brianna Laugher, Andreas Pelme, Anthon van der Neut, Anatoly Bubenkoff, Vladimir Keleshev, Mathieu Agopian, Ronny Pfannschmidt, Christian Theunert and many others.** may passing tests be with you, holger krekel Changes between 2.3.5 and 2.4 --- known incompatibilities: - if calling --genscript from python2.7 or above, you only get a standalone script which works on python2.7 or above. Use Python2.6 to also get a python2.5 compatible version. - all xunit-style teardown methods (nose-style, pytest-style, unittest-style) will not be called if the corresponding setup method failed, see issue322 below. - the pytest_plugin_unregister hook wasn't ever properly called and there is no known implementation of the hook - so it got removed. - pytest.fixture-decorated functions cannot be generators (i.e. use yield) anymore. This change might be reversed in 2.4.1 if it causes unforeseen real-life issues. However, you can always write and return an inner function/generator and change the fixture consumer to iterate over the returned generator. This change was done in lieu of the new ``pytest.yield_fixture`` decorator, see below. new features: - experimentally introduce a new ``pytest.yield_fixture`` decorator which accepts exactly the same parameters as pytest.fixture but mandates a ``yield`` statement instead of a ``return statement`` from fixture functions. This allows direct integration with with-style context managers in fixture functions and generally avoids registering of finalization callbacks in favour of treating the after-yield as teardown code. Thanks Andreas Pelme, Vladimir Keleshev, Floris Bruynooghe, Ronny Pfannschmidt and many others for discussions. - allow boolean expression directly with skipif/xfail if a reason is also specified. Rework skipping documentation to recommend condition as booleans because it prevents surprises when importing markers between modules. Specifying conditions as strings will remain fully supported. - reporting: color the last line red or green depending if failures/errors occured or everything passed. thanks Christian Theunert. - make import pdb ; pdb.set_trace() work natively wrt capturing (no -s needed anymore), making ``pytest.set_trace()`` a mere shortcut. - fix issue181: --pdb now also works on collect errors (and on internal errors) . This was implemented by a slight internal refactoring and the introduction of a new hook ``pytest_exception_interact`` hook (see next item). - fix issue341: introduce new experimental hook for IDEs/terminals to intercept debugging: ``pytest_exception_interact(node, call, report)``. - new monkeypatch.setattr() variant to provide a shorter invocation for patching out classes/functions from modules: monkeypatch.setattr(requests.get, myfunc) will replace the get function of the requests module with ``myfunc``. - fix issue322: tearDownClass is not run if setUpClass failed. Thanks Mathieu Agopian for the initial fix. Also make all of pytest/nose finalizer mimick the same generic behaviour: if a setupX exists
Re: I have a problem when creating a django project
在 2013年10月1日星期二UTC+8下午1时47分05秒,YetToCome写道: I can't create a django project, I think the usage of the commend is correct...here is the error information. h:\jcodedjango-admin.py startproject mysite Usage: django-admin.py subcommand [options] [args] Options: -v VERBOSITY, --verbosity=VERBOSITY Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output --settings=SETTINGS The Python path to a settings module, e.g. myproject.settings.main. If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used. --pythonpath=PYTHONPATH A directory to add to the Python path, e.g. /home/djangoprojects/myproject. --traceback Print traceback on exception --version show program's version number and exit -h, --helpshow this help message and exit Type 'django-admin.py help subcommand' for help on a specific subcommand. And what happened now... h:\jcodedjango-admin.py help Type 'django-admin.py help' for usage. -- https://mail.python.org/mailman/listinfo/python-list
Re: class implementation
On Tuesday, October 1, 2013 3:34:08 AM UTC+8, Dave Angel wrote: On 30/9/2013 08:41, markot...@gmail.com wrote: under variables, i mean, the int's and lists and strings and floats that the parent class uses. IF in parent class there is variable called location, then can i use the same variable in my sub class. Python doesn't actually have variables, but the things it documents as variables are local names within a method. Those are not visible outside of the method, regardless of whether you're in a class or a subclass. But perhaps you mean attributes. There are both class attributes and instance attributes, and the behavior is quite different. Roughly speaking a class attribute occurs only once per class, and all code can read its value with either Class.my_attrib or instance.my_attrib. It can be written with Class.my_attrib. On the other hand, instance attributes are usable by instance.my_attrib, regardless of whether the instance is a base class An instance is an object of some class that could have its own attributes i.e. instance priviate properties during the run time. or a child class. Each instance of the class gets a separate copy of such an attribute. They are normally defined in the __init__() method. If you don't happen to know the difference between a class an an instance of that class, then all the above will look like gibberish, and you need to do some studying first. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list
Re: I have a problem when creating a django project
在 2013年10月1日星期二UTC+8下午2时54分53秒,YetToCome写道: 在 2013年10月1日星期二UTC+8下午1时47分05秒,YetToCome写道: I can't create a django project, I think the usage of the commend is correct...here is the error information. h:\jcodedjango-admin.py startproject mysite Usage: django-admin.py subcommand [options] [args] Options: -v VERBOSITY, --verbosity=VERBOSITY Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output --settings=SETTINGS The Python path to a settings module, e.g. myproject.settings.main. If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used. --pythonpath=PYTHONPATH A directory to add to the Python path, e.g. /home/djangoprojects/myproject. --traceback Print traceback on exception --version show program's version number and exit -h, --helpshow this help message and exit Type 'django-admin.py help subcommand' for help on a specific subcommand. And what happened now... h:\jcodedjango-admin.py help Type 'django-admin.py help' for usage. ok...i solve the problem, clean the Registry and reinstall python -- https://mail.python.org/mailman/listinfo/python-list
Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte
Op 01-10-13 01:14, Νίκος schreef: Στις 1/10/2013 1:56 πμ, ο/η Chris Angelico έγραψε: But what you're doing is charging your customers while you learn the very basics. I designed their websites and they are up and running. Yes i have charged some money, but they gain what they paid for, a running website, all of them. So, its not like i'm ripping off someone here. Yes you are. People don't just pay for a running website, with running meaning some vague: is mostly accesible. People pay for some kind of guaranteed uptime. Since you don't have the skills to deliver that guarantee, you are in fact ripping them off. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list
Re: Functional Programming and python
On Tue, Oct 1, 2013 at 11:36 AM, rusi rustompm...@gmail.com wrote: (But I do sometimes yearn for a goto.) Ha! In Scheme, a tail call IS a goto with parameter re-assignment Precisely. In fact, tail call optimization basically consists of that exact rewrite. I'm absolutely fine with it being completely explicit. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
I haev fixed it
http://superhost.gr/warning.html -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 01/10/2013 00:59, ni...@secure.superhost.gr wrote: http://superhost.gr/warning.html I believe this is set at a suitable level http://www.youtube.com/watch?v=HyTPFyyA-mA -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte
Στις 1/10/2013 10:27 πμ, ο/η Antoon Pardon έγραψε: Op 01-10-13 01:14, Νίκος schreef: Στις 1/10/2013 1:56 πμ, ο/η Chris Angelico έγραψε: But what you're doing is charging your customers while you learn the very basics. I designed their websites and they are up and running. Yes i have charged some money, but they gain what they paid for, a running website, all of them. So, its not like i'm ripping off someone here. Yes you are. People don't just pay for a running website, with running meaning some vague: is mostly accesible. People pay for some kind of guaranteed uptime. Since you don't have the skills to deliver that guarantee, you are in fact ripping them off. But it has uptime, VPS is always online, i dont make system wide changes except for the fat that i installed Python 3.3.2 for my personal account needs. If i encounter some problem i ask, bu the sad thing is that my provider doesn't care to help. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On Tue, Oct 1, 2013 at 9:59 AM, ni...@secure.superhost.gr wrote: http://superhost.gr/warning.html Okay, who posted this? I'm thinking possibly someone may have access to your server again. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte
Op 01-10-13 10:39, Νίκος schreef: Στις 1/10/2013 10:27 πμ, ο/η Antoon Pardon έγραψε: Op 01-10-13 01:14, Νίκος schreef: Στις 1/10/2013 1:56 πμ, ο/η Chris Angelico έγραψε: But what you're doing is charging your customers while you learn the very basics. I designed their websites and they are up and running. Yes i have charged some money, but they gain what they paid for, a running website, all of them. So, its not like i'm ripping off someone here. Yes you are. People don't just pay for a running website, with running meaning some vague: is mostly accesible. People pay for some kind of guaranteed uptime. Since you don't have the skills to deliver that guarantee, you are in fact ripping them off. But it has uptime, VPS is always online, i dont make system wide changes except for the fat that i installed Python 3.3.2 for my personal account needs. That is has uptime is not enough. The question is: Should something go wrong, are you skilled enough to fix it within a reasonable time? In other words, when the side does go down, how long will it take you to have it up again? Going by the skill level you have shown here, you are unable to cope with such situations in a way that can be expected. If i encounter some problem i ask, bu the sad thing is that my provider doesn't care to help. Then either you have the wrong provider or you are so lacking in skill that your provider is fed up with spoon feeding you the basic solutions. Going with your history here, I'll go with the latter. Especially as I think it entirely possible that your provider has already helped you and provided you the necessary answers but you rejected them because you didn't like the particular style of the answer. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list
JUST GOT HACKED
Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 11:59 πμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 9:59 AM, ni...@secure.superhost.gr wrote: http://superhost.gr/warning.html Okay, who posted this? I'm thinking possibly someone may have access to your server again. ChrisA Hi chris, I just saw thios thread, although half an hour earlier i opened anew one myself. Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 1:47 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On Tue, Oct 1, 2013 at 8:54 PM, Νίκος nikos.gr...@gmail.com wrote: How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. You know it was Mark, then? Okay. In that case, ask him directly. If not, I advise you to refrain from making bald statements that you can't back. You really need to sort out your own security. Don't go begging someone else for help - not everyone is courteous enough to just put an HTML file down and send an email from your account. Some people will actually destroy things. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 10/1/13 6:54 AM, Νίκος wrote: Στις 1/10/2013 1:47 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. Nikos, I am sorry you have been hacked. But how it happened is not a Python question. It's not an appropriate topic of discussion on this mailing list. Please don't make a bad situation worse by continuing to talk about it here. --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 1:58 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:54 PM, Νίκος nikos.gr...@gmail.com wrote: How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. You know it was Mark, then? Okay. In that case, ask him directly. If not, I advise you to refrain from making bald statements that you can't back. He started the thread didn't he? He also posted couple days agon if i have fixes a link form a domain i host which provided my source code in plain text. Let alone his hatred agaisnt me. Considerign the above I think its safe to say it was him. You really need to sort out your own security. Don't go begging someone else for help - not everyone is courteous enough to just put an HTML file down and send an email from your account. Some people will actually destroy things. I'am not begging anyone. I have aksed a question as to HOW this might have happened. But it seems you don't want to provide an explanation although i think you might have a theory. -- https://mail.python.org/mailman/listinfo/python-list
Converting image into string and obtain the string in json
How to insert an image in mysql and retrieve the image to pass it as a string to json file. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 13:06, schrieb Νίκος: But it seems you don't want to provide an explanation although i think you might have a theory. You need a theory? 1) Your password(s) is/are leaked (see the URL referenced somewhere before, and IIRC you also posted your GMail password sometime ago), and 2) you did password-reuse, so that by an attacker getting access to one password, more than one of your accounts was compromised. - -- - --- Heiko. -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSSrIKAAoJEDMqpHf921/SO+UH/iujBSt7ZXmXAIAHgHXoKH0Q Qxvzi2L1pCXcXvEE4yeUI0g0TiYD9B88Q5eRyCegWWm2BwpOjx7KLNBkMqQeiI6H M52L/ulXwMkwVq0HTn6YPNncReQrPMu2V5xQaKWhfVhBnWLZnZYm1n7WZse9M2Sr 9KaAkZ4j2jlHozJ9tAGXnIt/9bj6MM3SQPuG1b68qSWThisUhvTcbrDkm3e4KDoq I9i9kEF93XPLYeOMefEOksm51vKjpDWFlRu20Vqy5quYxDHpUU/5e04Z6doz0py8 6XhR892g4zetQ3OwtzxQOKunwaLOvSg9VtXfIn7ElBkCE0v/XbCxTnO/oBLcb7g= =I1kO -END PGP SIGNATURE- -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 2:29 μμ, ο/η Heiko Wundram έγραψε: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 13:06, schrieb Νίκος: But it seems you don't want to provide an explanation although i think you might have a theory. You need a theory? 1) Your password(s) is/are leaked (see the URL referenced somewhere before, and IIRC you also posted your GMail password sometime ago), and Hello, i know about the link you mentioned and i have deleted the source code from there. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: i know about the link you mentioned and i have deleted the source code from there. Guess what: Google keeps a cache. See here: http://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cgi-bin/metrites.py So if you haven't changed your password(s), you'd better do that now. - -- - --- Heiko. -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.20 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSSrwRAAoJEDMqpHf921/SY/MH/3pf9ZdHCXuu84urCodUyBrQ RVRbVN1lXAzCXY1nyPGfzANOsraXLzRDe0j9ZBfHbEaZR19Hvl4DOf8+RJfRl8jg LWCsgIIVb2fWWVLrx1CU3oz47sVfy1vGOp8XRiIqjcDKa+zOtyqqlxIolKCFM6CL /YsHnb1/9JE1zn07WaKYJTi1/9+uptaQPR9kNzOssv1TpvRiJ+4H1oO67Px6tpdj VchpEirkV7CaD39mD9BLEoB24FhEX+NSNYPRJx89ivC+MENpNUp6n5vVjQ+ciXI/ NvJJxBalypi/DLNaCR/up2B2018ebH+3ByDv3xO+UnbS6MYx5YVppstilvkvr1c= =2VTx -END PGP SIGNATURE- -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 3:12 μμ, ο/η Heiko Wundram έγραψε: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: i know about the link you mentioned and i have deleted the source code from there. Guess what: Google keeps a cache. See here: http://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cgi-bin/metrites.py So if you haven't changed your password(s), you'd better do that now. Tahnk you Heiko i didnt knew Google was keeping cached version of files. But i have deleted the file metrites.py 2 days ago when i saw Mark Lawrence mentioned it and i also have changed the passwords from my personal account and root as well. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 3:21 μμ, ο/η Νίκος έγραψε: Στις 1/10/2013 3:12 μμ, ο/η Heiko Wundram έγραψε: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: i know about the link you mentioned and i have deleted the source code from there. Guess what: Google keeps a cache. See here: http://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cgi-bin/metrites.py So if you haven't changed your password(s), you'd better do that now. Tahnk you Heiko i didnt knew Google was keeping cached version of files. But i have deleted the file metrites.py 2 days ago when i saw Mark Lawrence mentioned it and i also have changed the passwords from my personal account and root as well. I know how he did it, he sees it form here: http://superhost.gr/~nikos/cgi-bin/metrites.py I must somehow use an apache directive not to allow such view. -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Am 01.10.2013 13:25, schrieb Νίκος: Στις 1/10/2013 3:21 μμ, ο/η Νίκος έγραψε: Στις 1/10/2013 3:12 μμ, ο/η Heiko Wundram έγραψε: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: i know about the link you mentioned and i have deleted the source code from there. Guess what: Google keeps a cache. See here: http://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cgi-bin/metrites.py So if you haven't changed your password(s), you'd better do that now. Tahnk you Heiko i didnt knew Google was keeping cached version of files. But i have deleted the file metrites.py 2 days ago when i saw Mark Lawrence mentioned it and i also have changed the passwords from my personal account and root as well. I know how he did it, he sees it form here: http://superhost.gr/~nikos/cgi-bin/metrites.py I must somehow use an apache directive not to allow such view. I agree. Just keep folders for scripts and templates above the actual public_html. Sas -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 3:50 μμ, ο/η ishish έγραψε: Am 01.10.2013 13:25, schrieb Νίκος: Στις 1/10/2013 3:21 μμ, ο/η Νίκος έγραψε: Στις 1/10/2013 3:12 μμ, ο/η Heiko Wundram έγραψε: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: i know about the link you mentioned and i have deleted the source code from there. Guess what: Google keeps a cache. See here: http://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cgi-bin/metrites.py So if you haven't changed your password(s), you'd better do that now. Tahnk you Heiko i didnt knew Google was keeping cached version of files. But i have deleted the file metrites.py 2 days ago when i saw Mark Lawrence mentioned it and i also have changed the passwords from my personal account and root as well. I know how he did it, he sees it form here: http://superhost.gr/~nikos/cgi-bin/metrites.py I must somehow use an apache directive not to allow such view. I agree. Just keep folders for scripts and templates above the actual public_html. python scripts need to be placed inside the 'cgi-bin/' folder which is located at '~/public_html/'. Othwerise they wont work. -- https://mail.python.org/mailman/listinfo/python-list
Re: Converting image into string and obtain the string in json
On 01/10/2013 12:17, arunraja.j...@gmail.com wrote: How to insert an image in mysql and retrieve the image to pass it as a string to json file. You write some code, try to run it and if it fails and you don't understand why, post a code snippet that fails, what you expected to happen, what actually happened and the full traceback if applicable, quoting your OS and Python version. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 01/10/2013 11:47, Chris Angelico wrote: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. ChrisA I'm sorry Chris but I must disagree with you. It's like claiming that somebody has done well breaking into a field that has neither gate nor fence. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
Στις 1/10/2013 4:06 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. Okey smartass, Try to do it again, if you be successfull again i'll even congratulate you myself. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 4:19 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 11:47, Chris Angelico wrote: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. ChrisA I'm sorry Chris but I must disagree with you. It's like claiming that somebody has done well breaking into a field that has neither gate nor fence. Now it hance a fence. Jump again to break in. -- https://mail.python.org/mailman/listinfo/python-list
Re: I have a problem when creating a django project
did you know there is a django mailing list/news group. On Tue, Oct 1, 2013 at 3:24 AM, YetToCome wjw15...@gmail.com wrote: 在 2013年10月1日星期二UTC+8下午2时54分53秒,YetToCome写道: 在 2013年10月1日星期二UTC+8下午1时47分05秒,YetToCome写道: I can't create a django project, I think the usage of the commend is correct...here is the error information. h:\jcodedjango-admin.py startproject mysite Usage: django-admin.py subcommand [options] [args] Options: -v VERBOSITY, --verbosity=VERBOSITY Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output --settings=SETTINGS The Python path to a settings module, e.g. myproject.settings.main. If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used. --pythonpath=PYTHONPATH A directory to add to the Python path, e.g. /home/djangoprojects/myproject. --traceback Print traceback on exception --version show program's version number and exit -h, --helpshow this help message and exit Type 'django-admin.py help subcommand' for help on a specific subcommand. And what happened now... h:\jcodedjango-admin.py help Type 'django-admin.py help' for usage. ok...i solve the problem, clean the Registry and reinstall python -- https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
all your base are belong to us On Tue, Oct 1, 2013 at 9:19 AM, Mark Lawrence breamore...@yahoo.co.ukwrote: On 01/10/2013 11:47, Chris Angelico wrote: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. ChrisA I'm sorry Chris but I must disagree with you. It's like claiming that somebody has done well breaking into a field that has neither gate nor fence. -- Cheers. Mark Lawrence -- https://mail.python.org/**mailman/listinfo/python-listhttps://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 01/10/2013 11:54, Νίκος wrote: Στις 1/10/2013 1:47 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. Brilliantly funny on the gounds that I haven't got the faintest idea about how web systems are put together, let alone hacking them. But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Am 01.10.2013 14:14, schrieb Νίκος: Στις 1/10/2013 3:50 μμ, ο/η ishish έγραψε: Am 01.10.2013 13:25, schrieb Νίκος: Στις 1/10/2013 3:21 μμ, ο/η Νίκος έγραψε: Στις 1/10/2013 3:12 μμ, ο/η Heiko Wundram έγραψε: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: i know about the link you mentioned and i have deleted the source code from there. Guess what: Google keeps a cache. See here: http://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cgi-bin/metrites.py So if you haven't changed your password(s), you'd better do that now. Tahnk you Heiko i didnt knew Google was keeping cached version of files. But i have deleted the file metrites.py 2 days ago when i saw Mark Lawrence mentioned it and i also have changed the passwords from my personal account and root as well. I know how he did it, he sees it form here: http://superhost.gr/~nikos/cgi-bin/metrites.py I must somehow use an apache directive not to allow such view. I agree. Just keep folders for scripts and templates above the actual public_html. python scripts need to be placed inside the 'cgi-bin/' folder which is located at '~/public_html/'. Othwerise they wont work. That's due to your (or whoever set these up) configurations. I have never used the public_html to store perl, python or php scripts and it works perfectly fine for me. Sas -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On Tue, Oct 1, 2013 at 3:15 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 1/10/2013 4:06 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. Okey smartass, Try to do it again, if you be successfull again i'll even congratulate you myself. -- https://mail.python.org/mailman/listinfo/python-list It looks like you are accusing someone of doing something without any proof whatsoever. Would you like help with the fallout of the lawsuit that I hope Mark might (should!) come up with? Speaking of “try again”, I doubt it would be hard… As long as a FTP daemon is running somewhere (and you clearly do not know better); or even you have a SSH daemon and you do not know better, an attacker can: a) wait for you to publish your password yet again; b) get you to download an exploit/keylogger/whatever; c) brute-force. Well, considering it’s unlikely you actually have a long-as-shit password, (c) is the best option. Unless your password is very long, in which case is not. I’m also wondering what language your password is in. If you actually used a Greek phrase, how long will it take you to get locked out due to encoding bullshit? -- Chris “Kwpolska” Warrick http://kwpolska.tk PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 11:54, Νίκος wrote: Στις 1/10/2013 1:47 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. Brilliantly funny on the gounds that I haven't got the faintest idea about how web systems are put together, let alone hacking them. But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? And the file's contents that was uploaded speaks out loud your kind of insults. How tough ws to break in since you had the account password by seeing it from the source code? Don't try to blame someone else for this and pretend you didn't ahd anythign to dop with it. Who pinched my mail account? i never posted by mistake any of my mail accounts' passwords, except once from gmail's which i chnaged it immeditely.What are you talking about? As far accusing me for being a moron i have i have fixed it immediately. Since you are so clever jump the fense again grasshoper. -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 01/10/2013 14:15, Νίκος wrote: Στις 1/10/2013 4:06 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. Okey smartass, Try to do it again, if you be successfull again i'll even congratulate you myself. Oh boy is this fun!!! Is this Nikos or is this not Nikos, that is the question? Thinking that I could hack a website, there's more likelihood that it's the latest member of the UK Royal Family. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On Tue, Oct 1, 2013 at 9:26 AM, ishish ish...@domhain.de wrote: Am 01.10.2013 14:14, schrieb Νίκος: Στις 1/10/2013 3:50 μμ, ο/η ishish έγραψε: Am 01.10.2013 13:25, schrieb Νίκος: Στις 1/10/2013 3:21 μμ, ο/η Νίκος έγραψε: Στις 1/10/2013 3:12 μμ, ο/η Heiko Wundram έγραψε: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: i know about the link you mentioned and i have deleted the source code from there. Guess what: Google keeps a cache. See here: http://webcache.**googleusercontent.com/search?** q=cache:http://superhost.gr/~**dauwin/cgi-bin/metrites.pyhttp://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cgi-bin/metrites.py So if you haven't changed your password(s), you'd better do that now. Tahnk you Heiko i didnt knew Google was keeping cached version of files. But i have deleted the file metrites.py 2 days ago when i saw Mark Lawrence mentioned it and i also have changed the passwords from my personal account and root as well. I know how he did it, he sees it form here: http://superhost.gr/~nikos/**cgi-bin/metrites.pyhttp://superhost.gr/~nikos/cgi-bin/metrites.py I must somehow use an apache directive not to allow such view. I agree. Just keep folders for scripts and templates above the actual public_html. python scripts need to be placed inside the 'cgi-bin/' folder which is located at '~/public_html/'. Othwerise they wont work. That's due to your (or whoever set these up) configurations. I have never used the public_html to store perl, python or php scripts and it works perfectly fine for me. Sas -- https://mail.python.org/**mailman/listinfo/python-listhttps://mail.python.org/mailman/listinfo/python-list Thanks for that note. I haven't done this sort of thing for a while, but as I recall you NEVER put code in public_html. So that was odd (well not really since its from Nikos!) to see a rule that code must be put there. On a personal note, i'm bummed out I woke up too late to see the warning page. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 4:26 μμ, ο/η ishish έγραψε: Am 01.10.2013 14:14, schrieb Νίκος: Στις 1/10/2013 3:50 μμ, ο/η ishish έγραψε: Am 01.10.2013 13:25, schrieb Νίκος: Στις 1/10/2013 3:21 μμ, ο/η Νίκος έγραψε: Στις 1/10/2013 3:12 μμ, ο/η Heiko Wundram έγραψε: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: i know about the link you mentioned and i have deleted the source code from there. Guess what: Google keeps a cache. See here: http://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cgi-bin/metrites.py So if you haven't changed your password(s), you'd better do that now. Tahnk you Heiko i didnt knew Google was keeping cached version of files. But i have deleted the file metrites.py 2 days ago when i saw Mark Lawrence mentioned it and i also have changed the passwords from my personal account and root as well. I know how he did it, he sees it form here: http://superhost.gr/~nikos/cgi-bin/metrites.py I must somehow use an apache directive not to allow such view. I agree. Just keep folders for scripts and templates above the actual public_html. python scripts need to be placed inside the 'cgi-bin/' folder which is located at '~/public_html/'. Othwerise they wont work. That's due to your (or whoever set these up) configurations. I have never used the public_html to store perl, python or php scripts and it works perfectly fine for me. To which folders do you store your cgi scripts for safety? -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 4:35 μμ, ο/η Joel Goldstick έγραψε: Thanks for that note. I haven't done this sort of thing for a while, but as I recall you NEVER put code in public_html. So that was odd (well not really since its from Nikos!) to see a rule that code must be put there. public_html as well as cgi-bin are there for a reason you know. So people put files within those folders. Tehy can be dafe there as well, no nee to place them above '../public_html'. I still have them there and they are safe now. -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
Στις 1/10/2013 4:27 μμ, ο/η Chris “Kwpolska” Warrick έγραψε: On Tue, Oct 1, 2013 at 3:15 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 1/10/2013 4:06 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. Okey smartass, Try to do it again, if you be successfull again i'll even congratulate you myself. -- https://mail.python.org/mailman/listinfo/python-list It looks like you are accusing someone of doing something without any proof whatsoever. Would you like help with the fallout of the lawsuit that I hope Mark might (should!) come up with?i'am Speaking of “try again”, I doubt it would be hard… As long as a FTP daemon is running somewhere (and you clearly do not know better); or even you have a SSH daemon and you do not know better, an attacker can: a) wait for you to publish your password yet again; b) get you to download an exploit/keylogger/whatever; c) brute-force. Well, considering it’s unlikely you actually have a long-as-shit password, (c) is the best option. Unless your password is very long, in which case is not. I’m also wondering what language your password is in. If you actually used a Greek phrase, how long will it take you to get locked out due to encoding bullshit? Like i use grek letter for my passwords or like i'am gonna fall for any of your 3 dumbass reasons. I already foudn the weakness and corrected it. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 01/10/2013 14:34, Νίκος wrote: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 11:54, Νίκος wrote: Στις 1/10/2013 1:47 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. Brilliantly funny on the gounds that I haven't got the faintest idea about how web systems are put together, let alone hacking them. But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? And the file's contents that was uploaded speaks out loud your kind of insults. How tough ws to break in since you had the account password by seeing it from the source code? Don't try to blame someone else for this and pretend you didn't ahd anythign to dop with it. Who pinched my mail account? i never posted by mistake any of my mail accounts' passwords, except once from gmail's which i chnaged it immeditely.What are you talking about? As far accusing me for being a moron i have i have fixed it immediately. Since you are so clever jump the fense again grasshoper. Okay I'm not falling for this. This has to be the pseudo Nikos as there aren't enough typos for it to be the real one. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 4:27 μμ, ο/η Joel Goldstick έγραψε: all your base are belong to us Keep it safe, because its high unlikely you will see it again. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 4:44 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 14:34, Νίκος wrote: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 11:54, Νίκος wrote: Στις 1/10/2013 1:47 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. Brilliantly funny on the gounds that I haven't got the faintest idea about how web systems are put together, let alone hacking them. But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? And the file's contents that was uploaded speaks out loud your kind of insults. How tough ws to break in since you had the account password by seeing it from the source code? Don't try to blame someone else for this and pretend you didn't ahd anythign to dop with it. Who pinched my mail account? i never posted by mistake any of my mail accounts' passwords, except once from gmail's which i chnaged it immeditely.What are you talking about? As far accusing me for being a moron i have i have fixed it immediately. Since you are so clever jump the fense again grasshoper. Okay I'm not falling for this. This has to be the pseudo Nikos as there aren't enough typos for it to be the real one. I can type properly you know if i'am not in a hurry. Come on, don't be a coward try again to break in! Jump the fence, unlock the door...or admin that you can't. -- https://mail.python.org/mailman/listinfo/python-list
Fwd: JUST GOT HACKED
Why is this list not setting Reply-To correctly again? -- Forwarded message -- From: Chris “Kwpolska” Warrick kwpol...@gmail.com Date: Tue, Oct 1, 2013 at 3:55 PM Subject: Re: JUST GOT HACKED To: Νίκος nikos.gr...@gmail.com On Tue, Oct 1, 2013 at 3:42 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 1/10/2013 4:27 μμ, ο/η Chris “Kwpolska” Warrick έγραψε: On Tue, Oct 1, 2013 at 3:15 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 1/10/2013 4:06 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. Okey smartass, Try to do it again, if you be successfull again i'll even congratulate you myself. -- https://mail.python.org/mailman/listinfo/python-list It looks like you are accusing someone of doing something without any proof whatsoever. Would you like help with the fallout of the lawsuit that I hope Mark might (should!) come up with?i'am Speaking of “try again”, I doubt it would be hard… As long as a FTP daemon is running somewhere (and you clearly do not know better); or even you have a SSH daemon and you do not know better, an attacker can: a) wait for you to publish your password yet again; b) get you to download an exploit/keylogger/whatever; c) brute-force. Well, considering it’s unlikely you actually have a long-as-shit password, (c) is the best option. Unless your password is very long, in which case is not. I’m also wondering what language your password is in. If you actually used a Greek phrase, how long will it take you to get locked out due to encoding bullshit? Like i use grek letter for my passwords Did you know that you just lowered the amount of characters an attacker should check while brute-forcing your password from 256/164 (UTF-*/ISO-8859-7) to just 95? No? Congratulations anyways, Nikos! -- Chris “Kwpolska” Warrick http://kwpolska.tk PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense -- Chris “Kwpolska” Warrick http://kwpolska.tk PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On Tue, 01 Oct 2013 16:42:31 +0300, Νίκος wrote: Στις 1/10/2013 4:27 μμ, ο/η Chris “Kwpolska” Warrick έγραψε: On Tue, Oct 1, 2013 at 3:15 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 1/10/2013 4:06 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. Okey smartass, Try to do it again, if you be successfull again i'll even congratulate you myself. -- https://mail.python.org/mailman/listinfo/python-list It looks like you are accusing someone of doing something without any proof whatsoever. Would you like help with the fallout of the lawsuit that I hope Mark might (should!) come up with?i'am Speaking of “try again”, I doubt it would be hard… As long as a FTP daemon is running somewhere (and you clearly do not know better); or even you have a SSH daemon and you do not know better, an attacker can: a) wait for you to publish your password yet again; b) get you to download an exploit/keylogger/whatever; c) brute-force. Well, considering it’s unlikely you actually have a long-as-shit password, (c) is the best option. Unless your password is very long, in which case is not. I’m also wondering what language your password is in. If you actually used a Greek phrase, how long will it take you to get locked out due to encoding bullshit? Like i use grek letter for my passwords or like i'am gonna fall for any of your 3 dumbass reasons. I already foudn the weakness and corrected it. i hope whoever is taking on your roll has a better basic understating of programming systems administration. good luck with you new career -- This place just isn't big enough for all of us. We've got to find a way off this planet. -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: JUST GOT HACKED
Στις 1/10/2013 4:56 μμ, ο/η Chris “Kwpolska” Warrick έγραψε: Why is this list not setting Reply-To correctly again? -- Forwarded message -- From: Chris “Kwpolska” Warrick kwpol...@gmail.com Date: Tue, Oct 1, 2013 at 3:55 PM Subject: Re: JUST GOT HACKED To: Νίκος nikos.gr...@gmail.com On Tue, Oct 1, 2013 at 3:42 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 1/10/2013 4:27 μμ, ο/η Chris “Kwpolska” Warrick έγραψε: On Tue, Oct 1, 2013 at 3:15 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 1/10/2013 4:06 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. Okey smartass, Try to do it again, if you be successfull again i'll even congratulate you myself. -- https://mail.python.org/mailman/listinfo/python-list It looks like you are accusing someone of doing something without any proof whatsoever. Would you like help with the fallout of the lawsuit that I hope Mark might (should!) come up with?i'am Speaking of “try again”, I doubt it would be hard… As long as a FTP daemon is running somewhere (and you clearly do not know better); or even you have a SSH daemon and you do not know better, an attacker can: a) wait for you to publish your password yet again; b) get you to download an exploit/keylogger/whatever; c) brute-force. Well, considering it’s unlikely you actually have a long-as-shit password, (c) is the best option. Unless your password is very long, in which case is not. I’m also wondering what language your password is in. If you actually used a Greek phrase, how long will it take you to get locked out due to encoding bullshit? Like i use grek letter for my passwords Did you know that you just lowered the amount of characters an attacker should check while brute-forcing your password from 256/164 (UTF-*/ISO-8859-7) to just 95? No? Congratulations anyways, Nikos! Yes' iam aware of that, iam helping you as you see. Brute force then, after a few fail attempts you will be fobribben to even try a a new connection. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 01/10/2013 14:52, Νίκος wrote: Στις 1/10/2013 4:44 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 14:34, Νίκος wrote: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 11:54, Νίκος wrote: Στις 1/10/2013 1:47 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:16 PM, Νίκος nikos.gr...@gmail.com wrote: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Whoever did it, he seems also to have gained access to your emails as well. Congratulations to him, I think he's done well. How did this happened i asked. I must know how did this happen so i take action to prevent it from happening again. I you want to congratulate Mark Lawrence do it in private. Brilliantly funny on the gounds that I haven't got the faintest idea about how web systems are put together, let alone hacking them. But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? And the file's contents that was uploaded speaks out loud your kind of insults. How tough ws to break in since you had the account password by seeing it from the source code? Don't try to blame someone else for this and pretend you didn't ahd anythign to dop with it. Who pinched my mail account? i never posted by mistake any of my mail accounts' passwords, except once from gmail's which i chnaged it immeditely.What are you talking about? As far accusing me for being a moron i have i have fixed it immediately. Since you are so clever jump the fense again grasshoper. Okay I'm not falling for this. This has to be the pseudo Nikos as there aren't enough typos for it to be the real one. I can type properly you know if i'am not in a hurry. Come on, don't be a coward try again to break in! Jump the fence, unlock the door...or admin that you can't. Yes very subtle, now come on and admit who you really are, the tension is killing me. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: Functional Programming and python
On 2013-10-01, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 30 Sep 2013 18:36:28 +, Neil Cerutti quoted: Why can??t lambda forms contain statements? Gah! Please fix your news client! (I see you're using slrn.) The \x92 bytes found in your message are apostrophes (technically: right single quotation marks), encoded using the legacy Windows-1252 codec, but your news client is falsely advertising it as US-ASCII: Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit It's almost 2014, it is unspeakably poor form that an application is still making this mistake. Is there an updated version of slrn that fixes this? Can you manually force it to use UTF-8? Can you report this as a bug? In case you aren't too clear on the concepts, here are two Must Read links: http://www.joelonsoftware.com/articles/Unicode.html http://nedbatchelder.com/text/unipain.html Thanks, Steve. I'm aware my news setup is crap when it comes to character set/unicode support. I haven't been motivated to fix it, because everything else about it works great for me. I'm afraid slrn is stagnated, but it might provide at least some support and I need to find out what. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
Στις 1/10/2013 4:57 μμ, ο/η Alister έγραψε: On Tue, 01 Oct 2013 16:42:31 +0300, Νίκος wrote: Στις 1/10/2013 4:27 μμ, ο/η Chris “Kwpolska” Warrick έγραψε: On Tue, Oct 1, 2013 at 3:15 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 1/10/2013 4:06 μμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 10:58, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! Would you please stop posting, I've almost burst my stomach laughing at this. You definetely have a ready made career writing comedy. Okey smartass, Try to do it again, if you be successfull again i'll even congratulate you myself. -- https://mail.python.org/mailman/listinfo/python-list It looks like you are accusing someone of doing something without any proof whatsoever. Would you like help with the fallout of the lawsuit that I hope Mark might (should!) come up with?i'am Speaking of “try again”, I doubt it would be hard… As long as a FTP daemon is running somewhere (and you clearly do not know better); or even you have a SSH daemon and you do not know better, an attacker can: a) wait for you to publish your password yet again; b) get you to download an exploit/keylogger/whatever; c) brute-force. Well, considering it’s unlikely you actually have a long-as-shit password, (c) is the best option. Unless your password is very long, in which case is not. I’m also wondering what language your password is in. If you actually used a Greek phrase, how long will it take you to get locked out due to encoding bullshit? Like i use grek letter for my passwords or like i'am gonna fall for any of your 3 dumbass reasons. I already foudn the weakness and corrected it. i hope whoever is taking on your roll has a better basic understating of programming systems administration. good luck with you new career Carred remaisn and it will remain the same. Thanks for visting my website: you help me increase my google page rank without actually utilizing SEO. Here: http://superhost.gr/?show=logpage=index.html -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Am Dienstag, 1. Oktober 2013 15:34:26 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: ... But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? Your are wrong (again) Nikos. Mark did not start the thread. YOU did: The thread was started by ni...@secure.superhost.gr ( see https://groups.google.com/forum/#!topic/comp.lang.python/_J_3e6_LIa8) So stop accusing others! And the file's contents that was uploaded speaks out loud your kind of insults. Mark is not the only one telling you the truth in this group. ... -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 02/10/2013 12:05 AM, Νίκος nikos.gr...@gmail.com wrote: Thanks for visting my website: you help me increase my google page rank without actually utilizing SEO. -- https://mail.python.org/mailman/listinfo/python-list 1) You need links, not page views to improve your Google rank. 2) I just signed up the this mailing list. To the regulars, is this what normally happens on this list? 3) I'm a bit late to the party. Is Nikos a real sysadmin or is this some horrible inside joke I don't get? -- https://mail.python.org/mailman/listinfo/python-list
Re: extraction tool using CRF++
2013/10/1 cerr ron.egg...@gmail.com: Hi, I want to write an extraction tool using CRF++ (http://crfpp.googlecode.com/svn/trunk/doc/index.html). I have written a trainings file and a template: training: banana FOODB-NP bread FOODI-NP template: U01:%x[0,1] U02:%x[1,1] and now I want to go ahead and extract the foods from a sentence like how do I make a banana bread. Also, I'm unsure how I interface to crf++ with python, I compiled and installed it from source as described on the above website but I don't have a crf module available in python... -- https://mail.python.org/mailman/listinfo/python-list Hi, I have unfortunately no experience with CRF++; if there is no python wrapper for it available, the usage might not be (easily) possible - depending on the character of this library, you may try accessing it e.g. via ctypes. Alternatively, you may try another packages already available, e.g. NLTK: http://nltk.org/ import nltk any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(apple)) True any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(bread)) True any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(wine)) True any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(book)) False any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(pencil)) False # of course there might be some surprise, probably due to polysemy ore some specifics of the semantic description... any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(dog)) True any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(white)) True cf. http://nltk.org/ http://nltk.googlecode.com/svn/trunk/doc/howto/wordnet.html http://www.velvetcache.org/2010/03/01/looking-up-words-in-a-dictionary-using-python http://wordnet.princeton.edu/man/lexnames.5WN.html hth, vbr -- https://mail.python.org/mailman/listinfo/python-list
Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte
On 2013-09-30, ?? nikos.gr...@gmail.com wrote: I learn during the process. That's fine as long as your customers are told up front that what they're paying for is _not_ a working usable service, but rahter a training program for you personally (a training program that's failing rather badly, IMO). That's how i deal with the situation. I challedge my self and then try to confront the given situation _live_. That's a lousy attitude to have if your customers expect something that works rather than some in-progress hacked-up POS you're using for practice. -- Grant Edwards grant.b.edwardsYow! I want to mail a at bronzed artichoke to gmail.comNicaragua! -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 5:08 μμ, ο/η feedthetr...@gmx.de έγραψε: Am Dienstag, 1. Oktober 2013 15:34:26 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: ... But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? Your are wrong (again) Nikos. Mark did not start the thread. YOU did: The thread was started by ni...@secure.superhost.gr ( see https://groups.google.com/forum/#!topic/comp.lang.python/_J_3e6_LIa8) So stop accusing others! And the file's contents that was uploaded speaks out loud your kind of insults. Mark is not the only one telling you the truth in this group. ... Yeah right. X-Spam-Evidence: '*H*': 0.46; '*S*': 0.11; 'header:User-Agent:1': 0.23; 'received:84': 0.35; 'charset:us-ascii': 0.36; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'from:no real name:2**0': 0.61; 'content-disposition:inline': 0.62 Date: Mon, 30 Sep 2013 23:59:14 + From: ni...@secure.superhost.gr To: pytho...@python.org Subject: I haev fixed it MIME-Version: 1.0 User-Agent: Mutt/1.5.20 (2009-12-10) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - secure.superhost.gr X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [515 515] / [47 12] X-AntiAbuse: Sender Address Domain - secure.superhost.gr X-Get-Message-Sender-Via: secure.superhost.gr: authenticated_id: nikos/primary_hostname/system user As you see here, here the origiv of the mail is from my server and the forger used the mail agent Mutt to send the mail. *I* use ThunderBird, not Mutt mail client. Don't cover him up. The message of the file also contain insulting languge like he uses all th etime against me. -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
Daniel, I'm sorry your initial interactions with the list were tainted by this experience. Modulo these degenerative threads (usually started by Nikos), it *really* is a helpful and friendly place. On 2013-10-02 00:24, Daniel Stojanov wrote: 2) I just signed up the this mailing list. To the regulars, is this what normally happens on this list? There's all the other very helpful, very on-topic traffic and there's the Nikos flailing around trying to get other people to write his code and solve his problems for him without actually taking the time to understand the actual problem/solution, and demanding that helpful/working solutions be contorted to fit his perspective of what the solution *should* look like threads. When things boil up sufficiently, I tend to just use my mail/usenet client's kill-thread feature to auto-block threads where the FROM header contains Nikos's gmail or superhost.gr, and suddenly the list reverts mostly to the very helpful, very on-topic traffic. 3) I'm a bit late to the party. Is Nikos a real sysadmin or is this some horrible inside joke I don't get? You don't leave much wiggle-room there. I'm afraid he is a real sysadmin (for some definition of real and sysadmin) or at least he has development/deployment access on a shared-hosting system where he alleges to have strikesuckers/strikeactual clients depending on his services. I wish it was a horrible joke (or maybe it is). The site hacking referred to in this thread appears to be the result of his repeated antagonization of the list through his intentional disregard for advice given; also a result of his failure to heed instructions on securing the site--especially with regards to publishing passwords on mailing-lists (or the URLs to the code containing those plain-text credentials). Again, I'm sorry this is how you meet the list. -tkc -- https://mail.python.org/mailman/listinfo/python-list
Re: extraction tool using CRF++
Hi Ron, In the python/ subdirectory of the CRF++ source package there's a README with instructions on how to use the CRFPP python module. HTH, Joost On Tue, Oct 1, 2013 at 4:24 PM, Vlastimil Brom vlastimil.b...@gmail.com wrote: 2013/10/1 cerr ron.egg...@gmail.com: Hi, I want to write an extraction tool using CRF++ (http://crfpp.googlecode.com/svn/trunk/doc/index.html). I have written a trainings file and a template: training: banana FOODB-NP bread FOODI-NP template: U01:%x[0,1] U02:%x[1,1] and now I want to go ahead and extract the foods from a sentence like how do I make a banana bread. Also, I'm unsure how I interface to crf++ with python, I compiled and installed it from source as described on the above website but I don't have a crf module available in python... -- https://mail.python.org/mailman/listinfo/python-list Hi, I have unfortunately no experience with CRF++; if there is no python wrapper for it available, the usage might not be (easily) possible - depending on the character of this library, you may try accessing it e.g. via ctypes. Alternatively, you may try another packages already available, e.g. NLTK: http://nltk.org/ import nltk any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(apple)) True any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(bread)) True any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(wine)) True any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(book)) False any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(pencil)) False # of course there might be some surprise, probably due to polysemy ore some specifics of the semantic description... any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(dog)) True any(synset.lexname == noun.food for synset in nltk.corpus.wordnet.synsets(white)) True cf. http://nltk.org/ http://nltk.googlecode.com/svn/trunk/doc/howto/wordnet.html http://www.velvetcache.org/2010/03/01/looking-up-words-in-a-dictionary-using-python http://wordnet.princeton.edu/man/lexnames.5WN.html hth, vbr -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 10/1/13 10:24 AM, Daniel Stojanov wrote: 2) I just signed up the this mailing list. To the regulars, is this what normally happens on this list? This is not what normally happens here. Usually we have concise and helpful conversations. Unfortunately, every online community has to struggle with the occasional troublemaker. We are currently struggling with that. The best approach is to simply ignore people that you either can't help or don't care to help. 3) I'm a bit late to the party. Is Nikos a real sysadmin or is this some horrible inside joke I don't get? Please don't contribute to the problem by discussing Nikos. Thanks, --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: extraction tool using CRF++
On Tuesday, October 1, 2013 3:04:00 PM UTC, Joost Molenaar wrote: Hi Ron, In the python/ subdirectory of the CRF++ source package there's a README with instructions on how to use the CRFPP python module. Joost, Hoops, didn't see that! Yes, Thanks! :) -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Am Dienstag, 1. Oktober 2013 16:32:57 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 5:08 μμ, ο/η feedthetroll έγραψε: Am Dienstag, 1. Oktober 2013 15:34:26 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: ... But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? Your are wrong (again) Nikos. Mark did not start the thread. YOU did: The thread was started by ni...@secure.superhost.gr ( see https://groups.google.com/forum/#!topic/comp.lang.python/_J_3e6_LIa8) So stop accusing others! And the file's contents that was uploaded speaks out loud your kind of insults. Mark is not the only one telling you the truth in this group. ... Yeah right. I am very happy, that you admit, that not Mark but YOU started the thread. You said, that the one who started the thread, broke into your system. So YOU broke into your system and are fooling us (again). ... As you see here, here the origiv of the mail is from my server and the forger used the mail agent Mutt to send the mail. *I* use ThunderBird, not Mutt mail client. You also use gmail and even systems of other people (as you told us months ago when someone asked why you were using so many different FROM - addresses), so we can not know, that you are not also using mutt. ... The message of the file also contain insulting languge like he uses all th etime against me. And the original subject was full of typos. You are the only one committing thousands of typos. So, following your arguments, this is the proof, that YOU started the thread. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 6:53 μμ, ο/η feedthetr...@gmx.de έγραψε: Am Dienstag, 1. Oktober 2013 16:32:57 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 5:08 μμ, ο/η feedthetroll έγραψε: Am Dienstag, 1. Oktober 2013 15:34:26 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: ... But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? Your are wrong (again) Nikos. Mark did not start the thread. YOU did: The thread was started by ni...@secure.superhost.gr ( see https://groups.google.com/forum/#!topic/comp.lang.python/_J_3e6_LIa8) So stop accusing others! And the file's contents that was uploaded speaks out loud your kind of insults. Mark is not the only one telling you the truth in this group. ... Yeah right. I am very happy, that you admit, that not Mark but YOU started the thread. You said, that the one who started the thread, broke into your system. So YOU broke into your system and are fooling us (again). ... As you see here, here the origiv of the mail is from my server and the forger used the mail agent Mutt to send the mail. *I* use ThunderBird, not Mutt mail client. You also use gmail and even systems of other people (as you told us months ago when someone asked why you were using so many different FROM - addresses), so we can not know, that you are not also using mutt. ... The message of the file also contain insulting languge like he uses all th etime against me. And the original subject was full of typos. You are the only one committing thousands of typos. So, following your arguments, this is the proof, that YOU started the thread. You are a liar and a bad one. -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
Στις 1/10/2013 5:52 μμ, ο/η Ned Batchelder έγραψε: On 10/1/13 10:24 AM, Daniel Stojanov wrote: 2) I just signed up the this mailing list. To the regulars, is this what normally happens on this list? This is not what normally happens here. Usually we have concise and helpful conversations. Unfortunately, every online community has to struggle with the occasional troublemaker. We are currently struggling with that. The best approach is to simply ignore people that you either can't help or don't care to help. 3) I'm a bit late to the party. Is Nikos a real sysadmin or is this some horrible inside joke I don't get? Please don't contribute to the problem by discussing Nikos. Thanks, --Ned. Excuse me...but i;am no troublemaker, i ask question and read the answers and comment on those. And also i was the one being hacked here, not ther other way around, i did not started this. -- https://mail.python.org/mailman/listinfo/python-list
PyDoc_STRVAR error in msvc compile
I'm trying to port C code that compiles under 2.7 to 3.3; the intention is to make things work under both. I used to use raw strings for the module documentation, but my porting guide suggests that I should be using PyDoc_STRVAR. That works for me using linux, but I'm getting errors under windows compiles My usage looks like this PyDoc_STRVAR(__DOC__, Helper extension module for xxx.\n\ \n\ Interface summary:\n\ \n\ import _xxx\n\ ..\n #ifdef stuff\n #endif \n\ .\n\ ); but it seems that the MSVC compiler for python-2.7 cannot hack this and I get messages like this _xxx.c C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2121: '#' : invalid character : possibly the result of a macro expansion C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2146: syntax error : missing ';' before ident ifier 'ifdef' C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2143: syntax error : missing '{' before 'cons tant' C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2059: syntax error : 'Unknown' C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2121: '#' : invalid character : possibly the result of a macro expansion error: command 'C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' failed with exit status 2 line 66 is the closing paranthesis. Anyone got any ideas? Previously I used code like this static char moduleDoc =Helper extension module for xxx.\n\ \n\ Interface summary:\n\ \n\ import _xxx\n\ ..\n #ifdef stuff\n #endif \n\ .\n\ ; but the registration and usage differs quite a lot between python2 python3 so I thought to switch to the newer mechanism. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Am Dienstag, 1. Oktober 2013 17:57:25 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 6:53 μμ, ο/η feedthetroll έγραψε: Am Dienstag, 1. Oktober 2013 16:32:57 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 5:08 μμ, ο/η feedthetroll έγραψε: Am Dienstag, 1. Oktober 2013 15:34:26 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: ... But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? Your are wrong (again) Nikos. Mark did not start the thread. YOU did: The thread was started by ni...@secure.superhost.gr ( see https://groups.google.com/forum/#!topic/comp.lang.python/_J_3e6_LIa8) So stop accusing others! And the file's contents that was uploaded speaks out loud your kind of insults. Mark is not the only one telling you the truth in this group. ... Yeah right. I am very happy, that you admit, that not Mark but YOU started the thread. You said, that the one who started the thread, broke into your system. So YOU broke into your system and are fooling us (again). ... As you see here, here the origiv of the mail is from my server and the forger used the mail agent Mutt to send the mail. *I* use ThunderBird, not Mutt mail client. You also use gmail and even systems of other people (as you told us months ago when someone asked why you were using so many different FROM - addresses), so we can not know, that you are not also using mutt. ... The message of the file also contain insulting languge like he uses all th etime against me. And the original subject was full of typos. You are the only one committing thousands of typos. So, following your arguments, this is the proof, that YOU started the thread. You are a liar and a bad one. Do you have any points / evidence or are you just trolling again. btw: If you write Yeah right. (see 23 lines above) you should read what you agree to. But I forgot, you do not read answers to your posts. You just write arbitrary things. Just like a troll does. -- https://mail.python.org/mailman/listinfo/python-list
Re: VERY BASIC HELP
On Monday, September 30, 2013 11:20:16 PM UTC+5:30, vignesh.h...@gmail.com wrote: Thank you both so much! I'll be sure to make more pertinent subject lines now :) Thanks for the detailed explanations! Clearly, I've just started learning this language ~20 minutes before I made this post, and am still learning the basics. Do you guys know of any guides for a beginner? I am definitely willing to take the time to learn in depth :) Have you seen http://docs.python.org/2/tutorial/ ?? Its kind of required reading for beginners. A little time spent on that will save a lot on head-scratchers avoided. After that there are the language and the library references http://docs.python.org/2/reference/index.html#reference-index http://docs.python.org/2/library/index.html#library-index The library is ok if you stick to modules that make sense to you. The language-ref is too heavy-going for a beginner -- other material/books may be preferable. -- https://mail.python.org/mailman/listinfo/python-list
Re: PyDoc_STRVAR error in msvc compile
On 01/10/2013 17:41, Robin Becker wrote: I'm trying to port C code that compiles under 2.7 to 3.3; the intention is to make things work under both. I used to use raw strings for the module documentation, but my porting guide suggests that I should be using PyDoc_STRVAR. That works for me using linux, but I'm getting errors under windows compiles My usage looks like this PyDoc_STRVAR(__DOC__, Helper extension module for xxx.\n\ \n\ Interface summary:\n\ \n\ import _xxx\n\ ..\n #ifdef stuff\n #endif \n\ .\n\ ); but it seems that the MSVC compiler for python-2.7 cannot hack this and I get messages like this _xxx.c C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2121: '#' : invalid character : possibly the result of a macro expansion C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2146: syntax error : missing ';' before ident ifier 'ifdef' C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2143: syntax error : missing '{' before 'cons tant' C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2059: syntax error : 'Unknown' C:\code\hg-repos\test_ext\xxx\_xxx.c(66) : error C2121: '#' : invalid character : possibly the result of a macro expansion error: command 'C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' failed with exit status 2 line 66 is the closing paranthesis. Anyone got any ideas? Previously I used code like this static char moduleDoc =Helper extension module for xxx.\n\ \n\ Interface summary:\n\ \n\ import _xxx\n\ ..\n #ifdef stuff\n #endif \n\ .\n\ ; but the registration and usage differs quite a lot between python2 python3 so I thought to switch to the newer mechanism. I've tried it in a minimal console program, and it seems to work for me. -- https://mail.python.org/mailman/listinfo/python-list
Re: VERY BASIC HELP
On 30/09/2013 18:50, vignesh.harikris...@gmail.com wrote: Thank you both so much! I'll be sure to make more pertinent subject lines now :) Thanks for the detailed explanations! Clearly, I've just started learning this language ~20 minutes before I made this post, and am still learning the basics. Do you guys know of any guides for a beginner? I am definitely willing to take the time to learn in depth :) As a newbie you might like to try the tutor mailing list see https://mail.python.org/mailman/listinfo/tutor -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: Functional Programming and python
Antoon Pardon antoon.par...@rece.vub.ac.be writes: Op 30-09-13 20:55, Piet van Oostrum schreef: Franck Ditter nob...@nowhere.org writes: Good approach of FP in Python, but two points make me crazy : 1. Tail recursion is not optimized. We are in 2013, why ? This is known technology (since 1960). And don't answer with good programmers don't use recursion, this is bullshit. Tail recursion optimization throws away valuable stack trace information in case of an error. This is hardly relevant. Because what are we told to use instead of tail calls? We are told to use loops. But when you use a loop the stack trace doesn't contain the values of previous runs through the loop. So how valuable is that stack frame information when the proposed alternative doesn't produces it either. This is incorrect. Loops are not always a replacement for tail recursion optimization. Tail recursion optimization generally means that the last function call before a return in a function reuses the current stack frame instead of generating a new one. This is regardless of which function is called, otherwise mutually recursive calls will not be optimized. (Unless you do static analysis of all the functions calls involved, which is very hard or even impossible in python.) A better name for this process is therefore 'tail call optimization'. So any function call that is last in its flow will be optimized. This gives a lot of situations where stack trace information is thrown away, even in those situations where a loop would not be an alternative and where optimization would give little benefit. Anyway, deep recursion isn't used very often in Python, which diminishes the value of tail call optimization. -- Piet van Oostrum p...@vanoostrum.org WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list
Re: Help with python functions?
I ended up with these. I know they're only like half right... I was wondering if any of you had to do this, what would you end up with? # Question 1.a def temp(T, from_unit, to_unit): if from_unit == 'C' or from_unit == 'c': return 32 + (9/5)*T elif from_unit == 'K' or from_unit == 'k': return T + 273.15 elif from_unit == 'F' or from_unit == 'f': return (5/9)*(T - 32) else: return to_unit # Question 1.b def comp(T1, u1, T2, u2): if u1 != u2: T1 = temp(T1, u1) elif T2 T1: return -1 elif T1 T2: return 1 else: return 0 # Question 2 def P(p_0, t, i): Amount = P(1 + (i/100)) return P(1 + (t * i/12)) -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Νίκος nikos.gr...@gmail.com writes: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! These questions show that the one who put that warning on your site was right. -- Piet van Oostrum p...@vanoostrum.org WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
Νίκος nikos.gr...@gmail.com writes: Just logged in via FTP to my server and i saw an uploade file named Warnign html Contents were: WARNING I am incompetent. Do not hire me! Question: WHO AND MOST IMPORTNTANLY HOW DID HE MANAGED TO UPLOAD THIS FILE ON MY ACCOUNT? PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK. SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?! This shows that the warning was correct. -- Piet van Oostrum p...@vanoostrum.org WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 01/10/2013 14:27, Chris “Kwpolska” Warrick wrote: It looks like you are accusing someone of doing something without any proof whatsoever. Would you like help with the fallout of the lawsuit that I hope Mark might (should!) come up with? Why would I want to sue someone who's very kindly given me the longest, loudest laugh I've had in years? Besides I can't afford a lawyer, don't want to put any money the way of ThievingScumbagLawyers.co.uk, and what is the point of sueing a person who almost certainly is going bust and hence can't afford to pay up. Finally it was most certainly *NOT* me who did the hacking. If it had of been I would have taken the same type of action just to teach Nikos a lesson, but I would have owned up to my trickery after a few hours. As it happens my skills are so outdated that I wouldn't have the faintest idea where to start, unless of course I'd have taken the trouble of wading through the gazillions of posts talking about websites here with the occasional mention of how (not) to write Python. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: Help with python functions?
On Tue, Oct 1, 2013, at 13:53, kjaku...@gmail.com wrote: I ended up with these. I know they're only like half right... I was wondering if any of you had to do this, what would you end up with? # Question 1.a def temp(T, from_unit, to_unit): Assuming this is temperature conversion. You should add a docstring. if from_unit == 'C' or from_unit == 'c': Consider normalizing the unit with .upper() at the top of the function so you don't have to do this or case in every single section. return 32 + (9/5)*T You are ignoring the value of to_unit and returning the value in fahrenheit. elif from_unit == 'K' or from_unit == 'k': return T + 273.15 This conversion is simply wrong - it's the conversion _from_ celsius _to_ kelvin. elif from_unit == 'F' or from_unit == 'f': return (5/9)*(T - 32) You are ignoring the value of to_unit and returning the value in celsius else: return to_unit I don't know what this is. It's probably wrong. To implement a temperature conversion function, I would convert from the unit given to kelvin, then convert from kelvin to the desired unit - that way you don't have to implement every combination separately. # Question 1.b def comp(T1, u1, T2, u2): if u1 != u2: T1 = temp(T1, u1) You're not passing in u2 here. elif T2 T1: return -1 elif T1 T2: return 1 else: return 0 # Question 2 def P(p_0, t, i): Amount = P(1 + (i/100)) return P(1 + (t * i/12)) I don't know what this is. Is this for homework? -- https://mail.python.org/mailman/listinfo/python-list
Convert Microsoft Word files to PDF with DOCXtoPDF
Hi list, I hope some people may find this useful. This post by me shows how to use DOCXtoPDF (a program I wrote recently) to convert the text in Microsoft Word files (that are in DOCX format) to PDF: Convert Microsoft Word files to PDF with DOCXtoPDF http://jugad2.blogspot.in/2013/10/convert-microsoft-word-files-to-pdf.html The prerequisites are also mentioned. They are: Python, Reportlab, my xtopdf toolkit and python-docx. --- - Vasudev Ram Dancing Bison Enterprises Software training and consulting - Python, Linux, databases, open source ... http://www.dancingbison.com http://jugad2.blogspot.com --- -- https://mail.python.org/mailman/listinfo/python-list
Aloha! Check out the Betabots!
Aloha Python Fans! Did you all miss me? I have been busy working on my Python-based chatbots called the Betabots. I mentioned this mailing list and thanked the Python mailing list in the documentation like I said I would. I just released v0.8a. Enjoy! Thanks for all the past help everyone. Mahalo, Devyn Collier Johnson devyncjohn...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 2 October 2013 00:00, Νίκος nikos.gr...@gmail.com wrote: Thanks for visting my website: you help me increase my google page rank without actually utilizing SEO. Here: http://superhost.gr/?show=log**page=index.htmlhttp://superhost.gr/?show=logpage=index.html Speaking of which, I would strongly advise against *anyone* going to Nikos' web site. With the length of time his credentials have been available for anyone in the world to obtain and use it's highly likely that by now his website is a malware-spewing zombie member of a botnet. Of course, I'm not going to risk it by going there to check myself ... Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list
Tail recursion to while iteration in 2 easy steps
Part of the reason that Python does not do tail call optimization is that turning tail recursion into while iteration is almost trivial, once you know the secret of the two easy steps. Here it is. Assume that you have already done the work of turning a body recursive ('not tail recursive') form like def fact(n): return 1 if n = 1 else n * fact(n-1) into a tail recursion like def fact(n, _fac=1): '''Return factorial for any count n. Users are not expected to override private parameter _fac. ''' if n = 1: return _fac else: # optional return fact(n-1, n * _fac) (This conversion nearly requires adding an accumulator parameter, as done here. Turn this into while iteration with two easy steps. 1. If not already done, make if-else a statement, rather than an expression, with the recursive call in the if branch. If nothing else, just use 'not condition' to invert the condition. def fact(n, _fac=1): if n 1: # not n = 1 return fact(n-1, n * _fac) else: # optional return _fac While contrary to what is often published, this order makes logical sense. The recursive call means 'go to the top of this function with new bindings for the parameters'. So put it closest to the top. The base case means 'we are done, time to leave'. So put it at the bottom. 2. This order also makes the follow substeps work: 2a. Replace 'if' with 'while'. 2b. Replace the recursive call with multiple assignment, using the parameters as targets and the arguments as source. For our example: def fact(n, _fac=1): while n 1: n, _fac = n-1, n * _fac else: return _fac The proof of correctness for this conversion might argue that the recursive form is equivalent to the following pseudo-Python: def fact(n, _fac=1): label top if n 1: n, _fac = n-1, n * _fac goto top else: return _fac and that this is equivalent to the real Python with while. At this point, you call pull the initialization of the private parameter into the body, remove the else, and even add a value check. def fact(n): if n 0 or n != int(n): raise ValueError('fact input {} is not a count'.format(n)) fac = 1 while n 1: n, fac = n-1, n * fac return fac With care, the multiple-assignment statement can usually be turned into multiple assignment statements for greater efficiency. fac *= n n -= 1 But note that the reverse order would be a bug. So I would not do this, especially in more complicated situations, without having tests first. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: Help with python functions?
On Tue, 01 Oct 2013 10:53:26 -0700, kjakupak wrote: I ended up with these. I know they're only like half right... I was wondering if any of you had to do this, what would you end up with? # Question 1.a def temp(T, from_unit, to_unit): I suspect that this doesn't work properly for all cases of from_unit, to_unit. As a general case: def temp ( T, u1, u2 ): # from and to units the same, return T unchanged # else use a conversion table ct = { (a, b):lambda x: formula, } return ct[ (u1, u2 ) ]( T ) Note you may need to build in case independence! # Question 1.b def comp(T1, u1, T2, u2): You completely missed the point of my earlier posts, and I suspect the reason both these questions were included. Firstly, consider that if temp (from q1a) works properly you can use temp to convert the units of T2 to the units of T1, by calling: temp( T2, u2, u1 ) q1b can be implemented in one line if temp from q1a works properly! # Question 2 def P(p_0, t, i): Amount = P(1 + (i/100)) return P(1 + (t * i/12)) First calculate the annual interest as 1 + fraction where fraction is interest % / 100 The calculate the compounded interest as annual ^ years Finally multiply the compounded interest by the principal Mathematically: principal * ( ( 1 + ( period_interest_% / 100 ) ) ^ periods ) Again, this should be possible as a single line function. All you have to do is turn the math into python code. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
Daniel Stojanov daniel.st...@gmail.com writes: 2) I just signed up the this mailing list. Welcome! Feel free to engage and/or begin some Python-related threads :-) To the regulars, is this what normally happens on this list? This is an unmoderated forum, so we have occasional spates of persistent nuisances, and those who respond with the maturity level and impulse control of an average six-year-old. We have guidelines on community conduct, but they are enforced through social pressure and hence are not perfect. 3) I'm a bit late to the party. Is Nikos a real sysadmin or is this some horrible inside joke I don't get? Nikos has turned out to be a particularly persistent nuisance here, but is relatively easy to avoid once you realise that. -- \ “An idea isn't responsible for the people who believe in it.” | `\ —Donald Robert Perry Marquis | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On Tue, 01 Oct 2013 12:58:50 +0300, Νίκος wrote: Just logged in via FTP to my server and i saw an uploade file named Warnign html Yes, so we can add basic internet security to the growing list of things you know nothing about: python programming, etiquette, http, dns, tcp/ip, mimetypes, utf-8, basic internet security And this is just based on the last 30 days of your posts! -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On Wed, Oct 2, 2013 at 12:24 AM, Daniel Stojanov daniel.st...@gmail.com wrote: 3) I'm a bit late to the party. Is Nikos a real sysadmin or is this some horrible inside joke I don't get? He's a real sysadmin, in the sense that he has a system that he administers - this isn't some elaborate prank that we collectively pull on newcomers, no. His main problem is that he doesn't listen to advice, even advice he specifically requests; so his server has, on occasion, had major problems lasting a long time. What just happened here, I think, is that he had a password accidentally visible, and someone logged in as him. Tip: Learn from his mistakes, that'll save you the pain of making them yourself :) Fortunately, this sort of thing isn't all that common. Most of the time we have much more in the category of Python-related and real good fun. Unless you absolutely detest Python and all that it stands for, stick around - we're sure to have something more interesting than this. :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 01/10/2013 15:24, Daniel Stojanov wrote: 2) I just signed up the this mailing list. To the regulars, is this what normally happens on this list? Nah, sadly part of it is due to me failing to keep Asperger Syndrome under control. Marks out of 10, -5, must try harder :( If you're into upping your game with Python please take a look here http://news.gmane.org/index.php?prefix=gmane.comp.python, there's a couple of mailing lists that could keep you occupied for a few minutes each day :) -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Improving community discussion (was: JUST GOT HACKED)
Mark Lawrence breamore...@yahoo.co.uk writes: Nah, sadly part of it is due to me failing to keep Asperger Syndrome under control. Marks out of 10, -5, must try harder :( Thank you for acknowledging this. I sincerely wish you strength in limiting antisocial behaviour. We need more people who can recognise and overcome their own impulses to behave badly :-) If you're into upping your game with Python please take a look here http://news.gmane.org/index.php?prefix=gmane.comp.python, there's a couple of mailing lists that could keep you occupied for a few minutes each day :) Also of benefit is to find – or, if it doesn't exist, to found – a local Python User Group URL:https://wiki.python.org/moin/LocalUserGroups. Meeting and discussing in person with like-minded fellows, on a regular schedule, works very well for a tool like Python, in my experience. -- \“He who laughs last, thinks slowest.” —anonymous | `\ | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 1/10/2013 7:40 μμ, ο/η feedthetr...@gmx.de έγραψε: Am Dienstag, 1. Oktober 2013 17:57:25 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 6:53 μμ, ο/η feedthetroll έγραψε: Am Dienstag, 1. Oktober 2013 16:32:57 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 5:08 μμ, ο/η feedthetroll έγραψε: Am Dienstag, 1. Oktober 2013 15:34:26 UTC+2 schrieb Ferrous Cranus: Στις 1/10/2013 4:23 μμ, ο/η Mark Lawrence έγραψε: ... But am I replying to the real, really incompetant Greek moron or the person who has pinched his email account? I'll happily admit to being far too lazy to try and find out. You started the thread didn't you? Your are wrong (again) Nikos. Mark did not start the thread. YOU did: The thread was started by ni...@secure.superhost.gr ( see https://groups.google.com/forum/#!topic/comp.lang.python/_J_3e6_LIa8) So stop accusing others! And the file's contents that was uploaded speaks out loud your kind of insults. Mark is not the only one telling you the truth in this group. ... Yeah right. I am very happy, that you admit, that not Mark but YOU started the thread. You said, that the one who started the thread, broke into your system. So YOU broke into your system and are fooling us (again). ... As you see here, here the origiv of the mail is from my server and the forger used the mail agent Mutt to send the mail. *I* use ThunderBird, not Mutt mail client. You also use gmail and even systems of other people (as you told us months ago when someone asked why you were using so many different FROM - addresses), so we can not know, that you are not also using mutt. ... The message of the file also contain insulting languge like he uses all th etime against me. And the original subject was full of typos. You are the only one committing thousands of typos. So, following your arguments, this is the proof, that YOU started the thread. You are a liar and a bad one. Do you have any points / evidence or are you just trolling again. btw: If you write Yeah right. (see 23 lines above) you should read what you agree to. But I forgot, you do not read answers to your posts. You just write arbitrary things. Just like a troll does. The hacker created all the above situation to made it look it was me. But it wasn't me. And i was never used Mutt' as MUA. If only there was a log file that could show the connection made by the hacker's host, so to post it here. -- https://mail.python.org/mailman/listinfo/python-list
python function parameters, debugging, comments, etc.
I've got a fair bit of programming experience (mostly kernel/POSIX stuff in C). I'm fairly new to python though, and was hoping for some advice. Given the fact that function parameters do not specify types, when you're looking at someone else's code how the heck do you know what is expected for a given argument? (Especially in a nontrivial system where the parameter is just passed on to some other function and may not be evaluated for several nested function calls.) Is the recommendation to have comments for each function describing the expected args? I was trying to debug some stuff that someone else wrote. It turned out that the problem was in code like this: def rebuild_instance(self, context, instance, image, ...) request_spec = scheduler_utils.build_request_spec(context, image, [instance]) ...stuff... other_function(...,image,...) where build_request_spec looks like: def build_request_spec(ctxt, image, instances): ...etc... and it took me a while to realize that rebuild_instance() was being passed the image ID (basically just a string), and other_function() was expecting the image ID, but build_request_spec() was expecting the actual image dictionary. It also took me a while to realize that that build_request_spec() was expecting a list of instances, while rebuild_instance() was passing in a single instance. That one is already fixed in the above code. So what's the recommended way of dealing with stuff like this in larger projects with many developers? Thanks, Chris -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 01/10/2013 23:46, Νίκος wrote: If only there was a log file that could show the connection made by the hacker's host, so to post it here. I'd write a serious letter of complaint to all of your customers asking them why they've not provided you with log files that list what they do on the system that you've provided them with. At least I think that's how these things usually work, isn't it? -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: python function parameters, debugging, comments, etc.
On Tue, Oct 1, 2013 at 6:54 PM, Chris Friesen cbf...@mail.usask.ca wrote: I've got a fair bit of programming experience (mostly kernel/POSIX stuff in C). I'm fairly new to python though, and was hoping for some advice. Given the fact that function parameters do not specify types, when you're looking at someone else's code how the heck do you know what is expected for a given argument? (Especially in a nontrivial system where the parameter is just passed on to some other function and may not be evaluated for several nested function calls.) Is the recommendation to have comments for each function describing the expected args? I was trying to debug some stuff that someone else wrote. It turned out that the problem was in code like this: def rebuild_instance(self, context, instance, image, ...) request_spec = scheduler_utils.build_request_spec(context, image, [instance]) ...stuff... other_function(...,image,...) where build_request_spec looks like: def build_request_spec(ctxt, image, instances): ...etc... and it took me a while to realize that rebuild_instance() was being passed the image ID (basically just a string), and other_function() was expecting the image ID, but build_request_spec() was expecting the actual image dictionary. It also took me a while to realize that that build_request_spec() was expecting a list of instances, while rebuild_instance() was passing in a single instance. That one is already fixed in the above code. So what's the recommended way of dealing with stuff like this in larger projects with many developers? Thanks, Chris -- https://mail.python.org/mailman/listinfo/python-list One way is to require docstrings (the triple quoted text immediately following the def line) on your project and set out requirements for how to describe the function/method arguments there. There is a tool call pydoc that collects docstrings and makes great documentation. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
: Imagine, if you will, a pub landlord. I'll call him Nick. The pub Nick manages is a run-of-the-mill affair: he leases it from a brewery, and they look after most of the technical aspects of the business. When it comes down to it, Nick is just a reseller of alcohol. If one of the regulars mentions that they like Joomlager[1], all he has to do is call the brewery and they'll handle the rest. After a little while, Nick decides that his six months experience behind a bar qualifies him for greater things. He's heard that the cool kids are all drinking artesanal, micro-brewed Python Ale these days, so thinking to himself how hard can it be?, Nick throws syrup, yeast and water into a big bucket next to the bar (reading up on how to do it properly is too boring for Nick), and after a week or so, he's got a sludgy mess for his trouble. Great!, thinks Nick. I can sell this no problem. Unsurprisingly, Nick's beer is awful. His customers aren't that fussy (they're in Nick's bar, after all), but the stuff doesn't even seem to get you even slightly merry, and a couple of people have gotten ill after drinking it. Undaunted, Nick decides to stick at it. He still can't be bothered to learn anything about fermentation or any of that boring crap, but that's okay, because he's discovered the local Python Ale Brewing Club. The PABC is a friendly, helpful bunch, and a lot of the members really know their stuff. For example, when Nick asks how do I avoid letting that scummy residue into the glass when I dunk it into the bucket to serve someone?, they try to explain to him that a) serving directly from the same bucket he brewed in is a bad idea, and b) if he'd brewed it right, there shouldn't be any scummy residue in the first place. Of course, Nick doesn't have time for any of that - he just wants an answer to his question. He resolutely ignores anyone who tells him things like anyone could spit (or worse) in that open bucket; you need to think about safety, and if someone tells him he should add malt to improve the flavour, he just throws some ovaltine into the bucket he's serving from, along with any half-finished drinks left by his customers. Meanwhile, a lot of the members of the PABC are getting tired of Nick asking the same questions over and over again, and not listening to the answers - and especially his casual disregard for the safety of his customers. They're enthusiasts, after all, and he's the kind of guy that gives drinking establishments a bad name. So, one night just before closing time, one of them pours bright green food dye into Nick's bucket - nothing that would hurt anyone, but something that Nick couldn't fail to notice before opening up the next day. It's a little sketchy to adulterate his product like that, but he's proved impervious to everyone's attempts to get him to take safety seriously - maybe *this* will shock him into action. Sure enough, the next morning Nick starts crying about how someone has poisoned his beer. It's okay though; he's covered the bucket with a wet towel, and he challenges anyone to get past what he believes is his now-perfect security. - - - In other words: you weren't hacked. You'd been repeatedly told that you had publicly visible source code on the net containing passwords in plain text; all anyone had to do was login to your server with the credentials you negligently exposed, and open a text editor. If that's hacking, I'm Neo. That's not to say someone else *hasn't* pissed in your bucket, but if they have, they won't have publicised the fact. By the way: if you haven't already, you'll want to remove the extra line from your .htaccess file. And in case it isn't obvious: no, it wasn't Mark Lawrence. -[]z. [1] It's a bit rough, but it gets the job done. Gives you a terrible hangover, mind. -- Zero Piraeus: flagellum dei http://etiol.net/pubkey.asc -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 2/10/2013 1:57 πμ, ο/η Mark Lawrence έγραψε: On 01/10/2013 23:46, Νίκος wrote: If only there was a log file that could show the connection made by the hacker's host, so to post it here. I'd write a serious letter of complaint to all of your customers asking them why they've not provided you with log files that list what they do on the system that you've provided them with. At least I think that's how these things usually work, isn't it? My customer's are not hackers. Neither are you. You show my password in plain text somehow and decided to break in. The contents of the warning.html file also fits your style of insult. Stop pretending it wasn't you. -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 1/10/2013 9:06 PM, Νίκος wrote: Στις 1/10/2013 1:58 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:54 PM, Νίκος nikos.gr...@gmail.com wrote: I you want to congratulate Mark Lawrence do it in private. You know it was Mark, then? Okay. In that case, ask him directly. If not, I advise you to refrain from making bald statements that you can't back. He started the thread didn't he? He also posted couple days agon if i have fixes a link form a domain i host which provided my source code in plain text. Let alone his hatred agaisnt me. Considerign the above I think its safe to say it was him. No, it's defamation. Unless you have _proof_ it was Mark Lawrence, you really should just shut up for once. As it stands, without an apology (and even _with_ one), Mark has the legal right to sue you. http://en.wikipedia.org/wiki/Defamation#Internationally http://www.aaronkellylaw.com/internet-defamation-laws/serving-an-international-defamation-subpoena/ -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 2/10/2013 1:34 AM, Νίκος wrote: i ask question and read the answers and comment on those. Citation needed. -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
Στις 2/10/2013 2:02 πμ, ο/η Zero Piraeus έγραψε: In other words: you weren't hacked. You'd been repeatedly told that you had publicly visible source code on the net containing passwords in plain text; all anyone had to do was login to your server with the credentials you negligently exposed, and open a text editor. If that's hacking, I'm Neo. I'am aware of that fact, but the line you are refering too was just initiating a mysql connection: con = pymysql.connect( db = 'mypass', user = 'myuser', passwd = 'mysqlpass', charset = 'utf8', host = 'localhost' ) That was viewable by the link Mark have posted. But this wasnt my personal's account's login password, that was just the mysql password. Mysql pass != account's password That's not to say someone else *hasn't* pissed in your bucket, but if they have, they won't have publicised the fact. Ah, now i shoudl worry for more people breaking in? By the way: if you haven't already, you'll want to remove the extra line from your .htaccess file. Tell me the line you are referring to. Yes i added some line but i want you to tell me which line is that. case it isn't obvious: no, it wasn't Mark Lawrence. Who was it then, you? -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
Στις 2/10/2013 2:25 πμ, ο/η alex23 έγραψε: On 1/10/2013 9:06 PM, Νίκος wrote: Στις 1/10/2013 1:58 μμ, ο/η Chris Angelico έγραψε: On Tue, Oct 1, 2013 at 8:54 PM, Νίκος nikos.gr...@gmail.com wrote: I you want to congratulate Mark Lawrence do it in private. You know it was Mark, then? Okay. In that case, ask him directly. If not, I advise you to refrain from making bald statements that you can't back. He started the thread didn't he? He also posted couple days agon if i have fixes a link form a domain i host which provided my source code in plain text. Let alone his hatred agaisnt me. Considerign the above I think its safe to say it was him. No, it's defamation. Unless you have _proof_ it was Mark Lawrence, you really should just shut up for once. As it stands, without an apology (and even _with_ one), Mark has the legal right to sue you. http://en.wikipedia.org/wiki/Defamation#Internationally http://www.aaronkellylaw.com/internet-defamation-laws/serving-an-international-defamation-subpoena/ Wooow! Now i'am rely scared! Please don't put me behind barslol! -- https://mail.python.org/mailman/listinfo/python-list
Re: I haev fixed it
On 2/10/2013 9:30 AM, Νίκος wrote: Στις 2/10/2013 2:25 πμ, ο/η alex23 έγραψε: No, it's defamation. Unless you have _proof_ it was Mark Lawrence, you really should just shut up for once. As it stands, without an apology (and even _with_ one), Mark has the legal right to sue you. Wooow! Now i'am rely scared! Please don't put me behind barslol! Yes, it's so funny. You do understand there's a good chance your customers would be able to sue you as well? -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 2 October 2013 09:28, Νίκος nikos.gr...@gmail.com wrote: con = pymysql.connect( db = 'mypass', user = 'myuser', passwd = 'mysqlpass', charset = 'utf8', host = 'localhost' ) That was viewable by the link Mark have posted. But this wasnt my personal's account's login password, that was just the mysql password. Mysql pass != account's password Because there's no chance with the brilliance you display that there could be any possibility of login details being kept in plaintext in your database. And of course your database is so well locked down that no attacker with a login to it could then execute arbitrary code on your system. And there's also zero chance that your personal account login details are also available in plaintext somewhere that you're unaware of. Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list
Re: python function parameters, debugging, comments, etc.
On 01/10/2013 23:54, Chris Friesen wrote: I've got a fair bit of programming experience (mostly kernel/POSIX stuff in C). I'm fairly new to python though, and was hoping for some advice. Given the fact that function parameters do not specify types, when you're looking at someone else's code how the heck do you know what is expected for a given argument? (Especially in a nontrivial system where the parameter is just passed on to some other function and may not be evaluated for several nested function calls.) Is the recommendation to have comments for each function describing the expected args? [...] In the Python community, one of the programming styles that is encouraged is duck-typing. What this means is that rather than writing functions that check whether arguments passed to that function are of a specific type, the function should simply use any methods of those arguments it requires; that way the function will still work if passed an argument whose type is a custom type defined by the user which has the right interface so that the function body still makes sense (if it quacks like a duck, then the function might as well treat it like a duck). If a user passes an argument which doesn't have the right methods then the function will fail, but the traceback that the interpreter provides will often have enough information to make it clear why it failed. (see http://docs.python.org/3/glossary.html#term-duck-typing ) So the upside of duck-typing is clear. But as you've already discovered, so is the downside: Python's dynamic nature means that there's no way for the interpreter to know what kind of arguments a function will accept, and so a user of any function relies on the function having clear documentation. There are several ways to document a function; apart from comments, functions also have docstrings, which will be displayed, along with the function's signature, when you call help(function). A docstring is a string literal which occurs as the first statement of a function definition, like this: def foo(x, y = 2): '''This function takes an argument x, which should be iterable, and a function y, which should be a numeric type. It does nothing.''' pass If I call help(foo), I get this: Help on function foo in module __main__: foo(x, y=2) This function takes an argument x, which should be iterable, and a function y, which should be a numeric type. It does nothing. In Python 3.0 and later, functions can also have annotations; they have no semantics in the language itself but third-party modules can use them if they choose to do so. They look like this: def foo(x: str, y: int = 2, z: 'Hello' = None) - tuple: return a, b, c For more about annotations, see here: http://www.python.org/dev/peps/pep-3107/ So the short answer is that Python gives you several methods for making it clear what kind of arguments the functions you define should be passed, but unfortunately you'll likely encounter functions written by people who made no use of those methods. On the plus side, Python's exception reporting is good, so if in doubt just try using a function in the interactive interpreter and see what happens (with the usual caveats about using untrusted code, obviously). -- https://mail.python.org/mailman/listinfo/python-list
Re: python function parameters, debugging, comments, etc.
On 10/1/2013 6:54 PM, Chris Friesen wrote: Given the fact that function parameters do not specify types, when you're looking at someone else's code how the heck do you know what is expected for a given argument? (Especially in a nontrivial system where the parameter is just passed on to some other function and may not be evaluated for several nested function calls.) Is the recommendation to have comments for each function describing the expected args? Here is an example from the stdlib. print(int.__doc__) int(x=0) - integer int(x, base=10) - integer Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero. If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. int('0b100', base=0) 4 help(int) prints the above plus the int methods. Functions coded in Python should not have the signature in the doc string because help() can get it from the function object itself. def f(a, b=3, *, c='abc'): '''return (a + b) / len(c) a and b (default 3) are numbers. c must be a sequence (default 'abc').''' help(f) Help on function f in module __main__: f(a, b=3, *, c='abc') return (a + b) / len(c) a and b (default 3) are numbers. c must be a sequence (default 'abc'). -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: JUST GOT HACKED
On 2013-10-02 09:48, Tim Delaney wrote: Because there's no chance with the brilliance you display that there could be any possibility of login details being kept in plaintext in your database. And of course your database is so well locked down that no attacker with a login to it could then execute arbitrary code on your system. And there's also zero chance that your personal account login details are also available in plaintext somewhere that you're unaware of. And there's no way an elephant-sized hole in the web application allowed for dropping files/scripts on the server to do the arbitrary bidding of anybody who read the source... -tkc -- https://mail.python.org/mailman/listinfo/python-list
Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte
On Tue, 01 Oct 2013 09:27:22 +0200, Antoon Pardon wrote: People pay for some kind of guaranteed uptime. You have *no idea* what sort of contract Nikos has with his customers. Nor do you know have any idea what fees he charges. For all we know, he is promising, and charging for, 99% uptime while delivering 99.9% uptime. I know you are getting off on hating Nikos, but take it elsewhere. -- Steven -- https://mail.python.org/mailman/listinfo/python-list