From devin at nextdrop.org Tue Sep 2 10:22:11 2014 From: devin at nextdrop.org (Devin Miller) Date: Tue, 2 Sep 2014 13:52:11 +0530 Subject: [BangPypers] [JOB] Full Stack Hacker - wanted to solve real world problems @nextdrop Message-ID: Position: Full Stack Hacker - wanted to build cool technologies that solve real world problems @nextdrop Background: NextDrop is expanding and looking for passionate individuals to join our growing tech team. You will specifically create a seamless user experience for the customers who receive our SMS water alerts, while also creating custom web based technology for the water utility- to enable them to make data driven decisions. Your job will also entail being the guardian and keeper of all our data- which means looking after our custom built SMS/IVR system. Finally, you'll be making custom internal analytics to track all of the important pieces of information - so we can all figure out how to improve and grow our company. You Should Apply For This Job If: You are itching to make your ideas come to life, and create amazing products that have the ability to impact millions of lives. You can take a real world problem, and create a technical solution for it- the prospect of doing things nobody has ever done before excites you. You love data, and truly believe that making data driven decisions will help any organization succeed. You also love the details and have been criticized as being too much of a perfectionist- you won't let something pass if there's even an extra space between a comma and the next word. You love to travel, and you don't like to sit in the same place all the time. Similarly, you enjoy challenges, and love the prospect of doing different things every day. You also love the details: you record everything that goes right, AND everything that goes wrong so you can fix it next time. You believe in the hacker mentality: Fail fast, fail often, but learn every time. But most of all, you are simply passionate about making a real difference in the world, and will do whatever it takes to make that happen. You're a match if: - You are a web development whiz, but more particularly, you love to use Python (Django web framework), HTML5, SCSS, JavaScript. - You and interactive maps (Leaflet, Google Maps API, etc.) are best friends (but you are also friends with the nginx web server). - REST APIs: No Problem. - Sysadmin and server management- piece of cake - Android or mobile is a plus but not required Email your resume and mobile/contact number to team at nextdrop.org http://nextdrop.org/ From nitin.nitp at gmail.com Wed Sep 3 08:37:35 2014 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Wed, 3 Sep 2014 12:07:35 +0530 Subject: [BangPypers] python in news Message-ID: http://economictimes.indiatimes.com/tech/software/programming-language-python-yet-to-find-place-in-teaching-curriculum-in-india-despite-its-popularity/articleshow/41464925.cms Nitin K From saager.mhatre at gmail.com Wed Sep 3 17:26:24 2014 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 3 Sep 2014 11:26:24 -0400 Subject: [BangPypers] python in news In-Reply-To: References: Message-ID: On Wed, Sep 3, 2014 at 2:37 AM, Nitin Kumar wrote: > > http://economictimes.indiatimes.com/tech/software/programming-language-python-yet-to-find-place-in-teaching-curriculum-in-india-despite-its-popularity/articleshow/41464925.cms Anyone have a link to that IEEE report mentioned in the article that puts Python as the 2nd most popular web-dev language? Curious about who else is on the list and why. - d From palakmathur at gmail.com Wed Sep 3 17:36:34 2014 From: palakmathur at gmail.com (Palak Mathur) Date: Wed, 3 Sep 2014 10:36:34 -0500 Subject: [BangPypers] python in news In-Reply-To: References: Message-ID: On Sep 3, 2014, at 10:26 AM, Saager Mhatre wrote: On Wed, Sep 3, 2014 at 2:37 AM, Nitin Kumar wrote: > > http://economictimes.indiatimes.com/tech/software/programming-language-python-yet-to-find-place-in-teaching-curriculum-in-india-despite-its-popularity/articleshow/41464925.cms Anyone have a link to that IEEE report mentioned in the article that puts Python as the 2nd most popular web-dev language? ---- http://spectrum.ieee.org/static/interactive-the-top-programming-languages#index/0/1/1/1/1/50/1/50/1/50/1/30/1/30/1/30/1/20/1/20/1/5/1/5/1/20/1/100/ From saager.mhatre at gmail.com Wed Sep 3 18:01:15 2014 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 3 Sep 2014 12:01:15 -0400 Subject: [BangPypers] python in news In-Reply-To: References: Message-ID: On Wed, Sep 3, 2014 at 11:36 AM, Palak Mathur wrote: > > > On Sep 3, 2014, at 10:26 AM, Saager Mhatre > wrote: > > On Wed, Sep 3, 2014 at 2:37 AM, Nitin Kumar wrote: > > > > > > http://economictimes.indiatimes.com/tech/software/programming-language-python-yet-to-find-place-in-teaching-curriculum-in-india-despite-its-popularity/articleshow/41464925.cms > > > Anyone have a link to that IEEE report mentioned in the article that puts > Python as the 2nd most popular web-dev language? > > ---- > http://spectrum.ieee.org/static/interactive-the-top-programming-languages#index/0/1/1/1/1/50/1/50/1/50/1/30/1/30/1/30/1/20/1/20/1/5/1/5/1/20/1/100/ Thanks Palak - d From karra.etc at gmail.com Fri Sep 5 09:44:25 2014 From: karra.etc at gmail.com (Sriram Karra) Date: Fri, 5 Sep 2014 13:14:25 +0530 Subject: [BangPypers] [OT] [Commercial] HackerRank looking for freelancers to frame questions to test Python skills Message-ID: Hi, HackerRank *for Work* is a popular enterprise recruitment solution used by a large number of tech companies worldwide. We are actively looking for freelancers to contribute questions that can be used to assess Python programming skill. These could be in the form of Multiple Choice Questions that test language expertise, or programming problems that test applied problem solving skills. We pay quite well (relative to the market for such work) - including a fixed rate per accepted question and a discretionary bonus based on quality and coverage. If you are interested in contributing, you can reply to me *off-list.* Thank you, -Karra -- Sriram Karra Director, Products HackerRank From abhinav.lall at gmail.com Sun Sep 7 14:24:46 2014 From: abhinav.lall at gmail.com (Abhinav Lal) Date: Sun, 7 Sep 2014 17:54:46 +0530 Subject: [BangPypers] Sequoia::Hack 2014 Message-ID: Join us at Sequoia::Hack 2014 ? 500 devs, 35+ companies, 24 hours of coding!Check us out at https://www.sequoiahack.com/ and apply! From a.daftery at arduino.cc Mon Sep 8 14:37:09 2014 From: a.daftery at arduino.cc (Ankit Daftery (Arduino)) Date: Mon, 8 Sep 2014 18:07:09 +0530 Subject: [BangPypers] Using Python To Do More With Arduino Message-ID: Hello All We are having a small talk + demo session on the various ways in which you can use Python with Arduino (software, hardware, addons et. all), at the Arduino India office this Friday. It would be great to have members of this list over as well, it's a community event (free, of course), and you are welcome to bring friends along too. Topic : Using Python To Do More With Your Arduino Address : 31/4 Coles Road , 2nd Floor, Above State Bank of Mysore, Bangalore Date and Time : 5.30pm, 12th September 2014, Friday Event RSVP : https://www.facebook.com/events/261530914056107/ Facebook : https://www.facebook.com/arduinoatindia Feel free to drop me a line at a.daftery at arduino.cc if you have any questions, and hopefully see many of you on Friday ! Cheers Ankit From ankitdaf at gmail.com Mon Sep 8 17:02:32 2014 From: ankitdaf at gmail.com (Ankit Daftery) Date: Mon, 8 Sep 2014 20:32:32 +0530 Subject: [BangPypers] Using Python To Do More With Arduino Message-ID: Hello All We are having a small talk + demo session on the various ways in which you can use Python with Arduino (software, hardware, addons et. all), at the Arduino India office this Friday. It would be great to have members of this list over as well, it's a community event (free, of course), and you are welcome to bring friends along too. Topic : Using Python To Do More With Your Arduino Address : 31/4 Coles Road , 2nd Floor, Above State Bank of Mysore, Bangalore Date and Time : 5.30pm, 12th September 2014, Friday Event RSVP : https://www.facebook.com/events/261530914056107/ Facebook : https://www.facebook.com/arduinoatindia Feel free to drop me a line at a.daftery at arduino.cc if you have any questions, and hopefully see many of you on Friday ! Cheers Ankit Daftery From avneesh.chadha at gmail.com Mon Sep 8 19:38:02 2014 From: avneesh.chadha at gmail.com (Avneesh Chadha) Date: Mon, 8 Sep 2014 23:08:02 +0530 Subject: [BangPypers] Mapping django forms to Bootstrap fields Message-ID: Hi All, I am first time django user. I am trying to use django with bootstrap 3 and can't seem to be able map form fields I create to the bootstrap fields in the web page. Things I figured out till now: 1.Write the attributes for the fields as wigdets while declaring the form. example : *Name = forms.CharField(widget=forms.TextInput(attrs={'type': 'text','id': 'Name','class': 'form-control','placeholder':'Name'}))* 2.Using Django-bootstrap-form : I tried to use this, but it just renders the fields using its own CSS . I couldn't figure out how to modify their appearance by adding classes or attributes using this, also the documentation is utterly horrible. Isn't there somthing in django which lets me do the following (if my field is myform.username, then I can map it like) : What is the best(and easiest) way of going about doing this?! Thanks in advance. From lgp171188 at gmail.com Mon Sep 8 19:40:10 2014 From: lgp171188 at gmail.com (L. Guruprasad) Date: Mon, 08 Sep 2014 23:10:10 +0530 Subject: [BangPypers] Mapping django forms to Bootstrap fields In-Reply-To: References: Message-ID: <540DE9FA.8080505@gmail.com> Hi, On Monday 08 September 2014 11:08 PM, Avneesh Chadha wrote: > Hi All, > > I am first time django user. I am trying to use django with bootstrap 3 > and can't seem to be able map form fields I create to the bootstrap fields > in the web page. I came across Django widget tweaks (https://pypi.python.org/pypi/django-widget-tweaks) recently and found it to be very useful in this regard. Ymmv. Thanks & Regards, Guruprasad From veraks18 at gmail.com Tue Sep 9 12:49:07 2014 From: veraks18 at gmail.com (Akshay Verma) Date: Tue, 9 Sep 2014 16:19:07 +0530 Subject: [BangPypers] Using Python To Do More With Arduino Message-ID: Could you upload a Video or Materials of this event? Best Regards, Akshay Verma. From tanuj at toptalent.in Wed Sep 10 16:33:39 2014 From: tanuj at toptalent.in (Tanuj Deshpande) Date: Wed, 10 Sep 2014 20:03:39 +0530 Subject: [BangPypers] [Job] Looking for Full Stack Generalist Message-ID: Hi, Caratlane is looking for Full Stack Generalist in Chennai. If interested, Please apply through this link. https://www.toptalent.in/job/3342/full-stack-generalist-mobile-web-chennai-india/ Thanks, Tanuj. From asif.jamadar at rezayat.net Sat Sep 13 09:57:00 2014 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Sat, 13 Sep 2014 07:57:00 +0000 Subject: [BangPypers] Python is still greek to india's top IT firms Message-ID: http://timesofindia.indiatimes.com/...-Indias-top-IT-firms/articleshow/41535783.cms NEW DELHI: Recently, one of India's top software companies was faced with quandary. It had won a $200 million (Rs 1,200 crore) contract to develop an app store for a large US bank, but did not have adequate numbers of programmers who could write code in Python, the language most suited for the job. Eventually, it paid thrice the billing rate to a group of freelance Python programmers in the US. And learned a valuable lesson about the importance of a language named after the British television comedy series Monty Python. For a nation regarded as a software programming powerhouse, the episode has salutary lessons. While skills in traditional computer languages meant for stitching software applications and maintaining large mainframe computers are a strength, ignoring Python could prove to be a costly mistake. "Because companies like Infosys and TCS prefer proprietary languages like Java or dot NET most students think of these as an option in college. That is the reason you don't get good quality talent in the industry to work with us in Python," said Jofin Joseph, cofounder and chief operating officer of Profoundis, a Kochi-based technology startup which has been struggling for about a year to hire young Python programmers. From me at bibhas.in Sat Sep 13 11:07:21 2014 From: me at bibhas.in (Bibhas) Date: Sat, 13 Sep 2014 14:37:21 +0530 Subject: [BangPypers] Python is still greek to india's top IT firms In-Reply-To: References: Message-ID: <54140949.7040403@bibhas.in> On 09/13/2014 01:27 PM, Asif Jamadar wrote: > http://timesofindia.indiatimes.com/...-Indias-top-IT-firms/articleshow/41535783.cms > > NEW DELHI: Recently, one of India's top software companies was faced with quandary. It had won a $200 million (Rs 1,200 crore) contract to develop an app store for a large US bank, but did not have adequate numbers of programmers who could write code in Python, the language most suited for the job. Eventually, it paid thrice the billing rate to a group of freelance Python programmers in the US. And learned a valuable lesson about the importance of a language named after the British television comedy series Monty Python. I'd like to know which company this `one of India's top software companies` is. Sounds like they don't network enough to find out the Python developers in India. > > For a nation regarded as a software programming powerhouse, the episode has salutary lessons. While skills in traditional computer languages meant for stitching software applications and maintaining large mainframe computers are a strength, ignoring Python could prove to be a costly mistake. > > "Because companies like Infosys and TCS prefer proprietary languages like Java or dot NET most students think of these as an option in college. That is the reason you don't get good quality talent in the industry to work with us in Python," said Jofin Joseph, cofounder and chief operating officer of Profoundis, a Kochi-based technology startup which has been struggling for about a year to hire young Python programmers. Checked out the social network profiles of Profoundis, they are almost non-existent. They don't attend any events at all. I wonder how they are trying to hire Python programmers. That might tell us why they are struggling. Anyway, other points about big companies working with Java and as a result colleges teaching only those, is true. It's become a circle. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers From skb655952 at gmail.com Sat Sep 13 20:37:21 2014 From: skb655952 at gmail.com (sayantan bhattacharya) Date: Sun, 14 Sep 2014 00:07:21 +0530 Subject: [BangPypers] Python is still greek to india's top IT firms In-Reply-To: <54140949.7040403@bibhas.in> References: <54140949.7040403@bibhas.in> Message-ID: Hello all, I work at TCS and they didn't know about Python either. Now that I have written a script that does the log monitoring easy for the Application support guys, they have accepted the language. But there seems to be a resistance among the people using Java to accept that Python is powerful and capable enough to do the same task that Java does. On Sat, Sep 13, 2014 at 2:37 PM, Bibhas wrote: > > On 09/13/2014 01:27 PM, Asif Jamadar wrote: > >> http://timesofindia.indiatimes.com/...-Indias-top- >> IT-firms/articleshow/41535783.cms> indiatimes.com/tech/jobs/Python-is-still-greek-to-Indias-top-IT-firms/ >> articleshow/41535783.cms> >> >> NEW DELHI: Recently, one of India's top software companies was faced with >> quandary. It had won a $200 million (Rs 1,200 crore) contract to develop an >> app store for a large US bank, but did not have adequate numbers of >> programmers who could write code in Python, the language most suited for >> the job. Eventually, it paid thrice the billing rate to a group of >> freelance Python programmers in the US. And learned a valuable lesson about >> the importance of a language named after the British television comedy >> series Monty Python. >> > > I'd like to know which company this `one of India's top software > companies` is. Sounds like they don't network enough to find out the Python > developers in India. > > >> For a nation regarded as a software programming powerhouse, the episode >> has salutary lessons. While skills in traditional computer languages meant >> for stitching software applications and maintaining large mainframe >> computers are a strength, ignoring Python could prove to be a costly >> mistake. >> >> "Because companies like Infosys> indiatimes.com/infosys-technologies-ltd/stocks/companyid-10960.cms> and >> TCS prefer proprietary languages like Java or dot NET most students think >> of these as an option in college. That is the reason you don't get good >> quality talent in the industry to work with us in Python," said Jofin >> Joseph, cofounder and chief operating officer of Profoundis, a Kochi-based >> technology startup which has been struggling for about a year to hire young >> Python programmers. >> > > Checked out the social network profiles of Profoundis, they are almost > non-existent. They don't attend any events at all. I wonder how they are > trying to hire Python programmers. That might tell us why they are > struggling. > > > Anyway, other points about big companies working with Java and as a result > colleges teaching only those, is true. It's become a circle. > > > _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> https://mail.python.org/mailman/listinfo/bangpypers >> > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > -- Sayantan Bhattacharya From noufal at nibrahim.net.in Sun Sep 14 05:01:30 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sun, 14 Sep 2014 08:31:30 +0530 Subject: [BangPypers] Python is still greek to india's top IT firms In-Reply-To: (sayantan bhattacharya's message of "Sun, 14 Sep 2014 00:07:21 +0530") References: <54140949.7040403@bibhas.in> Message-ID: <871tresy5x.fsf@nibrahim.net.in> On Sun, Sep 14 2014, sayantan bhattacharya wrote: > Hello all, > > I work at TCS and they didn't know about Python either. Now that I > have written a script that does the log monitoring easy for the > Application support guys, they have accepted the language. But there > seems to be a resistance among the people using Java to accept that > Python is powerful and capable enough to do the same task that Java > does. Not unconditionally. From what I know, the JVM handles cross platform issues, JITting, concurrency etc. much better than Python. [...] -- Cordially, Noufal http://nibrahim.net.in From senthil at uthcode.com Wed Sep 17 12:54:18 2014 From: senthil at uthcode.com (Senthil Kumaran) Date: Wed, 17 Sep 2014 18:54:18 +0800 Subject: [BangPypers] Python is still greek to india's top IT firms In-Reply-To: References: Message-ID: Python does not have the push that Java and .Net has from the corporate world. Java and .Net/C# has strong ecosystem of tools too. And surprisingly PHP in open source world got a good adoption by being at the right time for a specific solution. So, in India we see PHP, Java and .Net as primary platform for developers. But the good news is, if an individual developer becomes very strong in Python, he is creating a value for himself. Given that world is moving to multiple language shops and almost all companies will use more than one language in their offerings, having python knowledge is definitely going to help anyone get hired. >From my experience at Akamai Bangalore, when we had to hire Java developers for my team, we had 100s of resumes competing for single spot, but we looked for "quality" python developers, there were very less < 10 (and all of them known folks) who could easily land up in the role. So, yeah there you go. Any developer will have edge by learning a language like Python. On Sat, Sep 13, 2014 at 3:57 PM, Asif Jamadar wrote: > > http://timesofindia.indiatimes.com/...-Indias-top-IT-firms/articleshow/41535783.cms > < > http://timesofindia.indiatimes.com/tech/jobs/Python-is-still-greek-to-Indias-top-IT-firms/articleshow/41535783.cms > > > > NEW DELHI: Recently, one of India's top software companies was faced with > quandary. It had won a $200 million (Rs 1,200 crore) contract to develop an > app store for a large US bank, but did not have adequate numbers of > programmers who could write code in Python, the language most suited for > the job. Eventually, it paid thrice the billing rate to a group of > freelance Python programmers in the US. And learned a valuable lesson about > the importance of a language named after the British television comedy > series Monty Python. > > For a nation regarded as a software programming powerhouse, the episode > has salutary lessons. While skills in traditional computer languages meant > for stitching software applications and maintaining large mainframe > computers are a strength, ignoring Python could prove to be a costly > mistake. > > "Because companies like Infosys< > http://economictimes.indiatimes.com/infosys-technologies-ltd/stocks/companyid-10960.cms> > and TCS prefer proprietary languages like Java or dot NET most students > think of these as an option in college. That is the reason you don't get > good quality talent in the industry to work with us in Python," said Jofin > Joseph, cofounder and chief operating officer of Profoundis, a Kochi-based > technology startup which has been struggling for about a year to hire young > Python programmers. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From vsapre80 at gmail.com Fri Sep 19 18:32:56 2014 From: vsapre80 at gmail.com (Vishal) Date: Fri, 19 Sep 2014 22:02:56 +0530 Subject: [BangPypers] [OT] When user interfaces become problems... Message-ID: http://www.eetimes.com/author.asp?section_id=216&doc_id=1323983&_mc=NL_EET_EDT_EET_daily_20140919&cid=NL_EET_EDT_EET_daily_20140919&elq=cd039eec1e20423e942a0a85375c55be&elqCampaignId=19233 ?Enjoy,? Vishal Sapre --- Please DONT print this email, unless you really need to. Save Energy & Paper. Save the Earth. From vsapre80 at gmail.com Fri Sep 19 18:34:20 2014 From: vsapre80 at gmail.com (Vishal) Date: Fri, 19 Sep 2014 22:04:20 +0530 Subject: [BangPypers] [OT] When user interfaces become problems... In-Reply-To: References: Message-ID: Sorry...sent to the wrong list. my bad. take care, Vishal Thanks and best regards, Vishal Sapre --- Please DONT print this email, unless you really need to. Save Energy & Paper. Save the Earth. On Fri, Sep 19, 2014 at 10:02 PM, Vishal wrote: > > http://www.eetimes.com/author.asp?section_id=216&doc_id=1323983&_mc=NL_EET_EDT_EET_daily_20140919&cid=NL_EET_EDT_EET_daily_20140919&elq=cd039eec1e20423e942a0a85375c55be&elqCampaignId=19233 > > ?Enjoy,? > Vishal Sapre > > --- > Please DONT print this email, unless you really need to. Save Energy & > Paper. Save the Earth. > From noufal at nibrahim.net.in Sat Sep 20 11:04:49 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 14:34:49 +0530 Subject: [BangPypers] Return values Message-ID: <87ioki7jda.fsf@nibrahim.net.in> I've recently come across something that I'd like some comments on. It's a stylistic issue so not something that there's an objective answer for. Nevertheless. I have a function that gets some statistics from some source and returns it to the user as a Stats object. Let's call it get_stats. This has a parameter `consolidate`. If consolidate is True, it will combine all the statistics and return just one Stats object. If not, it will return a list of Stats objects. The problem now is that this function sometimes returns a single thing and some times a list. I don't like this since I have to alter my calling code to handle this. I'm surprised that I've never hit this before and I'm not really sure how to handle it. Comments? -- Cordially, Noufal http://nibrahim.net.in From shankhabanerjee at gmail.com Sat Sep 20 11:14:07 2014 From: shankhabanerjee at gmail.com (shankha) Date: Sat, 20 Sep 2014 14:44:07 +0530 Subject: [BangPypers] Return values In-Reply-To: <87ioki7jda.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: Can you please tell at how many places you make the call. That is the problem with these stupid dynamic languages :-) On Sep 20, 2014 2:35 PM, "Noufal Ibrahim KV" wrote: > > I've recently come across something that I'd like some comments on. It's > a stylistic issue so not something that there's an objective answer > for. Nevertheless. > > I have a function that gets some statistics from some source and returns > it to the user as a Stats object. Let's call it get_stats. This has a > parameter `consolidate`. If consolidate is True, it will combine all the > statistics and return just one Stats object. If not, it will return a > list of Stats objects. > > The problem now is that this function sometimes returns a single thing > and some times a list. I don't like this since I have to alter my > calling code to handle this. > > I'm surprised that I've never hit this before and I'm not really sure > how to handle it. > > Comments? > > > > -- > Cordially, > Noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From harish.shastry at gmail.com Sat Sep 20 11:19:02 2014 From: harish.shastry at gmail.com (Harish Vishwanath) Date: Sat, 20 Sep 2014 14:49:02 +0530 Subject: [BangPypers] Return values In-Reply-To: References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: Couple of approaches: - Break the api into two. get_stats and get_stats_consolidated. This way, the caller who doesn't know what is your default value of "consolidated" argument is will not be confused. - Change the return value to be a list always. Without "consolidated" set, it will just be [Stats], else [stat1, stat2, stat3..] - More descriptive return value could be a dict: { 'consolidated': True|False 'value' : [] } Regards, Harish On Sat, Sep 20, 2014 at 2:44 PM, shankha wrote: > Can you please tell at how many places you make the call. > > That is the problem with these stupid dynamic languages :-) > On Sep 20, 2014 2:35 PM, "Noufal Ibrahim KV" > wrote: > > > > > I've recently come across something that I'd like some comments on. It's > > a stylistic issue so not something that there's an objective answer > > for. Nevertheless. > > > > I have a function that gets some statistics from some source and returns > > it to the user as a Stats object. Let's call it get_stats. This has a > > parameter `consolidate`. If consolidate is True, it will combine all the > > statistics and return just one Stats object. If not, it will return a > > list of Stats objects. > > > > The problem now is that this function sometimes returns a single thing > > and some times a list. I don't like this since I have to alter my > > calling code to handle this. > > > > I'm surprised that I've never hit this before and I'm not really sure > > how to handle it. > > > > Comments? > > > > > > > > -- > > Cordially, > > Noufal > > http://nibrahim.net.in > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From senthil at uthcode.com Sat Sep 20 11:20:44 2014 From: senthil at uthcode.com (Senthil Kumaran) Date: Sat, 20 Sep 2014 17:20:44 +0800 Subject: [BangPypers] Return values In-Reply-To: <87ioki7jda.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: On Sat, Sep 20, 2014 at 5:04 PM, Noufal Ibrahim KV wrote: > This has a > parameter `consolidate`. If consolidate is True, it will combine all the > statistics and return just one Stats object. If not, it will return a > list of Stats objects. > > The problem now is that this function sometimes returns a single thing > and some times a list. I don't like this since I have to alter my > calling code to handle this. > > I'm surprised that I've never hit this before and I'm not really sure > how to handle it. > > Comments? > One option to me looks like, don't have consolidate as parameter for this function, but do the operation outside. Like providing a function called get_consolidated_stats, which will call get_stats and provide the consolidated result. The reason I am suggesting is, consolidation is one of the operation that be performed on the the collection and it seems that injecting that operation on the collection is 'limiting' the API. The other obvious options are. 1) Return a list, but when consolidate is sent, it is a single element list. # This hurts semantics and human understanding 2) Return a higher level object, (Stats object) which has a property called consolidate, which can be set, when it is invoked. # This makes it a bit complex. From anandology at gmail.com Sat Sep 20 11:29:07 2014 From: anandology at gmail.com (Anand Chitipothu) Date: Sat, 20 Sep 2014 14:59:07 +0530 Subject: [BangPypers] Return values In-Reply-To: <87ioki7jda.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: On Sat, Sep 20, 2014 at 2:34 PM, Noufal Ibrahim KV wrote: > > I've recently come across something that I'd like some comments on. It's > a stylistic issue so not something that there's an objective answer > for. Nevertheless. > > I have a function that gets some statistics from some source and returns > it to the user as a Stats object. Let's call it get_stats. This has a > parameter `consolidate`. If consolidate is True, it will combine all the > statistics and return just one Stats object. If not, it will return a > list of Stats objects. > > The problem now is that this function sometimes returns a single thing > and some times a list. I don't like this since I have to alter my > calling code to handle this. > > I'm surprised that I've never hit this before and I'm not really sure > how to handle it. > > Comments? > Oh, that feels like PHP. That style seems to be popular in that side of the world. It might be a good idea to add consolidate method on the return value. Something like: class StatsList(list): def consolidate(self): .. print get_stats(..) print get_stats(..).consolidate() Anand From vivek.ramakrishna at globalsoft.com Sat Sep 20 11:15:17 2014 From: vivek.ramakrishna at globalsoft.com (Vivek Ramakrishna) Date: Sat, 20 Sep 2014 14:45:17 +0530 Subject: [BangPypers] Return values In-Reply-To: <87ioki7jda.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: Hi Noufal Why not create two methods, get_stats() and get_stats_list(). Both can share logic in a common function which takes the consolidate flag - meaning your logic is localised to one point only. It makes for more readable code when called as well. Cheers Vivek On Sat, Sep 20, 2014 at 2:34 PM, Noufal Ibrahim KV wrote: > > I've recently come across something that I'd like some comments on. It's > a stylistic issue so not something that there's an objective answer > for. Nevertheless. > > I have a function that gets some statistics from some source and returns > it to the user as a Stats object. Let's call it get_stats. This has a > parameter `consolidate`. If consolidate is True, it will combine all the > statistics and return just one Stats object. If not, it will return a > list of Stats objects. > > The problem now is that this function sometimes returns a single thing > and some times a list. I don't like this since I have to alter my > calling code to handle this. > > I'm surprised that I've never hit this before and I'm not really sure > how to handle it. > > Comments? > > > > -- > Cordially, > Noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > -- *Vivek Ramakrishna* | Director | GSoft Services Pvt Ltd | www.globalsoft.com | +91 702 202 5880 From noufal at nibrahim.net.in Sat Sep 20 12:48:42 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 16:18:42 +0530 Subject: [BangPypers] Return values In-Reply-To: (Harish Vishwanath's message of "Sat, 20 Sep 2014 14:49:02 +0530") References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: <878ule7ek5.fsf@nibrahim.net.in> On Sat, Sep 20 2014, Harish Vishwanath wrote: > Couple of approaches: > > - Break the api into two. get_stats and get_stats_consolidated. This way, > the caller who doesn't know what is your default value of "consolidated" > argument is will not be confused. This explodes the API. It's similar to having two sort functions 'sort_increasing', and 'sort_decreasing' instead of just a single sort function with a flag to indicate ordering. > - Change the return value to be a list always. Without "consolidated" set, > it will just be [Stats], else [stat1, stat2, stat3..] That's what I'd do if it were C. An array. However, in python, when I know that I'm going to return a list with only one item, I'd prefer to just return it. Otherwise, there will be stuff like if consolidated: stats = stats.pop() and other such nasties in the code. > - More descriptive return value could be a dict: > { > 'consolidated': True|False > 'value' : [] > } That's an option though not one that occurred to me. However, then I'd have to unpack this dictionary every time I called the function and optionally, do checking too. I'm not shooting down your ideas. These are what occurred to me too. I'm just looking for something "neater". [...] -- Cordially, Noufal http://nibrahim.net.in From noufal at nibrahim.net.in Sat Sep 20 12:52:37 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 16:22:37 +0530 Subject: [BangPypers] Return values In-Reply-To: (Senthil Kumaran's message of "Sat, 20 Sep 2014 17:20:44 +0800") References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: <8738bm7edm.fsf@nibrahim.net.in> On Sat, Sep 20 2014, Senthil Kumaran wrote: [...] > One option to me looks like, don't have consolidate as parameter for > this function, but do the operation outside. Like providing a > function called get_consolidated_stats, which will call get_stats and > provide the consolidated result. > > The reason I am suggesting is, consolidation is one of the operation > that be performed on the the collection and it seems that injecting > that operation on the collection is 'limiting' the API. [...] I thought of this. If I can, for example, implement __add__ for the stats, I can say something like consolidated_stats = sum(get_stats(), Stats()) My only objection was if the consolidation is not trivial or depends on the time of sampling, then it might be complex, if not impossible. Still, this seems like the neatest way to do it. -- Cordially, Noufal http://nibrahim.net.in From noufal at nibrahim.net.in Sat Sep 20 12:53:39 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 16:23:39 +0530 Subject: [BangPypers] Return values In-Reply-To: (Anand Chitipothu's message of "Sat, 20 Sep 2014 14:59:07 +0530") References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: <87wq8y5zrg.fsf@nibrahim.net.in> On Sat, Sep 20 2014, Anand Chitipothu wrote: [...] > Oh, that feels like PHP. That style seems to be popular in that side of the > world. > > It might be a good idea to add consolidate method on the return value. > Something like: > > class StatsList(list): > def consolidate(self): > .. > > print get_stats(..) > print get_stats(..).consolidate() [...] That's a nice solution. It's similar to what Senthil suggested but I like the API better. -- Cordially, Noufal http://nibrahim.net.in From noufal at nibrahim.net.in Sat Sep 20 12:54:54 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 16:24:54 +0530 Subject: [BangPypers] Return values In-Reply-To: (Vivek Ramakrishna's message of "Sat, 20 Sep 2014 14:45:17 +0530") References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: <87r3z65zpd.fsf@nibrahim.net.in> On Sat, Sep 20 2014, Vivek Ramakrishna wrote: > Hi Noufal > > Why not create two methods, get_stats() and get_stats_list(). Both can > share logic in a common function which takes the consolidate flag - meaning > your logic is localised to one point only. It makes for more readable code > when called as well. [...] This approach (especially with many calls) will make the API really big. I don't remember but I've seen things with get_something, get_something_list, get_something_dict and what not which don't really help readability. -- Cordially, Noufal http://nibrahim.net.in From karra.etc at gmail.com Sat Sep 20 13:09:59 2014 From: karra.etc at gmail.com (Sriram Karra) Date: Sat, 20 Sep 2014 16:39:59 +0530 Subject: [BangPypers] Return values In-Reply-To: References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: On Sat, Sep 20, 2014 at 2:50 PM, Senthil Kumaran wrote: > > One option to me looks like, don't have consolidate as parameter for this > function, but do the operation outside. > Like providing a function called get_consolidated_stats, which will call > get_stats and provide the consolidated result. > > +1 to this. Having a method do two different things based on a flag is not a clean answer to anything. From karra.etc at gmail.com Sat Sep 20 13:13:52 2014 From: karra.etc at gmail.com (Sriram Karra) Date: Sat, 20 Sep 2014 16:43:52 +0530 Subject: [BangPypers] Return values In-Reply-To: <878ule7ek5.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> <878ule7ek5.fsf@nibrahim.net.in> Message-ID: On Sat, Sep 20, 2014 at 4:18 PM, Noufal Ibrahim KV wrote: > On Sat, Sep 20 2014, Harish Vishwanath wrote: > > > Couple of approaches: > > > > - Break the api into two. get_stats and get_stats_consolidated. This way, > > the caller who doesn't know what is your default value of "consolidated" > > argument is will not be confused. > > This explodes the API. It's similar to having two sort functions > 'sort_increasing', and 'sort_decreasing' instead of just a single sort > function with a flag to indicate ordering. I think the comparison is not strictly apples to apples. In case of sort ascending / descending flag parameterises the same sort algorithm. In your case, you do some additional things (loop through and add up stuff, perhaps) based on the value of the flag. That is very different. From noufal at nibrahim.net.in Sat Sep 20 13:17:55 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 16:47:55 +0530 Subject: [BangPypers] Return values In-Reply-To: (Sriram Karra's message of "Sat, 20 Sep 2014 16:43:52 +0530") References: <87ioki7jda.fsf@nibrahim.net.in> <878ule7ek5.fsf@nibrahim.net.in> Message-ID: <87lhpe5yn0.fsf@nibrahim.net.in> On Sat, Sep 20 2014, Sriram Karra wrote: [...] > I think the comparison is not strictly apples to apples. In case of sort > ascending / descending flag parameterises the same sort algorithm. In your > case, you do some additional things (loop through and add up stuff, > perhaps) based on the value of the flag. That is very different. [...] Of course but the API should hide that in a neat way from you shouldn't it? If I have two "switches" an operation, I'd still like to have just one function. Not 4 representing all the combinations. -- Cordially, Noufal http://nibrahim.net.in From noufal at nibrahim.net.in Sat Sep 20 13:18:38 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 16:48:38 +0530 Subject: [BangPypers] Return values In-Reply-To: (Sriram Karra's message of "Sat, 20 Sep 2014 16:39:59 +0530") References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: <87fvfm5ylt.fsf@nibrahim.net.in> On Sat, Sep 20 2014, Sriram Karra wrote: [...] > Having a method do two different things based on a flag is not > a clean answer to anything. [...] That's a useful rule of thumb. Thank you. -- Cordially, Noufal http://nibrahim.net.in From karra.etc at gmail.com Sat Sep 20 13:25:18 2014 From: karra.etc at gmail.com (Sriram Karra) Date: Sat, 20 Sep 2014 16:55:18 +0530 Subject: [BangPypers] Return values In-Reply-To: <87r3z65zpd.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> <87r3z65zpd.fsf@nibrahim.net.in> Message-ID: On Sat, Sep 20, 2014 at 4:24 PM, Noufal Ibrahim KV wrote: > > This approach (especially with many calls) will make the API really > big. I don't remember but I've seen things with get_something, > get_something_list, get_something_dict and what not which don't really > help readability. That is true. But in my experience one of the biggest pain points in using Python has been dealing with 3rd party libraries that are poorly documented and have methods that return different types in different scenarios. It is living hell with said library is packaged and distributed as a pyd. I have come to avoid returning multiple types from a method - like the plague. All that in addition to your valid concern about exploding API. But your problem can be addressed by naming the functions after what they do - after all your consolidate function does something tangible other than just return a different type of data. From karra.etc at gmail.com Sat Sep 20 13:28:48 2014 From: karra.etc at gmail.com (Sriram Karra) Date: Sat, 20 Sep 2014 16:58:48 +0530 Subject: [BangPypers] Return values In-Reply-To: <87lhpe5yn0.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> <878ule7ek5.fsf@nibrahim.net.in> <87lhpe5yn0.fsf@nibrahim.net.in> Message-ID: On Sat, Sep 20, 2014 at 4:47 PM, Noufal Ibrahim KV wrote: > > Of course but the API should hide that in a neat way from you shouldn't > it? If I have two "switches" an operation, I'd still like to have just > one function. Not 4 representing all the combinations. > > I will agree with you in principle. But I will note that we have gone from discussing a specific answer for a specific question to a sort of hypothetical situation. So I will have to stop right here. From noufal at nibrahim.net.in Sat Sep 20 13:45:40 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 17:15:40 +0530 Subject: [BangPypers] Return values In-Reply-To: (Sriram Karra's message of "Sat, 20 Sep 2014 16:55:18 +0530") References: <87ioki7jda.fsf@nibrahim.net.in> <87r3z65zpd.fsf@nibrahim.net.in> Message-ID: <8761gi5xcr.fsf@nibrahim.net.in> On Sat, Sep 20 2014, Sriram Karra wrote: [...] > But your problem can be addressed by naming the functions after what they > do - after all your consolidate function does something tangible other than > just return a different type of data. [...] Let me give you a specific example. The psutils library has a function to get cpu times (idle, busy etc.). It can either do this per CPU (in which case, it will return a list of CPUTime objects, one per CPU) or give you the total (in which case, you'll get back a single CPUTime object). This is controlled by a per_cpu boolean flag. You can write a separate method to sum the individual times and then keep the "conslidation" outside get_cpu_times. The library chooses to sometimes return a list and sometimes return a single item. I don't like that. Now, I can write two functions like get_cpu_times and get_cpu_times_per_cpu. I don't particularly like that either. >From the thread so far, Anand's solution is the one I like best. Although it's something tailored for my problem rather than a general pattern. -- Cordially, Noufal http://nibrahim.net.in From karra.etc at gmail.com Sat Sep 20 18:27:20 2014 From: karra.etc at gmail.com (Sriram Karra) Date: Sat, 20 Sep 2014 21:57:20 +0530 Subject: [BangPypers] Return values In-Reply-To: <8761gi5xcr.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> <87r3z65zpd.fsf@nibrahim.net.in> <8761gi5xcr.fsf@nibrahim.net.in> Message-ID: On Sat, Sep 20, 2014 at 5:15 PM, Noufal Ibrahim KV wrote: > > From the thread so far, Anand's solution is the one I like > best. Although it's something tailored for my problem rather than a > general pattern. > Anand's solution is good. But with the added context you have given - why are you not creating classes for CPU and Machine, with get_stats() and set_stats() methods for them? Something like: class CPU: def set_stats (self, cpu_t): self.cpu_stats = cpu_t def get_stats (self): return self.cpu_stats class Machine: def __init__ (self, n_cpus): self.cpus = [CPU() for i in range(0, n_cpus)] def fetch_stats (self): stats_list = psutils.get_cpu_stats() for i, stat in enumerate(stats_list): cpu[i].set_stats(stat) self.cpu_stats_summary = psutils.get_cpu_stats(summary=True) def get_cpu_stats_summary (self): return self.cpu_stats_summary From noufal at nibrahim.net.in Sat Sep 20 18:47:58 2014 From: noufal at nibrahim.net.in (Noufal Ibrahim KV) Date: Sat, 20 Sep 2014 22:17:58 +0530 Subject: [BangPypers] Return values In-Reply-To: (Sriram Karra's message of "Sat, 20 Sep 2014 21:57:20 +0530") References: <87ioki7jda.fsf@nibrahim.net.in> <87r3z65zpd.fsf@nibrahim.net.in> <8761gi5xcr.fsf@nibrahim.net.in> Message-ID: <87zjdu44sh.fsf@nibrahim.net.in> On Sat, Sep 20 2014, Sriram Karra wrote: [...] > Anand's solution is good. But with the added context you have given - why > are you not creating classes for CPU and Machine, with get_stats() and > set_stats() methods for them? Something like: This is a higher level abstraction and something I might cook up depending on the application. My question was about the implementation of the get_cpu_stats function and its behaviour depending on the summary flag. [...] -- Cordially, Noufal http://nibrahim.net.in From thes.kumar at gmail.com Fri Sep 19 10:29:11 2014 From: thes.kumar at gmail.com (Saurabh Kumar) Date: Fri, 19 Sep 2014 13:59:11 +0530 Subject: [BangPypers] [JOB] Python/Django opportunity in Delhi NCR Message-ID: Hello Pythonistas, Ophio[1] is looking for a full-time *python developer* with experience in Django to join it's Delhi team. You can see the complete job listing at https://hasjob.co/view/essb6 Please spread the word, if you know someone who might be interested. [1]: http://ophio.co.in Regards, ?--? *?*Saurabh Kumar *https://keybase.io/theskumar * From vsapre80 at gmail.com Sat Sep 20 21:27:11 2014 From: vsapre80 at gmail.com (Vishal) Date: Sun, 21 Sep 2014 00:57:11 +0530 Subject: [BangPypers] Return values In-Reply-To: References: <87ioki7jda.fsf@nibrahim.net.in> <87r3z65zpd.fsf@nibrahim.net.in> <8761gi5xcr.fsf@nibrahim.net.in> Message-ID: Dear Noufal, Have not gone through all the replies...so may be i am repeating...may be I am not in my senses :)) I would create a "stats_bundle" object, with members like stats_val and stats_list, which are initialized to None. So you always get a stats_bundle object which you can pass around to the handler function in the calling code. Since one of the above members is always going to be None, a simple check in the handler will be fine..i guess. But all this is stylistic...so it depends. Take care, Vishal Thanks and best regards, Vishal Sapre --- Please DONT print this email, unless you really need to. Save Energy & Paper. Save the Earth. On Sat, Sep 20, 2014 at 9:57 PM, Sriram Karra wrote: > On Sat, Sep 20, 2014 at 5:15 PM, Noufal Ibrahim KV > > wrote: > > > > > > From the thread so far, Anand's solution is the one I like > > best. Although it's something tailored for my problem rather than a > > general pattern. > > > > > Anand's solution is good. But with the added context you have given - why > are you not creating classes for CPU and Machine, with get_stats() and > set_stats() methods for them? Something like: > > class CPU: > def set_stats (self, cpu_t): > self.cpu_stats = cpu_t > > def get_stats (self): > return self.cpu_stats > > class Machine: > def __init__ (self, n_cpus): > self.cpus = [CPU() for i in range(0, n_cpus)] > > def fetch_stats (self): > stats_list = psutils.get_cpu_stats() > for i, stat in enumerate(stats_list): > cpu[i].set_stats(stat) > > self.cpu_stats_summary = psutils.get_cpu_stats(summary=True) > > def get_cpu_stats_summary (self): > return self.cpu_stats_summary > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From mails.ashok at yahoo.com Sun Sep 21 08:52:16 2014 From: mails.ashok at yahoo.com (Ashok K) Date: Sat, 20 Sep 2014 23:52:16 -0700 Subject: [BangPypers] Best books for python Message-ID: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> Hello All, I have learnt the python basics by viewing few videos. Want to gain in-depth knowledge and master python:) Please suggest some books/materials that would help me master python. Thanks, Ashok From senthil at uthcode.com Sun Sep 21 13:26:00 2014 From: senthil at uthcode.com (Senthil Kumaran) Date: Sun, 21 Sep 2014 19:26:00 +0800 Subject: [BangPypers] Best books for python In-Reply-To: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> References: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> Message-ID: On Sun, Sep 21, 2014 at 2:52 PM, Ashok K < mails.ashok at yahoo.com.dmarc.invalid> wrote: > Please suggest some books/materials that would help me master python. Python Cookbook 2nd Edition by Alex Martelli. Python Cookbook 3rd edition by Dave Beazley. Then try doing programming projects using Python, possibly involving yourself with other senior python developers. Those are the limited resources available atm. -- Senthil From annamsaratchand at gmail.com Mon Sep 22 05:57:13 2014 From: annamsaratchand at gmail.com (sarat chand) Date: Mon, 22 Sep 2014 09:27:13 +0530 Subject: [BangPypers] Best books for python In-Reply-To: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> References: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> Message-ID: Hi Ashok, I think www.tutorialspoint.com is useful for your practice. Thanks Sarat On Sun, Sep 21, 2014 at 12:22 PM, Ashok K < mails.ashok at yahoo.com.dmarc.invalid> wrote: > Hello All, > > I have learnt the python basics by viewing few videos. Want to gain > in-depth knowledge and master python:) > > Please suggest some books/materials that would help me master python. > > Thanks, > Ashok > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From netwebsteps at gmail.com Mon Sep 22 12:08:38 2014 From: netwebsteps at gmail.com (G.T.RAO) Date: Mon, 22 Sep 2014 15:38:38 +0530 Subject: [BangPypers] Best books for python In-Reply-To: References: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> Message-ID: Hi Core python programming , Wesley J.Chun , 1st & 2nd Edition. Sent with MailTrack On Mon, Sep 22, 2014 at 9:27 AM, sarat chand wrote: > Hi Ashok, > > > I think www.tutorialspoint.com is useful for your practice. > > > Thanks > Sarat > > > On Sun, Sep 21, 2014 at 12:22 PM, Ashok K < > mails.ashok at yahoo.com.dmarc.invalid> wrote: > > > Hello All, > > > > I have learnt the python basics by viewing few videos. Want to gain > > in-depth knowledge and master python:) > > > > Please suggest some books/materials that would help me master python. > > > > Thanks, > > Ashok > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > -- *Regards,* *G.T.RAOA free software fund-a-mentaL-isT.* http://fossyatra.wordpress.com http://paper.li/GTRao/1342070958 ??????: ??:????? ?? ???? ????? ????????? ?? ?? ??? ?? ?????? ?? ??? ????? ??.?? ??? adware,?? ??? spyware, ????? ????? ?????????. P* Please don't print this e-mail unless you really need to.* From narayannaik.05 at gmail.com Mon Sep 22 14:53:24 2014 From: narayannaik.05 at gmail.com (narayan naik) Date: Mon, 22 Sep 2014 18:23:24 +0530 Subject: [BangPypers] face detection Message-ID: good evening sir, I am doing my M.Tech project on face detection,but I am confused with the algorithm,can u please tell me a simple and best face detection algorithm. From skb655952 at gmail.com Mon Sep 22 14:56:21 2014 From: skb655952 at gmail.com (sayantan bhattacharya) Date: Mon, 22 Sep 2014 18:26:21 +0530 Subject: [BangPypers] face detection In-Reply-To: References: Message-ID: Check haarcascade in open cv On Sep 22, 2014 6:23 PM, "narayan naik" wrote: > good evening sir, > I am doing my M.Tech project on face > detection,but I am confused with the algorithm,can u please tell me a > simple and best face detection algorithm. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From narayannaik.05 at gmail.com Mon Sep 22 15:03:08 2014 From: narayannaik.05 at gmail.com (narayan naik) Date: Mon, 22 Sep 2014 18:33:08 +0530 Subject: [BangPypers] face detection In-Reply-To: References: Message-ID: Thank you sir,I will check now On Mon, Sep 22, 2014 at 6:26 PM, sayantan bhattacharya wrote: > Check haarcascade in open cv > On Sep 22, 2014 6:23 PM, "narayan naik" wrote: > > > good evening sir, > > I am doing my M.Tech project on face > > detection,but I am confused with the algorithm,can u please tell me a > > simple and best face detection algorithm. > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From awanish00 at gmail.com Mon Sep 22 15:24:19 2014 From: awanish00 at gmail.com (kumar awanish) Date: Mon, 22 Sep 2014 18:54:19 +0530 Subject: [BangPypers] New to Python Message-ID: Hii All , I am new to python , I want to explore in web development ,can anyone please suggest which framework to start with for backend development ..Django or Flask as a beginner .Please do suggest some open source project related to that and some helpful links/resources. BR, Awanish From satishsagar83 at gmail.com Mon Sep 22 15:28:02 2014 From: satishsagar83 at gmail.com (L Radhakrishna Rao) Date: Mon, 22 Sep 2014 18:58:02 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: Start with django On open source development, you can try to interface arduino with python, and try to log real time information in a web browser On Mon, Sep 22, 2014 at 6:54 PM, kumar awanish wrote: > Hii All , > > I am new to python , I want to explore in web development ,can anyone > please suggest which framework to start with for backend development > ..Django or Flask as a beginner .Please do suggest some open source > project related to that and some helpful links/resources. > > BR, > Awanish > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From knightsamar at gmail.com Mon Sep 22 15:43:32 2014 From: knightsamar at gmail.com (Samarendra) Date: Mon, 22 Sep 2014 19:13:32 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: Hi Awanish, Welcome to the world of Python! If your basics of Python are clear, you can start with either of these frameworks. I personally find both Flask and Django equally easy and good for beginners. Their documentation and the beginner tutorials they have in it, are good enough to get you started. As for a project, if you like Django, askbot(https://github.com/ASKBOT/askbot-devel) is one good project you can contribute to. Also rapidsms(http://rapidsms.org/), but it seems dormant. Also, if you are new to contributing to open source projects, you might find this presentation (http://www.shakthimaan.com/downloads/glv/presentations/i-want-2-do-project-tell-me-wat-2-do.pdf) useful! :-) Regards, Samarendra On Mon, Sep 22, 2014 at 6:54 PM, kumar awanish wrote: > > Hii All , > > I am new to python , I want to explore in web development ,can anyone > please suggest which framework to start with for backend development > ..Django or Flask as a beginner .Please do suggest some open source > project related to that and some helpful links/resources. > > BR, > Awanish > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers From sshabinesh at gmail.com Mon Sep 22 19:13:05 2014 From: sshabinesh at gmail.com (sshabinesh at gmail.com) Date: Mon, 22 Sep 2014 22:43:05 +0530 Subject: [BangPypers] Anyone need PyCon ticket? Message-ID: Hi All, Due to some unavoidable situation I am not attending Pycon this time. I have registered for it. If anyone is interested you can buy the ticket from me. You can contact me at --S From awanish00 at gmail.com Mon Sep 22 19:51:01 2014 From: awanish00 at gmail.com (kumar awanish) Date: Mon, 22 Sep 2014 23:21:01 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: Thanks L Radhakrishna Rao & Samarendra :) On Mon, Sep 22, 2014 at 7:13 PM, Samarendra wrote: > Hi Awanish, > > Welcome to the world of Python! > > If your basics of Python are clear, you can start with either of these > frameworks. I personally find both Flask and Django equally easy and > good for beginners. Their documentation and the beginner tutorials > they have in it, are good enough to get you started. > > As for a project, if you like Django, > askbot(https://github.com/ASKBOT/askbot-devel) is one good project you > can contribute to. Also rapidsms(http://rapidsms.org/), but it seems > dormant. > > Also, if you are new to contributing to open source projects, you > might find this presentation > ( > http://www.shakthimaan.com/downloads/glv/presentations/i-want-2-do-project-tell-me-wat-2-do.pdf > ) > useful! :-) > > Regards, > Samarendra > > On Mon, Sep 22, 2014 at 6:54 PM, kumar awanish > wrote: > > > > Hii All , > > > > I am new to python , I want to explore in web development ,can anyone > > please suggest which framework to start with for backend development > > ..Django or Flask as a beginner .Please do suggest some open source > > project related to that and some helpful links/resources. > > > > BR, > > Awanish > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > https://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From maverick.f90 at gmail.com Tue Sep 23 04:40:22 2014 From: maverick.f90 at gmail.com (sachidanand gowda) Date: Tue, 23 Sep 2014 10:40:22 +0800 Subject: [BangPypers] Fwd: Issue with basemap import In-Reply-To: References: Message-ID: Hi, I was non member 5 mins back :) so reposting it again ---------- Forwarded message ---------- From: sachidanand gowda Date: Tue, Sep 23, 2014 at 10:13 AM Subject: Issue with basemap import To: bangpypers at python.org Hi Guys, I needed help on importing basemap http://stackoverflow.com/questions/25985808/error-importing-basemap-keyerror-dap I have posted the question on stack overflow. Kindly help me with this issue Thanks, Sachi From senthil at uthcode.com Tue Sep 23 10:29:52 2014 From: senthil at uthcode.com (Senthil Kumaran) Date: Tue, 23 Sep 2014 16:29:52 +0800 Subject: [BangPypers] Fwd: Issue with basemap import In-Reply-To: References: Message-ID: How did you install your base package? The matplotlib? Are you using any distribution? If you installed it separately., then looks like you will have to install basecamp using the matplotlib toolkits ( http://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/) too. If you are using a prebuilt distribution like anaconda (from continuum.io) it might have those libraries prebuilt for you. On Tue, Sep 23, 2014 at 10:40 AM, sachidanand gowda wrote: > Hi, > > I was non member 5 mins back :) so reposting it again > ---------- Forwarded message ---------- > From: sachidanand gowda > Date: Tue, Sep 23, 2014 at 10:13 AM > Subject: Issue with basemap import > To: bangpypers at python.org > > > Hi Guys, > > I needed help on importing basemap > > http://stackoverflow.com/questions/25985808/error-importing-basemap-keyerror-dap > > I have posted the question on stack overflow. Kindly help me with this > issue > > Thanks, > Sachi > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From kazim2007 at gmail.com Tue Sep 23 13:15:42 2014 From: kazim2007 at gmail.com (Kazim Abbas) Date: Tue, 23 Sep 2014 16:45:42 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: Hi, I will check all the given link, But how can i start a project in Django, Please let me know On Mon, Sep 22, 2014 at 7:13 PM, Samarendra wrote: > Hi Awanish, > > Welcome to the world of Python! > > If your basics of Python are clear, you can start with either of these > frameworks. I personally find both Flask and Django equally easy and > good for beginners. Their documentation and the beginner tutorials > they have in it, are good enough to get you started. > > As for a project, if you like Django, > askbot(https://github.com/ASKBOT/askbot-devel) is one good project you > can contribute to. Also rapidsms(http://rapidsms.org/), but it seems > dormant. > > Also, if you are new to contributing to open source projects, you > might find this presentation > ( > http://www.shakthimaan.com/downloads/glv/presentations/i-want-2-do-project-tell-me-wat-2-do.pdf > ) > useful! :-) > > Regards, > Samarendra > > On Mon, Sep 22, 2014 at 6:54 PM, kumar awanish > wrote: > > > > Hii All , > > > > I am new to python , I want to explore in web development ,can anyone > > please suggest which framework to start with for backend development > > ..Django or Flask as a beginner .Please do suggest some open source > > project related to that and some helpful links/resources. > > > > BR, > > Awanish > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > https://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From blucalvin at gmail.com Tue Sep 23 13:20:16 2014 From: blucalvin at gmail.com (Haris Ibrahim K. V.) Date: Tue, 23 Sep 2014 16:50:16 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: Kazim, As Saramendra said, only jump into Django if you have basics of Python learnt well. The official documentation of Django is very good to get started. For installation, use this: https://docs.djangoproject.com/en/1.7/intro/install/. For a step by step tutorial to get started, use this: https://docs.djangoproject.com/en/1.7/intro/tutorial01/ Also, one of the best places to ask Django doubts is the #django channel on Freenode. It is simply amazing. :) Cheers! On 23 September 2014 16:45, Kazim Abbas wrote: > Hi, > I will check all the given link, But how can i start a project in Django, > Please let me know > > On Mon, Sep 22, 2014 at 7:13 PM, Samarendra wrote: > >> Hi Awanish, >> >> Welcome to the world of Python! >> >> If your basics of Python are clear, you can start with either of these >> frameworks. I personally find both Flask and Django equally easy and >> good for beginners. Their documentation and the beginner tutorials >> they have in it, are good enough to get you started. >> >> As for a project, if you like Django, >> askbot(https://github.com/ASKBOT/askbot-devel) is one good project you >> can contribute to. Also rapidsms(http://rapidsms.org/), but it seems >> dormant. >> >> Also, if you are new to contributing to open source projects, you >> might find this presentation >> ( >> http://www.shakthimaan.com/downloads/glv/presentations/i-want-2-do-project-tell-me-wat-2-do.pdf >> ) >> useful! :-) >> >> Regards, >> Samarendra >> >> On Mon, Sep 22, 2014 at 6:54 PM, kumar awanish >> wrote: >> > >> > Hii All , >> > >> > I am new to python , I want to explore in web development ,can anyone >> > please suggest which framework to start with for backend development >> > ..Django or Flask as a beginner .Please do suggest some open source >> > project related to that and some helpful links/resources. >> > >> > BR, >> > Awanish >> > _______________________________________________ >> > BangPypers mailing list >> > BangPypers at python.org >> > https://mail.python.org/mailman/listinfo/bangpypers >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> https://mail.python.org/mailman/listinfo/bangpypers >> > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers -- Haris Ibrahim K. V. http://sosaysharis.wordpress.com @harisibrahimkv From senthil at uthcode.com Tue Sep 23 13:57:59 2014 From: senthil at uthcode.com (Senthil Kumaran) Date: Tue, 23 Sep 2014 19:57:59 +0800 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: On Tue, Sep 23, 2014 at 7:15 PM, Kazim Abbas wrote: > But how can i start a project in Django, > Please let me know > Start with this book called Two scoops of Django, which is a recent entrant and geared towards beginners. Then you can look at the official Django docs. -- Senthil From blucalvin at gmail.com Tue Sep 23 15:19:25 2014 From: blucalvin at gmail.com (Haris Ibrahim K. V.) Date: Tue, 23 Sep 2014 18:49:25 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: Hey Senthil, I don't quite think Two Scoops is a complete beginner material. It is not a tutorial for instance. It is more like one of the best reference books to get your Django code whipped up into proper shape as well as to give better performance altogether. That's my feeling after going through it. :) On 23 September 2014 17:27, Senthil Kumaran wrote: > On Tue, Sep 23, 2014 at 7:15 PM, Kazim Abbas wrote: > >> But how can i start a project in Django, >> Please let me know >> > > Start with this book called Two scoops of Django, which is a recent entrant > and geared towards beginners. > Then you can look at the official Django docs. > > -- > Senthil > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers -- Haris Ibrahim K. V. http://sosaysharis.wordpress.com @harisibrahimkv From arunvr at gmail.com Tue Sep 23 15:55:02 2014 From: arunvr at gmail.com (Arun Ravindran) Date: Tue, 23 Sep 2014 19:25:02 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: Hi Awanish, If you are are attending Pycon this year, then there will be a panel discussion addressing this very topic. The web frameworks which will be discussed and compared are: Django, Flask and web.py Regards, Arun On Tue, Sep 23, 2014 at 6:49 PM, Haris Ibrahim K. V. wrote: > Hey Senthil, > > I don't quite think Two Scoops is a complete beginner material. It is > not a tutorial for instance. It is more like one of the best reference > books to get your Django code whipped up into proper shape as well as > to give better performance altogether. > > That's my feeling after going through it. :) > > On 23 September 2014 17:27, Senthil Kumaran wrote: > > On Tue, Sep 23, 2014 at 7:15 PM, Kazim Abbas > wrote: > > > >> But how can i start a project in Django, > >> Please let me know > >> > > > > Start with this book called Two scoops of Django, which is a recent > entrant > > and geared towards beginners. > > Then you can look at the official Django docs. > > > > -- > > Senthil > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > > -- > Haris Ibrahim K. V. > http://sosaysharis.wordpress.com > @harisibrahimkv > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From kartiksinghal at gmail.com Tue Sep 23 18:26:30 2014 From: kartiksinghal at gmail.com (Kartik Singhal) Date: Tue, 23 Sep 2014 21:56:30 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: On Tue, Sep 23, 2014 at 6:49 PM, Haris Ibrahim K. V. wrote: > I don't quite think Two Scoops is a complete beginner material. It is > not a tutorial for instance. It is more like one of the best reference > books to get your Django code whipped up into proper shape as well as > to give better performance altogether. > > That's my feeling after going through it. :) +1 to that. For a beginner, I would rather recommend - Tango with Django. It's based on version 1.5.8, and like most other tutorials continues to get outdated. -- Kartik http://k4rtik.wordpress.com/ From lgp171188 at gmail.com Tue Sep 23 19:22:01 2014 From: lgp171188 at gmail.com (L. Guruprasad) Date: Tue, 23 Sep 2014 22:52:01 +0530 Subject: [BangPypers] New to Python In-Reply-To: References: Message-ID: <5421AC39.2020801@gmail.com> On Tuesday 23 September 2014 09:56 PM, Kartik Singhal wrote: > On Tue, Sep 23, 2014 at 6:49 PM, Haris Ibrahim K. V. > wrote: >> I don't quite think Two Scoops is a complete beginner material. It is >> not a tutorial for instance. It is more like one of the best reference >> books to get your Django code whipped up into proper shape as well as >> to give better performance altogether. >> >> That's my feeling after going through it. :) > > +1 to that. > > For a beginner, I would rather recommend - Tango with Django. It's > based on version 1.5.8, and like most other tutorials continues to get > outdated. I would recommend "TDD for the Web, with Python, Selenium, Django, JavaScript and pals" by Harry J.W. Percival at www.obeythetestinggoat.com if you like to learn Django from the ground up using a TDD approach. Thanks & Regards, Guruprasad From narayannaik.05 at gmail.com Wed Sep 24 06:12:56 2014 From: narayannaik.05 at gmail.com (narayan naik) Date: Wed, 24 Sep 2014 09:42:56 +0530 Subject: [BangPypers] Fwd: Issue with basemap import In-Reply-To: References: Message-ID: hi,anybody help me to learn python.I am beginer On Tue, Sep 23, 2014 at 1:59 PM, Senthil Kumaran wrote: > How did you install your base package? The matplotlib? Are you using any > distribution? > If you installed it separately., then looks like you will have to install > basecamp using the matplotlib toolkits ( > http://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/) > too. > If you are using a prebuilt distribution like anaconda (from continuum.io) > it might have those libraries prebuilt for you. > > > On Tue, Sep 23, 2014 at 10:40 AM, sachidanand gowda < > maverick.f90 at gmail.com> > wrote: > > > Hi, > > > > I was non member 5 mins back :) so reposting it again > > ---------- Forwarded message ---------- > > From: sachidanand gowda > > Date: Tue, Sep 23, 2014 at 10:13 AM > > Subject: Issue with basemap import > > To: bangpypers at python.org > > > > > > Hi Guys, > > > > I needed help on importing basemap > > > > > http://stackoverflow.com/questions/25985808/error-importing-basemap-keyerror-dap > > > > I have posted the question on stack overflow. Kindly help me with this > > issue > > > > Thanks, > > Sachi > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From pankaj at gaurishiv.org Tue Sep 23 08:22:59 2014 From: pankaj at gaurishiv.org (Pankaj Gupta) Date: Tue, 23 Sep 2014 11:52:59 +0530 Subject: [BangPypers] Best books for python In-Reply-To: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> References: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> Message-ID: Hi Ashok, You can use "Learning Python by Mark Lutz" and then "Programming Python by Mark Lutz". This will help you understand python better.? On Sun, Sep 21, 2014 at 12:22 PM, Ashok K < mails.ashok at yahoo.com.dmarc.invalid> wrote: > > Hello All, > > I have learnt the python basics by viewing few videos. Want to gain > in-depth knowledge and master python:) > > Please suggest some books/materials that would help me master python. > > Thanks, > Ashok > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > > https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.python.org_mailman_listinfo_bangpypers&d=AAICAg&c=ByDrzdYw8tO08sJlHDO_Vg&r=jnDxYpXrEYVoZvzL2Tsjfw&m=E08bqKWYzLYIR14sG0_-jelyY3t-QSbRMcknFLPppQw&s=KqZqAxYtLoQq7JuMyiBTdXBGbO196cN5Agd8-q1WXww&e= > -- Thanks with Regards: Pankaj Kumar Gupta Hyderabad, Telangana cell: *+91-9035486588* From skb655952 at gmail.com Wed Sep 24 08:55:56 2014 From: skb655952 at gmail.com (sayantan bhattacharya) Date: Wed, 24 Sep 2014 12:25:56 +0530 Subject: [BangPypers] Best books for python In-Reply-To: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> References: <1411282336.86202.YahooMailNeo@web120904.mail.ne1.yahoo.com> Message-ID: You can also try out Beginning Python - from Novice to Professional. On Sep 21, 2014 12:28 PM, "Ashok K" wrote: > Hello All, > > I have learnt the python basics by viewing few videos. Want to gain > in-depth knowledge and master python:) > > Please suggest some books/materials that would help me master python. > > Thanks, > Ashok > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From senthil at uthcode.com Wed Sep 24 11:33:41 2014 From: senthil at uthcode.com (Senthil Kumaran) Date: Wed, 24 Sep 2014 17:33:41 +0800 Subject: [BangPypers] Fwd: Issue with basemap import In-Reply-To: References: Message-ID: On Wed, Sep 24, 2014 at 12:12 PM, narayan naik wrote: > hi,anybody help me to learn python.I am beginer Sure. But you have ask the question first. If you want start learning, then look for Swaroop's book - A Byte of Python and it is a good start. From satishsagar83 at gmail.com Wed Sep 24 11:49:52 2014 From: satishsagar83 at gmail.com (L Radhakrishna Rao) Date: Wed, 24 Sep 2014 15:19:52 +0530 Subject: [BangPypers] Fwd: Issue with basemap import In-Reply-To: References: Message-ID: What's the python version you are using? Is it 64 bit or 32 bit? The operating system version? On Wed, Sep 24, 2014 at 3:03 PM, Senthil Kumaran wrote: > On Wed, Sep 24, 2014 at 12:12 PM, narayan naik > wrote: > > > hi,anybody help me to learn python.I am beginer > > > Sure. But you have ask the question first. If you want start learning, > then look for Swaroop's book - A Byte of Python and it is a good start. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From pratheekonline at gmail.com Wed Sep 24 12:34:25 2014 From: pratheekonline at gmail.com (Pratheek M S) Date: Wed, 24 Sep 2014 16:04:25 +0530 Subject: [BangPypers] Good book for django Message-ID: Hello all, Can anyone suggest a good book for Django. I can say my django knowledge is of intermediate level. I dont need a tutorial but something that can teach me good design patterns and optimizations. I was looking at Pro Django and I think it might be out of my reach. Is "two scoops of django" what I'm looking for ?? -- Regards, Pratheek M S From kushaldas at gmail.com Wed Sep 24 13:13:21 2014 From: kushaldas at gmail.com (Kushal Das) Date: Wed, 24 Sep 2014 16:43:21 +0530 Subject: [BangPypers] Good book for django In-Reply-To: References: Message-ID: On Wed, Sep 24, 2014 at 4:04 PM, Pratheek M S wrote: > Hello all, > > Can anyone suggest a good book for Django. I can say my django knowledge is > of intermediate level. I dont need a tutorial but something that can teach > me good design patterns and optimizations. I was looking at Pro Django and > I think it might be out of my reach. Is "two scoops of django" what I'm > looking for ?? > Yes it is. Buy the Indian version. Kushal -- CPython Core Developer http://fedoraproject.org http://kushaldas.in From mails.ashok at yahoo.com Wed Sep 24 16:55:37 2014 From: mails.ashok at yahoo.com (Ashok K) Date: Wed, 24 Sep 2014 07:55:37 -0700 Subject: [BangPypers] auto answer or auto input Message-ID: <1411570537.37475.YahooMailNeo@web120903.mail.ne1.yahoo.com> Hello, I am trying to write a python script which auto accepts input from a dictionary/list. Sample: Enter your name: Enter email: The above two fields should be auto answer from a list a = ['Ram','ram at example.com'] Please share your suggestions. Thanks, Ashok From vivek.ramakrishna at globalsoft.com Wed Sep 24 17:42:47 2014 From: vivek.ramakrishna at globalsoft.com (Vivek Ramakrishna) Date: Wed, 24 Sep 2014 21:12:47 +0530 Subject: [BangPypers] auto answer or auto input In-Reply-To: <1411570537.37475.YahooMailNeo@web120903.mail.ne1.yahoo.com> References: <1411570537.37475.YahooMailNeo@web120903.mail.ne1.yahoo.com> Message-ID: Hi Ashok Have you looked at the pexpect module? It's like the expect utility in Unix, for programmatically driving interactive applications. http://pexpect.sourceforge.net/pexpect.html Vivek On Sep 24, 2014 8:28 PM, "Ashok K" wrote: > Hello, > > I am trying to write a python script which auto accepts input from a > dictionary/list. > > Sample: > Enter your name: > Enter email: > > The above two fields should be auto answer from a list > > a = ['Ram','ram at example.com'] > > Please share your suggestions. > > Thanks, > Ashok > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From saager.mhatre at gmail.com Wed Sep 24 23:09:49 2014 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 24 Sep 2014 17:09:49 -0400 Subject: [BangPypers] Python is still greek to india's top IT firms In-Reply-To: References: Message-ID: On Wed, Sep 17, 2014 at 6:54 AM, Senthil Kumaran wrote: > [...] Given that world is moving to multiple language shops and almost all > companies will use more than one language in their offerings Some would beg to differ http://tek.io/1yjHw0U - d From saager.mhatre at gmail.com Wed Sep 24 23:19:30 2014 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 24 Sep 2014 17:19:30 -0400 Subject: [BangPypers] Python is still greek to india's top IT firms In-Reply-To: References: Message-ID: On Wed, Sep 17, 2014 at 6:54 AM, Senthil Kumaran wrote: > [...] > > From my experience at Akamai Bangalore, when we had to hire Java developers > for my team, we had 100s of resumes competing for single spot, but we > looked for "quality" python developers, there were very less < 10 (and all > of them known folks) who could easily land up in the role. Not to sound overly disparaging, but that argument reeks of survivorship bias, or at least confirmation bias.What about all the shops looking for python devs but not finding any good ones; you know, like the ones that aren't connected to the community? Contrast that with the number of 'conventional language' programmers and recruiters who aren't connected to the community but still manage to get jobs. Personally, I think us tech-savvy types tend to get too caught up in these debates and read too much into it. IMHO, language choice tends to me more flavour of the day than we'd like to admit; and there's nothing wrong with that. While we're so worried about how technology works, the other side is too busy figuring out what they want to do with it to care about our concerns. That said, I'm not saying they get it right all the time either; just that we need to tone down the, "my language kicks your language's ass, 'cause... well, check out all the cool people we can hire" rhetoric. Just sayin' - d From senthil at uthcode.com Thu Sep 25 01:15:35 2014 From: senthil at uthcode.com (Senthil Kumaran) Date: Thu, 25 Sep 2014 07:15:35 +0800 Subject: [BangPypers] Python is still greek to india's top IT firms In-Reply-To: References: Message-ID: On Thu, Sep 25, 2014 at 5:09 AM, Saager Mhatre wrote: > Some would beg to differ http://tek.io/1yjHw0U > Companies are polyglot from a long time. This talk about developers and some of their grudges :) And author is choosing to overlook technologies like Apache thrift and Protobuf technologies which enable services to talking to each other.. From senthil at uthcode.com Thu Sep 25 01:21:39 2014 From: senthil at uthcode.com (Senthil Kumaran) Date: Thu, 25 Sep 2014 07:21:39 +0800 Subject: [BangPypers] Python is still greek to india's top IT firms In-Reply-To: References: Message-ID: On Thu, Sep 25, 2014 at 5:19 AM, Saager Mhatre wrote: > Not to sound overly disparaging, but that argument reeks of survivorship > bias, or at least confirmation bias.What about all the shops looking for > python devs but not finding any good ones; you know, like the ones that > aren't connected to the community? Contrast that with the number of > 'conventional language' programmers and recruiters who aren't connected to > the community but still manage to get jobs. > I don't know. That was a mere statement that I made from the past experience and real one. :) And yeah, I have no preferences towards developer or companies which have contacts with communities. Some are connected and some are not, but all of them exists to make profit for themselves, and create value and jobs for the society. From saager.mhatre at gmail.com Thu Sep 25 05:02:25 2014 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 24 Sep 2014 23:02:25 -0400 Subject: [BangPypers] Return values In-Reply-To: <87wq8y5zrg.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> <87wq8y5zrg.fsf@nibrahim.net.in> Message-ID: On Sat, Sep 20, 2014 at 6:53 AM, Noufal Ibrahim KV wrote: > On Sat, Sep 20 2014, Anand Chitipothu wrote: > > > [...] > > > Oh, that feels like PHP. That style seems to be popular in that side of > the > > world. > > > > It might be a good idea to add consolidate method on the return value. > > Something like: > > > > class StatsList(list): > > def consolidate(self): > > .. > > > > print get_stats(..) > > print get_stats(..).consolidate() > > [...] > > That's a nice solution. It's similar to what Senthil suggested but I > like the API better. Alternatively, would it be possible to model Stats/StatsList as a composite hierarchy (potentially with Courtesy Implementations )? - d From benignbala at gmail.com Thu Sep 25 05:13:27 2014 From: benignbala at gmail.com (Balachandran Sivakumar) Date: Thu, 25 Sep 2014 08:43:27 +0530 Subject: [BangPypers] Return values In-Reply-To: <87ioki7jda.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: Hi, On Sat, Sep 20, 2014 at 2:34 PM, Noufal Ibrahim KV wrote: > > The problem now is that this function sometimes returns a single thing > and some times a list. I don't like this since I have to alter my > calling code to handle this. > I generally try to make the return type consistent. I will do something like if consolidated: return [object] else: return the_list_of_objects What I also do is, the object will have a consolidated flag as well. The the code that invokes this will have to do: stats = get_stats(consolidated = True) ... ... for stat in stats: if stat.consolidated: do something. else: do something else I run into this problem frequently because, there is a tool(framework) that I write at office that is used by multiple teams. So, to keep stuff consistent, I always return the same type and let the user handle the result the way he/she wants. Thanks -- Thank you Balachandran Sivakumar From narayannaik.05 at gmail.com Thu Sep 25 07:20:31 2014 From: narayannaik.05 at gmail.com (narayan naik) Date: Thu, 25 Sep 2014 10:50:31 +0530 Subject: [BangPypers] project Message-ID: Sir,I am doing my M.Tech project on face detection,can u please tell me a simplest face detection algorithm. Thanking you, From arunram.atma at gmail.com Thu Sep 25 07:29:21 2014 From: arunram.atma at gmail.com (Arunram A) Date: Thu, 25 Sep 2014 10:59:21 +0530 Subject: [BangPypers] project In-Reply-To: References: Message-ID: You can try using OpenCV. One such example in Python using OpenCV here: http://jyotiska.github.io/blog/2014/08/21/simple-face-detection-using-python-and-opencv/ Regards, Arunram A. On Thu, Sep 25, 2014 at 10:50 AM, narayan naik wrote: > Sir,I am doing my M.Tech project on face detection,can u please tell me a > simplest face detection algorithm. > > > Thanking you, > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From narayannaik.05 at gmail.com Thu Sep 25 10:25:48 2014 From: narayannaik.05 at gmail.com (narayan naik) Date: Thu, 25 Sep 2014 13:55:48 +0530 Subject: [BangPypers] project In-Reply-To: References: Message-ID: Thank you sir. On Thu, Sep 25, 2014 at 10:59 AM, Arunram A wrote: > You can try using OpenCV. > > One such example in Python using OpenCV here: > > http://jyotiska.github.io/blog/2014/08/21/simple-face-detection-using-python-and-opencv/ > > Regards, > Arunram A. > > On Thu, Sep 25, 2014 at 10:50 AM, narayan naik > wrote: > > > Sir,I am doing my M.Tech project on face detection,can u please tell me a > > simplest face detection algorithm. > > > > > > Thanking you, > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From svaksha at gmail.com Thu Sep 25 11:35:32 2014 From: svaksha at gmail.com (SVAKSHA) Date: Thu, 25 Sep 2014 09:35:32 +0000 Subject: [BangPypers] project In-Reply-To: References: Message-ID: On Thu, Sep 25, 2014 at 5:20 AM, narayan naik wrote: > Sir,I am doing my M.Tech project on face detection,can u please tell me a > simplest face detection algorithm. https://github.com/svaksha/pythonidae/blob/master/Computer-Graphics.md#graphics PS: Please dont CC lists you are not subscribed to. hth, -SVAKSHA ? http://about.me/svaksha ? From arunvr at gmail.com Thu Sep 25 12:55:22 2014 From: arunvr at gmail.com (Arun Ravindran) Date: Thu, 25 Sep 2014 16:25:22 +0530 Subject: [BangPypers] Return values In-Reply-To: <87ioki7jda.fsf@nibrahim.net.in> References: <87ioki7jda.fsf@nibrahim.net.in> Message-ID: Hi Noufal, Looks like we already have different style preferences here. So let me throw some more to the mix :) Wearing a functional programmers cap, I would suggest creating one get_stats() function that always returns the stat values as a list. Then, there could be potentially several Higher Order Functions like stats_avg() or stats_median() which work on a list of Stats objects and returns a single Stats object or even a literal value. Thinking in a slightly different object oriented style, the return value could be a Stats object. It could have a raw_values() and consolidate() methods. Derived classes can override the consolidate() method to support various consolidation algorithms. Depends on the style you follow in the rest of the API as well :) Cheers, Arun On Sat, Sep 20, 2014 at 2:34 PM, Noufal Ibrahim KV wrote: > > I've recently come across something that I'd like some comments on. It's > a stylistic issue so not something that there's an objective answer > for. Nevertheless. > > I have a function that gets some statistics from some source and returns > it to the user as a Stats object. Let's call it get_stats. This has a > parameter `consolidate`. If consolidate is True, it will combine all the > statistics and return just one Stats object. If not, it will return a > list of Stats objects. > > The problem now is that this function sometimes returns a single thing > and some times a list. I don't like this since I have to alter my > calling code to handle this. > > I'm surprised that I've never hit this before and I'm not really sure > how to handle it. > > Comments? > > > > -- > Cordially, > Noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > https://mail.python.org/mailman/listinfo/bangpypers > From vivek.ramakrishna at globalsoft.com Thu Sep 25 13:47:06 2014 From: vivek.ramakrishna at globalsoft.com (Vivek Ramakrishna) Date: Thu, 25 Sep 2014 17:17:06 +0530 Subject: [BangPypers] [JOB] Developer opportunities at Globalsoft Message-ID: Hi everyone, Globalsoft are looking for intelligent, independent and passionate Python and SQL developers to join our team at our Basavanagudi office. We have a proven track record in developing large-scale and complex applications for leading organisations. We'll provide you with ongoing training as you work across a range of innovative data and information related projects. Globalsoft have a flat hierarchy and foster a supportive, collaborative culture. We value your ideas over corporate fit, and your ability over qualifications. You'll be part of a smart team that enjoy what they do and know how to have fun. Oh, and you'll also get your own brand new gorgeous 27" iMac :) Interested? Send through your CV and a brief description of where you see yourself in 3 years to talent at globalsoft.com We'll be amongst the crowd at PyCon this weekend, so hope to see you there and have a chat. Regards Vivek Director www.globalsoft.com From sumit786raj at gmail.com Thu Sep 25 15:06:40 2014 From: sumit786raj at gmail.com (SUMIT KUMAR RAJ) Date: Thu, 25 Sep 2014 18:36:40 +0530 Subject: [BangPypers] Workshop Tickets [PyCon] Message-ID: Hi there, I was still assuming that the workshop tickets will be sold at the venue until I saw the link to buy workshop tickets which is sold out now. When was this announced ? Last time I attended Pycon 2012 then workshop tickets were not sold online ,I guess. Will there be any on -spot registration for workshops tomorrow ? As I am already able to attend only 1st day of the conference , I can' afford to miss the workshop too. Please help. -- Regards... ---------------------- Sumit Kumar Raj Software Engineer, Yodlee Infotech Pvt. Ltd. Bangalore,India From jinsthomas at gmail.com Fri Sep 26 18:24:45 2014 From: jinsthomas at gmail.com (Jins Thomas) Date: Fri, 26 Sep 2014 21:54:45 +0530 Subject: [BangPypers] Using Python To Do More With Arduino In-Reply-To: References: Message-ID: On Tue, Sep 9, 2014 at 4:19 PM, Akshay Verma wrote: > Could you upload a Video or Materials of this event? > > I just found this on their website. http://local.arduino.cc/bangalore/2014/09/15/using-python-to-do-more-with-your-arduino/ From amishatiitkgp at gmail.com Tue Sep 30 09:20:00 2014 From: amishatiitkgp at gmail.com (Amish Anand) Date: Tue, 30 Sep 2014 12:50:00 +0530 Subject: [BangPypers] cython Query Message-ID: Hi all, I have a problem where I want to use a C api that takes a callback function. I want to call this C Api from python and also provide the python callback function to the api. Inside the callback function, I need access to the values of a global variable declared in the same Python file. I had tried to this without Cython but in my implementation the global variable used to be a different instance in the callback function. Hence I am requesting for help from Cython experts whether they think this problem can be solved using cython. Regards, Amish