From abdulmuneer at gmail.com Mon Apr 1 11:02:01 2013 From: abdulmuneer at gmail.com (Abdul Muneer) Date: Mon, 1 Apr 2013 14:32:01 +0530 Subject: [BangPypers] Evaluating Web Frameworks based on certain criteria Message-ID: Hi, I need to decide on a python web-framework based on the below listed criteria. 1. Ease of customization of bundled packages 2. Ease of development 3. Long term support of frameworks 4. Learning curve 5. Logging and monitoring 6. Clustering 7. Ease of deployment 8. Testing: unit testing libraries 9. DB management 10. User management: e.g. should be possible to tie one user id to multiple entities 11. LDAP integration What would you recommend? Please share your experiences and insights related to any of these points. Ignore the points in the list that appear vague to you. The existing app is written in pylons 0.9 , but as we want to enhance and add lot more features, we would like to rebuild it on a new framework altogether. The current web app had too many dependencies and the new versions of some of these libraries have conflicting requirements. Some other libraries were long dead. So the choice is to rebuild entire stuff on a framework where we will not end up in the same situation. Regards, Abdul Muneer -- Follow me on Twitter: @abdulmuneer From venkat83 at gmail.com Mon Apr 1 11:57:36 2013 From: venkat83 at gmail.com (Venkatraman S) Date: Mon, 1 Apr 2013 15:27:36 +0530 Subject: [BangPypers] Evaluating Web Frameworks based on certain criteria In-Reply-To: References: Message-ID: On Mon, Apr 1, 2013 at 2:32 PM, Abdul Muneer wrote: > I need to decide on a python web-framework based on the below listed > criteria. > > 1. Ease of customization of bundled packages > 2. Ease of development > 3. Long term support of frameworks > 4. Learning curve > 5. Logging and monitoring > 6. Clustering > 7. Ease of deployment > 8. Testing: unit testing libraries > 9. DB management > 10. User management: e.g. should be possible to tie one user id to > multiple entities > 11. LDAP integration > > What would you recommend? Please share your experiences and insights > related to any of these points. Ignore the points in the list that appear > vague to you. > > The existing app is written in pylons 0.9 , but as we want to enhance and > add lot more features, we would like to rebuild it on a new framework > altogether. > > The current web app had too many dependencies and the new versions of some > of these libraries have conflicting requirements. Some other libraries were > long dead. So the choice is to rebuild entire stuff on a framework where we > will not end up in the same situation. > Suggesting a web-framework is an easy task, but you as an owner have to personally evaluate the available options that fits into your needs. Personal bias in these kind of questions in open forums is pretty high. Also most frameworks would support almost all the features that you have requested. Having said that, i tend to lean towards django. -V From kracethekingmaker at gmail.com Mon Apr 1 12:48:44 2013 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Mon, 1 Apr 2013 16:18:44 +0530 Subject: [BangPypers] Evaluating Web Frameworks based on certain criteria In-Reply-To: References: Message-ID: Try creating google doc or survey and ask people's opinion. On Mon, Apr 1, 2013 at 3:27 PM, Venkatraman S wrote: > On Mon, Apr 1, 2013 at 2:32 PM, Abdul Muneer > wrote: > > > I need to decide on a python web-framework based on the below listed > > criteria. > > > > 1. Ease of customization of bundled packages > > 2. Ease of development > > 3. Long term support of frameworks > > 4. Learning curve > > 5. Logging and monitoring > > 6. Clustering > > 7. Ease of deployment > > 8. Testing: unit testing libraries > > 9. DB management > > 10. User management: e.g. should be possible to tie one user id to > > multiple entities > > 11. LDAP integration > > > > What would you recommend? Please share your experiences and insights > > related to any of these points. Ignore the points in the list that appear > > vague to you. > > > > The existing app is written in pylons 0.9 , but as we want to enhance and > > add lot more features, we would like to rebuild it on a new framework > > altogether. > > > > The current web app had too many dependencies and the new versions of > some > > of these libraries have conflicting requirements. Some other libraries > were > > long dead. So the choice is to rebuild entire stuff on a framework where > we > > will not end up in the same situation. > > > > > Suggesting a web-framework is an easy task, but you as an owner have to > personally > evaluate the available options that fits into your needs. Personal bias in > these kind > of questions in open forums is pretty high. Also most frameworks would > support almost > all the features that you have requested. > > Having said that, i tend to lean towards django. > > -V > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- * Thanks & Regards "Talk is cheap, show me the code" -- Linus Torvalds kracekumar www.kracekumar.com * From noufal at nibrahim.net.in Mon Apr 1 13:12:58 2013 From: noufal at nibrahim.net.in (Noufal Ibrahim) Date: Mon, 01 Apr 2013 16:42:58 +0530 Subject: [BangPypers] Evaluating Web Frameworks based on certain criteria In-Reply-To: (Abdul Muneer's message of "Mon, 1 Apr 2013 14:32:01 +0530") References: Message-ID: <8738vao66d.fsf@sanitarium.localdomain> Abdul Muneer writes: > Hi, > I need to decide on a python web-framework based on the below listed > criteria. > > 1. Ease of customization of bundled packages > 2. Ease of development > 3. Long term support of frameworks > 4. Learning curve > 5. Logging and monitoring > 6. Clustering > 7. Ease of deployment > 8. Testing: unit testing libraries > 9. DB management > 10. User management: e.g. should be possible to tie one user id to > multiple entities > 11. LDAP integration > > What would you recommend? Please share your experiences and insights > related to any of these points. Ignore the points in the list that appear > vague to you. > > The existing app is written in pylons 0.9 , but as we want to enhance and > add lot more features, we would like to rebuild it on a new framework > altogether. > > The current web app had too many dependencies and the new versions of > some of these libraries have conflicting requirements. Some other > libraries were long dead. So the choice is to rebuild entire stuff on > a framework where we will not end up in the same situation. Django has a track record. It's been around for a while and despite smaller, leaner upstarts has managed to hold it's own. It has a large community and contributed plugins. It bundles a lot of stuff with itself leading to reduced dependency problems (and less flexibility). You're not going to get "the best" framework that satisfies these criteria. Also, typical management won't care about these tech. details as long as the team making the recommendations can insulate them from them. [...] -- Cordially, Noufal http://nibrahim.net.in From harshjha2006 at gmail.com Mon Apr 1 13:18:22 2013 From: harshjha2006 at gmail.com (Harsh Jha) Date: Mon, 1 Apr 2013 16:48:22 +0530 Subject: [BangPypers] Error while building pygame project Message-ID: Hi All, I'm trying to build a pygame project as given in http://pygame.renpy.org/android-packaging.html. While running the build command as mentioned in 4th step(*android.py build mygame release install*), I'm getting - *C:\pgs4a-0.9.4>android.py build mygame release install Updating build files. Traceback (most recent call last): File "C:\pgs4a-0.9.4\android.py", line 66, in main() File "C:\pgs4a-0.9.4\android.py", line 54, in main build.build(iface, args.argument[0], args.argument[1:]) File "buildlib\build.py", line 301, in build build_core(iface, directory, commands) File "buildlib\build.py", line 221, in build_core subprocess.call([plat.android, "update", "project", "-p", '.', '-t', 'androi d-8', '-n', versioned_name]) File "C:\Python27\lib\subprocess.py", line 486, in call return Popen(*popenargs, **kwargs).wait() File "C:\Python27\lib\subprocess.py", line 672, in __init__ errread, errwrite) File "C:\Python27\lib\subprocess.py", line 882, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified * I don't understand the issue. Please help. Thanks -- Harsh Jha Senior Member Technical Staff, Oracle India Pvt. Ltd. From larryt at winfirst.com Mon Apr 1 21:04:46 2013 From: larryt at winfirst.com (larryt at winfirst.com) Date: Mon, 1 Apr 2013 12:04:46 -0700 (PDT) Subject: [BangPypers] Evaluating Web Frameworks based on certain criteria In-Reply-To: References: Message-ID: <20130401120446.CMH42195@ms1.mc.surewest.net> >Hi, >I need to decide on a python web-framework based on the below listed >criteria. > > 1. Ease of customization of bundled packages > 2. Ease of development > 3. Long term support of frameworks > 4. Learning curve > 5. Logging and monitoring > 6. Clustering > 7. Ease of deployment > 8. Testing: unit testing libraries > 9. DB management > 10. User management: e.g. should be possible to tie one user id to > multiple entities > 11. LDAP integration > >What would you recommend? Please share your experiences and insights >related to any of these points. Ignore the points in the list that appear >vague to you. > >The existing app is written in pylons 0.9 , but as we want to enhance and >add lot more features, we would like to rebuild it on a new framework >altogether. > >The current web app had too many dependencies and the new versions of some >of these libraries have conflicting requirements. Some other libraries were >long dead. So the choice is to rebuild entire stuff on a framework where we >will not end up in the same situation. There are probably three to look at in following the advice you've already received: Pyramid, Django and Flask. If you're a PC/Mac shop look first and harder at Django. Otherwise start with Flask and Pyramid. I use Flask because the ecosystem seems more manageable to me, but I'm sure that's just because of my previous experience, so yours may lead you to Pyramid, especially coming from pylons. -larry From abdulmuneer at gmail.com Tue Apr 2 10:02:49 2013 From: abdulmuneer at gmail.com (Abdul Muneer) Date: Tue, 2 Apr 2013 13:32:49 +0530 Subject: [BangPypers] Evaluating Web Frameworks based on certain criteria In-Reply-To: <20130401120446.CMH42195@ms1.mc.surewest.net> References: <20130401120446.CMH42195@ms1.mc.surewest.net> Message-ID: Thank you all, especially larry. Pyramid and Django are what I have looked at. I have worked with Django and all pylons stuff along with SQLA was initially cumbersome. I would have really loved to go with Django as it is 'easy', but there are reasons why Pyramid is built the way it is and I wanted to consider those factors too. I appreciate SQLA very much now, although I haven't encountered a scenario where I had been at a loss if I didn't use it. I am looking forward to experiences from people which led them towards or away from any framework. Did anyone hit the wall by using Django ORM? Or did anyone find the SQLA too heavy and needless? I certainly hit the wall with old pylons, or more precisely with the plugins for pylons. All those deprecated dependencies make the upgrade or maintenance extremely difficult and unreliable. Regards, Abdul Muneer -- Follow me on Twitter: @abdulmuneer On Tue, Apr 2, 2013 at 12:34 AM, wrote: > > >Hi, > >I need to decide on a python web-framework based on the below listed > >criteria. > > > > 1. Ease of customization of bundled packages > > 2. Ease of development > > 3. Long term support of frameworks > > 4. Learning curve > > 5. Logging and monitoring > > 6. Clustering > > 7. Ease of deployment > > 8. Testing: unit testing libraries > > 9. DB management > > 10. User management: e.g. should be possible to tie one user id to > > multiple entities > > 11. LDAP integration > > > >What would you recommend? Please share your experiences and insights > >related to any of these points. Ignore the points in the list that appear > >vague to you. > > > >The existing app is written in pylons 0.9 , but as we want to enhance and > >add lot more features, we would like to rebuild it on a new framework > >altogether. > > > >The current web app had too many dependencies and the new versions of some > >of these libraries have conflicting requirements. Some other libraries > were > >long dead. So the choice is to rebuild entire stuff on a framework where > we > >will not end up in the same situation. > > There are probably three to look at in following the advice you've already > received: Pyramid, Django and Flask. If you're a PC/Mac shop look first > and harder at Django. Otherwise start with Flask and Pyramid. I use Flask > because the ecosystem seems more manageable to me, but I'm sure that's just > because of my previous experience, so yours may lead you to Pyramid, > especially coming from pylons. > > -larry > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From gaurav.tula at gmail.com Tue Apr 2 11:08:22 2013 From: gaurav.tula at gmail.com (Gaurav Malhotra) Date: Tue, 2 Apr 2013 14:38:22 +0530 Subject: [BangPypers] Beginner Help Message-ID: Hi everyone, Below is the code (with output) which can be found in the Python Official Documentation: >>> # Measure some strings: ... words = ['cat', 'window', 'defenestrate'] >>> for w in words: ... print w, len(w) ... cat 3 window 6 defenestrate 12 # The Problem is: When "w" is not defined how python interpreter can evaluate the output?? Please Explain the lines where "w" is occurred. if i would replace "w" with any other variable, it will show the same output. I want to know "What is happening in the back (i mean how interpreter is handling it)" ?? Thanks & Regards, Gaurav Malhotra -- *Regards Gaurav Malhotra +91-9410562301* From manishreddytirumala at gmail.com Tue Apr 2 11:13:47 2013 From: manishreddytirumala at gmail.com (Manish Reddy) Date: Tue, 2 Apr 2013 14:43:47 +0530 Subject: [BangPypers] Beginner Help In-Reply-To: References: Message-ID: w is like a variable for python. You can use any variable instead of w and get the same output. Your code is telling python to execute something for each item in the list. So, w takes 'cat', 'window', 'defenestrate' each time and executes the code for each of them. Hope I helped. On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra wrote: > Hi everyone, > > Below is the code (with output) which can be found in the Python Official > Documentation: > > >>> # Measure some strings: > > ... words = ['cat', 'window', 'defenestrate'] > > >>> for w in words: > > ... print w, len(w) > > ... > > cat 3 > > window 6 > > defenestrate 12 > > # The Problem is: > When "w" is not defined how python interpreter can evaluate the output?? > > Please Explain the lines where "w" is occurred. if i would replace "w" with > any other variable, it will show the same output. > > I want to know "What is happening in the back (i mean how interpreter is > handling it)" ?? > > Thanks & Regards, > Gaurav Malhotra > > -- > *Regards > Gaurav Malhotra > +91-9410562301* > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Manish Reddy www.LurnQ.com From venkat83 at gmail.com Tue Apr 2 11:14:39 2013 From: venkat83 at gmail.com (Venkatraman S) Date: Tue, 2 Apr 2013 14:44:39 +0530 Subject: [BangPypers] Beginner Help In-Reply-To: References: Message-ID: Before someone pops in and says, let me say it.... 'List Comprehensions'.....ah! now i can RIP :) On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra wrote: > Hi everyone, > > Below is the code (with output) which can be found in the Python Official > Documentation: > > >>> # Measure some strings: > > ... words = ['cat', 'window', 'defenestrate'] > > >>> for w in words: > > ... print w, len(w) > > ... > > cat 3 > > window 6 > > defenestrate 12 > > # The Problem is: > When "w" is not defined how python interpreter can evaluate the output?? > > Please Explain the lines where "w" is occurred. if i would replace "w" with > any other variable, it will show the same output. > > I want to know "What is happening in the back (i mean how interpreter is > handling it)" ?? > > Thanks & Regards, > Gaurav Malhotra > > -- > *Regards > Gaurav Malhotra > +91-9410562301* > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From satishsagar83 at gmail.com Tue Apr 2 11:14:57 2013 From: satishsagar83 at gmail.com (L Radhakrishna Rao) Date: Tue, 2 Apr 2013 14:44:57 +0530 Subject: [BangPypers] Beginner Help In-Reply-To: References: Message-ID: for w in words: On Tue, Apr 2, 2013 at 2:43 PM, Manish Reddy wrote: > w is like a variable for python. You can use any variable instead of w and > get the same output. > > Your code is telling python to execute something for each item in the list. > So, w takes 'cat', 'window', 'defenestrate' each time and executes the code > for each of them. > > Hope I helped. > > > On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra >wrote: > > > Hi everyone, > > > > Below is the code (with output) which can be found in the Python Official > > Documentation: > > > > >>> # Measure some strings: > > > > ... words = ['cat', 'window', 'defenestrate'] > > > > >>> for w in words: > > > > ... print w, len(w) > > > > ... > > > > cat 3 > > > > window 6 > > > > defenestrate 12 > > > > # The Problem is: > > When "w" is not defined how python interpreter can evaluate the output?? > > > > Please Explain the lines where "w" is occurred. if i would replace "w" > with > > any other variable, it will show the same output. > > > > I want to know "What is happening in the back (i mean how interpreter is > > handling it)" ?? > > > > Thanks & Regards, > > Gaurav Malhotra > > > > -- > > *Regards > > Gaurav Malhotra > > +91-9410562301* > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Manish Reddy > www.LurnQ.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From satishsagar83 at gmail.com Tue Apr 2 11:16:07 2013 From: satishsagar83 at gmail.com (L Radhakrishna Rao) Date: Tue, 2 Apr 2013 14:46:07 +0530 Subject: [BangPypers] Beginner Help In-Reply-To: References: Message-ID: for w in words: print w, len(w) this is where w is getting initialized. Even if you will use 'i' there, output will be same. On Tue, Apr 2, 2013 at 2:43 PM, Manish Reddy wrote: > w is like a variable for python. You can use any variable instead of w and > get the same output. > > Your code is telling python to execute something for each item in the list. > So, w takes 'cat', 'window', 'defenestrate' each time and executes the code > for each of them. > > Hope I helped. > > > On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra >wrote: > > > Hi everyone, > > > > Below is the code (with output) which can be found in the Python Official > > Documentation: > > > > >>> # Measure some strings: > > > > ... words = ['cat', 'window', 'defenestrate'] > > > > >>> for w in words: > > > > ... print w, len(w) > > > > ... > > > > cat 3 > > > > window 6 > > > > defenestrate 12 > > > > # The Problem is: > > When "w" is not defined how python interpreter can evaluate the output?? > > > > Please Explain the lines where "w" is occurred. if i would replace "w" > with > > any other variable, it will show the same output. > > > > I want to know "What is happening in the back (i mean how interpreter is > > handling it)" ?? > > > > Thanks & Regards, > > Gaurav Malhotra > > > > -- > > *Regards > > Gaurav Malhotra > > +91-9410562301* > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Manish Reddy > www.LurnQ.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From abhat38 at gmail.com Tue Apr 2 11:21:25 2013 From: abhat38 at gmail.com (anirudh bhat) Date: Tue, 2 Apr 2013 14:51:25 +0530 Subject: [BangPypers] Beginner Help In-Reply-To: References: Message-ID: Hi, Python is dynamically typed language.You dont initialize variables with data types as you do it in c. On Tue, Apr 2, 2013 at 2:46 PM, L Radhakrishna Rao wrote: > for w in words: > print w, len(w) > > this is where w is getting initialized. > > Even if you will use 'i' there, output will be same. > > > On Tue, Apr 2, 2013 at 2:43 PM, Manish Reddy > wrote: > > > w is like a variable for python. You can use any variable instead of w > and > > get the same output. > > > > Your code is telling python to execute something for each item in the > list. > > So, w takes 'cat', 'window', 'defenestrate' each time and executes the > code > > for each of them. > > > > Hope I helped. > > > > > > On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra > >wrote: > > > > > Hi everyone, > > > > > > Below is the code (with output) which can be found in the Python > Official > > > Documentation: > > > > > > >>> # Measure some strings: > > > > > > ... words = ['cat', 'window', 'defenestrate'] > > > > > > >>> for w in words: > > > > > > ... print w, len(w) > > > > > > ... > > > > > > cat 3 > > > > > > window 6 > > > > > > defenestrate 12 > > > > > > # The Problem is: > > > When "w" is not defined how python interpreter can evaluate the > output?? > > > > > > Please Explain the lines where "w" is occurred. if i would replace "w" > > with > > > any other variable, it will show the same output. > > > > > > I want to know "What is happening in the back (i mean how interpreter > is > > > handling it)" ?? > > > > > > Thanks & Regards, > > > Gaurav Malhotra > > > > > > -- > > > *Regards > > > Gaurav Malhotra > > > +91-9410562301* > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > Manish Reddy > > www.LurnQ.com > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From gaurav.tula at gmail.com Tue Apr 2 11:38:05 2013 From: gaurav.tula at gmail.com (Gaurav Malhotra) Date: Tue, 2 Apr 2013 15:08:05 +0530 Subject: [BangPypers] BangPypers Digest, Vol 68, Issue 3 In-Reply-To: References: Message-ID: Thanks all, So Python is smarter as I expected. As I am exploring it, I am more excited about it. On Tue, Apr 2, 2013 at 2:51 PM, wrote: > Send BangPypers mailing list submissions to > bangpypers at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-request at python.org > > You can reach the person managing the list at > bangpypers-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. Beginner Help (Gaurav Malhotra) > 2. Re: Beginner Help (Manish Reddy) > 3. Re: Beginner Help (Venkatraman S) > 4. Re: Beginner Help (L Radhakrishna Rao) > 5. Re: Beginner Help (L Radhakrishna Rao) > 6. Re: Beginner Help (anirudh bhat) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 2 Apr 2013 14:38:22 +0530 > From: Gaurav Malhotra > To: bangpypers at python.org > Subject: [BangPypers] Beginner Help > Message-ID: > < > CAOQBMqweuGb+eZFOMFZbG49rBJpAZLTS019tqMoExYRTm58ncg at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi everyone, > > Below is the code (with output) which can be found in the Python Official > Documentation: > > >>> # Measure some strings: > > ... words = ['cat', 'window', 'defenestrate'] > > >>> for w in words: > > ... print w, len(w) > > ... > > cat 3 > > window 6 > > defenestrate 12 > > # The Problem is: > When "w" is not defined how python interpreter can evaluate the output?? > > Please Explain the lines where "w" is occurred. if i would replace "w" with > any other variable, it will show the same output. > > I want to know "What is happening in the back (i mean how interpreter is > handling it)" ?? > > Thanks & Regards, > Gaurav Malhotra > > -- > *Regards > Gaurav Malhotra > +91-9410562301* > > > ------------------------------ > > Message: 2 > Date: Tue, 2 Apr 2013 14:43:47 +0530 > From: Manish Reddy > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Beginner Help > Message-ID: > X+MGtzCVTw at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > w is like a variable for python. You can use any variable instead of w and > get the same output. > > Your code is telling python to execute something for each item in the list. > So, w takes 'cat', 'window', 'defenestrate' each time and executes the code > for each of them. > > Hope I helped. > > > On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra >wrote: > > > Hi everyone, > > > > Below is the code (with output) which can be found in the Python Official > > Documentation: > > > > >>> # Measure some strings: > > > > ... words = ['cat', 'window', 'defenestrate'] > > > > >>> for w in words: > > > > ... print w, len(w) > > > > ... > > > > cat 3 > > > > window 6 > > > > defenestrate 12 > > > > # The Problem is: > > When "w" is not defined how python interpreter can evaluate the output?? > > > > Please Explain the lines where "w" is occurred. if i would replace "w" > with > > any other variable, it will show the same output. > > > > I want to know "What is happening in the back (i mean how interpreter is > > handling it)" ?? > > > > Thanks & Regards, > > Gaurav Malhotra > > > > -- > > *Regards > > Gaurav Malhotra > > +91-9410562301* > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Manish Reddy > www.LurnQ.com > > > ------------------------------ > > Message: 3 > Date: Tue, 2 Apr 2013 14:44:39 +0530 > From: Venkatraman S > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Beginner Help > Message-ID: > < > CAN7tdFQ92_LrFNiAezgTsWXBA-ULLn62DVoPHnPSYzECcBmefA at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Before someone pops in and says, let me say it.... 'List > Comprehensions'.....ah! now i can RIP :) > > On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra >wrote: > > > Hi everyone, > > > > Below is the code (with output) which can be found in the Python Official > > Documentation: > > > > >>> # Measure some strings: > > > > ... words = ['cat', 'window', 'defenestrate'] > > > > >>> for w in words: > > > > ... print w, len(w) > > > > ... > > > > cat 3 > > > > window 6 > > > > defenestrate 12 > > > > # The Problem is: > > When "w" is not defined how python interpreter can evaluate the output?? > > > > Please Explain the lines where "w" is occurred. if i would replace "w" > with > > any other variable, it will show the same output. > > > > I want to know "What is happening in the back (i mean how interpreter is > > handling it)" ?? > > > > Thanks & Regards, > > Gaurav Malhotra > > > > -- > > *Regards > > Gaurav Malhotra > > +91-9410562301* > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > ------------------------------ > > Message: 4 > Date: Tue, 2 Apr 2013 14:44:57 +0530 > From: L Radhakrishna Rao > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Beginner Help > Message-ID: > < > CAAZd-jRMwe8pRrQrkx-XH-tJf+NhJTAqfWqy8RsWCs1MSJMrOQ at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > for w in words: > > > > On Tue, Apr 2, 2013 at 2:43 PM, Manish Reddy > wrote: > > > w is like a variable for python. You can use any variable instead of w > and > > get the same output. > > > > Your code is telling python to execute something for each item in the > list. > > So, w takes 'cat', 'window', 'defenestrate' each time and executes the > code > > for each of them. > > > > Hope I helped. > > > > > > On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra > >wrote: > > > > > Hi everyone, > > > > > > Below is the code (with output) which can be found in the Python > Official > > > Documentation: > > > > > > >>> # Measure some strings: > > > > > > ... words = ['cat', 'window', 'defenestrate'] > > > > > > >>> for w in words: > > > > > > ... print w, len(w) > > > > > > ... > > > > > > cat 3 > > > > > > window 6 > > > > > > defenestrate 12 > > > > > > # The Problem is: > > > When "w" is not defined how python interpreter can evaluate the > output?? > > > > > > Please Explain the lines where "w" is occurred. if i would replace "w" > > with > > > any other variable, it will show the same output. > > > > > > I want to know "What is happening in the back (i mean how interpreter > is > > > handling it)" ?? > > > > > > Thanks & Regards, > > > Gaurav Malhotra > > > > > > -- > > > *Regards > > > Gaurav Malhotra > > > +91-9410562301* > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > Manish Reddy > > www.LurnQ.com > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > ------------------------------ > > Message: 5 > Date: Tue, 2 Apr 2013 14:46:07 +0530 > From: L Radhakrishna Rao > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Beginner Help > Message-ID: > < > CAAZd-jTifqZSv4F1Uy2p1KSjqgDXt5it25xZQ7jX3+j2jNrFow at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > for w in words: > print w, len(w) > > this is where w is getting initialized. > > Even if you will use 'i' there, output will be same. > > > On Tue, Apr 2, 2013 at 2:43 PM, Manish Reddy > wrote: > > > w is like a variable for python. You can use any variable instead of w > and > > get the same output. > > > > Your code is telling python to execute something for each item in the > list. > > So, w takes 'cat', 'window', 'defenestrate' each time and executes the > code > > for each of them. > > > > Hope I helped. > > > > > > On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra > >wrote: > > > > > Hi everyone, > > > > > > Below is the code (with output) which can be found in the Python > Official > > > Documentation: > > > > > > >>> # Measure some strings: > > > > > > ... words = ['cat', 'window', 'defenestrate'] > > > > > > >>> for w in words: > > > > > > ... print w, len(w) > > > > > > ... > > > > > > cat 3 > > > > > > window 6 > > > > > > defenestrate 12 > > > > > > # The Problem is: > > > When "w" is not defined how python interpreter can evaluate the > output?? > > > > > > Please Explain the lines where "w" is occurred. if i would replace "w" > > with > > > any other variable, it will show the same output. > > > > > > I want to know "What is happening in the back (i mean how interpreter > is > > > handling it)" ?? > > > > > > Thanks & Regards, > > > Gaurav Malhotra > > > > > > -- > > > *Regards > > > Gaurav Malhotra > > > +91-9410562301* > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > Manish Reddy > > www.LurnQ.com > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > ------------------------------ > > Message: 6 > Date: Tue, 2 Apr 2013 14:51:25 +0530 > From: anirudh bhat > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Beginner Help > Message-ID: > < > CAHKD0sEU3Qo7ii2Hmgh2cCuea7+GqDzfUQfz3BkEm3Q+oFS5og at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi, > Python is dynamically typed language.You dont initialize variables with > data types as you do it in c. > > > On Tue, Apr 2, 2013 at 2:46 PM, L Radhakrishna Rao > wrote: > > > for w in words: > > print w, len(w) > > > > this is where w is getting initialized. > > > > Even if you will use 'i' there, output will be same. > > > > > > On Tue, Apr 2, 2013 at 2:43 PM, Manish Reddy > > wrote: > > > > > w is like a variable for python. You can use any variable instead of w > > and > > > get the same output. > > > > > > Your code is telling python to execute something for each item in the > > list. > > > So, w takes 'cat', 'window', 'defenestrate' each time and executes the > > code > > > for each of them. > > > > > > Hope I helped. > > > > > > > > > On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra > > >wrote: > > > > > > > Hi everyone, > > > > > > > > Below is the code (with output) which can be found in the Python > > Official > > > > Documentation: > > > > > > > > >>> # Measure some strings: > > > > > > > > ... words = ['cat', 'window', 'defenestrate'] > > > > > > > > >>> for w in words: > > > > > > > > ... print w, len(w) > > > > > > > > ... > > > > > > > > cat 3 > > > > > > > > window 6 > > > > > > > > defenestrate 12 > > > > > > > > # The Problem is: > > > > When "w" is not defined how python interpreter can evaluate the > > output?? > > > > > > > > Please Explain the lines where "w" is occurred. if i would replace > "w" > > > with > > > > any other variable, it will show the same output. > > > > > > > > I want to know "What is happening in the back (i mean how interpreter > > is > > > > handling it)" ?? > > > > > > > > Thanks & Regards, > > > > Gaurav Malhotra > > > > > > > > -- > > > > *Regards > > > > Gaurav Malhotra > > > > +91-9410562301* > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > -- > > > Manish Reddy > > > www.LurnQ.com > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > ------------------------------ > > End of BangPypers Digest, Vol 68, Issue 3 > ***************************************** > -- *Regards Gaurav Malhotra +91-9410562301* From rishi at turtleyogi.com Tue Apr 2 11:41:09 2013 From: rishi at turtleyogi.com (Hrishikesh Kulkarni) Date: Tue, 2 Apr 2013 15:11:09 +0530 Subject: [BangPypers] Beginner Help In-Reply-To: References: Message-ID: >> # The Problem is: >> When "w" is not defined how python interpreter can evaluate the output?? When you say "defined" you are comparing it to a programming language you have already know. I am guessing C or C++. C/C++ supports the concept of variable declaration and definition. Variable name is actually attaching a label or tag to a memory location where the real value is stored (for simplicity ignore pointers for now). in C, the pseudo code would have been: for (int i = 0; i< numberofwords ; i++) { printf("%s", words[i]); } here "i" is the index in the array "words", which means you could use "i" to step into the memory owned by array "words". In Python, the same thing is in play except that python allocates the label or tag on the go. "w" is internally pointing to words[index]. The index is auto generated. The "for" is auto incrementing index for you. "for" also ensures "w" is available within its scope. >>> for w in words: ... print w, len(w) Quick analogy: Variable names in C/C++ vs Python is like sticking post-its along the memory location (in RAM). C/C++ makes you buy the post-its and makes you figure out where to stick the post-its and even lets your make mistakes. Python buys it for you and sticks it for you. You just have to pick the color of the post-it and remember it. Suggestion: Another reason why it is so important to understand pointers C. Once you get it, you can always figure out the internals of other programming languages. (especially those which are built on top of C) regards, Rishi On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra wrote: > Hi everyone, > > Below is the code (with output) which can be found in the Python Official > Documentation: > > >>> # Measure some strings: > > ... words = ['cat', 'window', 'defenestrate'] > > >>> for w in words: > > ... print w, len(w) > > ... > > cat 3 > > window 6 > > defenestrate 12 > > # The Problem is: > When "w" is not defined how python interpreter can evaluate the output?? > > Please Explain the lines where "w" is occurred. if i would replace "w" with > any other variable, it will show the same output. > > I want to know "What is happening in the back (i mean how interpreter is > handling it)" ?? > > Thanks & Regards, > Gaurav Malhotra > > -- > *Regards > Gaurav Malhotra > +91-9410562301* > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From gopalakrishnan.subramani at gmail.com Tue Apr 2 11:54:42 2013 From: gopalakrishnan.subramani at gmail.com (Gopalakrishnan Subramani) Date: Tue, 2 Apr 2013 15:24:42 +0530 Subject: [BangPypers] Evaluating Web Frameworks based on certain criteria In-Reply-To: References: <20130401120446.CMH42195@ms1.mc.surewest.net> Message-ID: I was using Pylons for nearly 3 years and moved to Flask instead of Django. The decision is based on my 'opinion' on opinionated frameworks. Pylons and Pyramid is completely running DIY philosophy, it was not really fun for me (personal preference matter, no argument please). I need to look around too many things to fix the issues or add new auth system or framework to it. I certainly liked Flask in that manner. It is simple and easy. I code Python from 11:00 PM to 3:00 AM after my day job, so I tend to go simple one than the Pyramid. I use SqlAlchemy, Jinja2 along with Flask. With Pylons, I have used Mako and Sql Alchemy. On Tue, Apr 2, 2013 at 1:32 PM, Abdul Muneer wrote: > Thank you all, especially larry. Pyramid and Django are what I have looked > at. I have worked with Django and all pylons stuff along with SQLA was > initially cumbersome. I would have really loved to go with Django as it is > 'easy', but there are reasons why Pyramid is built the way it is and I > wanted to consider those factors too. I appreciate SQLA very much now, > although I haven't encountered a scenario where I had been at a loss if I > didn't use it. > > I am looking forward to experiences from people which led them towards or > away from any framework. Did anyone hit the wall by using Django ORM? Or > did anyone find the SQLA too heavy and needless? I certainly hit the wall > with old pylons, or more precisely with the plugins for pylons. All those > deprecated dependencies make the upgrade or maintenance extremely difficult > and unreliable. > > Regards, > Abdul Muneer > > -- > Follow me on Twitter: @abdulmuneer > > > On Tue, Apr 2, 2013 at 12:34 AM, wrote: > > > > > >Hi, > > >I need to decide on a python web-framework based on the below listed > > >criteria. > > > > > > 1. Ease of customization of bundled packages > > > 2. Ease of development > > > 3. Long term support of frameworks > > > 4. Learning curve > > > 5. Logging and monitoring > > > 6. Clustering > > > 7. Ease of deployment > > > 8. Testing: unit testing libraries > > > 9. DB management > > > 10. User management: e.g. should be possible to tie one user id to > > > multiple entities > > > 11. LDAP integration > > > > > >What would you recommend? Please share your experiences and insights > > >related to any of these points. Ignore the points in the list that > appear > > >vague to you. > > > > > >The existing app is written in pylons 0.9 , but as we want to enhance > and > > >add lot more features, we would like to rebuild it on a new framework > > >altogether. > > > > > >The current web app had too many dependencies and the new versions of > some > > >of these libraries have conflicting requirements. Some other libraries > > were > > >long dead. So the choice is to rebuild entire stuff on a framework where > > we > > >will not end up in the same situation. > > > > There are probably three to look at in following the advice you've > already > > received: Pyramid, Django and Flask. If you're a PC/Mac shop look first > > and harder at Django. Otherwise start with Flask and Pyramid. I use > Flask > > because the ecosystem seems more manageable to me, but I'm sure that's > just > > because of my previous experience, so yours may lead you to Pyramid, > > especially coming from pylons. > > > > -larry > > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From venkat83 at gmail.com Wed Apr 3 02:28:35 2013 From: venkat83 at gmail.com (Venkatraman S) Date: Wed, 3 Apr 2013 05:58:35 +0530 Subject: [BangPypers] Fwd: First ever DjangoCon AU - precedes Pycon-au in Hobart in early July In-Reply-To: <515ABB8C.7030305@dewhirst.com.au> References: <515ABB8C.7030305@dewhirst.com.au> Message-ID: FYI ---------- Forwarded message ---------- From: Mike Dewhirst Date: Tue, Apr 2, 2013 at 4:35 PM Subject: First ever DjangoCon AU - precedes Pycon-au in Hobart in early July To: django-users at googlegroups.com All Just forwarding the Pycon-au notice for obvious reasons ... "This year we're welcoming the Python on OpenStack day, and the first ever DjangoCon AU. These will happen on Friday July 5, just before the CodeWars Tournament, where we'll pit teams of developers against each other on the big screen. After the conference are the PyCon Sprints on July 8 and 9 offering a valuable opportunity to shape the future of Python in a face-to-face setting." http://2013.pycon-au.org/**about/pycon_australia On 2/04/2013 11:18am, Chris Neugebauer wrote: > This week marks your last opportunity to submit proposals to present > at PyCon Australia 2013, the national conference for the Python > programming community, to be held on July 6 and 7 in Hobart, Tasmania. > > The deadline for proposal submission is Friday April 5, 2013, and more > information can be found at http://pycon-au.org/cfp > > PyCon Australia is an excellent opportunity to share experience and > knowledge with like-minded Python developers from all walks of life -- > we attract professional developers from industry, government, science > and education, along with enthusiast and student developers. > Presentations can be targeted at all skill levels, on any topic > related to Python programming. > > This year, we're welcoming DjangoCon AU under the PyCon Australia > umbrella, it'll run on Friday 5 July, before the main conference. > Every Django-related proposal we receive in the PyCon Australia CFP > will also be considered as part of the DjangoCon AU programme. > > Our OpenStack Miniconf is running a separate CFP, and first-round > submissions close on April 9. Details can be found at the OpenStack > Miniconf CFP site (http://tinyurl.com/pyconau-**2013-openstack > ). > > If you're a first-time Python developer, don't be afraid to submit a > presentation -- we're a community-driven conference, and we have a > focus on building the next generation of Python programmers. > > We can't wait to see your proposals. > > == About PyCon Australia == > > PyCon Australia is the national conference for the Python Programming > Community. The fourth PyCon Australia will be held on July 5--7, 2013 > in Hobart, Tasmania, bringing together professional, student and > enthusiast developers with a love for developing with Python. PyCon > Australia informs the country?s Python developers with presentations, > tutorials and panel sessions by experts and core developers of Python, > as well as the libraries and frameworks that they rely on. > > To find out more about PyCon Australia 2013, visit our website at > http://pycon-au.org or e-mail us at contact at pycon-au.org. > > PyCon Australia is presented by Linux Australia (www.linux.org.au) and > acknowledges the support of our Platinum sponsor: Australian Computer > Society (Tasmanian Branch) (www.acs.org.au); and our Gold Sponsor, > Google Australia (www.google.com.au). For full details of our > sponsors, see our website. > > > -- > -- > --Christopher Neugebauer > Conference Coordinator and Sponsor Liaison > > PyCon Australia: Hobart 2013 -- http://pycon-au.org -- @pyconau > 5?7 July 2013; CFP now open: closes 5 April -- http://pycon-au.org/cfp > > Jabber: chrisjrn at gmail.com -- IRC: chrisjrn on irc.freenode.net -- > WWW: http://chris.neugebauer.id.au -- Twitter/Identi.ca: @chrisjrn > > ______________________________**_________________ > python-au maillist - python-au at starship.python.net > http://starship.python.net/**mailman/listinfo/python-au > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@**googlegroups.com . To post to this group, send email to django-users at googlegroups.com. Visit this group at http://groups.google.com/**group/django-users?hl=en . For more options, visit https://groups.google.com/**groups/opt_out . From newtonhanes at hushmail.com Wed Apr 3 00:58:55 2013 From: newtonhanes at hushmail.com (newtonhanes at hushmail.com) Date: Tue, 02 Apr 2013 18:58:55 -0400 Subject: [BangPypers] Biggest Fake Conference in Computer Science In-Reply-To: Message-ID: <20130402225855.70A3110E2D6@smtp.hushmail.com> We are researchers from different parts of the world and conducted a study on the world?s biggest bogus computer science conference WORLDCOMP ( http://sites.google.com/site/worlddump1 ) organized by Prof. Hamid Arabnia from University of Georgia, USA. We submitted a fake paper to WORLDCOMP 2011 and again (the same paper with a modified title) to WORLDCOMP 2012. This paper had numerous fundamental mistakes. Sample statements from that paper include: (1). Binary logic is fuzzy logic and vice versa (2). Pascal developed fuzzy logic (3). Object oriented languages do not exhibit any polymorphism or inheritance (4). TCP and IP are synonyms and are part of OSI model (5). Distributed systems deal with only one computer (6). Laptop is an example for a super computer (7). Operating system is an example for computer hardware Also, our paper did not express any conceptual meaning. However, it was accepted both the times without any modifications (and without any reviews) and we were invited to submit the final paper and a payment of $500+ fee to present the paper. We decided to use the fee for better purposes than making Prof. Hamid Arabnia (Chairman of WORLDCOMP) rich. After that, we received few reminders from WORLDCOMP to pay the fee but we never responded. We MUST say that you should look at the above website if you have any thoughts to submit a paper to WORLDCOMP. DBLP and other indexing agencies have stopped indexing WORLDCOMP?s proceedings since 2011 due to its fakeness. See http://www.informatik.uni-trier.de/~ley/db/conf/icai/index.html for of one of the conferences of WORLDCOMP and notice that there is no listing after 2010. See http://sites.google.com/site/dumpconf for comments from well-known researchers about WORLDCOMP. The status of your WORLDCOMP papers can be changed from ?scientific? to ?other? (i.e., junk or non-technical) at any time. See the comments http://www.mail-archive.com/tccc at lists.cs.columbia.edu/msg05168.html of a respected researcher on this. Better not to have a paper than having it in WORLDCOMP and spoil the resume and peace of mind forever! Our study revealed that WORLDCOMP is a money making business, using University of Georgia mask, for Prof. Hamid Arabnia. He is throwing out a small chunk of that money (around 20 dollars per paper published in WORLDCOMP?s proceedings) to his puppet (Mr. Ashu Solo or A.M.G. Solo) who publicizes WORLDCOMP and also defends it at various forums, using fake/anonymous names. The puppet uses fake names and defames other conferences to divert traffic to WORLDCOMP. That is, the puppet does all his best to get a maximum number of papers published at WORLDCOMP to get more money into his (and Prof. Hamid Arabnia?s) pockets. Monte Carlo Resort (the venue of WORLDCOMP until 2012) has refused to provide the venue for WORLDCOMP?13 because of the fears of their image being tarnished due to WORLDCOMP?s fraudulent activities. WORLDCOMP?13 will be held at a different resort. WORLDCOMP will not be held after 2013. The paper submission deadline for WORLDCOMP?13 was March 18 and it is extended to April 6 (it will be extended many times, as usual) but still there are no committee members, no reviewers, and there is no conference Chairman. The only contact details available on WORLDCOMP?s website is just an email address! What bothers us the most is that Prof. Hamid Arabnia never posted an apology for the damage he has done to the research community. He is still trying to defend WORLDCOMP. Let us make a direct request to him: publish all reviews for all the papers (after blocking identifiable details) since 2000 conference. Reveal the names and affiliations of all the reviewers (for each year) and how many papers each reviewer had reviewed on average. We also request him to look at the Open Challenge at http://sites.google.com/site/dumpconf Sorry for posting to multiple lists. Spreading the word is the only way to stop this bogus conference. Please forward this message to other mailing lists and people. We are shocked with Prof. Hamid Arabnia and his puppet?s activities http://worldcomp-fake-bogus.blogspot.com Search Google using the keyword worldcomp fake for additional links. From abpillai at gmail.com Wed Apr 3 14:30:32 2013 From: abpillai at gmail.com (Anand B Pillai) Date: Wed, 3 Apr 2013 18:00:32 +0530 Subject: [BangPypers] Biggest Fake Conference in Computer Science In-Reply-To: <20130402225855.70A3110E2D6@smtp.hushmail.com> References: <20130402225855.70A3110E2D6@smtp.hushmail.com> Message-ID: Hi, Thank you for educating the list. Though this is not exactly relevant to our subject matter actually. Regards, --Anand On Wed, Apr 3, 2013 at 4:28 AM, wrote: > We are researchers from different parts of the world and conducted a study > on > the world?s biggest bogus computer science conference WORLDCOMP > ( http://sites.google.com/site/worlddump1 ) organized by Prof. Hamid > Arabnia > from University of Georgia, USA. > > > We submitted a fake paper to WORLDCOMP 2011 and again (the > same paper with a modified title) to WORLDCOMP 2012. This paper > had numerous fundamental mistakes. Sample statements from > that paper include: > > (1). Binary logic is fuzzy logic and vice versa > (2). Pascal developed fuzzy logic > (3). Object oriented languages do not exhibit any polymorphism or > inheritance > (4). TCP and IP are synonyms and are part of OSI model > (5). Distributed systems deal with only one computer > (6). Laptop is an example for a super computer > (7). Operating system is an example for computer hardware > > > Also, our paper did not express any conceptual meaning. However, it > was accepted both the times without any modifications (and without > any reviews) and we were invited to submit the final paper and a > payment of $500+ fee to present the paper. We decided to use the > fee for better purposes than making Prof. Hamid Arabnia (Chairman > of WORLDCOMP) rich. After that, we received few reminders from > WORLDCOMP to pay the fee but we never responded. > > > We MUST say that you should look at the above website if you have any > thoughts > to submit a paper to WORLDCOMP. DBLP and other indexing agencies > have stopped indexing WORLDCOMP?s proceedings since 2011 due to its > fakeness. > See http://www.informatik.uni-trier.de/~ley/db/conf/icai/index.html for > of one of the > conferences of WORLDCOMP and notice that there is no listing after 2010. > See > http://sites.google.com/site/dumpconf for comments from well-known > researchers > about WORLDCOMP. > > > The status of your WORLDCOMP papers can be changed from ?scientific? > to ?other? (i.e., junk or non-technical) at any time. See the comments > http://www.mail-archive.com/tccc at lists.cs.columbia.edu/msg05168.html > of a respected researcher on this. Better not to have a paper than > having it in WORLDCOMP and spoil the resume and peace of mind forever! > > > Our study revealed that WORLDCOMP is a money making business, > using University of Georgia mask, for Prof. Hamid Arabnia. He is throwing > out a small chunk of that money (around 20 dollars per paper published > in WORLDCOMP?s proceedings) to his puppet (Mr. Ashu Solo or A.M.G. Solo) > who publicizes WORLDCOMP and also defends it at various forums, using > fake/anonymous names. The puppet uses fake names and defames other > conferences > to divert traffic to WORLDCOMP. That is, the puppet does all his best > to get a maximum number of papers published at WORLDCOMP to get more > money into his (and Prof. Hamid Arabnia?s) pockets. > > > Monte Carlo Resort (the venue of WORLDCOMP until 2012) has refused to > provide the venue for WORLDCOMP?13 because of the fears of their image > being tarnished due to WORLDCOMP?s fraudulent activities. WORLDCOMP?13 > will be held at a different resort. > > > WORLDCOMP will not be held after 2013. > > > The paper submission deadline for WORLDCOMP?13 was March 18 and it is > extended to April 6 (it will be extended many times, as usual) but > still there are no committee members, no reviewers, and there is no > conference Chairman. The only contact details available on WORLDCOMP?s > website is just an email address! > > > What bothers us the most is that Prof. Hamid Arabnia never posted an > apology for the damage he has done to the research community. He is still > trying to defend WORLDCOMP. Let us make a direct request to him: publish > all reviews for all the papers (after blocking identifiable details) since > 2000 conference. Reveal the names and affiliations of all the reviewers > (for each year) and how many papers each reviewer had reviewed on average. > We also request him to look at the Open Challenge at > http://sites.google.com/site/dumpconf > > > Sorry for posting to multiple lists. Spreading the word is the only way to > stop > this bogus conference. Please forward this message to other mailing lists > and people. > > > We are shocked with Prof. Hamid Arabnia and his puppet?s activities > http://worldcomp-fake-bogus.blogspot.com Search Google using the > keyword worldcomp fake for additional links. > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From satishsagar83 at gmail.com Wed Apr 3 16:12:26 2013 From: satishsagar83 at gmail.com (L Radhakrishna Rao) Date: Wed, 3 Apr 2013 19:42:26 +0530 Subject: [BangPypers] Biggest Fake Conference in Computer Science In-Reply-To: References: <20130402225855.70A3110E2D6@smtp.hushmail.com> Message-ID: I am shocked that University of Georgia have these sort of Professor. It is considered as one of the best university in USA. On Wed, Apr 3, 2013 at 6:00 PM, Anand B Pillai wrote: > Hi, > > Thank you for educating the list. Though this is not exactly > relevant to our subject matter actually. > > Regards, > > --Anand > > > On Wed, Apr 3, 2013 at 4:28 AM, wrote: > > > We are researchers from different parts of the world and conducted a > study > > on > > the world?s biggest bogus computer science conference WORLDCOMP > > ( http://sites.google.com/site/worlddump1 ) organized by Prof. Hamid > > Arabnia > > from University of Georgia, USA. > > > > > > We submitted a fake paper to WORLDCOMP 2011 and again (the > > same paper with a modified title) to WORLDCOMP 2012. This paper > > had numerous fundamental mistakes. Sample statements from > > that paper include: > > > > (1). Binary logic is fuzzy logic and vice versa > > (2). Pascal developed fuzzy logic > > (3). Object oriented languages do not exhibit any polymorphism or > > inheritance > > (4). TCP and IP are synonyms and are part of OSI model > > (5). Distributed systems deal with only one computer > > (6). Laptop is an example for a super computer > > (7). Operating system is an example for computer hardware > > > > > > Also, our paper did not express any conceptual meaning. However, it > > was accepted both the times without any modifications (and without > > any reviews) and we were invited to submit the final paper and a > > payment of $500+ fee to present the paper. We decided to use the > > fee for better purposes than making Prof. Hamid Arabnia (Chairman > > of WORLDCOMP) rich. After that, we received few reminders from > > WORLDCOMP to pay the fee but we never responded. > > > > > > We MUST say that you should look at the above website if you have any > > thoughts > > to submit a paper to WORLDCOMP. DBLP and other indexing agencies > > have stopped indexing WORLDCOMP?s proceedings since 2011 due to its > > fakeness. > > See http://www.informatik.uni-trier.de/~ley/db/conf/icai/index.html for > > of one of the > > conferences of WORLDCOMP and notice that there is no listing after 2010. > > See > > http://sites.google.com/site/dumpconf for comments from well-known > > researchers > > about WORLDCOMP. > > > > > > The status of your WORLDCOMP papers can be changed from ?scientific? > > to ?other? (i.e., junk or non-technical) at any time. See the comments > > http://www.mail-archive.com/tccc at lists.cs.columbia.edu/msg05168.html > > of a respected researcher on this. Better not to have a paper than > > having it in WORLDCOMP and spoil the resume and peace of mind forever! > > > > > > Our study revealed that WORLDCOMP is a money making business, > > using University of Georgia mask, for Prof. Hamid Arabnia. He is throwing > > out a small chunk of that money (around 20 dollars per paper published > > in WORLDCOMP?s proceedings) to his puppet (Mr. Ashu Solo or A.M.G. Solo) > > who publicizes WORLDCOMP and also defends it at various forums, using > > fake/anonymous names. The puppet uses fake names and defames other > > conferences > > to divert traffic to WORLDCOMP. That is, the puppet does all his best > > to get a maximum number of papers published at WORLDCOMP to get more > > money into his (and Prof. Hamid Arabnia?s) pockets. > > > > > > Monte Carlo Resort (the venue of WORLDCOMP until 2012) has refused to > > provide the venue for WORLDCOMP?13 because of the fears of their image > > being tarnished due to WORLDCOMP?s fraudulent activities. WORLDCOMP?13 > > will be held at a different resort. > > > > > > WORLDCOMP will not be held after 2013. > > > > > > The paper submission deadline for WORLDCOMP?13 was March 18 and it is > > extended to April 6 (it will be extended many times, as usual) but > > still there are no committee members, no reviewers, and there is no > > conference Chairman. The only contact details available on WORLDCOMP?s > > website is just an email address! > > > > > > What bothers us the most is that Prof. Hamid Arabnia never posted an > > apology for the damage he has done to the research community. He is > still > > trying to defend WORLDCOMP. Let us make a direct request to him: publish > > all reviews for all the papers (after blocking identifiable details) > since > > 2000 conference. Reveal the names and affiliations of all the reviewers > > (for each year) and how many papers each reviewer had reviewed on > average. > > We also request him to look at the Open Challenge at > > http://sites.google.com/site/dumpconf > > > > > > Sorry for posting to multiple lists. Spreading the word is the only way > to > > stop > > this bogus conference. Please forward this message to other mailing lists > > and people. > > > > > > We are shocked with Prof. Hamid Arabnia and his puppet?s activities > > http://worldcomp-fake-bogus.blogspot.com Search Google using the > > keyword worldcomp fake for additional links. > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From kracethekingmaker at gmail.com Wed Apr 3 18:27:16 2013 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Wed, 3 Apr 2013 21:57:16 +0530 Subject: [BangPypers] April month meetup In-Reply-To: References: Message-ID: All, Unfortunately Siva can't attend April month meetup, so Django Hands on session is *CANCELLED*. If any one is willing to present a session is welcome. On Sun, Mar 24, 2013 at 1:24 AM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > All, > > Siva informed me he is willing to handle 3 hours hands-on session about > getting started with Django next month. We need a venue which has power > socket and decent internet connection. I would like to have others > suggestions about the format, looking forward for venue to host for next > meetup. We will be also needing few volunteers to help during meetup. > > -- > * > Thanks & Regards > > "Talk is cheap, show me the code" -- Linus Torvalds > kracekumar > www.kracekumar.com > * > -- * Thanks & Regards "Talk is cheap, show me the code" -- Linus Torvalds kracekumar www.kracekumar.com * From sumit786raj at gmail.com Wed Apr 3 19:34:30 2013 From: sumit786raj at gmail.com (SUMIT KUMAR RAJ) Date: Wed, 3 Apr 2013 23:04:30 +0530 Subject: [BangPypers] Hosting the Python Code on web Message-ID: Hello Everyone, I have kept learning from you all and I am very thankful to you also. Actually I am doing my final year project of engg. ie. "Sentiment Analysis of Twitter Data" and I got this code on github https://github.com/ravikiranj/twitter-sentiment-analyzer which is working in terminal to classify any tweet as positive, negative or neutral. I wan't the same to be happening in browser by uploading or hosting the code to my domain as www.sentiment140.com works. I am really confused about it.Please help 1).Do I need to write the code again using any framework or is there any way? 2) I have a linux hosting plan for my domain www.techpython.com.So, how can I host any django code or any python code which has third party module with it? Will the hosting support codes other than standard python library? -- Regards... ---------------------- Sumit Kumar Raj Software & Web Developer Contact no:-9590283524 Bangalore,India From kracethekingmaker at gmail.com Wed Apr 3 20:08:56 2013 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Wed, 3 Apr 2013 23:38:56 +0530 Subject: [BangPypers] Hosting the Python Code on web In-Reply-To: References: Message-ID: On Wed, Apr 3, 2013 at 11:04 PM, SUMIT KUMAR RAJ wrote: > Hello Everyone, > I have kept learning from you all and I am very > thankful to you also. > Actually I am doing my final year project of engg. ie. "Sentiment Analysis > of Twitter Data" and I got this code on github > https://github.com/ravikiranj/twitter-sentiment-analyzer > which is working in terminal to classify any tweet as positive, negative or > neutral. > I wan't the same to be happening in browser by uploading or hosting the > code to my domain as www.sentiment140.com works. > I am really confused about it.Please help > 1).Do I need to write the code again using any framework or is there any > way? > > Yes, you can package the current work and choose framework to port existing work as Web application. Yes framework is required, in case you are trying any other trick it may end up dirty. > 2) I have a linux hosting plan for my domain www.techpython.com.So, how > can > I host any django code or any python code which has third party module with > it? Will the hosting support codes other than standard python library? > > It depends on hosting, with VPS you will get root access, so all the third party libraries can be installed. I don't think shared hosting as great option. Service like dotcloud, heroku are free. It is great bet to try on those and later migrate to VPS. > -- > Regards... > ---------------------- > Sumit Kumar Raj > Software & Web Developer > Contact no:-9590283524 > Bangalore,India > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- * Thanks & Regards "Talk is cheap, show me the code" -- Linus Torvalds kracekumar www.kracekumar.com * From mandarvaze at gmail.com Wed Apr 3 20:08:53 2013 From: mandarvaze at gmail.com (=?UTF-8?B?TWFuZGFyIFZhemUgLyDgpK7gpILgpKbgpL7gpLAg4KS14KSd4KWH?=) Date: Wed, 3 Apr 2013 23:38:53 +0530 Subject: [BangPypers] Hosting the Python Code on web In-Reply-To: References: Message-ID: > 1).Do I need to write the code again using any framework or is there any > way? > Yes. Currently your code prints the output on the terminal To display something in the browser, you'll need to use some web framework You should be able to use most of the logic from your existing code > 2) I have a linux hosting plan for my domain www.techpython.com.So, how > can > I host any django code or any python code which has third party module with > it? Will the hosting support codes other than standard python library? > You should ask this to your hosting provider. BTW, you can try https://www.pythonanywhere.com/pricing/ For free plan your application will be available at . pythonanywhere.com i.e. you can't use other domain name for free plan (Might be OK if this is your final year project) -Mandar From satishsagar83 at gmail.com Thu Apr 4 06:13:08 2013 From: satishsagar83 at gmail.com (L Radhakrishna Rao) Date: Thu, 4 Apr 2013 09:43:08 +0530 Subject: [BangPypers] April month meetup In-Reply-To: References: Message-ID: Guys, Is the venue decided? Thanks On Wed, Apr 3, 2013 at 9:57 PM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > All, > > Unfortunately Siva can't attend April month meetup, so Django Hands on > session is *CANCELLED*. If any one is willing to present a session is > welcome. > > > On Sun, Mar 24, 2013 at 1:24 AM, kracekumar ramaraju < > kracethekingmaker at gmail.com> wrote: > > > All, > > > > Siva informed me he is willing to handle 3 hours hands-on session about > > getting started with Django next month. We need a venue which has power > > socket and decent internet connection. I would like to have others > > suggestions about the format, looking forward for venue to host for next > > meetup. We will be also needing few volunteers to help during meetup. > > > > -- > > * > > Thanks & Regards > > > > "Talk is cheap, show me the code" -- Linus Torvalds > > kracekumar > > www.kracekumar.com > > * > > > > > > -- > * > Thanks & Regards > > "Talk is cheap, show me the code" -- Linus Torvalds > kracekumar > www.kracekumar.com > * > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From gamebit07 at gmail.com Thu Apr 4 12:46:00 2013 From: gamebit07 at gmail.com (Saket Bhushan) Date: Thu, 4 Apr 2013 16:16:00 +0530 Subject: [BangPypers] BangPypers Digest, Vol 68, Issue 7 In-Reply-To: References: Message-ID: On Thu, Apr 4, 2013 at 3:30 PM, wrote: > Send BangPypers mailing list submissions to > bangpypers at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-request at python.org > > You can reach the person managing the list at > bangpypers-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. Re: Hosting the Python Code on web (kracekumar ramaraju) > 2. Re: Hosting the Python Code on web (Mandar Vaze / ????? ???) > 3. Re: April month meetup (L Radhakrishna Rao) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 3 Apr 2013 23:38:56 +0530 > From: kracekumar ramaraju > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Hosting the Python Code on web > Message-ID: > 7rk4EN6GwitnvUrnh9Y_DeYZzi+sSyCRSBCBB2hBk-w at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Wed, Apr 3, 2013 at 11:04 PM, SUMIT KUMAR RAJ >wrote: > > > Hello Everyone, > > I have kept learning from you all and I am very > > thankful to you also. > > Actually I am doing my final year project of engg. ie. "Sentiment > Analysis > > of Twitter Data" and I got this code on github > > https://github.com/ravikiranj/twitter-sentiment-analyzer > > which is working in terminal to classify any tweet as positive, negative > or > > neutral. > > I wan't the same to be happening in browser by uploading or hosting the > > code to my domain as www.sentiment140.com works. > > I am really confused about it.Please help > > 1).Do I need to write the code again using any framework or is there any > > way? > > > > > Yes, you can package the current work and choose framework to port existing > work as Web application. Yes framework is required, in case you are trying > any other trick it may end up dirty. > > > > 2) I have a linux hosting plan for my domain www.techpython.com.So, how > > can > > I host any django code or any python code which has third party module > with > > it? Will the hosting support codes other than standard python library? > > > > > It depends on hosting, with VPS you will get root access, so all the third > party libraries can be installed. I don't think shared hosting as great > option. Service like dotcloud, heroku are free. It is great bet to try on > those and later migrate to VPS. > > > > -- > > Regards... > > ---------------------- > > Sumit Kumar Raj > > Software & Web Developer > > Contact no:-9590283524 > > Bangalore,India > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > * > Thanks & Regards > > "Talk is cheap, show me the code" -- Linus Torvalds > kracekumar > www.kracekumar.com > * > > > ------------------------------ > > Message: 2 > Date: Wed, 3 Apr 2013 23:38:53 +0530 > From: Mandar Vaze / ????? ??? > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Hosting the Python Code on web > Message-ID: > < > CADDYdfvVqAS9JaM5p4UeZgaoo7HV9mn218CQCAgD56iq6CAA9Q at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > > 1).Do I need to write the code again using any framework or is there any > > way? > > > > Yes. Currently your code prints the output on the terminal > To display something in the browser, you'll need to use some web framework > You should be able to use most of the logic from your existing code > > > > 2) I have a linux hosting plan for my domain www.techpython.com.So, how > > can > > I host any django code or any python code which has third party module > with > > it? Will the hosting support codes other than standard python library? > > > > You should ask this to your hosting provider. > BTW, you can try https://www.pythonanywhere.com/pricing/ > For free plan your application will be available at . > pythonanywhere.com i.e. you can't use other domain name for free plan > (Might be OK if this is your final year project) > > > -Mandar > > > ------------------------------ > > Message: 3 > Date: Thu, 4 Apr 2013 09:43:08 +0530 > From: L Radhakrishna Rao > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] April month meetup > Message-ID: > < > CAAZd-jT2trov+LPKFY-fTRsbPtRK0Gz+EemQ6a1wFC9J_-TZxQ at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Guys, > > Is the venue decided? > > Thanks > > > On Wed, Apr 3, 2013 at 9:57 PM, kracekumar ramaraju < > kracethekingmaker at gmail.com> wrote: > > > All, > > > > Unfortunately Siva can't attend April month meetup, so Django Hands on > > session is *CANCELLED*. If any one is willing to present a session is > > welcome. > > > I am in blore, I won't mind doing a session, please let me know date/venue. > > > > On Sun, Mar 24, 2013 at 1:24 AM, kracekumar ramaraju < > > kracethekingmaker at gmail.com> wrote: > > > > > All, > > > > > > Siva informed me he is willing to handle 3 hours hands-on session > about > > > getting started with Django next month. We need a venue which has power > > > socket and decent internet connection. I would like to have others > > > suggestions about the format, looking forward for venue to host for > next > > > meetup. We will be also needing few volunteers to help during meetup. > > > > > > -- > > > * > > > Thanks & Regards > > > > > > "Talk is cheap, show me the code" -- Linus Torvalds > > > kracekumar > > > www.kracekumar.com > > > * > > > > > > > > > > > -- > > * > > Thanks & Regards > > > > "Talk is cheap, show me the code" -- Linus Torvalds > > kracekumar > > www.kracekumar.com > > * > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > ------------------------------ > > End of BangPypers Digest, Vol 68, Issue 7 > ***************************************** > -- Regards, Saket Bhushan twitter , linkedin, myshareplex From kracethekingmaker at gmail.com Thu Apr 4 13:18:42 2013 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Thu, 4 Apr 2013 16:48:42 +0530 Subject: [BangPypers] April month meetup In-Reply-To: References: Message-ID: Saket, Meetup is on 20th April, from 3.00PM to 6.00Pm you can present any topic. Django or Machine Learning. Location is yet to be decided. Here is the meetup page. RSVP: http://www.meetup.com/BangPypers/events/111834102/ On Sun, Mar 24, 2013 at 1:24 AM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > All, > > Siva informed me he is willing to handle 3 hours hands-on session about > getting started with Django next month. We need a venue which has power > socket and decent internet connection. I would like to have others > suggestions about the format, looking forward for venue to host for next > meetup. We will be also needing few volunteers to help during meetup. > > -- > * > Thanks & Regards > > "Talk is cheap, show me the code" -- Linus Torvalds > kracekumar > www.kracekumar.com > * > -- * Thanks & Regards "Talk is cheap, show me the code" -- Linus Torvalds kracekumar www.kracekumar.com * From shabda at agiliq.com Fri Apr 5 08:46:33 2013 From: shabda at agiliq.com (Shabda Raaj) Date: Fri, 5 Apr 2013 12:16:33 +0530 Subject: [BangPypers] What is the output of this python program? Message-ID: Something I found interesting. (Please try answering before running in the interpretor). https://gist.github.com/shabda/5317134 -- import random import string def random_word_from_seed(seed, len): random.seed(seed) letters = string.ascii_lowercase return ''.join([random.choice(letters) for i in range(len)]) print random_word_from_seed(1944062, 5) +" "+random_word_from_seed(2068527, 5) -- Thanks, Shabda Agiliq.com - Building Amazing Apps agiliq.com/blog/ | github.com/agiliq US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj Our Android Apps | Our iOS Apps From maniandram01 at gmail.com Fri Apr 5 09:50:12 2013 From: maniandram01 at gmail.com (Ramchandra Apte) Date: Fri, 5 Apr 2013 13:20:12 +0530 Subject: [BangPypers] What is the output of this python program? In-Reply-To: References: Message-ID: I suppose it will give Hello World? I've seen a similar question on StackOverflow. On 5 April 2013 12:16, Shabda Raaj wrote: > Something I found interesting. (Please try answering before running in the > interpretor). > > https://gist.github.com/shabda/5317134 > > -- > > import random > import string > > def random_word_from_seed(seed, len): > random.seed(seed) > letters = string.ascii_lowercase > return ''.join([random.choice(letters) for i in range(len)]) > > print random_word_from_seed(1944062, 5) +" > "+random_word_from_seed(2068527, 5) > > > > -- > Thanks, > Shabda > > Agiliq.com - Building Amazing Apps > agiliq.com/blog/ | github.com/agiliq > US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj > Our Android Apps > | Our > iOS Apps > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From ruchiryshukla at gmail.com Fri Apr 5 10:39:15 2013 From: ruchiryshukla at gmail.com (Ruchir Shukla) Date: Fri, 5 Apr 2013 14:09:15 +0530 Subject: [BangPypers] What is the output of this python program? In-Reply-To: References: Message-ID: Hello ! I did not get the Answer for how . can you explain the Answer ? On Fri, Apr 5, 2013 at 12:16 PM, Shabda Raaj wrote: > Something I found interesting. (Please try answering before running in the > interpretor). > > https://gist.github.com/shabda/5317134 > > -- > > import random > import string > > def random_word_from_seed(seed, len): > random.seed(seed) > letters = string.ascii_lowercase > return ''.join([random.choice(letters) for i in range(len)]) > > print random_word_from_seed(1944062, 5) +" > "+random_word_from_seed(2068527, 5) > > > > -- > Thanks, > Shabda > > Agiliq.com - Building Amazing Apps > agiliq.com/blog/ | github.com/agiliq > US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj > Our Android Apps > | Our > iOS Apps > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ---------------------------- Kind regards Ruchir Shukla Phone: +91 9099020687 ruchiryshukla at gmail.com; Ruchir Shukla From gora at mimirtech.com Fri Apr 5 11:29:38 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Fri, 5 Apr 2013 14:59:38 +0530 Subject: [BangPypers] What is the output of this python program? In-Reply-To: References: Message-ID: On 5 April 2013 14:09, Ruchir Shukla wrote: > Hello ! > > I did not get the Answer for how . can you explain the Answer ? [...] Seeding a pseudo-random number generator makes it always generate a sequence specific to the seed. Someone discovered the seeds to print the sequence for "hello" and for "world". Kind of cute, but IMHO teaches one nothing except maybe to watch out for pseudo-random number generators where the state,and the generated sequence can be gleaned from a few examples. Unless one had already come across this particular trick, there was no way to predict the output of the program. Regards, Gora From rammy.sagar at gmail.com Fri Apr 5 11:40:23 2013 From: rammy.sagar at gmail.com (ram sagar) Date: Fri, 5 Apr 2013 15:10:23 +0530 Subject: [BangPypers] Beginner Help In-Reply-To: References: Message-ID: Hi, words = ['cat', 'window', 'defenestrate'] here words is a list and each element in that list can be accessed via index. words[0] will give cat words[1] will give window for more information on list : http://docs.python.org/2/tutorial/introduction.html#lists also in python for loop is quite from different from other programming languages. for more information on for loop : http://docs.python.org/2/tutorial/controlflow.html#for-statements for w in words: for the first loop ,the value in words[0] is picked and assigned to w , i.e w = words[0] for the second loop ,the value in words[1] is picked and assigned to w , i.e w = words[1] .....so on It is always better to have understanding of what data type we are working on and then what are the operation we are performing. I hope that you are clear about working of for loop. Regards Ram Sagar Mourya On Tue, Apr 2, 2013 at 2:38 PM, Gaurav Malhotra wrote: > Hi everyone, > > Below is the code (with output) which can be found in the Python Official > Documentation: > > >>> # Measure some strings: > > ... words = ['cat', 'window', 'defenestrate'] > > >>> for w in words: > > ... print w, len(w) > > ... > > cat 3 > > window 6 > > defenestrate 12 > > # The Problem is: > When "w" is not defined how python interpreter can evaluate the output?? > > Please Explain the lines where "w" is occurred. if i would replace "w" with > any other variable, it will show the same output. > > I want to know "What is happening in the back (i mean how interpreter is > handling it)" ?? > > Thanks & Regards, > Gaurav Malhotra > > -- > *Regards > Gaurav Malhotra > +91-9410562301* > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From mandarvaze at gmail.com Fri Apr 5 12:36:18 2013 From: mandarvaze at gmail.com (=?UTF-8?B?TWFuZGFyIFZhemUgLyDgpK7gpILgpKbgpL7gpLAg4KS14KSd4KWH?=) Date: Fri, 5 Apr 2013 16:06:18 +0530 Subject: [BangPypers] What is the output of this python program? In-Reply-To: References: Message-ID: > Seeding a pseudo-random number generator makes it > always generate a sequence specific to the seed. http://xkcd.com/221/ -Mandar From abdulmuneer at gmail.com Fri Apr 5 13:21:52 2013 From: abdulmuneer at gmail.com (Abdul Muneer) Date: Fri, 5 Apr 2013 16:51:52 +0530 Subject: [BangPypers] What is the output of this python program? In-Reply-To: References: Message-ID: Printing 'hello world' like a sir! :) p.s.:caution when using builtins as variable names. (e.g.: len) Regards, Abdul Muneer -- Follow me on Twitter: @abdulmuneer On Fri, Apr 5, 2013 at 4:06 PM, Mandar Vaze / ????? ??? < mandarvaze at gmail.com> wrote: > > Seeding a pseudo-random number generator makes it > > always generate a sequence specific to the seed. > > > http://xkcd.com/221/ > > -Mandar > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From abpillai at gmail.com Fri Apr 5 15:52:29 2013 From: abpillai at gmail.com (Anand B Pillai) Date: Fri, 5 Apr 2013 19:22:29 +0530 Subject: [BangPypers] What is the output of this python program? In-Reply-To: References: Message-ID: This tells one not to really on PRNGs to generate a truly random state. It is not very difficult to write some code to find the seed for printing a given word if you got some time to waste :) Here is one way. http://pastebin.ca/2350376 Sample: >>> findseed.find_seed_for_word('hello',100000) 0th count reached 100000th count reached 200000th count reached 300000th count reached 400000th count reached 500000th count reached 600000th count reached 700000th count reached 800000th count reached 900000th count reached 1000000th count reached 1100000th count reached 1200000th count reached 1300000th count reached 1400000th count reached 1500000th count reached 1600000th count reached 1700000th count reached 1800000th count reached 1900000th count reached Seed is 1944062 Time taken: 30.5493340492 30s to find the seed, not as bad as I thought. On Fri, Apr 5, 2013 at 4:51 PM, Abdul Muneer wrote: > Printing 'hello world' like a sir! :) > > p.s.:caution when using builtins as variable names. (e.g.: len) > > Regards, > Abdul Muneer > > -- > Follow me on Twitter: @abdulmuneer > > > On Fri, Apr 5, 2013 at 4:06 PM, Mandar Vaze / ????? ??? < > mandarvaze at gmail.com> wrote: > > > > Seeding a pseudo-random number generator makes it > > > always generate a sequence specific to the seed. > > > > > > http://xkcd.com/221/ > > > > -Mandar > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, --Anand From gora at mimirtech.com Fri Apr 5 16:16:54 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Fri, 5 Apr 2013 19:46:54 +0530 Subject: [BangPypers] What is the output of this python program? In-Reply-To: References: Message-ID: On 5 April 2013 19:22, Anand B Pillai wrote: > This tells one not to really on PRNGs to generate a truly random > state. Absolutely! PRNGs have their place, e.g., when one does want a repeatable sequence if given the same seed. For example, one would want that for Monte Carlo simulations where the computation needs to be repeatable. > It is not very difficult to write some code to find the seed for > printing a given word if you got some time to waste :) > > Here is one way. > > http://pastebin.ca/2350376 [...] Heh! Sounded like a fun exercise to do that, but was too busy to try. Regards, Gora From venkat83 at gmail.com Fri Apr 5 17:19:58 2013 From: venkat83 at gmail.com (Venkatraman S) Date: Fri, 5 Apr 2013 20:49:58 +0530 Subject: [BangPypers] Fwd: Django Weekly - Issue #26 In-Reply-To: References: Message-ID: I see some interest w.r.t Django in this group; hope many have signed up for this. Venkat ** Django Weekly #26 Share Tweet Forward to Friend *Articles* PyCon 2013 Slides This collection of PyCon slides is full of great presentations, covering Django and wider Python topics. If, like me, you couldn't make it to PyCon, this has you covered. Django Code Of Conduct I've been following Django for five years; the Django community is one of the most respectful, mature communities which I have ever been involved with. However, following the mantra "explicit is better than implicit", Jacob Kaplan-Moss is leading the development of a Code of Conduct. Give feedback! Best practices with Django on Webfaction Webfaction is (was?) a really popular host for Django applications, and this guide from Luke Plant covers some of the gotchas. Effective Django This guide, still in development, distills some hard-won Django knowledge into a really great intermediate-level guide. There is something here for everyone to learn. *Code* django-report-tools "Django Report Tools aims to take the pain out of putting charts, graphs and tables into your Django projects. It provides a nice class-based framework to restore a little bit of elegance to your application's complex data views." django-multiurl "Have you ever wanted multiple views to match to the same URL? Now you can." Get in touch If you have any feedback, news to share, or found some great code which you want to spread the word about, please get in touch . I'll credit any submissions. You can also find me on Twitter as @jon_atkinsonand @djangoweekly. *Our mailing address is:* Djangoweek.ly Office 1, New Inn Farm Dawson Lane Leyland, England PR25 5DB United Kingdom Add us to your address book [image: Email Marketing Powered by MailChimp] *Copyright ? 2013 Djangoweek.ly, All rights reserved.* You are receiving this email because you opted in at our website http://djangoweek.ly unsubscribe from this list update subscription preferences From kracethekingmaker at gmail.com Sat Apr 6 19:04:51 2013 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Sat, 6 Apr 2013 22:34:51 +0530 Subject: [BangPypers] April month meetup In-Reply-To: References: Message-ID: All I may not be available for this month meetup, can some one take charge of coordination April meetup. If interested let me know I will tell what needs to be done. On Thu, Apr 4, 2013 at 4:48 PM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > Saket, > > Meetup is on 20th April, from 3.00PM to 6.00Pm you can present any topic. > Django or Machine Learning. Location is yet to be decided. Here is the > meetup page. RSVP: http://www.meetup.com/BangPypers/events/111834102/ > > > On Sun, Mar 24, 2013 at 1:24 AM, kracekumar ramaraju < > kracethekingmaker at gmail.com> wrote: > >> All, >> >> Siva informed me he is willing to handle 3 hours hands-on session about >> getting started with Django next month. We need a venue which has power >> socket and decent internet connection. I would like to have others >> suggestions about the format, looking forward for venue to host for next >> meetup. We will be also needing few volunteers to help during meetup. >> >> -- >> * >> Thanks & Regards >> >> "Talk is cheap, show me the code" -- Linus Torvalds >> kracekumar >> www.kracekumar.com >> * >> > > > > -- > * > Thanks & Regards > > "Talk is cheap, show me the code" -- Linus Torvalds > kracekumar > www.kracekumar.com > * > -- * Thanks & Regards "Talk is cheap, show me the code" -- Linus Torvalds kracekumar www.kracekumar.com * From shabda at agiliq.com Sun Apr 7 07:56:06 2013 From: shabda at agiliq.com (Shabda Raaj) Date: Sun, 7 Apr 2013 11:26:06 +0530 Subject: [BangPypers] What is the output of this python program? Message-ID: I saw this Java question on SO and ported to Python. http://stackoverflow.com/questions/15182496/why-does-this-code-print-hello-world Here is the searcher function: https://github.com/shabda/search-seed-for-word/blob/master/searcher.py It tries to find the seeds using brute force. Is there a way to optimize the searcher function? For example finding seed for "hello" takes less than a minute. Finding the seed for "hello world" was taking longer than I was willing to let the program run. (The Python random algo is Mersenne twister, which is a non cryptographic PRNG, so it *might* be possible to find seeds without brute forcing.). Related, we were recently discussing these (in our office) in terms of Bitcoin type proof of work. Finding the seed for words is cpu intensive and is a proof of work. Verifying the seed is trivial in cpu time. -- Thanks, Shabda Agiliq.com - Building Amazing Apps agiliq.com/blog/ | github.com/agiliq US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj Our Android Apps | Our iOS Apps From arvind.kamble at gmail.com Sun Apr 7 08:14:48 2013 From: arvind.kamble at gmail.com (Aravind Kamble) Date: Sun, 7 Apr 2013 11:44:48 +0530 Subject: [BangPypers] How to set DNS IP of a machine Message-ID: Hi All, I am a beginner in Pyhton scripting. I want to know how can I set a predefined IP address as DNS IP of a machine in my Python script. Thanks, Aravind From gora at mimirtech.com Sun Apr 7 08:27:11 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Sun, 7 Apr 2013 11:57:11 +0530 Subject: [BangPypers] How to set DNS IP of a machine In-Reply-To: References: Message-ID: On 7 April 2013 11:44, Aravind Kamble wrote: > Hi All, > > I am a beginner in Pyhton scripting. I want to know how can I set a > predefined IP address as DNS IP of a machine in my Python script. You provide nowhere near enough details for anyone to help you. To start with, what operating system? It is also not clear what you want to do. Do you want to set the DNS nameserver for the current machine that the DNS server is running on? If so, you are very likely to need administrative access on the OS. Regards, Gora From kishanmehta3 at gmail.com Sun Apr 7 08:33:13 2013 From: kishanmehta3 at gmail.com (Kishan Mehta) Date: Sun, 7 Apr 2013 12:03:13 +0530 Subject: [BangPypers] Job for python fresher? Message-ID: Hi, Is there any opening for python freshers? Suggestion of groups that are releated to python jobs will also be helpful. Thank you, Kishan Mehta From arvind.kamble at gmail.com Sun Apr 7 08:36:02 2013 From: arvind.kamble at gmail.com (Aravind Kamble) Date: Sun, 7 Apr 2013 12:06:02 +0530 Subject: [BangPypers] How to set DNS IP of a machine In-Reply-To: References: Message-ID: Sorry for mistake. As I said I am the beginner, am still learning. I am using windows 7 machine. For my tests to run I need to set the machine's DNS IP address manually. For example if my DNS server IP is 192.168.1.20 then I would go to Control Panel\Network and Internet\Network Connections, open the properties of Local LAN connection, open TCP/IP properties and set the DNS IP manually. I want to do the same using script. Hope I am clear this time. Thanks, Aravind On Sun, Apr 7, 2013 at 11:57 AM, Gora Mohanty wrote: > On 7 April 2013 11:44, Aravind Kamble wrote: > > Hi All, > > > > I am a beginner in Pyhton scripting. I want to know how can I set a > > predefined IP address as DNS IP of a machine in my Python script. > > You provide nowhere near enough details for anyone to help > you. To start with, what operating system? It is also not clear > what you want to do. Do you want to set the DNS nameserver > for the current machine that the DNS server is running on? > If so, you are very likely to need administrative access on the OS. > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From gnuyoga at gmail.com Sun Apr 7 10:19:19 2013 From: gnuyoga at gmail.com (Sreekandh B) Date: Sun, 7 Apr 2013 13:49:19 +0530 Subject: [BangPypers] How to set DNS IP of a machine In-Reply-To: References: Message-ID: On Sunday, April 7, 2013, Aravind Kamble wrote: > Sorry for mistake. As I said I am the beginner, am still learning. I am > using windows 7 machine. > For my tests to run I need to set the machine's DNS IP address manually. > For example if my DNS server IP is 192.168.1.20 then I would go to Control > Panel\Network and Internet\Network Connections, open the properties of > Local LAN connection, open TCP/IP properties and set the DNS IP manually Am not sure about DNS entries but you can always edit hosts file under system32\etc folder and get windows resolve to required IP http://kb.simplywebhosting.com/idx/0/045/article/ -- gnuyoga.in From foxrun2005 at gmail.com Tue Apr 9 20:16:58 2013 From: foxrun2005 at gmail.com (Kamalakar gs) Date: Tue, 9 Apr 2013 23:46:58 +0530 Subject: [BangPypers] HI Need help for python Message-ID: Hi, Actually I have PCL file (i..e patran file).I want python coding to be done so that it will read the PCL file and open Patran GUI window.How to do that.Kindly find the attached PCL file for your ref. Thanks regards Kamalakar From benignbala at gmail.com Mon Apr 15 03:33:08 2013 From: benignbala at gmail.com (Balachandran Sivakumar) Date: Mon, 15 Apr 2013 07:03:08 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE Message-ID: Hi all, I understand that this is a Python group and not a free software group. But there are quite a few free software enthusiasts here, and they might already know/like to know the news. So, I apologise upfront, for posting this off-topic information. But Microsoft, has made a pact with AICTE, by which all college approved my AICTE will have to mandatorily use office 365+MS's cloud email solution. I came to know about this when my alma mater, Thiagarajar College of Engineering where we have been running our own mail servers with just free software was asked to migrate to AICTE by pointing the MX records to some domain of Microsoft. Here is the release from AICTE - http://www.aicte-india.org/downloads/AICTE_notice.pdf Here is an article about this on Microsoft's site - http://www.microsoft.com/casestudies/Microsoft-Office-365/All-India-Council-for-Technical-Education/India-Institute-Deploys-7.5-Million-Office-365-Seats-to-Improve-Governance-Learning/710000002268 Linux Users Group, Chennai and a few other LUGs are also discussing this issue. Would like to know if people here suggest something to counter this. Thanks -- Thank you Balachandran Sivakumar Arise Awake and stop not till the goal is reached. - Swami Vivekananda Mail: benignbala at gmail.com Blog: http://benignbala.wordpress.com/ From gora at mimirtech.com Mon Apr 15 05:43:00 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Mon, 15 Apr 2013 09:13:00 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: On 15 April 2013 07:03, Balachandran Sivakumar wrote: > Hi all, > > I understand that this is a Python group and not a free software > group. But there are quite a few free software enthusiasts here, and > they might already know/like to know the news. So, I apologise > upfront, for posting this off-topic information. [...] Please do not indulge in such off-topic postings, no matter how important you feel that your message is. By the argument that your message is important enough that it should be seen by people everywhere, every mailing list becomes a catch-all for all content. As you seem to be well aware, there are lists dedicated to such topics: Please stick to them. Regards, Gora From benignbala at gmail.com Mon Apr 15 07:47:30 2013 From: benignbala at gmail.com (Balachandran Sivakumar) Date: Mon, 15 Apr 2013 11:17:30 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: Hi, On Mon, Apr 15, 2013 at 9:13 AM, Gora Mohanty wrote: > On 15 April 2013 07:03, Balachandran Sivakumar wrote: > > Please do not indulge in such off-topic postings, no matter > how important you feel that your message is. By the argument > that your message is important enough that it should be seen > by people everywhere, every mailing list becomes a catch-all > for all content. As you seem to be well aware, there are lists > dedicated to such topics: Please stick to them. > I know there exists other lists elsewhere. I am not sure if one such list/group of people exists in Bangalore. If you know of any please point me. I am not going to argue with your response, but you misjudged. Thanks -- Thank you Balachandran Sivakumar Arise Awake and stop not till the goal is reached. - Swami Vivekananda Mail: benignbala at gmail.com Blog: http://benignbala.wordpress.com/ From gora at mimirtech.com Mon Apr 15 09:12:47 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Mon, 15 Apr 2013 12:42:47 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: On 15 April 2013 11:17, Balachandran Sivakumar wrote: > Hi, > > On Mon, Apr 15, 2013 at 9:13 AM, Gora Mohanty wrote: >> On 15 April 2013 07:03, Balachandran Sivakumar wrote: >> >> Please do not indulge in such off-topic postings, no matter >> how important you feel that your message is. By the argument >> that your message is important enough that it should be seen >> by people everywhere, every mailing list becomes a catch-all >> for all content. As you seem to be well aware, there are lists >> dedicated to such topics: Please stick to them. >> > > I know there exists other lists elsewhere. I am not sure if > one such list/group of people exists in Bangalore. If you know of any > please point me. I am not going to argue with your response, but you > misjudged. Thanks I am not sure of such an alternative list, but IMHO that still does not make it right to post off-topic on this list. Not sure what argument there is to be made about this: Just requesting you to refrain from such posts. Regards, Gora From aditya at thinrhino.net.in Mon Apr 15 11:30:59 2013 From: aditya at thinrhino.net.in (=?UTF-8?B?4KSG4KSm4KS/4KSk4KWN4KSvIOCksuCkmOCkvuCkn+Clhw==?=) Date: Mon, 15 Apr 2013 15:00:59 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: On 15 April 2013 11:17, Balachandran Sivakumar wrote: > I know there exists other lists elsewhere. I am not sure if > one such list/group of people exists in Bangalore. If you know of any > please point me. > ?Bangalore Linux Users Group? http://linux-bangalore.org/blug/? -- Life is like riding a bicycle. To keep your balance you must keep moving. From svaksha at gmail.com Mon Apr 15 11:50:49 2013 From: svaksha at gmail.com (=?UTF-8?B?IOCkuOCljeCkteCkleCljeCktw==?=) Date: Mon, 15 Apr 2013 15:20:49 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: On Mon, Apr 15, 2013 at 11:17 AM, Balachandran Sivakumar wrote: > > I know there exists other lists elsewhere. I am not sure if > one such list/group of people exists in Bangalore. If you know of any Try Bengaluru LUG ? http://groups.google.com/group/ilug-bengaluru And/Or, Fosscomm.in's General Discussions on Campaigns and Tasks ? http://lists.fosscom.in/listinfo.cgi/network-fosscom.in -- Best, Vid ? http://svaksha.com ? From maniandram01 at gmail.com Mon Apr 15 14:15:10 2013 From: maniandram01 at gmail.com (Ramchandra Apte) Date: Mon, 15 Apr 2013 17:45:10 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: +1000 On 15 April 2013 09:13, Gora Mohanty wrote: > On 15 April 2013 07:03, Balachandran Sivakumar > wrote: > > Hi all, > > > > I understand that this is a Python group and not a free software > > group. But there are quite a few free software enthusiasts here, and > > they might already know/like to know the news. So, I apologise > > upfront, for posting this off-topic information. > [...] > > Please do not indulge in such off-topic postings, no matter > how important you feel that your message is. By the argument > that your message is important enough that it should be seen > by people everywhere, every mailing list becomes a catch-all > for all content. As you seem to be well aware, there are lists > dedicated to such topics: Please stick to them. > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From benignbala at gmail.com Mon Apr 15 14:19:24 2013 From: benignbala at gmail.com (Balachandran Sivakumar) Date: Mon, 15 Apr 2013 17:49:24 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: Hi, On Mon, Apr 15, 2013 at 3:20 PM, ?????? wrote: > On Mon, Apr 15, 2013 at 11:17 AM, Balachandran Sivakumar > wrote: > > Try Bengaluru LUG ? http://groups.google.com/group/ilug-bengaluru > And/Or, > Fosscomm.in's General Discussions on Campaigns and Tasks ? > http://lists.fosscom.in/listinfo.cgi/network-fosscom.in Thanks for the links. I will try Bengaluru LUG. I didn't even know that we have a LUG in Bangalore :( -- Thank you Balachandran Sivakumar Arise Awake and stop not till the goal is reached. - Swami Vivekananda Mail: benignbala at gmail.com Blog: http://benignbala.wordpress.com/ From san00718 at gmail.com Mon Apr 15 15:20:52 2013 From: san00718 at gmail.com (Santosh Kumar) Date: Mon, 15 Apr 2013 18:50:52 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: Also there is another vdry active community of linux users, Free Software Movement Karnataka(FSMK), www.fsmk.org On Mon, Apr 15, 2013 at 5:49 PM, Balachandran Sivakumar < benignbala at gmail.com> wrote: > Hi, > > On Mon, Apr 15, 2013 at 3:20 PM, ?????? wrote: > > On Mon, Apr 15, 2013 at 11:17 AM, Balachandran Sivakumar > > wrote: > > > > Try Bengaluru LUG ? http://groups.google.com/group/ilug-bengaluru > > And/Or, > > Fosscomm.in's General Discussions on Campaigns and Tasks ? > > http://lists.fosscom.in/listinfo.cgi/network-fosscom.in > > > Thanks for the links. I will try Bengaluru LUG. I didn't even > know that we have a LUG in Bangalore :( > > > -- > Thank you > Balachandran Sivakumar > > Arise Awake and stop not till the goal is reached. > - Swami > Vivekananda > > Mail: benignbala at gmail.com > Blog: http://benignbala.wordpress.com/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From sriramnrn at gmail.com Mon Apr 15 16:53:19 2013 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Mon, 15 Apr 2013 09:53:19 -0500 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: The reason FOSCOMM was setup some years ago was because various such groups actually have some common interests. There are times when we need to get together to defend even other technologies and platforms. If we continue to declare "Not here" without constructively figuring out if the discussion can be carried out elsewhere, vested interests like MS will pick out areas one after the other, and there wouldn't be enough voices when it's a specific group's turn to face their brunt. Please see: http://en.wikipedia.org/wiki/First_they_came I'd attended the initial FOSCOMM meet at CIS, but I think it died out after that. -- Ram On Mon, Apr 15, 2013 at 8:20 AM, Santosh Kumar wrote: > Also there is another vdry active community of linux users, > Free Software Movement Karnataka(FSMK), > www.fsmk.org > > > On Mon, Apr 15, 2013 at 5:49 PM, Balachandran Sivakumar < > benignbala at gmail.com> wrote: > > > Hi, > > > > On Mon, Apr 15, 2013 at 3:20 PM, ?????? wrote: > > > On Mon, Apr 15, 2013 at 11:17 AM, Balachandran Sivakumar > > > wrote: > > > > > > Try Bengaluru LUG ? http://groups.google.com/group/ilug-bengaluru > > > And/Or, > > > Fosscomm.in's General Discussions on Campaigns and Tasks ? > > > http://lists.fosscom.in/listinfo.cgi/network-fosscom.in > > > > > > Thanks for the links. I will try Bengaluru LUG. I didn't even > > know that we have a LUG in Bangalore :( > > > > > > -- > > Thank you > > Balachandran Sivakumar > > > > Arise Awake and stop not till the goal is reached. > > - Swami > > Vivekananda > > > > Mail: benignbala at gmail.com > > Blog: http://benignbala.wordpress.com/ > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ------------------------------------ Belenix: www.belenix.org Twitter: @sriramnrn From dialkforkaushik at gmail.com Mon Apr 15 17:24:18 2013 From: dialkforkaushik at gmail.com (Kaushik Kalyanaraman) Date: Mon, 15 Apr 2013 10:24:18 -0500 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: 10 replies to Godwin http://en.wikipedia.org/wiki/Godwin's_law. Good job folks ! [/s] But, seriously, and even though even this reply is completely OT to the interests of this list, please try to provide your own reasons in your own words without sensationalizing with quotes, etc. At least then, some may be sympathetic (not claiming I am or I am not) to your cause. Otherwise, it equally well reeks of FUD on your part. Finally, people who are "religious" about FOSS (or other open source movements) should stop for a tiny bit to figure out if their militant propositioning pans out in the larger scheme of things. For example, I notice that OP as well as other defendant(s) are using Gmail. So, could they (or others) please enlighten me as to whether Gmail or Google, and by extension the internet itself (including intermediate routers, ISP server -- software as well as hardware components, etc.; you get the picture) is all built on the notion of openness that they are probably advocating in their "linux vs windows" battle. (For the record, I use neither.) If not, and if this is a fight against some notion of corporate greed, then why only in this particular instance ? I don't think that people aren't posting OT discussions to these lists proclaiming an urgent need for fight against corruption and/or other systemic deficiencies in the Indian context. tl;dr: Please follow ground rules and do not post these OT discussions. Also, please don't provide your defense or get all apologetic about why this needs to be posted here, especially after being pointed to. Thanks ! -Kaushik On Mon, Apr 15, 2013 at 9:53 AM, Sriram Narayanan wrote: > The reason FOSCOMM was setup some years ago was because various such groups > actually have some common interests. > > There are times when we need to get together to defend even other > technologies and platforms. If we continue to declare "Not here" without > constructively figuring out if the discussion can be carried out elsewhere, > vested interests like MS will pick out areas one after the other, and there > wouldn't be enough voices when it's a specific group's turn to face their > brunt. > > Please see: http://en.wikipedia.org/wiki/First_they_came > > I'd attended the initial FOSCOMM meet at CIS, but I think it died out after > that. > > -- Ram > > > On Mon, Apr 15, 2013 at 8:20 AM, Santosh Kumar wrote: > >> Also there is another vdry active community of linux users, >> Free Software Movement Karnataka(FSMK), >> www.fsmk.org >> >> >> On Mon, Apr 15, 2013 at 5:49 PM, Balachandran Sivakumar < >> benignbala at gmail.com> wrote: >> >> > Hi, >> > >> > On Mon, Apr 15, 2013 at 3:20 PM, ?????? wrote: >> > > On Mon, Apr 15, 2013 at 11:17 AM, Balachandran Sivakumar >> > > wrote: >> > > >> > > Try Bengaluru LUG ? http://groups.google.com/group/ilug-bengaluru >> > > And/Or, >> > > Fosscomm.in's General Discussions on Campaigns and Tasks ? >> > > http://lists.fosscom.in/listinfo.cgi/network-fosscom.in >> > >> > >> > Thanks for the links. I will try Bengaluru LUG. I didn't even >> > know that we have a LUG in Bangalore :( >> > >> > >> > -- >> > Thank you >> > Balachandran Sivakumar >> > >> > Arise Awake and stop not till the goal is reached. >> > - Swami >> > Vivekananda >> > >> > Mail: benignbala at gmail.com >> > Blog: http://benignbala.wordpress.com/ >> > _______________________________________________ >> > BangPypers mailing list >> > BangPypers at python.org >> > http://mail.python.org/mailman/listinfo/bangpypers >> > >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > ------------------------------------ > Belenix: www.belenix.org > Twitter: @sriramnrn > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers -- To know that we know what we know, and that we do not know what we do not know, that is true knowledge. From svaksha at gmail.com Mon Apr 15 19:35:01 2013 From: svaksha at gmail.com (=?UTF-8?B?IOCkuOCljeCkteCkleCljeCktw==?=) Date: Mon, 15 Apr 2013 23:05:01 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: On Mon, Apr 15, 2013 at 8:54 PM, Kaushik Kalyanaraman wrote: > 10 replies to Godwin http://en.wikipedia.org/wiki/Godwin's_law. Good > job folks ! [/s] > > But, seriously, and even though even this reply is completely OT to > the interests of this list, please try to provide your own reasons in > your own words without sensationalizing with quotes, etc. At least > then, some may be sympathetic (not claiming I am or I am not) to your > cause. Otherwise, it equally well reeks of FUD on your part. > > Finally, people who are "religious" about FOSS (or other open source > movements) should stop for a tiny bit to figure out if their militant "militant"? .... Ah, is the name-calling supposed to shame people into silence? [...SNIP...] > tl;dr: Please follow ground rules and do not post these OT > discussions. Also, please don't provide your defense or get all > apologetic about why this needs to be posted here, especially after The second sentence/para of your email contradicts the above, where you claim your reply is OT, against the interest of this list, and yet exhorted list members thus: "please try to provide your own reasons in your own words without sensationalizing with quotes, etc.". -- Best, Vid ? http://svaksha.com ? From benignbala at gmail.com Mon Apr 15 20:28:58 2013 From: benignbala at gmail.com (Balachandran Sivakumar) Date: Mon, 15 Apr 2013 23:58:58 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: Hi, On Mon, Apr 15, 2013 at 8:54 PM, Kaushik Kalyanaraman wrote: > > But, seriously, and even though even this reply is completely OT to > the interests of this list, please try to provide your own reasons in > your own words without sensationalizing with quotes, etc. At least > then, some may be sympathetic (not claiming I am or I am not) to your > cause. Otherwise, it equally well reeks of FUD on your part. > What are you trying to say ? We aren't talk about "sympathy" towards anything/anyone here. > Finally, people who are "religious" about FOSS (or other open source I don't understand this either. What do you mean being "religious" about foss/other open source movements. I was being "religious" about freedom, and a few of the members pointed out that, valid or not, this is not the place for it. A few were nice enough to suggest forums where such issues could be brought up. That ended the discussion. So, again, what are you trying to say ? That we should not care about freedom ? Well... > movements) should stop for a tiny bit to figure out if their militant > propositioning pans out in the larger scheme of things. For example, I Care to explain what "militant propositioning" means. It would be nice if people are careful with their language. And again, it would be nice if people do not use phrases just because they have an urge to use it somewhere. > notice that OP as well as other defendant(s) are using Gmail. So, > could they (or others) please enlighten me as to whether Gmail or I have seen this argument over and over. I use Gmail because I decided to use it(I don't have the necessity to run my own server, with exim/postfix whatever). It was not forced on me by parents/teachers/college/friends/whatever . The whole point is about freedom. > you get the picture) is all built on the notion of openness that they > are probably advocating in their "linux vs windows" battle. (For the > record, I use neither.) If not, and if this is a fight against some I hate to say this - But please, read mails before you reply, and reply only when you know what you are talking about. No one is talking about windows vs linux(or what ever you are imagining this to be). Again, I am forced to repeat, it would be nice if people do not use phrases just because they have an urge to use it somewhere. > > discussions. Also, please don't provide your defense or get all > apologetic about why this needs to be posted here, especially after > being pointed to. > I don't have to do either. I haven't committed any crime for which there is a need to defend myself. I had some assumptions before I posted, and changed those later. Thanks. -- Thank you Balachandran Sivakumar Arise Awake and stop not till the goal is reached. - Swami Vivekananda Mail: benignbala at gmail.com Blog: http://benignbala.wordpress.com/ From noufal at nibrahim.net.in Tue Apr 16 07:40:24 2013 From: noufal at nibrahim.net.in (Noufal Ibrahim) Date: Tue, 16 Apr 2013 11:10:24 +0530 Subject: [BangPypers] Please stop (was: [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE) In-Reply-To: (Balachandran Sivakumar's message of "Mon, 15 Apr 2013 23:58:58 +0530") References: Message-ID: <871uabxcc7.fsf_-_@sanitarium.localdomain> This conversation is getting more pointless than the original post which was not really on topic to begin with. If anyone has things that need to be sorted out, please do so but not on the list. -- Cordially, Noufal http://nibrahim.net.in From smrutilekha at gmail.com Tue Apr 16 08:47:18 2013 From: smrutilekha at gmail.com (Smrutilekha Swain) Date: Tue, 16 Apr 2013 12:17:18 +0530 Subject: [BangPypers] I need some help/guidance Message-ID: i am writing a program using PyQt4. i have created a table containg name of the instruments, locations, its latitudes, longitude and altitude. there may be two instruments and its locations are same but different latitude and longitude with mild difference. so now i want to sort the table by latitude or longitude whose have least difference... can u plz give me sume hints or guidance how to do..... thanzzzzzzz in advance..........waiting for ur reply............ From abdulmuneer at gmail.com Tue Apr 16 10:02:26 2013 From: abdulmuneer at gmail.com (Abdul Muneer) Date: Tue, 16 Apr 2013 13:32:26 +0530 Subject: [BangPypers] I need some help/guidance In-Reply-To: References: Message-ID: Hi, Basically you can sort any list by passing a key as follows: base_location = (x,y) locations = [(x1, y1), (x2, y2), ....(xn, yn)] def distance_between(geocordinate1, geo_cordinate2): ''' write your code here to return the distance between two cordinates you can use google maps api for this. '''' pass *locations.sort(key = lambda x: distance_between(x, base_location))* #sorts the list in-place Regards, Abdul Muneer -- Follow me on Twitter: @abdulmuneer On Tue, Apr 16, 2013 at 12:17 PM, Smrutilekha Swain wrote: > i am writing a program using PyQt4. i have created a table containg name of > the instruments, locations, its latitudes, longitude and altitude. > > there may be two instruments and its locations are same but different > latitude and longitude with mild difference. > > so now i want to sort the table by latitude or longitude whose have least > difference... > > can u plz give me sume hints or guidance how to do..... > > > thanzzzzzzz in advance..........waiting for ur reply............ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From abpillai at gmail.com Tue Apr 16 10:44:18 2013 From: abpillai at gmail.com (Anand B Pillai) Date: Tue, 16 Apr 2013 14:14:18 +0530 Subject: [BangPypers] Please stop (was: [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE) In-Reply-To: <871uabxcc7.fsf_-_@sanitarium.localdomain> References: <871uabxcc7.fsf_-_@sanitarium.localdomain> Message-ID: On Tue, Apr 16, 2013 at 11:10 AM, Noufal Ibrahim wrote: > > This conversation is getting more pointless than the original post which > was not really on topic to begin with. > http://en.wikipedia.org/wiki/Sorites_paradox Let us not create heaps of sand which don't have any sand particles in them :) > If anyone has things that need to be sorted out, please do so but not on > the list. > +1. > > -- > Cordially, > Noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, --Anand From gora at mimirtech.com Tue Apr 16 12:20:55 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Tue, 16 Apr 2013 15:50:55 +0530 Subject: [BangPypers] I need some help/guidance In-Reply-To: References: Message-ID: On 16 April 2013 12:17, Smrutilekha Swain wrote: > i am writing a program using PyQt4. i have created a table containg name of > the instruments, locations, its latitudes, longitude and altitude. > > there may be two instruments and its locations are same but different > latitude and longitude with mild difference. > > so now i want to sort the table by latitude or longitude whose have least > difference... [...] What do you mean by a "table"? A database table, or a Python sequence? Abdul has already pointed out how to sort a list in Python. However, if you want any kind of scale, you will need a database that supports GIS operations, and a web GIS framework if you need a presence on the web. I would suggest GeoDjango with PostGIS. Regards, Gora From venkat83 at gmail.com Tue Apr 16 13:27:16 2013 From: venkat83 at gmail.com (Venkatraman S) Date: Tue, 16 Apr 2013 16:57:16 +0530 Subject: [BangPypers] Do not Email Message-ID: In the wake of recent spam : http://blogs.technet.com/b/exchange/archive/2004/04/08/109626.aspx Venkat http://twitter.com/venkasub From ramdaz at gmail.com Tue Apr 16 13:32:26 2013 From: ramdaz at gmail.com (Ramdas S) Date: Tue, 16 Apr 2013 17:02:26 +0530 Subject: [BangPypers] Amazon and Django Message-ID: Anyone running Django apps on amazon, I need to spec and figure out some costing. Please do let me know? From gora at mimirtech.com Tue Apr 16 14:41:13 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Tue, 16 Apr 2013 18:11:13 +0530 Subject: [BangPypers] Amazon and Django In-Reply-To: References: Message-ID: On 16 April 2013 17:02, Ramdas S wrote: > Anyone running Django apps on amazon, I need to spec and figure out some > costing. Please do let me know? This is maybe a little off-topic, but we do use Django extensively on AWS. Maybe contact me off-list? Regards, Gora From ramdaz at gmail.com Tue Apr 16 14:43:48 2013 From: ramdaz at gmail.com (Ramdas S) Date: Tue, 16 Apr 2013 18:13:48 +0530 Subject: [BangPypers] Amazon and Django In-Reply-To: References: Message-ID: On Tue, Apr 16, 2013 at 6:11 PM, Gora Mohanty wrote: > On 16 April 2013 17:02, Ramdas S wrote: > > Anyone running Django apps on amazon, I need to spec and figure out some > > costing. Please do let me know? > > This is maybe a little off-topic, but we do use Django > extensively on AWS. Maybe contact me off-list? > Absolutely, give me your contact details > > Regards, > Gora > -- Ramdas S +91 9342 583 065 My Personal Blog on http://ramdaz.wordpress.com From gora at mimirtech.com Tue Apr 16 15:15:41 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Tue, 16 Apr 2013 18:45:41 +0530 Subject: [BangPypers] Amazon and Django In-Reply-To: References: Message-ID: On 16 April 2013 18:13, Ramdas S wrote: > > > On Tue, Apr 16, 2013 at 6:11 PM, Gora Mohanty wrote: >> >> On 16 April 2013 17:02, Ramdas S wrote: >> > Anyone running Django apps on amazon, I need to spec and figure out some >> > costing. Please do let me know? >> >> This is maybe a little off-topic, but we do use Django >> extensively on AWS. Maybe contact me off-list? > > > Absolutely, give me your contact details Please email me at this address. Regards, Gora From smrutilekha at gmail.com Wed Apr 17 06:30:40 2013 From: smrutilekha at gmail.com (Smrutilekha Swain) Date: Wed, 17 Apr 2013 10:00:40 +0530 Subject: [BangPypers] I need some help/guidance In-Reply-To: References: Message-ID: It is a database table which i have created using QTableWidget n it contains 7 columns. first column is checkbox for selecting the rows den name, site, latitude, longitude, altitude and date of entry. in that database some r redundant data like same name n same site but little difference in latitude or longitude. so i want to sort the table in such a way that the redundant data having least value will come first like in name- A, Site- V, latitude-23.456, longitude-87.789 n in another row name-A, Site-V, latitude-23.222, longitude-87.789. so i want the minimum value sud come first. another query is how to sort the table by date of entry as the date of entry is in string.... i will b vry grateful if u give me sum help............no api n no GIS... thanzzz in advance.............. On Tue, Apr 16, 2013 at 3:50 PM, Gora Mohanty wrote: > On 16 April 2013 12:17, Smrutilekha Swain wrote: > > i am writing a program using PyQt4. i have created a table containg name > of > > the instruments, locations, its latitudes, longitude and altitude. > > > > there may be two instruments and its locations are same but different > > latitude and longitude with mild difference. > > > > so now i want to sort the table by latitude or longitude whose have least > > difference... > [...] > > What do you mean by a "table"? A database table, or a > Python sequence? > > Abdul has already pointed out how to sort a list in > Python. However, if you want any kind of scale, you > will need a database that supports GIS operations, > and a web GIS framework if you need a presence on > the web. I would suggest GeoDjango with PostGIS. > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From gora at mimirtech.com Wed Apr 17 06:49:25 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Wed, 17 Apr 2013 10:19:25 +0530 Subject: [BangPypers] I need some help/guidance In-Reply-To: References: Message-ID: On 17 April 2013 10:00, Smrutilekha Swain wrote: > It is a database table which i have created using QTableWidget n it > contains 7 columns. first column is checkbox for selecting the rows den > name, site, latitude, longitude, altitude and date of entry. [...] In that case, I would look into what facilities PyQt4 offers to access such database tables. I am not familiar with PyQt4. Alternatively, you can use standard Python DB access and run specific SQL, or use a ORM as a higher-level interface. Regards, Gora From anandology at gmail.com Wed Apr 17 11:08:20 2013 From: anandology at gmail.com (Anand Chitipothu) Date: Wed, 17 Apr 2013 14:38:20 +0530 Subject: [BangPypers] April month meetup In-Reply-To: References: Message-ID: Krace is out of town. I've asked Baiju if he can coordinate the meetup at ZeOmega. He said he'll find someone to coordinate the event there. So we have Zeomega as tentative venue. Lets wait for a final confirmation from Baiju. Tentative Venue: ZeOmega, Basavanagudi Date: Saturday, April 20, 2013 Time: 3:00PM Agenda: * Hands on django Session - Beginner/Intermediate Level. by Saket Bhushan * Lightening talks If you any of you would like to present something, you are welcome. Meetup page: http://www.meetup.com/BangPypers/events/111834102/ Anand On Sat, Apr 6, 2013 at 10:34 PM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > All > > I may not be available for this month meetup, can some one take charge of > coordination April meetup. If interested let me know I will tell what needs > to be done. > > > On Thu, Apr 4, 2013 at 4:48 PM, kracekumar ramaraju < > kracethekingmaker at gmail.com> wrote: > > > Saket, > > > > Meetup is on 20th April, from 3.00PM to 6.00Pm you can present any > topic. > > Django or Machine Learning. Location is yet to be decided. Here is the > > meetup page. RSVP: http://www.meetup.com/BangPypers/events/111834102/ > > > > > > On Sun, Mar 24, 2013 at 1:24 AM, kracekumar ramaraju < > > kracethekingmaker at gmail.com> wrote: > > > >> All, > >> > >> Siva informed me he is willing to handle 3 hours hands-on session > about > >> getting started with Django next month. We need a venue which has power > >> socket and decent internet connection. I would like to have others > >> suggestions about the format, looking forward for venue to host for next > >> meetup. We will be also needing few volunteers to help during meetup. > >> > >> -- > >> * > >> Thanks & Regards > >> > >> "Talk is cheap, show me the code" -- Linus Torvalds > >> kracekumar > >> www.kracekumar.com > >> * > >> > > > > > > > > -- > > * > > Thanks & Regards > > > > "Talk is cheap, show me the code" -- Linus Torvalds > > kracekumar > > www.kracekumar.com > > * > > > > > > -- > * > Thanks & Regards > > "Talk is cheap, show me the code" -- Linus Torvalds > kracekumar > www.kracekumar.com > * > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Anand http://anandology.com/ From baiju.m.mail at gmail.com Wed Apr 17 16:50:11 2013 From: baiju.m.mail at gmail.com (Baiju M) Date: Wed, 17 Apr 2013 20:20:11 +0530 Subject: [BangPypers] April month meetup In-Reply-To: References: Message-ID: Yes, I confirm this venue. This is the address: ZeOmega Infotech Pvt. Ltd. "Subhashri Pride", 4th Floor, Southend Road, Basavanagudi, Bangalore-560-004 (Just look for "Axis Bank", it's the same building) My mobile number: 9945973441 On Wed, Apr 17, 2013 at 2:38 PM, Anand Chitipothu wrote: > Krace is out of town. I've asked Baiju if he can coordinate the meetup at > ZeOmega. He said he'll find someone to coordinate the event there. > > So we have Zeomega as tentative venue. Lets wait for a final confirmation > from Baiju. > > Tentative Venue: ZeOmega, Basavanagudi > > Date: Saturday, April 20, 2013 > Time: 3:00PM > > Agenda: > > * Hands on django Session - Beginner/Intermediate Level. by Saket Bhushan > * Lightening talks > > If you any of you would like to present something, you are welcome. > > Meetup page: http://www.meetup.com/BangPypers/events/111834102/ > > Anand > > > > > On Sat, Apr 6, 2013 at 10:34 PM, kracekumar ramaraju < > kracethekingmaker at gmail.com> wrote: > >> All >> >> I may not be available for this month meetup, can some one take charge of >> coordination April meetup. If interested let me know I will tell what needs >> to be done. >> >> >> On Thu, Apr 4, 2013 at 4:48 PM, kracekumar ramaraju < >> kracethekingmaker at gmail.com> wrote: >> >> > Saket, >> > >> > Meetup is on 20th April, from 3.00PM to 6.00Pm you can present any >> topic. >> > Django or Machine Learning. Location is yet to be decided. Here is the >> > meetup page. RSVP: http://www.meetup.com/BangPypers/events/111834102/ >> > >> > >> > On Sun, Mar 24, 2013 at 1:24 AM, kracekumar ramaraju < >> > kracethekingmaker at gmail.com> wrote: >> > >> >> All, >> >> >> >> Siva informed me he is willing to handle 3 hours hands-on session >> about >> >> getting started with Django next month. We need a venue which has power >> >> socket and decent internet connection. I would like to have others >> >> suggestions about the format, looking forward for venue to host for next >> >> meetup. We will be also needing few volunteers to help during meetup. >> >> >> >> -- >> >> * >> >> Thanks & Regards >> >> >> >> "Talk is cheap, show me the code" -- Linus Torvalds >> >> kracekumar >> >> www.kracekumar.com >> >> * >> >> >> > >> > >> > >> > -- >> > * >> > Thanks & Regards >> > >> > "Talk is cheap, show me the code" -- Linus Torvalds >> > kracekumar >> > www.kracekumar.com >> > * >> > >> >> >> >> -- >> * >> Thanks & Regards >> >> "Talk is cheap, show me the code" -- Linus Torvalds >> kracekumar >> www.kracekumar.com >> * >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > Anand > http://anandology.com/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers From rahul8590 at gmail.com Wed Apr 17 17:30:26 2013 From: rahul8590 at gmail.com (Rahul R) Date: Wed, 17 Apr 2013 21:00:26 +0530 Subject: [BangPypers] Reorder Dictionary Size in python Message-ID: Hey Guys, Is it possible to forcibly reorder the python dictionary after "n" number of inserts and deletions. As far as i know, python dictionary performs lazy deletes. Thus , even if the data is deleted, python has a dummy data their in order to preserve consistency. The python dictionary keeps expanding when the size of dict is increasing, but after deleting a few parameters the size does not decrease. Is there a way , where I can forcibly resize the dictionary ? I was thinking of copying content from existing dictionary to new dict and deleting the previous one.But thats a cumbersome operation. Thanks, ./Rahul From anandology at gmail.com Wed Apr 17 17:35:49 2013 From: anandology at gmail.com (Anand Chitipothu) Date: Wed, 17 Apr 2013 21:05:49 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: dictionaries are unordered. It is not a good idea to expect any order in dictionaries, even if you are seeing some order by chance. If you need order, then use OrderedDict from collections module (new in Python 2.7). Anand On Wed, Apr 17, 2013 at 9:00 PM, Rahul R wrote: > Hey Guys, > > Is it possible to forcibly reorder the python dictionary after "n" number > of inserts and deletions. As far as i know, python dictionary performs lazy > deletes. Thus , even if the data is deleted, python has a dummy data their > in order to preserve consistency. The python dictionary > keeps expanding when the size of dict is increasing, but after deleting a > few parameters the size does not decrease. Is there a way , where I can > forcibly resize the dictionary ? > > I was thinking of copying content from existing dictionary to new dict and > deleting the previous one.But thats a cumbersome operation. > > Thanks, > ./Rahul > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Anand http://anandology.com/ From rahul8590 at gmail.com Wed Apr 17 17:52:30 2013 From: rahul8590 at gmail.com (Rahul R) Date: Wed, 17 Apr 2013 21:22:30 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: Ahh , sorry If i wasnt clear the first time. I dint mean reorder the data in dictionary. I meant resize the dictionary. ./Rahul On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu wrote: > dictionaries are unordered. It is not a good idea to expect any order in > dictionaries, even if you are seeing some order by chance. > > If you need order, then use OrderedDict from collections module (new in > Python 2.7). > > Anand > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R wrote: > > > Hey Guys, > > > > Is it possible to forcibly reorder the python dictionary after "n" number > > of inserts and deletions. As far as i know, python dictionary performs > lazy > > deletes. Thus , even if the data is deleted, python has a dummy data > their > > in order to preserve consistency. The python dictionary > > keeps expanding when the size of dict is increasing, but after deleting a > > few parameters the size does not decrease. Is there a way , where I can > > forcibly resize the dictionary ? > > > > I was thinking of copying content from existing dictionary to new dict > and > > deleting the previous one.But thats a cumbersome operation. > > > > Thanks, > > ./Rahul > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Anand > http://anandology.com/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From ramdaz at gmail.com Wed Apr 17 17:53:47 2013 From: ramdaz at gmail.com (Ramdas S) Date: Wed, 17 Apr 2013 21:23:47 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: On Wed, Apr 17, 2013 at 9:22 PM, Rahul R wrote: > Ahh , sorry If i wasnt clear the first time. I dint mean reorder the data > in dictionary. I meant resize the dictionary. > What do you mean by resize? > > ./Rahul > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu >wrote: > > > dictionaries are unordered. It is not a good idea to expect any order in > > dictionaries, even if you are seeing some order by chance. > > > > If you need order, then use OrderedDict from collections module (new in > > Python 2.7). > > > > Anand > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R wrote: > > > > > Hey Guys, > > > > > > Is it possible to forcibly reorder the python dictionary after "n" > number > > > of inserts and deletions. As far as i know, python dictionary performs > > lazy > > > deletes. Thus , even if the data is deleted, python has a dummy data > > their > > > in order to preserve consistency. The python dictionary > > > keeps expanding when the size of dict is increasing, but after > deleting a > > > few parameters the size does not decrease. Is there a way , where I can > > > forcibly resize the dictionary ? > > > > > > I was thinking of copying content from existing dictionary to new dict > > and > > > deleting the previous one.But thats a cumbersome operation. > > > > > > Thanks, > > > ./Rahul > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > Anand > > http://anandology.com/ > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Ramdas S +91 9342 583 065 My Personal Blog on http://ramdaz.wordpress.com From rahul8590 at gmail.com Wed Apr 17 18:00:33 2013 From: rahul8590 at gmail.com (Rahul R) Date: Wed, 17 Apr 2013 21:30:33 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: As far as i know, python performs a lazy deletion of values , when we delete content from a dictionary (correct me if i am wrong) . So, when we insert a lot of values the dictionary automatically expands. I don't see dict shrinking when we delete values from dictionary. In such case, is there a way to forcibly reduce the dictionary size ? ./Rahul On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R wrote: > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder the data > > in dictionary. I meant resize the dictionary. > > > > What do you mean by resize? > > > > > > ./Rahul > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu > >wrote: > > > > > dictionaries are unordered. It is not a good idea to expect any order > in > > > dictionaries, even if you are seeing some order by chance. > > > > > > If you need order, then use OrderedDict from collections module (new in > > > Python 2.7). > > > > > > Anand > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R wrote: > > > > > > > Hey Guys, > > > > > > > > Is it possible to forcibly reorder the python dictionary after "n" > > number > > > > of inserts and deletions. As far as i know, python dictionary > performs > > > lazy > > > > deletes. Thus , even if the data is deleted, python has a dummy data > > > their > > > > in order to preserve consistency. The python dictionary > > > > keeps expanding when the size of dict is increasing, but after > > deleting a > > > > few parameters the size does not decrease. Is there a way , where I > can > > > > forcibly resize the dictionary ? > > > > > > > > I was thinking of copying content from existing dictionary to new > dict > > > and > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > Thanks, > > > > ./Rahul > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > -- > > > Anand > > > http://anandology.com/ > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Ramdas S > +91 9342 583 065 > My Personal Blog on http://ramdaz.wordpress.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From anandology at gmail.com Thu Apr 18 02:23:24 2013 From: anandology at gmail.com (Anand Chitipothu) Date: Thu, 18 Apr 2013 05:53:24 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > As far as i know, python performs a lazy deletion of values , when we > delete content from a dictionary (correct me if i am wrong) . So, when we > insert a lot of values the dictionary automatically expands. I don't see > dict shrinking when we delete values from dictionary. In such case, is > there a way to forcibly reduce the dictionary size ? > Don't try to optimize something that is not required. Python core developers are smarted than you, trust them. Premature optimization is root cause of all evil. Anand From abdulmuneer at gmail.com Thu Apr 18 05:55:12 2013 From: abdulmuneer at gmail.com (Abdul Muneer) Date: Thu, 18 Apr 2013 09:25:12 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: Expecting this behaviour from built-in dict is not a good idea. However try if garbage collection helps. >>> import gc >>> gc.collect() I have not tried it out myself, though. Regards, Abdul Muneer -- Follow me on Twitter: @abdulmuneer On Thu, Apr 18, 2013 at 5:53 AM, Anand Chitipothu wrote: > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > As far as i know, python performs a lazy deletion of values , when we > > delete content from a dictionary (correct me if i am wrong) . So, when > we > > insert a lot of values the dictionary automatically expands. I don't see > > dict shrinking when we delete values from dictionary. In such case, is > > there a way to forcibly reduce the dictionary size ? > > > > Don't try to optimize something that is not required. Python core > developers are smarted than you, trust them. > > Premature optimization is root cause of all evil. > > Anand > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From rahul8590 at gmail.com Thu Apr 18 07:17:52 2013 From: rahul8590 at gmail.com (Rahul R) Date: Thu, 18 Apr 2013 10:47:52 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: I dont intent to pre optimize things , I am rather driven by curiosity on how one could do that. Thanks, ./Rahul On Thu, Apr 18, 2013 at 5:53 AM, Anand Chitipothu wrote: > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > As far as i know, python performs a lazy deletion of values , when we > > delete content from a dictionary (correct me if i am wrong) . So, when > we > > insert a lot of values the dictionary automatically expands. I don't see > > dict shrinking when we delete values from dictionary. In such case, is > > there a way to forcibly reduce the dictionary size ? > > > > Don't try to optimize something that is not required. Python core > developers are smarted than you, trust them. > > Premature optimization is root cause of all evil. > > Anand > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From rahul8590 at gmail.com Thu Apr 18 07:18:49 2013 From: rahul8590 at gmail.com (Rahul R) Date: Thu, 18 Apr 2013 10:48:49 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: As far as i know , gc.collect() works on objects which are not used anymore. Not for resizing existing objects. Thanks, ./Rahul On Thu, Apr 18, 2013 at 9:25 AM, Abdul Muneer wrote: > Expecting this behaviour from built-in dict is not a good idea. However try > if garbage collection helps. > >>> import gc > >>> gc.collect() > I have not tried it out myself, though. > > Regards, > Abdul Muneer > > -- > Follow me on Twitter: @abdulmuneer > > > On Thu, Apr 18, 2013 at 5:53 AM, Anand Chitipothu >wrote: > > > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > > > As far as i know, python performs a lazy deletion of values , when we > > > delete content from a dictionary (correct me if i am wrong) . So, when > > we > > > insert a lot of values the dictionary automatically expands. I don't > see > > > dict shrinking when we delete values from dictionary. In such case, is > > > there a way to forcibly reduce the dictionary size ? > > > > > > > Don't try to optimize something that is not required. Python core > > developers are smarted than you, trust them. > > > > Premature optimization is root cause of all evil. > > > > Anand > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From noufal at nibrahim.net.in Thu Apr 18 07:24:21 2013 From: noufal at nibrahim.net.in (Noufal Ibrahim) Date: Thu, 18 Apr 2013 10:54:21 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: (Rahul R.'s message of "Thu, 18 Apr 2013 10:47:52 +0530") References: Message-ID: <87vc7k76nu.fsf@sanitarium.localdomain> Rahul R writes: > I dont intent to pre optimize things , I am rather driven by curiosity on > how one could do that. I'm with Anand on recommendations but like you, I'm curious as to whether this is possible. Do you have some estimates of size for your dictionary and the average size for the values? I'm trying some experiments. [...] -- Cordially, Noufal http://nibrahim.net.in From abpillai at gmail.com Thu Apr 18 07:46:25 2013 From: abpillai at gmail.com (Anand B Pillai) Date: Thu, 18 Apr 2013 11:16:25 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: <87vc7k76nu.fsf@sanitarium.localdomain> References: <87vc7k76nu.fsf@sanitarium.localdomain> Message-ID: On Thu, Apr 18, 2013 at 10:54 AM, Noufal Ibrahim wrote: > Rahul R writes: > > > I dont intent to pre optimize things , I am rather driven by curiosity > on > > how one could do that. > > I'm with Anand on recommendations but like you, I'm curious as to > whether this is possible. Do you have some estimates of size for your > dictionary and the average size for the values? > Does this help you ? http://stackoverflow.com/questions/2211965/python-memory-usage-loading-large-dictionaries-in-memory Python dictionaries always take up extra memory to allow fast access to contents. You might want to experiment with optimizing the objects you store in it or use some other dictionary like objects which are implemented differently - like shelve or dbm or bsddb. > > I'm trying some experiments. > > [...] > > > -- > Cordially, > Noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, --Anand From noufal at nibrahim.net.in Thu Apr 18 08:10:22 2013 From: noufal at nibrahim.net.in (Noufal Ibrahim) Date: Thu, 18 Apr 2013 11:40:22 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: <87vc7k76nu.fsf@sanitarium.localdomain> (Noufal Ibrahim's message of "Thu, 18 Apr 2013 10:54:21 +0530") References: <87vc7k76nu.fsf@sanitarium.localdomain> Message-ID: <87bo9c74j5.fsf@sanitarium.localdomain> Noufal Ibrahim writes: > Rahul R writes: > >> I dont intent to pre optimize things , I am rather driven by curiosity on >> how one could do that. > > I'm with Anand on recommendations but like you, I'm curious as to > whether this is possible. Do you have some estimates of size for your > dictionary and the average size for the values? > > I'm trying some experiments. My experiments were not particularly revealing. However, take a look at http://hg.python.org/cpython/file/3e02d70cd07b/Objects/dictnotes.txt There are *compile time* parameters that can be tweaked in the implementation which will affect behaviour. These things all affect performance in subtle ways and the values that they've chosen are probably based on varied data which best represent real life cases. Tweaking them will probably be a micro optimisation that you'll need only for specific cases. The ones I see are dictionary size, load, growth rate, sparseness and shrinkage rate. The last two are things you can tweak to get the behaviour you want. However, as it notes, shrinkage checks are never done when an item is removed. So, it looks as though you have to actually add an item after deleting everything else for the dictionary itself to shrink which is an interesting quirk. Another thing that occurs to me is that the "size" of the dictionary is probably dominated by the size of the keys and, perhaps more so, the values. Unless these are super small, I don't think the extra overhead of the dictionary itself will become a burden. In other words, the empty slots you're worried about shouldn't be a problem unless your actual data is so small that the free slots are the dominant data. [...] -- Cordially, Noufal http://nibrahim.net.in From rishi at turtleyogi.com Thu Apr 18 08:16:57 2013 From: rishi at turtleyogi.com (Hrishikesh Kulkarni) Date: Thu, 18 Apr 2013 11:46:57 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: Rahul, Get the source code of Python http://www.python.org/download/releases/ Search for the implementation of dictionary. I believe it should be Objects/dictobject.c Now you should be able to try out what you want. Python core developers maybe smarter but that is no good reason to not try out ideas (however silly they might seem), else we wouldnt have Stackless Python or PyPy. regards, Rishi On Thu, Apr 18, 2013 at 5:53 AM, Anand Chitipothu wrote: > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > As far as i know, python performs a lazy deletion of values , when we > > delete content from a dictionary (correct me if i am wrong) . So, when > we > > insert a lot of values the dictionary automatically expands. I don't see > > dict shrinking when we delete values from dictionary. In such case, is > > there a way to forcibly reduce the dictionary size ? > > > > Don't try to optimize something that is not required. Python core > developers are smarted than you, trust them. > > Premature optimization is root cause of all evil. > > Anand > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From rishi at turtleyogi.com Thu Apr 18 08:36:55 2013 From: rishi at turtleyogi.com (Hrishikesh Kulkarni) Date: Thu, 18 Apr 2013 12:06:55 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > As far as i know, python performs a lazy deletion of values , when we > delete content from a dictionary (correct me if i am wrong) . So, when we > insert a lot of values the dictionary automatically expands. I don't see > dict shrinking when we delete values from dictionary. In such case, is > there a way to forcibly reduce the dictionary size ? > Are you measuring this shrinking? the following in dictobject.c should guide you with the internals. The deleted item is simply replaced with a refcounted dummy. The deleted item is marked for cleanup by gc with decref. PyDict_DelItem () : .. old_key = ep->me_key; Py_INCREF(dummy); ep->me_key = dummy; old_value = ep->me_value; ep->me_value = NULL; mp->ma_used--; Py_DECREF(old_value); Py_DECREF(old_key); .. dict_length(): .. return mp->ma_used; .. PyDict_Size(): .. return ((PyDictObject *)mp)->ma_used; .. regards, Rishi > > ./Rahul > > On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > > > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R wrote: > > > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder the > data > > > in dictionary. I meant resize the dictionary. > > > > > > > What do you mean by resize? > > > > > > > > > > ./Rahul > > > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu < > anandology at gmail.com > > > >wrote: > > > > > > > dictionaries are unordered. It is not a good idea to expect any order > > in > > > > dictionaries, even if you are seeing some order by chance. > > > > > > > > If you need order, then use OrderedDict from collections module (new > in > > > > Python 2.7). > > > > > > > > Anand > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R > wrote: > > > > > > > > > Hey Guys, > > > > > > > > > > Is it possible to forcibly reorder the python dictionary after "n" > > > number > > > > > of inserts and deletions. As far as i know, python dictionary > > performs > > > > lazy > > > > > deletes. Thus , even if the data is deleted, python has a dummy > data > > > > their > > > > > in order to preserve consistency. The python dictionary > > > > > keeps expanding when the size of dict is increasing, but after > > > deleting a > > > > > few parameters the size does not decrease. Is there a way , where I > > can > > > > > forcibly resize the dictionary ? > > > > > > > > > > I was thinking of copying content from existing dictionary to new > > dict > > > > and > > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > > > Thanks, > > > > > ./Rahul > > > > > _______________________________________________ > > > > > BangPypers mailing list > > > > > BangPypers at python.org > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > -- > > > > Anand > > > > http://anandology.com/ > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > Ramdas S > > +91 9342 583 065 > > My Personal Blog on http://ramdaz.wordpress.com > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From venkat83 at gmail.com Thu Apr 18 09:40:29 2013 From: venkat83 at gmail.com (Venkatraman S) Date: Thu, 18 Apr 2013 13:10:29 +0530 Subject: [BangPypers] [OT] Intro Video - Companies in India Message-ID: Hi, How do the companies in India make the intro videos to be put up on their website? Do they outsource it to someone in the US to get the language and the accent right or is there some automated Voice SDK? Offlate, i stumbled on a few small companies(/startups) who have their intro-videos with an American Accent and wasn't sure whether they do indeed outsource it. -V @venkasub From vsapre80 at gmail.com Thu Apr 18 09:41:27 2013 From: vsapre80 at gmail.com (Vishal) Date: Thu, 18 Apr 2013 13:11:27 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: Not sure what the exact intent of resizing the dict is...however, if you wish to reduce the overall memory consumption of your python process...i would suggest: - copy the required contents to a new dict..(use dict comprehension if you can) >>> d2 = dict((k,v) for k,v in d1.items() if ) - Assign the old dict name to None >>> d1 = None - do a gc.collect() >>> import gc >>> gc.collect() you should see immediate results on process memory consumption. Enjoy Python Vishal Sapre On Wed, Apr 17, 2013 at 9:22 PM, Rahul R wrote: > Ahh , sorry If i wasnt clear the first time. I dint mean reorder the data > in dictionary. I meant resize the dictionary. > > ./Rahul > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu >wrote: > > > dictionaries are unordered. It is not a good idea to expect any order in > > dictionaries, even if you are seeing some order by chance. > > > > If you need order, then use OrderedDict from collections module (new in > > Python 2.7). > > > > Anand > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R wrote: > > > > > Hey Guys, > > > > > > Is it possible to forcibly reorder the python dictionary after "n" > number > > > of inserts and deletions. As far as i know, python dictionary performs > > lazy > > > deletes. Thus , even if the data is deleted, python has a dummy data > > their > > > in order to preserve consistency. The python dictionary > > > keeps expanding when the size of dict is increasing, but after > deleting a > > > few parameters the size does not decrease. Is there a way , where I can > > > forcibly resize the dictionary ? > > > > > > I was thinking of copying content from existing dictionary to new dict > > and > > > deleting the previous one.But thats a cumbersome operation. > > > > > > Thanks, > > > ./Rahul > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > Anand > > http://anandology.com/ > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks and best regards, Vishal Sapre --- "Life is 10% how you make it, and 90% how you take it" "????? ?????, ????? ????? (Benefit for most people, Happiness for most people.)" --- Please DONT print this email, unless you really need to. Save Energy & Paper. Save the Earth. From harish.shastry at gmail.com Thu Apr 18 09:44:31 2013 From: harish.shastry at gmail.com (Harish Vishwanath) Date: Thu, 18 Apr 2013 13:14:31 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: Here is a good talk on how dictionaries are implemented in python : http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2010-the-mighty-dictionary-55-3352147 Due to possibility of collisions in the hash table, dict keeps allocating 4x or 2x the size of existing allocation and *will* reorder the items when such an operation happens. They go and acquire more memory when the dict is 2/3rds full. But the reverse is not possible. A dummy key has to be inserted in a free slot, so that valid items in the dictionary can be found. Since all this depends on the order of insertion, you cannot guarantee that copying existing items into a new dictionary will consume less space. If look up times is not a concern, and you are trying to optimize for space the stackoverflow link that Anand shared earlier could help. Regards, Harish On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni wrote: > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > As far as i know, python performs a lazy deletion of values , when we > > delete content from a dictionary (correct me if i am wrong) . So, when > we > > insert a lot of values the dictionary automatically expands. I don't see > > dict shrinking when we delete values from dictionary. In such case, is > > there a way to forcibly reduce the dictionary size ? > > > > > Are you measuring this shrinking? > the following in dictobject.c should guide you with the internals. The > deleted item is simply replaced with a refcounted dummy. The deleted item > is marked for cleanup by gc with decref. > > PyDict_DelItem () : > .. > old_key = ep->me_key; > Py_INCREF(dummy); > ep->me_key = dummy; > old_value = ep->me_value; > ep->me_value = NULL; > mp->ma_used--; > Py_DECREF(old_value); > Py_DECREF(old_key); > .. > > > dict_length(): > .. > return mp->ma_used; > .. > > PyDict_Size(): > .. > return ((PyDictObject *)mp)->ma_used; > .. > > > > regards, > Rishi > > > > > > > > ./Rahul > > > > On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > > > > > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R wrote: > > > > > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder the > > data > > > > in dictionary. I meant resize the dictionary. > > > > > > > > > > What do you mean by resize? > > > > > > > > > > > > > > ./Rahul > > > > > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu < > > anandology at gmail.com > > > > >wrote: > > > > > > > > > dictionaries are unordered. It is not a good idea to expect any > order > > > in > > > > > dictionaries, even if you are seeing some order by chance. > > > > > > > > > > If you need order, then use OrderedDict from collections module > (new > > in > > > > > Python 2.7). > > > > > > > > > > Anand > > > > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R > > wrote: > > > > > > > > > > > Hey Guys, > > > > > > > > > > > > Is it possible to forcibly reorder the python dictionary after > "n" > > > > number > > > > > > of inserts and deletions. As far as i know, python dictionary > > > performs > > > > > lazy > > > > > > deletes. Thus , even if the data is deleted, python has a dummy > > data > > > > > their > > > > > > in order to preserve consistency. The python dictionary > > > > > > keeps expanding when the size of dict is increasing, but after > > > > deleting a > > > > > > few parameters the size does not decrease. Is there a way , > where I > > > can > > > > > > forcibly resize the dictionary ? > > > > > > > > > > > > I was thinking of copying content from existing dictionary to new > > > dict > > > > > and > > > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > > > > > Thanks, > > > > > > ./Rahul > > > > > > _______________________________________________ > > > > > > BangPypers mailing list > > > > > > BangPypers at python.org > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Anand > > > > > http://anandology.com/ > > > > > _______________________________________________ > > > > > BangPypers mailing list > > > > > BangPypers at python.org > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > -- > > > Ramdas S > > > +91 9342 583 065 > > > My Personal Blog on http://ramdaz.wordpress.com > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From venkat83 at gmail.com Thu Apr 18 09:47:06 2013 From: venkat83 at gmail.com (Venkatraman S) Date: Thu, 18 Apr 2013 13:17:06 +0530 Subject: [BangPypers] [OT] Intro Video - Companies in India In-Reply-To: References: Message-ID: On Thu, Apr 18, 2013 at 1:10 PM, Venkatraman S wrote: > How do the companies in India make the intro videos to be put up on their > website? Do they outsource it to someone in the US to get the language and > the accent right or is there some automated Voice SDK? Offlate, i stumbled > on a few small companies(/startups) who have their intro-videos with an > American Accent and wasn't sure whether they do indeed outsource it. > > Should have searched in Quora :) http://www.quora.com/Are-there-any-Indian-explainer-video-production-houses http://www.quora.com/Are-there-any-production-studios-in-India-like-Epipheo-and-PictureLab-that-make-short-intro-videos Interesting. Now, a slightly different Q: any DIY video sites? :) From jayneil.dalal at gmail.com Thu Apr 18 10:03:03 2013 From: jayneil.dalal at gmail.com (Jayneil Dalal) Date: Thu, 18 Apr 2013 03:03:03 -0500 Subject: [BangPypers] [OT] Intro Video - Companies in India In-Reply-To: References: Message-ID: Venkataraman, This should help: http://www.powtoon.com/ I have used it a couple of times and it is really good! It is free to try but you have to pay to get the video in HD format and for removing their logo. Best, Jayneil. On Thu, Apr 18, 2013 at 2:47 AM, Venkatraman S wrote: > On Thu, Apr 18, 2013 at 1:10 PM, Venkatraman S wrote: > > > How do the companies in India make the intro videos to be put up on their > > website? Do they outsource it to someone in the US to get the language > and > > the accent right or is there some automated Voice SDK? Offlate, i > stumbled > > on a few small companies(/startups) who have their intro-videos with an > > American Accent and wasn't sure whether they do indeed outsource it. > > > > > Should have searched in Quora :) > http://www.quora.com/Are-there-any-Indian-explainer-video-production-houses > > http://www.quora.com/Are-there-any-production-studios-in-India-like-Epipheo-and-PictureLab-that-make-short-intro-videos > > Interesting. Now, a slightly different Q: any DIY video sites? :) > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From rahul8590 at gmail.com Thu Apr 18 10:30:56 2013 From: rahul8590 at gmail.com (Rahul R) Date: Thu, 18 Apr 2013 14:00:56 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: Harish , you nailed it! Thanks for the video. So, decreasing the size will not be possible afterall. But what confuses me is why is copying the items to new dictionary will not consume less space ? By copying you will get rid of all the dummy variables and lookup time will also decrease. Thanks a lot! ./Rahul On Thu, Apr 18, 2013 at 1:14 PM, Harish Vishwanath wrote: > Here is a good talk on how dictionaries are implemented in python : > > http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2010-the-mighty-dictionary-55-3352147 > > Due to possibility of collisions in the hash table, dict keeps allocating > 4x or 2x the size of existing allocation and *will* reorder the items when > such an operation happens. They go and acquire more memory when the dict is > 2/3rds full. But the reverse is not possible. A dummy key has to be > inserted in a free slot, so that valid items in the dictionary can be > found. Since all this depends on the order of insertion, you cannot > guarantee that copying existing items into a new dictionary will consume > less space. > > If look up times is not a concern, and you are trying to optimize for space > the stackoverflow link that Anand shared earlier could help. > > Regards, > Harish > > > On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni > wrote: > > > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > > > As far as i know, python performs a lazy deletion of values , when we > > > delete content from a dictionary (correct me if i am wrong) . So, when > > we > > > insert a lot of values the dictionary automatically expands. I don't > see > > > dict shrinking when we delete values from dictionary. In such case, is > > > there a way to forcibly reduce the dictionary size ? > > > > > > > > > Are you measuring this shrinking? > > the following in dictobject.c should guide you with the internals. The > > deleted item is simply replaced with a refcounted dummy. The deleted item > > is marked for cleanup by gc with decref. > > > > PyDict_DelItem () : > > .. > > old_key = ep->me_key; > > Py_INCREF(dummy); > > ep->me_key = dummy; > > old_value = ep->me_value; > > ep->me_value = NULL; > > mp->ma_used--; > > Py_DECREF(old_value); > > Py_DECREF(old_key); > > .. > > > > > > dict_length(): > > .. > > return mp->ma_used; > > .. > > > > PyDict_Size(): > > .. > > return ((PyDictObject *)mp)->ma_used; > > .. > > > > > > > > regards, > > Rishi > > > > > > > > > > > > > > ./Rahul > > > > > > On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > > > > > > > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R > wrote: > > > > > > > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder > the > > > data > > > > > in dictionary. I meant resize the dictionary. > > > > > > > > > > > > > What do you mean by resize? > > > > > > > > > > > > > > > > > > ./Rahul > > > > > > > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu < > > > anandology at gmail.com > > > > > >wrote: > > > > > > > > > > > dictionaries are unordered. It is not a good idea to expect any > > order > > > > in > > > > > > dictionaries, even if you are seeing some order by chance. > > > > > > > > > > > > If you need order, then use OrderedDict from collections module > > (new > > > in > > > > > > Python 2.7). > > > > > > > > > > > > Anand > > > > > > > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R > > > wrote: > > > > > > > > > > > > > Hey Guys, > > > > > > > > > > > > > > Is it possible to forcibly reorder the python dictionary after > > "n" > > > > > number > > > > > > > of inserts and deletions. As far as i know, python dictionary > > > > performs > > > > > > lazy > > > > > > > deletes. Thus , even if the data is deleted, python has a dummy > > > data > > > > > > their > > > > > > > in order to preserve consistency. The python dictionary > > > > > > > keeps expanding when the size of dict is increasing, but after > > > > > deleting a > > > > > > > few parameters the size does not decrease. Is there a way , > > where I > > > > can > > > > > > > forcibly resize the dictionary ? > > > > > > > > > > > > > > I was thinking of copying content from existing dictionary to > new > > > > dict > > > > > > and > > > > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > > > > > > > Thanks, > > > > > > > ./Rahul > > > > > > > _______________________________________________ > > > > > > > BangPypers mailing list > > > > > > > BangPypers at python.org > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Anand > > > > > > http://anandology.com/ > > > > > > _______________________________________________ > > > > > > BangPypers mailing list > > > > > > BangPypers at python.org > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > _______________________________________________ > > > > > BangPypers mailing list > > > > > BangPypers at python.org > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > -- > > > > Ramdas S > > > > +91 9342 583 065 > > > > My Personal Blog on http://ramdaz.wordpress.com > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From rahul8590 at gmail.com Thu Apr 18 10:39:33 2013 From: rahul8590 at gmail.com (Rahul R) Date: Thu, 18 Apr 2013 14:09:33 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: Hey Hrishikesk, So are you saying, if i run gc.collect() in my program I will get rid of all the dummy variables in the dictionary ? Thanks, ./Rahul On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni wrote: > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > As far as i know, python performs a lazy deletion of values , when we > > delete content from a dictionary (correct me if i am wrong) . So, when > we > > insert a lot of values the dictionary automatically expands. I don't see > > dict shrinking when we delete values from dictionary. In such case, is > > there a way to forcibly reduce the dictionary size ? > > > > > Are you measuring this shrinking? > the following in dictobject.c should guide you with the internals. The > deleted item is simply replaced with a refcounted dummy. The deleted item > is marked for cleanup by gc with decref. > > PyDict_DelItem () : > .. > old_key = ep->me_key; > Py_INCREF(dummy); > ep->me_key = dummy; > old_value = ep->me_value; > ep->me_value = NULL; > mp->ma_used--; > Py_DECREF(old_value); > Py_DECREF(old_key); > .. > > > dict_length(): > .. > return mp->ma_used; > .. > > PyDict_Size(): > .. > return ((PyDictObject *)mp)->ma_used; > .. > > > > regards, > Rishi > > > > > > > > ./Rahul > > > > On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > > > > > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R wrote: > > > > > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder the > > data > > > > in dictionary. I meant resize the dictionary. > > > > > > > > > > What do you mean by resize? > > > > > > > > > > > > > > ./Rahul > > > > > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu < > > anandology at gmail.com > > > > >wrote: > > > > > > > > > dictionaries are unordered. It is not a good idea to expect any > order > > > in > > > > > dictionaries, even if you are seeing some order by chance. > > > > > > > > > > If you need order, then use OrderedDict from collections module > (new > > in > > > > > Python 2.7). > > > > > > > > > > Anand > > > > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R > > wrote: > > > > > > > > > > > Hey Guys, > > > > > > > > > > > > Is it possible to forcibly reorder the python dictionary after > "n" > > > > number > > > > > > of inserts and deletions. As far as i know, python dictionary > > > performs > > > > > lazy > > > > > > deletes. Thus , even if the data is deleted, python has a dummy > > data > > > > > their > > > > > > in order to preserve consistency. The python dictionary > > > > > > keeps expanding when the size of dict is increasing, but after > > > > deleting a > > > > > > few parameters the size does not decrease. Is there a way , > where I > > > can > > > > > > forcibly resize the dictionary ? > > > > > > > > > > > > I was thinking of copying content from existing dictionary to new > > > dict > > > > > and > > > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > > > > > Thanks, > > > > > > ./Rahul > > > > > > _______________________________________________ > > > > > > BangPypers mailing list > > > > > > BangPypers at python.org > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Anand > > > > > http://anandology.com/ > > > > > _______________________________________________ > > > > > BangPypers mailing list > > > > > BangPypers at python.org > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > -- > > > Ramdas S > > > +91 9342 583 065 > > > My Personal Blog on http://ramdaz.wordpress.com > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From harish.shastry at gmail.com Thu Apr 18 10:42:29 2013 From: harish.shastry at gmail.com (Harish Vishwanath) Date: Thu, 18 Apr 2013 14:12:29 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: As you may have noticed, dictionary size depends greatly on the order of insertion. Let us say you are trying to copy the current items from your existing dict [which could have been re-ordered multiple times because of collisions and increase in allocated memory]. It is definitely possible that the order in which you iterate your existing items may not be the most optimal order, and could generate more collisions and items could end up in much deeper slots than their original hash values. This will definitely hamper your lookup time. But it will probably reduce the memory consumption, since there are definitely lesser items in the new dictionary. Regards, Harish On Thu, Apr 18, 2013 at 2:00 PM, Rahul R wrote: > Harish , you nailed it! Thanks for the video. So, decreasing the size > will not be possible afterall. > But what confuses me is why is copying the items to new dictionary will not > consume less space ? By copying you will get rid of all the dummy variables > and lookup time will also decrease. > > Thanks a lot! > ./Rahul > > On Thu, Apr 18, 2013 at 1:14 PM, Harish Vishwanath < > harish.shastry at gmail.com > > wrote: > > > Here is a good talk on how dictionaries are implemented in python : > > > > > http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2010-the-mighty-dictionary-55-3352147 > > > > Due to possibility of collisions in the hash table, dict keeps allocating > > 4x or 2x the size of existing allocation and *will* reorder the items > when > > such an operation happens. They go and acquire more memory when the dict > is > > 2/3rds full. But the reverse is not possible. A dummy key has to be > > inserted in a free slot, so that valid items in the dictionary can be > > found. Since all this depends on the order of insertion, you cannot > > guarantee that copying existing items into a new dictionary will consume > > less space. > > > > If look up times is not a concern, and you are trying to optimize for > space > > the stackoverflow link that Anand shared earlier could help. > > > > Regards, > > Harish > > > > > > On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni > > wrote: > > > > > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > > > > > As far as i know, python performs a lazy deletion of values , when we > > > > delete content from a dictionary (correct me if i am wrong) . So, > when > > > we > > > > insert a lot of values the dictionary automatically expands. I don't > > see > > > > dict shrinking when we delete values from dictionary. In such case, > is > > > > there a way to forcibly reduce the dictionary size ? > > > > > > > > > > > > > Are you measuring this shrinking? > > > the following in dictobject.c should guide you with the internals. The > > > deleted item is simply replaced with a refcounted dummy. The deleted > item > > > is marked for cleanup by gc with decref. > > > > > > PyDict_DelItem () : > > > .. > > > old_key = ep->me_key; > > > Py_INCREF(dummy); > > > ep->me_key = dummy; > > > old_value = ep->me_value; > > > ep->me_value = NULL; > > > mp->ma_used--; > > > Py_DECREF(old_value); > > > Py_DECREF(old_key); > > > .. > > > > > > > > > dict_length(): > > > .. > > > return mp->ma_used; > > > .. > > > > > > PyDict_Size(): > > > .. > > > return ((PyDictObject *)mp)->ma_used; > > > .. > > > > > > > > > > > > regards, > > > Rishi > > > > > > > > > > > > > > > > > > > > ./Rahul > > > > > > > > On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > > > > > > > > > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R > > wrote: > > > > > > > > > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder > > the > > > > data > > > > > > in dictionary. I meant resize the dictionary. > > > > > > > > > > > > > > > > What do you mean by resize? > > > > > > > > > > > > > > > > > > > > > > ./Rahul > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu < > > > > anandology at gmail.com > > > > > > >wrote: > > > > > > > > > > > > > dictionaries are unordered. It is not a good idea to expect any > > > order > > > > > in > > > > > > > dictionaries, even if you are seeing some order by chance. > > > > > > > > > > > > > > If you need order, then use OrderedDict from collections module > > > (new > > > > in > > > > > > > Python 2.7). > > > > > > > > > > > > > > Anand > > > > > > > > > > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R > > > > wrote: > > > > > > > > > > > > > > > Hey Guys, > > > > > > > > > > > > > > > > Is it possible to forcibly reorder the python dictionary > after > > > "n" > > > > > > number > > > > > > > > of inserts and deletions. As far as i know, python dictionary > > > > > performs > > > > > > > lazy > > > > > > > > deletes. Thus , even if the data is deleted, python has a > dummy > > > > data > > > > > > > their > > > > > > > > in order to preserve consistency. The python dictionary > > > > > > > > keeps expanding when the size of dict is increasing, but > after > > > > > > deleting a > > > > > > > > few parameters the size does not decrease. Is there a way , > > > where I > > > > > can > > > > > > > > forcibly resize the dictionary ? > > > > > > > > > > > > > > > > I was thinking of copying content from existing dictionary to > > new > > > > > dict > > > > > > > and > > > > > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > > > > > > > > > Thanks, > > > > > > > > ./Rahul > > > > > > > > _______________________________________________ > > > > > > > > BangPypers mailing list > > > > > > > > BangPypers at python.org > > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > Anand > > > > > > > http://anandology.com/ > > > > > > > _______________________________________________ > > > > > > > BangPypers mailing list > > > > > > > BangPypers at python.org > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > _______________________________________________ > > > > > > BangPypers mailing list > > > > > > BangPypers at python.org > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Ramdas S > > > > > +91 9342 583 065 > > > > > My Personal Blog on http://ramdaz.wordpress.com > > > > > _______________________________________________ > > > > > BangPypers mailing list > > > > > BangPypers at python.org > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From rishi at turtleyogi.com Thu Apr 18 10:45:39 2013 From: rishi at turtleyogi.com (Hrishikesh Kulkarni) Date: Thu, 18 Apr 2013 14:15:39 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: The code snippet shows the old_value and old_keys are marked by decref not the dummy. I wouldnt worry about dummy keys so much. btw checkout dictresize which is called during insert/set which does resize the dict. When? that would be a good learning exercise. On Thu, Apr 18, 2013 at 2:09 PM, Rahul R wrote: > Hey Hrishikesk, > > So are you saying, if i run gc.collect() in my program I will get rid of > all the dummy variables in the dictionary ? > > Thanks, > ./Rahul > > On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni > wrote: > > > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > > > As far as i know, python performs a lazy deletion of values , when we > > > delete content from a dictionary (correct me if i am wrong) . So, when > > we > > > insert a lot of values the dictionary automatically expands. I don't > see > > > dict shrinking when we delete values from dictionary. In such case, is > > > there a way to forcibly reduce the dictionary size ? > > > > > > > > > Are you measuring this shrinking? > > the following in dictobject.c should guide you with the internals. The > > deleted item is simply replaced with a refcounted dummy. The deleted item > > is marked for cleanup by gc with decref. > > > > PyDict_DelItem () : > > .. > > old_key = ep->me_key; > > Py_INCREF(dummy); > > ep->me_key = dummy; > > old_value = ep->me_value; > > ep->me_value = NULL; > > mp->ma_used--; > > Py_DECREF(old_value); > > Py_DECREF(old_key); > > .. > > > > > > dict_length(): > > .. > > return mp->ma_used; > > .. > > > > PyDict_Size(): > > .. > > return ((PyDictObject *)mp)->ma_used; > > .. > > > > > > > > regards, > > Rishi > > > > > > > > > > > > > > ./Rahul > > > > > > On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > > > > > > > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R > wrote: > > > > > > > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder > the > > > data > > > > > in dictionary. I meant resize the dictionary. > > > > > > > > > > > > > What do you mean by resize? > > > > > > > > > > > > > > > > > > ./Rahul > > > > > > > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu < > > > anandology at gmail.com > > > > > >wrote: > > > > > > > > > > > dictionaries are unordered. It is not a good idea to expect any > > order > > > > in > > > > > > dictionaries, even if you are seeing some order by chance. > > > > > > > > > > > > If you need order, then use OrderedDict from collections module > > (new > > > in > > > > > > Python 2.7). > > > > > > > > > > > > Anand > > > > > > > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R > > > wrote: > > > > > > > > > > > > > Hey Guys, > > > > > > > > > > > > > > Is it possible to forcibly reorder the python dictionary after > > "n" > > > > > number > > > > > > > of inserts and deletions. As far as i know, python dictionary > > > > performs > > > > > > lazy > > > > > > > deletes. Thus , even if the data is deleted, python has a dummy > > > data > > > > > > their > > > > > > > in order to preserve consistency. The python dictionary > > > > > > > keeps expanding when the size of dict is increasing, but after > > > > > deleting a > > > > > > > few parameters the size does not decrease. Is there a way , > > where I > > > > can > > > > > > > forcibly resize the dictionary ? > > > > > > > > > > > > > > I was thinking of copying content from existing dictionary to > new > > > > dict > > > > > > and > > > > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > > > > > > > Thanks, > > > > > > > ./Rahul > > > > > > > _______________________________________________ > > > > > > > BangPypers mailing list > > > > > > > BangPypers at python.org > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Anand > > > > > > http://anandology.com/ > > > > > > _______________________________________________ > > > > > > BangPypers mailing list > > > > > > BangPypers at python.org > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > _______________________________________________ > > > > > BangPypers mailing list > > > > > BangPypers at python.org > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > -- > > > > Ramdas S > > > > +91 9342 583 065 > > > > My Personal Blog on http://ramdaz.wordpress.com > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From rahul8590 at gmail.com Thu Apr 18 11:01:17 2013 From: rahul8590 at gmail.com (Rahul R) Date: Thu, 18 Apr 2013 14:31:17 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: Afaik, python gc is threshold based. So, gc should trigger after a given threshold value (which can be changed) . but defintely the code is worth looking. thanks for pointing it out. ./Rahul On Thu, Apr 18, 2013 at 2:15 PM, Hrishikesh Kulkarni wrote: > The code snippet shows the old_value and old_keys are marked by decref not > the dummy. I wouldnt worry about dummy keys so much. btw checkout > dictresize > which is called during insert/set which does resize the dict. When? that > would be a good learning exercise. > > > > On Thu, Apr 18, 2013 at 2:09 PM, Rahul R wrote: > > > Hey Hrishikesk, > > > > So are you saying, if i run gc.collect() in my program I will get rid of > > all the dummy variables in the dictionary ? > > > > Thanks, > > ./Rahul > > > > On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni > > wrote: > > > > > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > > > > > As far as i know, python performs a lazy deletion of values , when we > > > > delete content from a dictionary (correct me if i am wrong) . So, > when > > > we > > > > insert a lot of values the dictionary automatically expands. I don't > > see > > > > dict shrinking when we delete values from dictionary. In such case, > is > > > > there a way to forcibly reduce the dictionary size ? > > > > > > > > > > > > > Are you measuring this shrinking? > > > the following in dictobject.c should guide you with the internals. The > > > deleted item is simply replaced with a refcounted dummy. The deleted > item > > > is marked for cleanup by gc with decref. > > > > > > PyDict_DelItem () : > > > .. > > > old_key = ep->me_key; > > > Py_INCREF(dummy); > > > ep->me_key = dummy; > > > old_value = ep->me_value; > > > ep->me_value = NULL; > > > mp->ma_used--; > > > Py_DECREF(old_value); > > > Py_DECREF(old_key); > > > .. > > > > > > > > > dict_length(): > > > .. > > > return mp->ma_used; > > > .. > > > > > > PyDict_Size(): > > > .. > > > return ((PyDictObject *)mp)->ma_used; > > > .. > > > > > > > > > > > > regards, > > > Rishi > > > > > > > > > > > > > > > > > > > > ./Rahul > > > > > > > > On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > > > > > > > > > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R > > wrote: > > > > > > > > > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder > > the > > > > data > > > > > > in dictionary. I meant resize the dictionary. > > > > > > > > > > > > > > > > What do you mean by resize? > > > > > > > > > > > > > > > > > > > > > > ./Rahul > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu < > > > > anandology at gmail.com > > > > > > >wrote: > > > > > > > > > > > > > dictionaries are unordered. It is not a good idea to expect any > > > order > > > > > in > > > > > > > dictionaries, even if you are seeing some order by chance. > > > > > > > > > > > > > > If you need order, then use OrderedDict from collections module > > > (new > > > > in > > > > > > > Python 2.7). > > > > > > > > > > > > > > Anand > > > > > > > > > > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R > > > > wrote: > > > > > > > > > > > > > > > Hey Guys, > > > > > > > > > > > > > > > > Is it possible to forcibly reorder the python dictionary > after > > > "n" > > > > > > number > > > > > > > > of inserts and deletions. As far as i know, python dictionary > > > > > performs > > > > > > > lazy > > > > > > > > deletes. Thus , even if the data is deleted, python has a > dummy > > > > data > > > > > > > their > > > > > > > > in order to preserve consistency. The python dictionary > > > > > > > > keeps expanding when the size of dict is increasing, but > after > > > > > > deleting a > > > > > > > > few parameters the size does not decrease. Is there a way , > > > where I > > > > > can > > > > > > > > forcibly resize the dictionary ? > > > > > > > > > > > > > > > > I was thinking of copying content from existing dictionary to > > new > > > > > dict > > > > > > > and > > > > > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > > > > > > > > > Thanks, > > > > > > > > ./Rahul > > > > > > > > _______________________________________________ > > > > > > > > BangPypers mailing list > > > > > > > > BangPypers at python.org > > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > Anand > > > > > > > http://anandology.com/ > > > > > > > _______________________________________________ > > > > > > > BangPypers mailing list > > > > > > > BangPypers at python.org > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > _______________________________________________ > > > > > > BangPypers mailing list > > > > > > BangPypers at python.org > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Ramdas S > > > > > +91 9342 583 065 > > > > > My Personal Blog on http://ramdaz.wordpress.com > > > > > _______________________________________________ > > > > > BangPypers mailing list > > > > > BangPypers at python.org > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From dhruvbaldawa at gmail.com Thu Apr 18 11:28:57 2013 From: dhruvbaldawa at gmail.com (Dhruv Baldawa) Date: Thu, 18 Apr 2013 14:58:57 +0530 Subject: [BangPypers] Reorder Dictionary Size in python In-Reply-To: References: Message-ID: http://code.activestate.com/recipes/578375-proof-of-concept-for-a-more-space-efficient-faster/?in=user-178123 -- Dhruv Baldawa (http://www.dhruvb.com) On Thu, Apr 18, 2013 at 2:31 PM, Rahul R wrote: > Afaik, python gc is threshold based. So, gc should trigger after a given > threshold value (which can be changed) . but defintely the code is worth > looking. thanks for pointing it out. > > ./Rahul > > On Thu, Apr 18, 2013 at 2:15 PM, Hrishikesh Kulkarni > wrote: > > > The code snippet shows the old_value and old_keys are marked by decref > not > > the dummy. I wouldnt worry about dummy keys so much. btw checkout > > dictresize > > which is called during insert/set which does resize the dict. When? that > > would be a good learning exercise. > > > > > > > > On Thu, Apr 18, 2013 at 2:09 PM, Rahul R wrote: > > > > > Hey Hrishikesk, > > > > > > So are you saying, if i run gc.collect() in my program I will get rid > of > > > all the dummy variables in the dictionary ? > > > > > > Thanks, > > > ./Rahul > > > > > > On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni > > > wrote: > > > > > > > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R > wrote: > > > > > > > > > As far as i know, python performs a lazy deletion of values , when > we > > > > > delete content from a dictionary (correct me if i am wrong) . So, > > when > > > > we > > > > > insert a lot of values the dictionary automatically expands. I > don't > > > see > > > > > dict shrinking when we delete values from dictionary. In such case, > > is > > > > > there a way to forcibly reduce the dictionary size ? > > > > > > > > > > > > > > > > > Are you measuring this shrinking? > > > > the following in dictobject.c should guide you with the internals. > The > > > > deleted item is simply replaced with a refcounted dummy. The deleted > > item > > > > is marked for cleanup by gc with decref. > > > > > > > > PyDict_DelItem () : > > > > .. > > > > old_key = ep->me_key; > > > > Py_INCREF(dummy); > > > > ep->me_key = dummy; > > > > old_value = ep->me_value; > > > > ep->me_value = NULL; > > > > mp->ma_used--; > > > > Py_DECREF(old_value); > > > > Py_DECREF(old_key); > > > > .. > > > > > > > > > > > > dict_length(): > > > > .. > > > > return mp->ma_used; > > > > .. > > > > > > > > PyDict_Size(): > > > > .. > > > > return ((PyDictObject *)mp)->ma_used; > > > > .. > > > > > > > > > > > > > > > > regards, > > > > Rishi > > > > > > > > > > > > > > > > > > > > > > > > > > ./Rahul > > > > > > > > > > On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S > wrote: > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R > > > wrote: > > > > > > > > > > > > > Ahh , sorry If i wasnt clear the first time. I dint mean > reorder > > > the > > > > > data > > > > > > > in dictionary. I meant resize the dictionary. > > > > > > > > > > > > > > > > > > > What do you mean by resize? > > > > > > > > > > > > > > > > > > > > > > > > > > ./Rahul > > > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:05 PM, Anand Chitipothu < > > > > > anandology at gmail.com > > > > > > > >wrote: > > > > > > > > > > > > > > > dictionaries are unordered. It is not a good idea to expect > any > > > > order > > > > > > in > > > > > > > > dictionaries, even if you are seeing some order by chance. > > > > > > > > > > > > > > > > If you need order, then use OrderedDict from collections > module > > > > (new > > > > > in > > > > > > > > Python 2.7). > > > > > > > > > > > > > > > > Anand > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R < > rahul8590 at gmail.com> > > > > > wrote: > > > > > > > > > > > > > > > > > Hey Guys, > > > > > > > > > > > > > > > > > > Is it possible to forcibly reorder the python dictionary > > after > > > > "n" > > > > > > > number > > > > > > > > > of inserts and deletions. As far as i know, python > dictionary > > > > > > performs > > > > > > > > lazy > > > > > > > > > deletes. Thus , even if the data is deleted, python has a > > dummy > > > > > data > > > > > > > > their > > > > > > > > > in order to preserve consistency. The python dictionary > > > > > > > > > keeps expanding when the size of dict is increasing, but > > after > > > > > > > deleting a > > > > > > > > > few parameters the size does not decrease. Is there a way , > > > > where I > > > > > > can > > > > > > > > > forcibly resize the dictionary ? > > > > > > > > > > > > > > > > > > I was thinking of copying content from existing dictionary > to > > > new > > > > > > dict > > > > > > > > and > > > > > > > > > deleting the previous one.But thats a cumbersome operation. > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > ./Rahul > > > > > > > > > _______________________________________________ > > > > > > > > > BangPypers mailing list > > > > > > > > > BangPypers at python.org > > > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Anand > > > > > > > > http://anandology.com/ > > > > > > > > _______________________________________________ > > > > > > > > BangPypers mailing list > > > > > > > > BangPypers at python.org > > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > BangPypers mailing list > > > > > > > BangPypers at python.org > > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Ramdas S > > > > > > +91 9342 583 065 > > > > > > My Personal Blog on http://ramdaz.wordpress.com > > > > > > _______________________________________________ > > > > > > BangPypers mailing list > > > > > > BangPypers at python.org > > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > _______________________________________________ > > > > > BangPypers mailing list > > > > > BangPypers at python.org > > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From jaganadhg at gmail.com Thu Apr 18 13:18:40 2013 From: jaganadhg at gmail.com (JAGANADH G) Date: Thu, 18 Apr 2013 16:48:40 +0530 Subject: [BangPypers] pyodbc Teradata connection Message-ID: Hi , Does anybody have experience with pyodbc and teradata . I was trying to connect to a remote teredata instance using pyodbc. it gives the following error. Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQLDriverConnect)') The connection string is pyodbc.connect("DRIVER={Teradata};DBCNAME=DB;UID=UU;PWD=PW", autocommit=True,ansi=True) Any clue on how to resolve the same . Best regards -- ********************************** JAGANADH G http://jaganadhg.in *ILUGCBE* http://ilugcbe.org.in From foxrun2005 at gmail.com Thu Apr 18 14:45:27 2013 From: foxrun2005 at gmail.com (Kamalakar gs) Date: Thu, 18 Apr 2013 18:15:27 +0530 Subject: [BangPypers] Need help for python coding Message-ID: HI all, I have a query that i have doc which is read through python.But instead of giving path and filename in the coding.I want to manipulate it like "python has to ask USER for a specific filename so that python recognizes the directory internally and read the file ".How do i do this.I have tried with filename = input ("filename") but it just file name and will not recognises the path. For example: file name = input ("file name: ") file name = python it has to recognizes the path like "C:\users\desktop\python" Thanks Regards Kamalakar From maniandram01 at gmail.com Thu Apr 18 14:54:07 2013 From: maniandram01 at gmail.com (Ramchandra Apte) Date: Thu, 18 Apr 2013 18:24:07 +0530 Subject: [BangPypers] [OT] Intro Video - Companies in India In-Reply-To: References: Message-ID: This is OT to this list which is about Python. On 18 April 2013 13:10, Venkatraman S wrote: > Hi, > > How do the companies in India make the intro videos to be put up on their > website? Do they outsource it to someone in the US to get the language and > the accent right or is there some automated Voice SDK? Offlate, i stumbled > on a few small companies(/startups) who have their intro-videos with an > American Accent and wasn't sure whether they do indeed outsource it. > > -V > @venkasub > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From abdulmuneer at gmail.com Thu Apr 18 14:59:05 2013 From: abdulmuneer at gmail.com (Abdul Muneer) Date: Thu, 18 Apr 2013 18:29:05 +0530 Subject: [BangPypers] Need help for python coding In-Reply-To: References: Message-ID: Hi Kamalakar, You can use os.path.join() to join the user input to a base path. Python will take care of unix/windows differentiation and append slashes accordingly. >>> import os >>> base_path = os.getcwd() >>> base_path '/home/amuneer/workspace/playground' >>> file_name = raw_input("Enter Filename\n") Enter Filename play >>> complete_path = os.path.join(base_path, file_name) >>> complete_path '/home/amuneer/workspace/playground/play' >>> Note:if you are not using python3, use raw_input instead of input. raw_input accepts the values as string and therefore people cannot do nasty things by typing executable code. Regards, Abdul Muneer -- Follow me on Twitter: @abdulmuneer On Thu, Apr 18, 2013 at 6:15 PM, Kamalakar gs wrote: > HI all, > I have a query that i have doc which is read through python.But instead of > giving path and filename > in the coding.I want to manipulate it like "python has to ask USER for a > specific filename so that python recognizes the directory internally and > read the file ".How do i do this.I have tried with > filename = input ("filename") but it just file name and will not recognises > the path. > > For example: > > file name = input ("file name: ") > > file name = python > > it has to recognizes the path like "C:\users\desktop\python" > > > Thanks > Regards > Kamalakar > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From rahul8590 at gmail.com Thu Apr 18 15:04:43 2013 From: rahul8590 at gmail.com (Rahul R) Date: Thu, 18 Apr 2013 18:34:43 +0530 Subject: [BangPypers] Need help for python coding In-Reply-To: References: Message-ID: os.path.realpath(__filename__) that should do the trick. ./Rahul On Thu, Apr 18, 2013 at 6:15 PM, Kamalakar gs wrote: > HI all, > I have a query that i have doc which is read through python.But instead of > giving path and filename > in the coding.I want to manipulate it like "python has to ask USER for a > specific filename so that python recognizes the directory internally and > read the file ".How do i do this.I have tried with > filename = input ("filename") but it just file name and will not recognises > the path. > > For example: > > file name = input ("file name: ") > > file name = python > > it has to recognizes the path like "C:\users\desktop\python" > > > Thanks > Regards > Kamalakar > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From mandarvaze at gmail.com Fri Apr 19 08:56:27 2013 From: mandarvaze at gmail.com (=?UTF-8?B?TWFuZGFyIFZhemUgLyDgpK7gpILgpKbgpL7gpLAg4KS14KSd4KWH?=) Date: Fri, 19 Apr 2013 12:26:27 +0530 Subject: [BangPypers] Need help for python coding In-Reply-To: References: Message-ID: On Thu, Apr 18, 2013 at 6:34 PM, Rahul R wrote: > os.path.realpath(__filename__) > that should do the trick. As much as I understand the requirement, Kamalakar wants to "recognize" the path, then he needs some equivalent of "which" command (for binaries) or "locate" for non-binaries realpath didn't work for me when I tried "ipython" on linux for either of the above requirements. -Mandar From saager.mhatre at gmail.com Fri Apr 19 23:11:17 2013 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Sat, 20 Apr 2013 02:41:17 +0530 Subject: [BangPypers] [OT] Microsoft Office 365 for Education made mandatory for approved institutions by AICTE In-Reply-To: References: Message-ID: On Mon, Apr 15, 2013 at 8:54 PM, Kaushik Kalyanaraman < dialkforkaushik at gmail.com> wrote: > 10 replies to Godwin Damn, nice catch! ;) - d From foxrun2005 at gmail.com Sat Apr 20 19:17:26 2013 From: foxrun2005 at gmail.com (Kamalakar gs) Date: Sat, 20 Apr 2013 22:47:26 +0530 Subject: [BangPypers] Need help for python coding Message-ID: What i am asking is i have a file of other format for example .PCL which is Patran file (Software used for analysis). Now what i want is if user inputs a file name,python has to recognise the file name and directory of file which exists and executes the file in patran window. For example following lines executes to open a new database in a patran. Now it is automatically recognising the path of the file inside PCL file. Like as below *uil_file_new.go( "C:\MSC.Software\Patran_x64\20121/template.db", @* *"C:\Users\Desktop\patran\plate.db" )* * * *POP UP WINDOW WILL SHOWS IN PATRAN WHEN ABOVE CODE READS THROUGH PCL FILE.* * * Now what i want is, python code has to execute in this way as it happens in Patran For Example: Userinput= Filename = plate.pcl now it has to recognise the file and directory as shown above and create a new database * * *Regards * *Kamalakar* From gora at mimirtech.com Sat Apr 20 20:31:32 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Sun, 21 Apr 2013 00:01:32 +0530 Subject: [BangPypers] Need help for python coding In-Reply-To: References: Message-ID: On 20 April 2013 22:47, Kamalakar gs wrote: > What i am asking is i have a file of other format for example .PCL which is > Patran file (Software used for analysis). Now what i want is if user inputs > a file name,python has to recognise the file name and directory of file > which exists and executes the file in patran window. (a) Please do not start separate threads for the same question (b) You might wish to review how to use mailing lists to your advantage, and with the added benefit of preserving the sanity of people trying to respond to your messages. Here are some excellent pointers: - http://wiki.apache.org/solr/UsingMailingLists - https://code.djangoproject.com/wiki/UsingTheMailingList - http://catb.org/~esr/faqs/smart-questions.html I am not sure who on this list might have an idea of some random software that you are interested in. Please formulate this in a way relevant to this list. Regards, Gora From hrdspl at gmail.com Sat Apr 20 21:10:25 2013 From: hrdspl at gmail.com (hiharry danny) Date: Sun, 21 Apr 2013 00:40:25 +0530 Subject: [BangPypers] Need help for python coding In-Reply-To: References: Message-ID: HELLO, please check for the file extension in ur code for .PCL , AND if the check matches then invoke the corresponding application required to open for that particular file using the if...elif...elif construct in python which is the substitute of switch case statements in other languages. On Sun, Apr 21, 2013 at 12:01 AM, Gora Mohanty wrote: > On 20 April 2013 22:47, Kamalakar gs wrote: > > What i am asking is i have a file of other format for example .PCL which > is > > Patran file (Software used for analysis). Now what i want is if user > inputs > > a file name,python has to recognise the file name and directory of file > > which exists and executes the file in patran window. > > (a) Please do not start separate threads for the same question > (b) You might wish to review how to use mailing lists to your > advantage, and with the added benefit of preserving the > sanity of people trying to respond to your messages. Here > are some excellent pointers: > - http://wiki.apache.org/solr/UsingMailingLists > - https://code.djangoproject.com/wiki/UsingTheMailingList > - http://catb.org/~esr/faqs/smart-questions.html > > I am not sure who on this list might have an idea of some random > software that you are interested in. Please formulate this in a way > relevant to this list. > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From hrdspl at gmail.com Sat Apr 20 21:01:25 2013 From: hrdspl at gmail.com (hiharry danny) Date: Sun, 21 Apr 2013 00:31:25 +0530 Subject: [BangPypers] [HELP] QUERIES RELATED TO PYTHON Message-ID: I have Python 2.5.4 installed on windows platform ..(win xp) ...and in the installation folder there is a folder named Tcl(Tool Command Language) which contains subfolders like Tk, Tix etc ..the version of tcl is 8.4 .The default gui standard of python is through Tkinter module and when this module is used the calls are made to the Tcl embedded interpreter to execute the code. So, is it for this reason Tcl is embedded in python or for anything else ? If i haven't installed tcl separately, what are the ways to access Tcl interpreter other than using ELmer and Using Tkinter module ,Tcl interpreter can be invoked using Tkinter.Tcl(). Can wish or telsh be for such ? import Tkinter a = Tkinter.Tcl() result = a.eval(' puts "hello, world" ') TclError: can not find channel named "stdout" But still it doesn't work, giving error why ? And one more thing when i type dir('Tkinter') or any other module name to display it's contents , why does it always show the same thing every time which is as follows ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__str__', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] From gora at mimirtech.com Sat Apr 20 21:22:04 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Sun, 21 Apr 2013 00:52:04 +0530 Subject: [BangPypers] [HELP] QUERIES RELATED TO PYTHON In-Reply-To: References: Message-ID: On 21 April 2013 00:31, hiharry danny wrote: > I have Python 2.5.4 installed on windows platform ..(win xp) ...and in the > installation folder there is a folder named Tcl(Tool Command Language) > which contains subfolders like Tk, Tix etc ..the version of tcl is 8.4 .The > default gui standard of python is through Tkinter module and when this > module is used the calls are made to the Tcl embedded interpreter to > execute the code. > So, is it for this reason Tcl is embedded in python or for anything else ? > If i haven't installed tcl separately, what are the ways to access Tcl > interpreter other than using ELmer and Using Tkinter module ,Tcl > interpreter can be invoked using Tkinter.Tcl(). > Can wish or telsh be for such ? Not sure what you are asking here. > import Tkinter > a = Tkinter.Tcl() > result = a.eval(' puts "hello, world" ') > TclError: can not find channel named "stdout" > But still it doesn't work, giving error why ? This works just fine for me on Linux with Python 2.7. Python 2.5 is quite old, and I would suspect some issue with your Python vs. Tk installation. > And one more thing when i type dir('Tkinter') or any other module name to > display it's contents , why does it always show the same thing every time > which is as follows [...] What you want is dir(Tkinter). Please note the absence of single quotes. What you are getting now is the dictionary for string, since that's you asked for. Regards, Gora From abpillai at gmail.com Sun Apr 21 11:30:19 2013 From: abpillai at gmail.com (Anand B Pillai) Date: Sun, 21 Apr 2013 15:00:19 +0530 Subject: [BangPypers] Need help for python coding In-Reply-To: References: Message-ID: Hi Kamalakar, You are trying to frequently send large files as attachments to this list. I (list owner) has already rejected one such email. Today I found 2 more messages from you held because of the same problem at the list server. Please avoid sending attachments to the list. Make your questions small and relevant and post attachments or other accessory information somewhere else and send the link to the list. Please abide or I will have to temporarily ban your messages for a while from the list. On Sat, Apr 20, 2013 at 10:47 PM, Kamalakar gs wrote: > What i am asking is i have a file of other format for example .PCL which is > Patran file (Software used for analysis). Now what i want is if user inputs > a file name,python has to recognise the file name and directory of file > which exists and executes the file in patran window. > > For example following lines executes to open a new database in a patran. > Now it is automatically recognising the path of the file inside PCL file. > Like as below > *uil_file_new.go( "C:\MSC.Software\Patran_x64\20121/template.db", @* > *"C:\Users\Desktop\patran\plate.db" )* > * > * > *POP UP WINDOW WILL SHOWS IN PATRAN WHEN ABOVE CODE READS THROUGH PCL > FILE.* > * > * > Now what i want is, python code has to execute in this way as it happens in > Patran > For Example: > Userinput= Filename = plate.pcl > now it has to recognise the file and directory as shown above and create a > new database > * > * > *Regards * > *Kamalakar* > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, --Anand From gora at mimirtech.com Sun Apr 21 19:38:47 2013 From: gora at mimirtech.com (Gora Mohanty) Date: Sun, 21 Apr 2013 23:08:47 +0530 Subject: [BangPypers] [Ncr-Python.in] [HELP] QUERIES RELATED TO PYTHON In-Reply-To: References: Message-ID: On 21 April 2013 16:54, saurabh chandra wrote: > I am trying to develop an algorithm for a combinatorial optimization. The > problem consists of a graph network with nodes and connected arcs. In this > algorithm I have to choose an optimal combination of nodes out of all the > nodes in the graph. The successive nodes are selected as entries in the list > using a random search technique. Successive nodes share a precedence > relationship. This description is not very clear, at least to me. What is an "optimal combination" in this case? Why does it make sense to use a random search? > In each iteration of the algorithm I generate a combination of a subset of > nodes chosen randomly from the whole node-set, as a list. In the same loop I > carry out a modification of the generated list and calculate the objective > value associated with this . A particular generated list in any loop will > give rise to a single modified list. > > Now I do not want same list to be generated again and again, so I maintain a > super-list of generated lists and check the membership of each new list in > this super-list. I restart the loop if same list appears again in the > algorithm. As I already said the original list gets modified within an > iteration. The problem is that although I append the super-list with the > original list before modification, as soon as I modify this original list > the list added to the super-list also changes automatically. Thus the > iteration goes on even if the same list is generated again and again. [...] Perhaps your best bet would be to show us some code, and describe which parts are not working as you expect them to. You might want to use pastebin.com for that. See if you can distil your code down to a small example that demonstrates the issue that you are facing. Regards, Gora From venkat83 at gmail.com Mon Apr 22 09:25:42 2013 From: venkat83 at gmail.com (Venkatraman S) Date: Mon, 22 Apr 2013 12:55:42 +0530 Subject: [BangPypers] Simple Search With Django ORM Message-ID: Linky : http://maxburstein.com/blog/simple-search-with-django-orm/ -Venkat @venkasub From vsapre80 at gmail.com Mon Apr 22 14:00:59 2013 From: vsapre80 at gmail.com (Vishal) Date: Mon, 22 Apr 2013 17:30:59 +0530 Subject: [BangPypers] hiredis on Windows Message-ID: Hello friends, As you might know, Redis is an in-memory key-value store library..and much more. Its officially supported only on *nix operating systems. redis-py is the default client Redis interface in python. redis-py is pure python. hiredis is a C client interface to reading responses from a Redis server. hiredis-py is the python wrapper on hiredis. *It works only in *nix operating systems (mostly because its officially designed to use POSIX socket api)* * * Redis and hiredis have been made available in Windows by Microsoft Open Source wing on github (https://github.com/MSOpenTech/redis) However that version of hiredis is not wrapped in Python !! I am looking for a hiredis-py port on Windows. Any ideas? Anybody willing to be kind enough make this available to the open source world at large would be doing a great job. Any takers :)) ? Thanks and best regards, Vishal Sapre p.s: I have access to hiredis.lib and hiredis.dll, but they would need ctypes/pywin32 wrappers to call. --- "Life is 10% how you make it, and 90% how you take it" "????? ?????, ????? ????? (Benefit for most people, Happiness for most people.)" --- Please DONT print this email, unless you really need to. Save Energy & Paper. Save the Earth. From foxrun2005 at gmail.com Tue Apr 23 20:01:11 2013 From: foxrun2005 at gmail.com (Kamalakar gs) Date: Tue, 23 Apr 2013 23:31:11 +0530 Subject: [BangPypers] Need help for python Message-ID: Hi, I have a PCL file which consists of following lines for the first few lines. *uil_file_new.go( "C:\MSC.Software\Patran_x64\20121/template.db", @* *"C:\Users\IMEMS SDC\Desktop\patran\plate.db" )* * * *set_current_dir( "C:\Users\IMEMS SDC\Desktop\patran" )* * * * * The* uil_file_new.go *which is a default command for creating new database in patran. Now i want to keep the * file name* as an user input so that directory name should automatically picked-up for execution. or one more option either user has to input both filename and dir name for execution of patran. How to associate filename and directory name for execution in MSC patran. For execution of patran through python, the following command would be used *os,system('patran -sfp')* which opens up patran window but file is not associating. How to do that. Regards Kamalakar From davidsnt at gmail.com Tue Apr 23 21:39:55 2013 From: davidsnt at gmail.com (davidsnt) Date: Wed, 24 Apr 2013 01:09:55 +0530 Subject: [BangPypers] RPM Build Help Message-ID: Hi, Can you help to find out the module that will help me to build RPM's and manipulate with RPM database. I followed http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-rpm-programming-python.html but unable to find rpm or python-rpm modules. pip search rpm just list few rpm packages like pyrpm which not much of help. Refer: http://rpm5.org/docs/api/classRpm.html Regards, Davidsanthosh L From gnuyoga at gmail.com Wed Apr 24 05:50:36 2013 From: gnuyoga at gmail.com (Sreekandh Balakrishnan) Date: Wed, 24 Apr 2013 09:20:36 +0530 Subject: [BangPypers] RPM Build Help In-Reply-To: References: Message-ID: <3E63E289180A4BDA994F6147CA3F7809@gmail.com> On Wednesday, 24 April 2013 at 1:09, davidsnt wrote: > Hi, > > Can you help to find out the module that will help me to build RPM's and > manipulate with RPM database. > > I followed > http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-rpm-programming-python.html > but unable to find rpm or python-rpm modules. > > pip search rpm > > just list few rpm packages like pyrpm which not much of help. > > Refer: > http://rpm5.org/docs/api/classRpm.htm > Are you in a Redhat/fedora/centos box ? If yes then do "yum install rpm-devel" From davidsnt at gmail.com Wed Apr 24 17:03:47 2013 From: davidsnt at gmail.com (davidsnt) Date: Wed, 24 Apr 2013 20:33:47 +0530 Subject: [BangPypers] RPM Build Help In-Reply-To: <3E63E289180A4BDA994F6147CA3F7809@gmail.com> References: <3E63E289180A4BDA994F6147CA3F7809@gmail.com> Message-ID: Thank you :) Regards, Davidsanthosh L On Wed, Apr 24, 2013 at 9:20 AM, Sreekandh Balakrishnan wrote: > On Wednesday, 24 April 2013 at 1:09, davidsnt wrote: > > Hi, > > > > Can you help to find out the module that will help me to build RPM's and > > manipulate with RPM database. > > > > I followed > > > http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-rpm-programming-python.html > > but unable to find rpm or python-rpm modules. > > > > pip search rpm > > > > just list few rpm packages like pyrpm which not much of help. > > > > Refer: > > http://rpm5.org/docs/api/classRpm.htm > > > Are you in a Redhat/fedora/centos box ? If yes then do "yum install > rpm-devel" > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From noufal at nibrahim.net.in Thu Apr 25 09:46:40 2013 From: noufal at nibrahim.net.in (Noufal Ibrahim) Date: Thu, 25 Apr 2013 13:16:40 +0530 Subject: [BangPypers] [OT] A decade of commits Message-ID: <874nevrr1b.fsf@sanitarium.localdomain> A nice post by Brett Cannon about working on the Python project for a decade http://sayspy.blogspot.ca/2013/04/a-decade-of-commits.html -- Cordially, Noufal http://nibrahim.net.in From shabda at agiliq.com Sun Apr 28 15:33:24 2013 From: shabda at agiliq.com (Shabda Raaj) Date: Sun, 28 Apr 2013 19:03:24 +0530 Subject: [BangPypers] Announce - Django Graphos Message-ID: Hello, I would like to announce our new app: Django-graphos. https://github.com/agiliq/django-graphos This is meant to make working with Django charting really easy. You can mix and match Data source charting APIs. * Python Nested lists * CSV Files * MongoDB * Redis * Django ORM ### Charting API Supported * [Flot](http://flotcharts.org) * [Google Charts API](https://developers.google.com/chart/) * [YUI Charts](http://yuilibrary.com/yui/docs/charts/) Feedback/Pull requests etc welcome and appreciated. :) I am particularly looking for a design critque of the class structure. -- Thanks, Shabda Agiliq.com - Building Amazing Apps agiliq.com/blog/ | github.com/agiliq US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj Our Android Apps | Our iOS Apps