Re: [BangPypers] Try Ninja IDE
On Thu, Aug 23, 2012 at 2:08 PM, Noufal Ibrahim nou...@nibrahim.net.inwrote: Deepak Garg deepakgarg.i...@gmail.com writes: You can find PyCharm free licenses for Open Source projects. [...] Something relevant from the Pragmatic Programmer http://pragmatictips.com/22 * Use a Single Editor Well The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable. That leaves just a few on the table. And I don't want to convert this thread to an Emacs vs Vi one :) -- Cordially, Noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] Keynote speakers - PyCon India!
Dear all, The blog post on our keynote speakers have been published. http://in.pycon.org/2012/blog/pyconindia-keynote-speakers Please spread the word via twitter and other channels. -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [Inpycon] PyCon India 2012: Important Dates
On Sun, Aug 12, 2012 at 3:04 PM, Anand Chitipothu anandol...@gmail.comwrote: Hi, PyCon India 2012, the fourth edition of PyCon India conference is being held in Bangalore,India from 28th September 2012 to 30th September 2012. http://in.pycon.org/2012/ With two keynote speakers, Jacob Kaplan-Mos (co-author of Django) and David Mertz (author of Text Processing with Python) and with lot of interesting talks coming up (including 2 talks proposed by a core CPython developer), this is promising to be best PyCon India ever. The last date for regular registration is August 16. Register soon. http://pyconindia2012.doattend.com/ If you are planning to submit a talk or a tutorial, the last date is August 25. Talks can be submitted at: http://in.pycon.org/2012/funnel/pyconindia2012/ Conference Dates: Tutorial day - Friday, September 28, 2012 Main Conference - Saturday-Sunday, September 29-30, 2012 Please spread this message to your friends, friends of friends and whoever might be interested. Posting it message to various mailing lists, internal mailing lists at your workplace, facebook/Google+ and any other medium will help spreading the word. +1 This is the very first PyCon featuring two keynote speakers, who are leaders in their projects/areas. David Mertz is the well-known author of the Charming Python series of articles published in IBM developer works. He is also the author of Text processing in Python and is a director of the board of members of the Python Software Foundation. He is also an expert in voting and security aspects related to voting, and open-voting in particular. Jacob Kaplan-Moss is a lead-developer and co-creator of Django. Jacob currently works for Revolution Systems and in his previous life worked for Lawrence Journal-World (http://ljworld.com/), a locally-owned newspaper in Lawrence, Kansas, where he helped develop and eventually open source Django. With these two luminaries presenting keynotes and sharing their experiences with Python and their projects, and with a good selection of other talks, you don't want to miss PyCon India this year! Go ahead, spread the word in your channels and mailing lists... Thanks, Anand ___ Inpycon mailing list inpy...@python.org http://mail.python.org/mailman/listinfo/inpycon -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Sad demise of our dear KG (Keneth Gonsalvas)
Kenneth was an asset to the Python community in India and did a lot to bootstrap IPSS. His demise is sad news for us. Some of us are going to Ooty to take part in the final rites scheduled tomorrow. If anyone from Bangalore wants to come along get in touch with me or Sreekanth off list. Mobile: 9880078014 --Anand On Fri, Aug 3, 2012 at 3:40 PM, Vivek Khurana hiddenharm...@gmail.comwrote: On Fri, Aug 3, 2012 at 3:25 PM, JAGANADH G jagana...@gmail.com wrote: Hi All, Just now I got a message that our dear KG (Kenneth Gonsalvas) passed away. He was admitted in hospital due to Asthma attack and passed away today morning. Cremation will be held at ooty on 4th Aug 2012. RIP Uncle Kenneth... It was great knowing you :( regards Vivek -- The hidden harmony is better than the obvious!! ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Two days course on Python
On Wed, Jun 27, 2012 at 10:08 AM, kala Vinay kala...@gmail.com wrote: Dear All, credativ India specialized in open source, conducting a two days course on Python Programming on 13th and 14th July 2012. Interested candidates can contact: train...@credativ.in Please don't spam the list. Repeated posting with the same title/content with no other replies in the thread is spamming. Regards, Vijayakala ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [CFP] Call for Proposals for Pycon India 2012 :: 28 - 30 September, Bangalore, India
On Tue, Jun 26, 2012 at 12:33 PM, Ramakrishna Reddy ramkr...@gmail.comwrote: === Call for Proposals for Pycon India 2012 :: 28 - 30 September, Bangalore, India. === The Fourth edition of PyCon India is being held in Bangalore,India from 28th September 2012 to 30th September 2012. The organisers of PyCon India 2012 are looking for talk and tutorial proposals to fill the formal presentation and tutorial tracks. We accept proposals on a very broad range of topics related to Python programming. http://in.pycon.org/2012/funnel/pyconindia2012/ ... Please RT the tweets on this to spread the word. -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Website change tracker
On Fri, Jun 8, 2012 at 10:36 PM, vid v...@svaksha.com wrote: On Fri, Jun 8, 2012 at 4:09 PM, kracethekingmaker kracethekingma...@gmail.com wrote: Hello, I am newbie to Python coding. And, I had a question. I want to write a script which will check content changes in websites send e-mail to a admin whenever there are changes. How many times in a day or how often will this check be performed ? You must look into how to use md5, diff utilities, for web scraping scrapy library is advised. Ideally this script/program should be scalable for say about 1000 websites at a time.. 1000 sites at a time? Wow, that's huge. Scraping that many sites is resource intensive, would need a nice big stable server that can handle the huge data dumps. Fwiw, Scrapy will only dump the data in the json files so check out a little about the database you want to use, the frontend to serve it, a queueing system to scale 1000 sites, etc... Also, some sites instantly ban scrapers. Watch out for that, and goodluck :) This is much more easier than you think. It looks big because you are solving it as a full-scale scraping problem. This is in fact more in the lines of an incremental crawler. Write a simple crawler that keeps track of a few key entrypoint URLs on every site. You can typically get them from the sitemap or from querying google. The crawler can be hand-written or use existing frameworks like pycurl, scrapy etc. 1. When crawling, use a HEAD request to fetch the page. This ensures you only get the headers of the page not the data. Store the metadata of interest to a file - use an MD5 hash of the URL as a unique name and use a two level directory scheme of squid. The fields of interest would be last-modified-time, etag (if any) and content-length. 2. Recrawl at fixed intervals. Before requesting a URL load its metadata from the cache if it exists - Fill in the If-Modified-Since header and put the last-modified-time in there. Also you can optionally add If-None-Match for the etag, if found. 3. If page is not modified, server returns HTTP 304 error. Handle it. Otherwise download the page or do whatever other actions. Update the cache if modified. For 1000 sites, partition the sites into multiple sets and do such incremental crawls frequently. Use random selection to pick up the sites per set. Use random selection of starting URLs to ensure you visit most parts of a site every subsequent crawl. I have written such systems before and still maintain them. It is an interesting area. Ask if you have specific questions. -- Regards, Vid ॥ http://svaksha.com ॥ ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] Fwd: [Inpycon] Volunteers Required: PyCon India website
Sorry for X-posting but this was a rare case. We need the help of folks to get the PyCon 2012 website up and going ASAP. Kindly see Anand C's post below and please volunteer. Thanks ! --Anand -- Forwarded message -- From: Anand Chitipothu anandol...@gmail.com Date: Thu, Jun 7, 2012 at 11:31 AM Subject: [Inpycon] Volunteers Required: PyCon India website To: Mailing list for the PyCon India conference inpy...@python.org Hi, We need couple of people to take charge of PyCon India website. Tasks include tweaking the website software and manage the content. We are using HasGeek's software for the website and managing talks. Code is on github. https://github.com/ipss/pyconindia2012 Please reply to this thread if you are interested. Anadn ___ Inpycon mailing list inpy...@python.org http://mail.python.org/mailman/listinfo/inpycon -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Run selenium script in python on remote systems
On Wed, Jun 6, 2012 at 9:24 PM, Baiju M baiju.m.m...@gmail.com wrote: On Wed, Jun 6, 2012 at 9:15 PM, Prem Sri newtech2le...@yahoo.com wrote: Hi, I am unable to find proper steps to run the selenium script in python on remote systems. Could you please provide the steps. Just few pointers: 1. You can use Jenkins with slaves and run selenium scripts remotely. http://readthedocs.org/docs/selenium-python/en/latest/ http://jenkins-ci.org/ A note - Jenkins is used at Yahoo! for test automation and seems to scale pretty well. or 2. Use Grid2 http://code.google.com/p/selenium/wiki/Grid2 Jenkins has a plugin for this: https://wiki.jenkins-ci.org/display/JENKINS/Selenium+Plugin -- Baiju M ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] BangPypers Digest, Vol 58, Issue 9
On Thu, Jun 7, 2012 at 2:58 PM, srinivas hn hnsr...@gmail.com wrote: Hi I am also ready to be volunteer for pycon 2012. Thanks and welcome! Please make sure you don't reply to digest emails. It screws up the context for everyone. Even if you do, kindly delete the long tail of previous emails before you post. CHEERS Srinivas HN 9986229891 -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] June Meetup
On Mon, Jun 4, 2012 at 2:23 PM, Deepak Garg deepakgarg.i...@gmail.comwrote: Hi All, I have scheduled the June meetup on June 16, the third Saturday in this month. The meetup time is 3:30 pm. a. Please suggest a location for this meetup. b. Please let know if you would like to present something. c. Please let me know if there are any other important events on the given day and if the date/time needs to be changed. I am hoping to discuss and demo Writing Apps in Google App Engine. Would be good if someone can share their experiences if any on writing Python apps on Amazon EC2. Cheers, Deepak Garg, Data Center and Cloud Div. Citrix RD, India Skype-id: deepakgarg.iit ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] converting python to assembly..
On Thu, May 31, 2012 at 11:40 AM, Vishal vsapr...@gmail.com wrote: Hello, Does anybody know of any effort that can covert a relatively static version of python code into assembly for use with microcontrollers ? Just wondering what is the need for this ? If you are coding in Python in the first place do you really want to go down all the way to assembly code output ? In that case I think you should start off with C rather than Python. CorePy did it but not for microcontrollers P14p (or PyMite) actually creates a python interpreter in C and puts it inside the microcontroller, and its GPL. PyPy as you know is not yet for microcontrollers and only creates assembly when the JIT kicks in. Cython/Pyrex would convert python with type specifications into extension module...but it will not fit into microcontrollers. I am looking for something more simple, i.e. instead of writing C and compiling it to machine instructions...write python (restricted set..may be) and convert it to machine instructions. Any pointers will be of big help.. I see some projects like pyastra (circa 2006) and pyasm on Google but nothing which is maintained and has kept up. Thanks and best regards, Vishal Sapre ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] ASynK - Flexible PIM synchronization across Google Contacts, Outlook, Emacs BBDB
On Fri, Jun 1, 2012 at 1:08 PM, Sriram Karra karra@gmail.com wrote: I am the author of a Python program called ASynK which I initially wrote to do bi-directional sync between Outlook contacts and Google. I have since rewritten and expanded it to do sync with Emacs BBDB as well. Currently it's the only program in existence for any sort of sync for BBDB. It's my first decent sized Python program, so wanted to share with the community for your comments, suggestions, etc. If you find a use for it that's great too. Have a look at the project page at: http://karra-asynk.appspot.com/ on where to get it, documentation etc. The download and other links don't seem to work for me. Btw, if you are sharing code please publish it in github or google code. Cheers, -Karra ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python/Perl Scripting resource
On Fri, May 25, 2012 at 5:39 PM, Saager Mhatre saager.mha...@gmail.comwrote: Could someone just point the OP to the Posting guidelines for this list, especially the ones around job postings? Harpal, at the least, job postings are required to have their subjects prefixed with '[JOB]' so that those like me can ignore them faster. :) Yes. I had an objection with this post mainly on missing the [JOB] prefix than the usage of resource. I hardly noticed it till I saw Senthil's email . - d ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Starting a Python User Group in Hyderabad
On Mon, May 14, 2012 at 5:57 PM, srinivasa rao srinivasaene...@gmail.comwrote: Hi I am from Bangalore group and i know in hyderabad 10k python developers are present with 2+ years developers are available my request is try all of them come and join because i have 6+ years into Python . Any updates on how this event went ? -- Regards, --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] April Meetup
On Mon, Apr 16, 2012 at 3:25 PM, Vinayak Hegde vinay...@gmail.com wrote: Date: April 22 - 3:00PM Link to the Map : http://g.co/maps/rrvwk Inmobi Address : Ground Floor, Pebble Beach, Embassy Golf Links Road, Amarjyoti Layout, Domlur Bangalore, Karnataka, India Front Desk Board Line number : 080 6583 4445 (for directions) Landmark (inside EGL) : Citibank ATM / Small Barista (There is another Barista in Pyramid Food Court) Can also people send me the Agenda ? +1 Regards Vinayak + 919449834401 ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Industrial Control Systems in Python
On Mon, Mar 26, 2012 at 7:56 PM, Vishal vsapr...@gmail.com wrote: On Mon, Mar 26, 2012 at 6:24 PM, Noufal Ibrahim nou...@nibrahim.net.in wrote: Vishal vsapr...@gmail.com writes: [...] 1) The scenario you describe is very close to what we would like to have...except that I wish to have an SBC running the actual control code in Python and a small micro-controller board to manage peripherals like ADC and PWM pins...that would translate to the control actions. These two talk over wire, using some protocol...some request-response bytes structure that we invent :)) I wrote a custom JSON based protocol but later in the project, I wished I had used something more standard. Now the next thing is...what is busybox and can I use it in this case on the SBC? and where to find such SBCs Busybox[1] is a single executable that provides the functionality of many of the basic UNIX userspace utilities (like ls etc.) depending on what name it's called with. You can simply symlink ls etc. to busybox and it'll work. It's very useful for embedded situations since you can just drop in a single executable and get all the basic things for free. Any pointers... ? Apropos SBCs, I recently bought a beagle board[2] for someone who was working on a project. It's ARM based and is quite powerful. It has tons of ports you can connect stuff to. I think he booted it with something called Angstrom[3] and then we connected to it via. serial and got a complete environment. It's powerful enough to run a proper small GNU/Linux. I don't think you need busybox and things like that. This is the only one *I* know of. You can order it in Bangalore from Tenet technologies[4] and it costs a little less than 10k. I recall there was an excellent presentation in Pycon 2010 by one Mr.Vijay about a programmable hardware interface called with an I/O framework written in Python by his company Zilogic. Details about this are here. http://in.pycon.org/2010/talks/52-device-interfacing-with-python-and-zio Looks like the toolkit is mainly meant for hobbyists and for prototyping but I think it could be used for your purpose as well. http://www.zilogic.com/zio-mb.html I wonder if it uses pyserial behind the scenes. HTH. --Anand the search continues :)) Recently I have realized that almost all problems in this world...are a form of search...No wonder the company that mastered search is a Giant now. My take is different. I recently met someone famous but I didn't recollect what he was famous for. He was standing about a metre away from me and instead of starting a conversation - something which I can do fairly well, I actually googled for his name to find out more about him. Later in the evening, I seriously wished that I didn't have the ability to just search for him. The conversation would have been a lot more interesting. But I'm a bit of a luddite so... 2) Going the ST way is not recommended (BTW its called Structured Text) ...because only a compiler will not be enough, we'll have to come up with some way of debugging... It would be like creating a whole new language. Good point. My use case was a lot less complicated. Footnotes: [1] http://www.busybox.net/about.html [2] http://beagleboard.org/ [3] http://www.angstrom-distribution.org/ [4] http://tenettech.com/ -- ~noufal http://nibrahim.net.in I always avoid prophesying beforehand because it is much better to prophesy after the event has already taken place. - Winston Churchill ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers Noufal, Thanks for the links. I hope my search will lead me to a decent solution. Indeed, machines_and_automation (of all kinds) is most of the times against humanization...so, i guess the only way is to stay human, while surrounded by machines all the time, is to exercise the humanitarian aspect of our personalities as much as possible every day of our lives. -- Warm regards, Vishal Sapre --- Life is 10% how you make it, and 90% how you take it बहुजन हिताय, बहुजन सुखाय (Benefit for most people, Happiness for most people.) --- Please DONT print this email, unless you really need to. Save Energy Paper. Save the Earth. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] JOB - Senior Web Developer - Talented Team!
On Fri, Mar 16, 2012 at 11:30 AM, Kenneth Gonsalves law...@gmail.comwrote: On Fri, 2012-03-16 at 10:39 +0530, Anand Balachandran Pillai wrote: Ah well, that was supposed to go to the sender. My bad. Ignore it. welcome to the club Bad karma. I should set the return address for the group to the sender perhaps :) -- regards Kenneth Gonsalves ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] JOB - Senior Web Developer - Talented Team!
On Fri, Mar 16, 2012 at 12:03 PM, स्वक्ष v...@svaksha.com wrote: On Fri, Mar 16, 2012 at 06:14, Noufal Ibrahim nou...@nibrahim.net.in wrote: Anand Balachandran Pillai abpil...@gmail.com writes: On Fri, Mar 16, 2012 at 11:30 AM, Kenneth Gonsalves law...@gmail.com wrote: On Fri, 2012-03-16 at 10:39 +0530, Anand Balachandran Pillai wrote: Ah well, that was supposed to go to the sender. My bad. Ignore it. welcome to the club Bad karma. I should set the return address for the group to the sender perhaps :) [...] Please don't. A mail client should have some way of specifying reply to sender or reply to reply-to address. Its not just the mail client's fault. If header munging in Mailman is set it wont help what the client settings are. So for your suggestion to work, this ML settings in Mailman for Edit anonymous_list and header munging Edit first_strip_reply_to settings should be set to NO and reply_goes_to_list must be set to go to the poster -- gmail's web interface now automatically recognizes this feature. Earlier it was not the case. That is a complicated group of settings. Not sure I want to try that. -- ॥ स्वक्ष ॥ http://svaksha.com ॥ ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] need help
On Fri, Mar 2, 2012 at 4:52 PM, mallanna biradar birada...@gmail.comwrote: Hi, I need to help for writing small script which will search for a patter in a file and insert some lines after that. For pattern matching and replacing, Python gives you the re module. Read the online documentation, try a few examples which should help you to get started. http://docs.python.org/library/re.html Regards, Mallanna Biradar ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] JOB - Senior Web Developer - Talented Team!
Hi RebelMouse, Saw this post in the list. Let me introduce myself. I founded this group in 2005, has been running it since then. I have written a few open source projects and published a few recipes in Python. Here to name a few. 1. HarvestMan - Multithreaded Python web-crawler used in a few projects notably EIAO and Egovmon (http://www.eiao.net). http://code.google.com/p/harvestman-crawler/ 2. Pyscanlogd - A network port-scanning detection daemon. http://code.google.com/p/pyscanlogd/ 3. My ASPN Cookbook recipes in Python. http://code.activestate.com/recipes/users/760763/ http://code.activestate.com/recipes/users/4169530/ Other skill sets include MySQL/XML/ReST/ etc. I have good working knowledge of Django, but never been a front-end developer so has not done much in Javascript etc, though open to that as well. I currently work in Yahoo! as senior principal engineer. Let me know if this interests you then we could connect! Regards --Anand On Thu, Feb 23, 2012 at 2:01 AM, Rebelmouse globalt...@rebelmouse.comwrote: SENIOR WEB DEVELOPER We're a NYC-based incubator working in the social space and are looking for developers who have experience with Python and jQuery to work as part of a global team. The founders and board were part of the critical team that created the HuffingtonPost, We're focused on building apps and sites that are fun, social, and scale well. The ideal candidate will go through a 1 to 4 week paid trial but end up as a permanent part of the team working with us on a monthly retainer, where you're not counting your hours, you have sick days and vacation days and you still get paid the same every month regardless of the days off. Strong communication skills are required - it's essential with the global team that each developer/designer/team member feels comfortable emailing all their thoughts and isn't shy about communicating. We don't require excellent grammar skills in English - however you communicate, through whichever style works for you is fine. What matters is that we can transcend the physical distance between us to understand each other's ideas and code. Every developer is encouraged to think about the business, the ideas, and contribute to the product as you learn, not just be given specific tasks. We have a very clear direction and feature set in mind, but there is always room for new ideas and discussion, as well as diverse engineering challenges to solve. A couple recent articles on what we're doing: http://www.businessinsider.com/8-cool-new-startups-that-have-launched-this-year-2012-2#paul-berry-left-his-long-time-job-as-cto-of-the-huffington-post-to-create-a-new-stealth-startup-rebel-mouse-3 http://www.google.com/url?q=http%3A%2F%2Fwww.businessinsider.com%2F8-cool-new-startups-that-have-launched-this-year-2012-2%23paul-berry-left-his-long-time-job-as-cto-of-the-huffington-post-to-create-a-new-stealth-startup-rebel-mouse-3sa=Dsntz=1usg=AFrqEzfCc4zcBUqLySPtxvtq65qZ3YPR9w http://adage.com/article/digital/meet-soho-tech-lab-huffpost-tech-chief-s-startup-incubator/232077/ http://www.google.com/url?q=http%3A%2F%2Fadage.com%2Farticle%2Fdigital%2Fmeet-soho-tech-lab-huffpost-tech-chief-s-startup-incubator%2F232077%2Fsa=Dsntz=1usg=AFrqEzdZ0bOLKjxCWO6xy4GnCh1RZK_gVQ We're building everything in Python/Django/jQuery and the team is really amazingly talented guys with a really strong sense of team work. We have great direct connections with key people at Google, Facebook, and Twitter and there's a lot of excitement about what we're doing. Your work will be seen by key people in the industry. Please feel free to pass this along to others who you think might be interested or let us know any ideas for where you think its best to reach the best talent in your part of the world. Required skills are: - very good level at python - very good level at javascript/jquery - interest in working on an application using up-to-date technologies and practices (in this case, one-page app with a lot of frontend templating and CSS3, incorporating data from social networks like Facebook, and using NoSQL on backend where appropriate) - strong communication skills and willingness to ask a question - we are looking for someone to treat as a member of the team, not someone to just assign 100% specced-out tasks that always must be implemented an exact way. Questions will occur and it is important that we be in contact via email or chat multiple times a day to discuss how projects are going and resolve any decisions to be made. - it's also expected that you'll offer feedback, ideas, and polite criticism on anything you think might be going wrong with the project. - strong experience in Javascript, CSS, and valid HTML. - know how to write efficient CSS and JS. Familiar with Yahoo's Best Practices for Speeding Up Your Website and Google Page Speed, and techniques such as image spriting Ideally also familiar with:
Re: [BangPypers] JOB - Senior Web Developer - Talented Team!
Ah well, that was supposed to go to the sender. My bad. Ignore it. On Fri, Mar 16, 2012 at 10:35 AM, Anand Balachandran Pillai abpil...@gmail.com wrote: Hi RebelMouse, ... -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Https and http difference in behaviour urllib2
On Wed, Feb 22, 2012 at 3:34 PM, Amit Sethi amit.pureene...@gmail.comwrote: Hi all , Can someone explain to me why things are implemented the following in urllib2. When I pass encoded url using http it again encodes the parameters whereas in case of https it does not urlencode again so lets say the (http) call is http//:example.com?email=amit%40sethi.comthe request is http://example.com?email=amit%2540sethi.com where as in case of https it is https://example.com?email=amit%40sethi.com Been a while since I posted here! For any kind of client side HTTP coding, I suggest the new requests library. I myself have been a heavy user of urllib2/urllib but these libraries are developer unfriendly and doesnt look like their problems are going to get fixed soon. Read this excellent blog post by Danny on comparing urllib2 vs requests. http://pydanny.blogspot.in/2011/05/python-http-requests-for-humans.html Thanks Amit -- A-M-I-T S|S ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] Fwd: Invitation for FOSSMeet 2012 at NIT Calicut
Speaking engagement at this event in Calicut, Kerala. Interested folks can check it out. --Anand -- Forwarded message -- From: Speakers Team speak...@fossmeet.in Date: Sat, Jan 21, 2012 at 5:03 PM Subject: Invitation for FOSSMeet 2012 at NIT Calicut To: abpil...@gmail.com Dear Sir/Madam, We are obliged to invite Kerala IT mission to deliver a talk or conduct a workshop at FOSSMeet 2012. FOSSMeet (http://fossmeet.in/2012/ ), abbreviation for Free and Open Source Softwares Meet, is an annual event on FOSS at National Institute of Technology Calicut. This event brings together FOSS enthusiasts from all over India. FOSSMeet is being conducted successfully for past 7 years now with a huge participation and support from the FOSS community. This edition of the event is scheduled to be held during February 25th (Saturday) and 26th(Sunday), 2012. We would like to know whether your team would be able to join us at this event. It would be grateful If you become our sponsor also. Looking forward to your reply. Thanking you -- Speakers Team FOSSMeet 2012 http://fossmeet.in/2012/ Ph No: +91 - 9745632130 Create-Share-Collaborate -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] I have solved some of the project euler problems in python
On Mon, Jan 16, 2012 at 11:41 AM, Sreenivas Reddy T thatiparthysreeni...@gmail.com wrote: And most of the problems reminded me that Python makes programming a lot more easier.otherwise I chose python especially for this reason.As programmer moves along ,i think ,he should work on higher level of abstraction. or you have to come up with range,map(int,str(123)) ,zip and Fraction module equivalents in your implementing lang and re-use them for solving these problems.And implementing these functions itself is a big exercise in its own right.So i chose not to,probably after some other time. My key insight when solving these using Python was how I was able to use techniques like memoizing using generators etc in order to optimize my code to a great degree. By caching a lot of values along the way many problems like those dealing with prime numbers perform at a different level. Regards, Srinivas Reddy Thatiparthy. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] I have solved some of the project euler problems in python
Hi Reddy, I had solved some 50 or odd euler problems in 2006 in Python. I have the solutions saved somewhere in my laptop. I will look at yours and probably try to publish mine as well. It is quite an interesting project. --Anand On Thu, Jan 12, 2012 at 1:31 PM, Sreenivas Reddy T thatiparthysreeni...@gmail.com wrote: Sorry!! Here is the link.. https://github.com/srinivasreddy/euler Thanks Regards, Sreenivas Reddy Thatiparthy, 9703888668. Anyone who has never made a mistake has never tried anything new !!! --Albert Einstein On Thu, Jan 12, 2012 at 1:30 PM, Sreenivas Reddy T thatiparthysreeni...@gmail.com wrote: Hi , I have solved 32 of project euler problems in python.If you anybody interested please take a look at them. Any kind of feedback is welcome. I am planning to solve more of them in future. Another question i have is,do these worth mention on resume?I feel more like these should be in hobby section. P.S: i never googled for a solution . :) Thanks Regards, Sreenivas Reddy Thatiparthy, Anyone who has never made a mistake has never tried anything new !!! --Albert Einstein ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] File read
On Mon, Nov 7, 2011 at 10:56 PM, steve st...@lonetwin.net wrote: Hey Shashidhar, Others may answer your question, I am not going to do that right away. I'll just offer a few suggestions to clean up your code. If you do that, I promise to answer your questions: a. Use os.path.join() to join path components b. You don't /have/ to read all the lines of the file into a list before processing it. The pythonic way would be: with open(filename) as input_file: for line in input_file.readline(): ...do stuff ... c. You don't need to iterate over lists using numeric indexes. Even if you /need/ numeric index, use enumerate. So, instead of : for index in range(len(somelist)): ...do something with somelist[index] ... OR ...do something with index ... use something like: for element in somelist: ...do something with element... OR for index, element in enumerate(somelist): ...do something with index or element d. Don't chain string operations to just match a substring, use regular expressions. If you /have/ to chain string operations (for instance, to extract rather than match), chain them only once. So, instead of : if all_lines_in_file[line].split(**'-')[1].split(')')[0].split(**')[1].strip() == true: ... ... print ZMP value %s % all_lines_in_file[line].split(** '-')[1].split(')')[0].split(**')[1].strip() ...and more such monstrosities, do either: stuff_that_interests_me = line.split('-')[1].split(')')** [0](')[1].strip() if stuff_that_interests_me == 'true': or just: matched = re.search(-\((.*)\), line) # or some such, depending on the format if matched: stuff_that_interests_me = matched.group() e. If you need one of three options as values of a dict (which I assume will serve as a config dict), default the config keys to something. So, do: config = {'MyFirstKey' : 'ASK', 'MyNextKey' : 'ASK', ... } for line in all_lines: ...extract stuff_that_interests_me from line... if 'MyFirstKey' in line: if stuff_that_interests_me == 'true': config['MyFirstKey'] = 'ON' elif stuff_that_interests_me == 'false': config['MyFirstKey'] = 'OFF' ... Excellent advise. Just adding 1 more point to this. Kindly don't post your code here. Please use repositories like pastebin for them and only post links here. (I am thinking I should add these guidelines to the welcome email...) HTH, cheers, - steve -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Interesting library
On Tue, Oct 11, 2011 at 5:06 PM, Ashutosh Narayan aashutoshnara...@gmail.com wrote: Hi, Came across this interesting library for sys-ad stuffs. http://docs.fabfile.org/en/1.2.2/index.html Isn't paramiko enough for most remote scripting tasks ? -- Ashutosh Narayan http://ashutoshn.wordpress.com | Twitter: @narayanashutosh ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Looking for Guest Speaker on Python and NLTK
On Sun, Oct 16, 2011 at 6:32 AM, Anand Chitipothu anandol...@gmail.comwrote: 2011/10/15 Senthil Kumaran sent...@uthcode.com: On Sat, Oct 15, 2011 at 10:19:17PM +0530, Anand Balachandran Pillai wrote: Some course from stanford on ml and ai. ml-class.org I have enrolled for this and I am currently taking the basic course lessons online. It is pretty good, I have an assignment on linear regression due tomorrow :) ai-class.org I am doing this. Just completed the assignment as well. It is pretty good. Even I'm doing that ai-class. Its very good. Great. We should all catch up sometime on the course topics. I just finished submitting the review questions. Felt nice trying calculus / algebra after ages and getting it right :) Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Looking for Guest Speaker on Python and NLTK
On Tue, Oct 11, 2011 at 4:46 PM, Abdul Muneer abdulmun...@gmail.com wrote: Hi, Some course from stanford on ml and ai. ml-class.org I have enrolled for this and I am currently taking the basic course lessons online. It is pretty good, I have an assignment on linear regression due tomorrow :) ai-class.org Join last date is already gone, but my friends are able to join even now.. Regards, Abdul Muneer -- Whom I'm Lookin' for is The One who sees!! On Tue, Oct 11, 2011 at 4:42 PM, s|s supr.e.etse...@gmail.com wrote: I would have loved to conduct the session. Unfortunately, I am in Delhi and also I am conducting a session on databases on 22nd. I am sending some important links in this context. http://pypi.python.org/pypi/Fuzzy http://pypi.python.org/pypi/python-Levenshtein/ http://www.nltk.org/ http://streamhacker.com/2010/05/10/text-classification-sentiment-analysis-naive-bayes-classifier/ http://nlp.lsi.upc.edu/freeling/ https://github.com/djinn/freeling-python As criticism of NLP http://teddziuba.com/2008/11/avoiding-nlp-at-all-costs.html Hope you guys have a great session. -- Supreet Sethi Ph IN: +919811143517 Ph Skype: d_j_i_n_n Profile: http://www.google.com/profiles/supreet.sethi Twt: http://twitter.com/djinn ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python3's Most Wanted!
Hi Chetan, On Wed, Oct 5, 2011 at 11:09 AM, chetan giridhar cjgirid...@gmail.comwrote: Hi Anand, How are you doing? When and where do you guys meet for all the discussions on Python? Please let me know, I would like to join. Discussions are pretty rare now a days. We have this pypy thread running for a while, but so far no concrete discussion plans yet. Maybe we need a change of venue :) Is NetApp a possibility ? Regards --Anand On Tue, Oct 4, 2011 at 10:42 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: Did anyone see this ? http://www.python.org/3kpoll -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Regards, Chetan http://technobeans.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] Python3's Most Wanted!
Did anyone see this ? http://www.python.org/3kpoll -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] List guidelines (was: [JOB] - Yahoo!)
On Wed, Sep 14, 2011 at 6:57 PM, Sreekanth S Rameshaiah s...@mahiti.orgwrote: On 14 September 2011 18:10, Noufal Ibrahim nou...@gmail.com wrote: My thoughts, This is Python mailing list. The mails should be wither around the topic. If a recruiter sends a mail for job XYZ which explicitly not invites people with python skils to apply, this list should treat it as spam. If some asks a Java or PHP relevant question, will we not treat that as irreverent? Need not be. If the Java or PHP question is generic enough and on a topic that is applicable to Python as well, it could be something worth answering. For example - if there is a question on multithreading in Java, I would answer it here since the Python threading module has a lot of similarity with Java. However, if the question is like Which class in Java to use for byte stream input then I would politely redirect him to a Java forum. After 12+ years of working in a wide number of programming languages from C to Java to Python to PHP and Perl, I keep a very open mind on this topic. This is a Python forum, but languages are inter-related and there is a lot to share and learn. We are not a Python fan forum IMHO but learned folks who chose to mostly center their discussions on Python and related topics. That shouldn't exclude related discussions in other languages, if there is an overlap with aspects of Python. I am sure this list is subscribed by a number of folks whose day job would be coding in languages other than Python. With respect to JOB posting, my only requirement is that the subject list contain [JOB] and it is somewhat relevant. I don't care if it is the first post of the member or 100th post. - sree ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] List guidelines
On Wed, Sep 14, 2011 at 7:22 PM, Senthil Kumaran sent...@uthcode.comwrote: On Wed, Sep 14, 2011 at 9:26 PM, Noufal Ibrahim nou...@gmail.com wrote: Am I the only one who thinks this is backward? No, definitely not. But you seem to be giving undue importance to this discussion by creating hypothetical scenarios. I think, we can tolerate some mistakes and just stay focused. As long as the list is not crawling with off-topic JOB posts and making our other discussions entirely impossible, I dont care if some one from Yahoo! or any other company posts a slightly off-topic JOB announcement. If we get to a stage where we are really swamped by non-Pythonic JOB posting robots, we can incrementally take a better stand. No need for worrying about hypothetical scenarios now. Show some flexibility. -- Senthil ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] About pypy and bangpypers
On Wed, Sep 14, 2011 at 8:29 PM, Sriram Narayanan sriram...@gmail.comwrote: On 9/14/11, Noufal Ibrahim nou...@gmail.com wrote: I was hoping to resurrect this after PyCon India this weekend. I'm eager to get it going. Same here. Looking fwd to meet up on this after Pycon India. Sounds good. I'll begin preparation for the meetup. For me, getting pypy to work will be a bit special, since I'll need to port it to run with what ever's available on the illumos platform. -- ~noufal http://nibrahim.net.in The first condition of immortality is death. -Stanislaw Lec ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Sriram == Belenix: www.belenix.org ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [JOB] - Yahoo!
On Tue, Sep 13, 2011 at 5:00 PM, Sudheer Satyanarayana sudhee...@sudheer.net wrote: To put the matter straight, Lokesh works in TA at Y! and he had asked my help to post an opening in the list. I mentioned that this is a Python list, but scripting languages like Perl, Python etc do have a lot of similarities (Ask me, I am a Python coder at heart but right now my bread is coming through Perl here). A lot of the skills at a high level are quite similar whether finally you end up coding in Python, Perl or PHP. Try posting a Python job ad to a Perl, Ruby or PHP list. Cut the heat. IMHO it was a problem with the wording of the posting by the OP. If he had been more diplomatic and sugar-coated his posting, most of you would have remained silent. See this post on the bangalore-rug list. It mentions ruby only once and among many other skills. https://groups.google.com/group/bangalorerug/browse_thread/thread/30d3e3dc6cdd8974/ead6b725a2c8e55e?hl=enlnk=gstq=job#ead6b725a2c8e55e Nobody cribbed. On the other hand, try abstracting the concept. Someone who is good in one scripting language might be good in another. Someone good in one programming language might be good in another. By that argument, if you are looking for a Java programmer you can post your job ad in a C language list. If you extend the argument, you can post the ad in an technology related list for that matter. Actually you can if you word it carefully like the link I mentioned. I agree with Noufal here. This is pure spam. There are enough job portals available for free. The OP should be directed to such websites. I don't want to see PHP, Ruby, Perl, C or other programming language related job ads here unless it is directly related to Python. Yes, he was not smart enough to say Python as one of the skills in his posting. That is what you are cribbing about ? Advocacy is good, it shouldn't turn into zealotry. -- With warm regards, Sudheer. S Personal home page - http://www.sudheer.net/about Tech Chorus - http://www.techchorus.net __**_ BangPypers mailing list BangPypers@python.org http://mail.python.org/**mailman/listinfo/bangpypershttp://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [JOB] - Yahoo!
On Tue, Sep 13, 2011 at 6:18 PM, Sriram Narayanan sriram...@gmail.comwrote: I feel that poking fun at any company's business is in extremely disgusting taste. This was done once about Thoughtworks (the company I work with) on this very mailing list. I didn't see any apology then by the person who did that, nor do I see any apology here by the person poking fun at Yahoo on this list. Since then, I'm convinced that by and large, we all need to understand better how to make bangpypers a safer place for discussions. +1 Please, love your language etc, but let us give the impression that we are not a bunch of amateur kids here, but professionals who are ready to give a bit of space for others to live amongst us. I made the mistake of telling OK to this guy on posting here, never going to repeat the mistake again. I had thought better of this list in fact. My bad. -- Sriram == Belenix: www.belenix.org ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Language Parsing and output generation
On Tue, Aug 23, 2011 at 11:15 AM, Gopalakrishnan Subramani gopalakrishnan.subram...@gmail.com wrote: I could make a grammar compiled myself. I will look into SPARK.. Anybody has experience in pyparsing http://pyparsing.wikispaces.com/ ? Under Examples http://pyparsing.wikispaces.com/Examples Python language example is promising. Have you taken a look at Lunatic Python ? http://labix.org/lunatic-python Looks like it already provides the required interfaces you need. Regards, Gopal On Mon, Aug 22, 2011 at 11:25 PM, Noufal Ibrahim nou...@gmail.com wrote: Gopalakrishnan Subramani gopalakrishnan.subram...@gmail.com writes: Source language IO is very limited and it has functions to map to IO and UI. As a total, they have around 100+ function. Those can be easily done in Lua. [...] For a project in one of my earlier companies, I used SPARK[1] to write a little parser for a language of my own making to used to specify some conditionals. The parser would convert this into a python expression which could be evaluated with some objects to return a true or a false. If you have the grammar of your source language at hand, it's a fews hours job to write a parser for it using SPARK. Once you do that, you have to write a backend to convert it into LUA which might be a little more complex but not impossibly so. Footnotes: [1] http://pages.cpsc.ucalgary.ca/~aycock/spark/ -- ~noufal http://nibrahim.net.in An empty cab drove up and Sarah Bernhardt got out. -Arthur Baer, American comic and columnist ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Updating Python 2.3.4 to 2.6.1 on RHEL 4
On Tue, Aug 23, 2011 at 4:16 PM, Ashutosh Narayan ashuli...@yahoo.comwrote: Hi, I wrote a script that involves subprocess module ; and when I ran it on a production server I found that due to older version of Python 2.3.4 my script failed to execute. I have the following python version on one of the RedHat servers. Python 2.3.4 (#1, Feb 18 2008, 17:17:04) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 Now, the concern is of updating Python version to 2.6.1 w/o effecting other things eg: system-config-* on RedHat machine which are dependent on current Python version 2.3.4 So far I have downloaded the source tar ball, untarred it and NOT yet executed - ./configure --prefix=/opt where I want it to land. Can I now run make, make install ? Any inputs on whether this is the right way to do withoutoverriding current default Python ? 1. Install to a different prefix on the system (/usr/local/, /opt etc). 2. Use virtualenv Thank you, ~ Ashutosh Narayan ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Create Better Python community
On Fri, Aug 19, 2011 at 5:36 PM, Noufal Ibrahim nou...@gmail.com wrote: This is basically just dearth of topics. I don't know how to fix it but maybe we can give it some kind of stimulus with a day long hackathon? It would help us get into depth about *something* and make some headway. It would be great to do this. I myself haven't really done much in Python for the last year or so. However the thing to hack should be sufficiently hard enough and in a topic of interest - not exactly writing Django plugins :) Anyone feel any pain point they want to hack on close to Python core, something which could be useful in general ? Personally, I would love to do something related to Python alternate implementation ecosystem (PyPy/Cython etc). Another option could be to form a small group who looks at core Python bugs and takes it over - if we can get started on this, we could end up owning some pieces of core Python in long term and also solve my problem # 2 (Shared goal). Of course, this needs some preparation - I am not talking of coming with a blank mind and just start random hacking. [...] -- ~noufal http://nibrahim.net.in Our comedies are not to be laughed at. -Samuel Goldwyn ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Create Better Python community
On Fri, Aug 19, 2011 at 6:12 PM, Noufal Ibrahim nou...@gmail.com wrote: Anand Chitipothu anandol...@gmail.com writes: [...] +1. I think it is a good idea. I'm interested in working on PyPy or core Python bugs. +1 for PyPy. I know nothing about it but would love to dive in. If there's a bunch of people interested, it would be awesome. Since Noufal is out this week-end, how about next Sat or Sun ? We can all do a bit of reading up of PyPy this week-end, discuss in the mailing list over next week, arrive (hopefully) at a common problem of interest to talk on or hack on next week-end. [...] -- ~noufal http://nibrahim.net.in Some bachelors want a meaningful overnight relationship. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Create Better Python community
On Sat, Aug 13, 2011 at 12:34 PM, Noufal Ibrahim nou...@gmail.com wrote: kracekumar ramaraju kracethekingma...@gmail.com writes: Things you could do to improve diversity in the Python community. (Quoting without permission from a thoughtful post on the Python diversity list; s/Python/Your project/ to suit your taste.) [...] It would be nice to just have python user group meetings in Bangalore regularly even if they're not particularly diverse. We need to poll people here on top 2 pain points/issues that prevent them from attending such meets. For me - it is mostly the distance to center of the city. Maybe we should have more hackdays. Something the IPSS should think about pretty soon. -- ~noufal http://nibrahim.net.in I always avoid prophesying beforehand because it is much better to prophesy after the event has already taken place. - Winston Churchill ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] PyPy outperforms C in microbenchmark
On Wed, Aug 3, 2011 at 12:50 PM, Noufal Ibrahim nou...@gmail.com wrote: PyPy outperforms C in a little benchmark capitalising on gcc's inability to optimise across files. http://morepypy.blogspot.com/2011/08/pypy-is-faster-than-c-again-string.html Not sure if that is the only factor playing here. I am pretty sure the malloc/free every cycle is killing the C program. -- ~noufal http://nibrahim.net.in Of course I can keep secrets. It's the people I tell them to that can't keep them. -Anthony Haden-Guest ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] if not with comparision statement in python
On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar asif.jama...@rezayat.netwrote: What if I have two lists for both minimum and maximum values Minimum Maximum 0 10 11 20 21 30 31 40 Now how should I check if actual result is not laying between above ranges if not minimum=actual_result and not maximum=actual_result: Any suggestions? Use zip. minl=(0,11,21,31) maxl=(10,20,30,40) x = 5 for r in zip(minl, maxl): ... if x in range(r[0], r[1]): print 'Found in range',r ... Found in range (0, 10) ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] parsing xml
On Mon, Aug 1, 2011 at 1:25 PM, Kiran Jonnalagadda j...@pobox.com wrote: On 31-Jul-2011, at 11:33 PM, Venkatraman S wrote: A regex is the simplest IMHO, because you need not know the syntax of the minidom parser. But, again i have seen this quiet often that lack of knowledge of regexp has led people to other solutions (the grapes are sour!) In the eternal words of Jamie Zawinski: Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. http://regex.info/blog/2006-09-15/247 I had fun reading the following quotes :) “Give a man a regular expression and he’ll match a string… teach him to make his own regular expressions and you’ve got a man with problems.” –me_da_clever_one “Give a man a regular expression and he’ll match a string… but by teaching him how to create them, you’ve given him enough rope to hang himself” – Andy Hood Please resist the temptation to use regexps for XML, for down that path lies only pain. It always starts with oh, only one token? Let me use a regex and get done with it, and soon enough you have a little forest of random-looking characters. Using regular expression to parse XML converts what is inherently hierarchical data to linear, flat data. Therein lies all its problems. Kiran -- Kiran Jonnalagadda http://jace.zaiki.in/ http://hasgeek.in/ ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] if not with comparision statement in python
On Mon, Aug 1, 2011 at 5:07 PM, Anand Chitipothu anandol...@gmail.comwrote: 2011/8/1 Dhananjay Nene dhananjay.n...@gmail.com: On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu anandol...@gmail.com wrote: 2011/8/1 Dhananjay Nene dhananjay.n...@gmail.com: On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar asif.jama...@rezayat.net wrote: What if I have two lists for both minimum and maximum values Minimum Maximum 0 10 11 20 21 30 31 40 Now how should I check if actual result is not laying between above ranges if not minimum=actual_result and not maximum=actual_result: Any suggestions? def in_range(number) : return any(map(lambda (x,y) : x = number = y, ((0,10),(11,20), (21,30), (31,40 How about this? def in_range(number, min_max_pairs): return any(x = number =y for x, y in min_max_pairs) Definitely better List comprehensions and generation expressions are usually more readable and expressive than using map. Thats probably truer for the python and python trained eyes than any other (in other words its both subjective and contextual and a bit to do with syntax). Allow me to illustrate : If I want to double all elements in a list and then increment them by one, here's how I would use a map in python def double(x) : return x * 2 def increment(x) : return x + 1 print map(increment,map(double,range(5))) and here's how I would do it in scala - notice the last (third) line and consider its readability (I'm sure a scala non-novice will offer something even superior) def double(n: Int) = n * 2 def increment(n: Int) = n + 1 println(0 to 4 map double map increment) so readability is often a function of what one's eyes are trained ot read and also the syntactic capabilities in the language This is just the prefix/postfix thing. Yes, prefix style is difficult to read if there are too many nested levels. Look at lisp code for example. Yes, it feel it awkward when I have to do range(len(x)). Unix pipes and chaining methods are postfix. What you are doing in scala is just that. If map was a list method, I could do this: range(0, 4).map(douple).map(increment) And as unix pipe: seq 0 4 | double | increment I also find map much more atomic and portable construct to think in - after all every list comprehension is syntactic sugar around map + filter, and map/reduce/filter are far more omnipresent than list comprehensions. Recently, I was thinking about converting a list comprehension to map/filter calls and It turned out that list comprehensions are more than map+filter. [i * i for i in range(10)] ~ map(lambda i*i, range(10)) [i * i for i in range(10) if i % 2 == 0] ~ map(lambda i*i, filter(lambda i%2 == 0, range(10))) But the situation gets tricky when there are multiple loop items in the list comprehension. Here is a list comprehension to find all Pythagorean triplets below 100. [(x, y, z) for x in range(1, 50) for y in range(x, 100) for z in range(y, 100) if x*x + y*y == z*z] Try converting this into map/filter and you'll understand the difference. +1. IMHO, map/filter/reduce and the inevitable companion lambda were added on to Python when it was still trying to find its identity on where it stood in the pantheon of dynamic typed languages - since it wanted to be everything for everyone it borrowed some of these constructs from Lisp or other functional languages. With addition of list comps, generators etc, these right now stand out like sore thumbs in the language and should be got ridden of at the earliest. Also, using any of the m/f/r trio with lambda is a performance killer. See an earlier post in a different thread for more on this. Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] Map vs List comprehensions (was Re: parsing xml)
On Mon, Aug 1, 2011 at 7:51 PM, Noufal Ibrahim nou...@gmail.com wrote: Anand Balachandran Pillai abpil...@gmail.com writes: On Mon, Aug 1, 2011 at 6:08 AM, Anand Chitipothu anandol...@gmail.com wrote: [...] It is more subtler than that. List comprehensions are faster than map functions when the latter needs to invoke a user-defined function call or a lambda. Maps score over list comprehensions in most cases where the function is a Python built-in and when no lambda is used. Example of former: def f1(): map(sqr, range(1, 100)) ... def f2(): [sqr(x) for x in range(1, 100)] ... mytimeit.Timeit(f1) '37.91 usec/pass' mytimeit.Timeit(f2) '37.50 usec/pass' Example of latter: def f1(): map(hex, range(1, 100)) ... def f2(): [hex(x) for x in range(1, 100)] ... mytimeit.Timeit(f1) '49.41 usec/pass' mytimeit.Timeit(f2) '55.29 usec/pass' This is confusing. Why is map(sqr, range(1, 100)) faster than map(hex, range(1, 100)) Assuming sqr is implemented in python, it should be slower than hex which is implemented in C. Maybe I should have rephrased it like this. - If using anonymous functions, prefer list comps over map. - If using built-in functions (C functions), prefer map over list comps. - If using pythonic user functions, there is nothing much to choose among these two, since the difference is not much. The reason - List comprehensions perform best, if all the calculations are inline within the two square brackets. Hence it scores over map in the lambda use-case but doesn't differ much if the function is declared outside. def f1(): [lambda x: x*x for x in range(100)] ... def f2(): map(lambda x: x*x, range(100)) ... mytimeit.Timeit(f1) '24.80 usec/pass' mytimeit.Timeit(f2) '37.44 usec/pass' The gain is significant. Whereas , def sqr(x): return x*x ... def f1(): [sqr(x) for x in range(100)] ... def f2(): map(sqr, range(100)) ... mytimeit.Timeit(f1) '37.23 usec/pass' mytimeit.Timeit(f2) '36.72 usec/pass' The gain is minuscule, barely noticeable. This is generally perceived as a performance trick with Python. http://www.ardendertat.com/2011/05/30/python-optimization/ [...] -- ~noufal http://nibrahim.net.in She used to diet on any kind of food she could lay her hands on. -- Arthur Baer, American comic and columnist ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] if not with comparision statement in python
On Mon, Aug 1, 2011 at 7:51 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Mon, Aug 1, 2011 at 7:26 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: IMHO, map/filter/reduce and the inevitable companion lambda were added on to Python when it was still trying to find its identity on where it stood in the pantheon of dynamic typed languages - since it wanted to be everything for everyone it borrowed some of these constructs from Lisp or other functional languages. With addition of list comps, generators etc, these right now stand out like sore thumbs in the language and should be got ridden of at the earliest. I am certain there are contrary opinions, even though the BDFL has weighed in. So yes, python is unlikely to be the playground for these constructs. I find a degree of elegance and utility to these constructs, though it is as well likely that these may seem like sore thumbs to others. I also used to think likewise when I first encountered these functions when I was playing around with Python many years back. However, I think the elegancy is actually a myth and is perhaps a pseudonym for being cryptic. For example, look at these competing solutions for summing the squares of first 10 integers. 1. List comp sum([x*x for x in range(10)]) 285 2. Map sum(map(lambda x: x*x, range(10))) 285 3. Reduce reduce(lambda x,y: x + y*y, range(10)) 285 I dont think there will be much disagreement that the listing is also in the order of decreasing readability. The list comp solution is graspable at one look, the map one takes one step of mental computation and the reduce one takes a few mental hoops to jump through and is utterly confusing to anyone not familiar with list/functional programming. The reduce one is also very error prone. For example, a small mistake such as, reduce(lambda x,y: x*x + y, range(10)) 2818129390158170901506703075470572449397357853477615482257305306043465L Produces a monstrosity instead of the expected answer. Perhaps those with a LISP/functional background find some mathematical elegance with these solutions. But from a pure Python perspective, they lack any elegance whatsoever. Also, using any of the m/f/r trio with lambda is a performance killer. See an earlier post in a different thread for more on this. Its a performance killer only for cPython - its a function of runtime not the construct. cPython is likely to stay a poorly performing runtime for these. I do hope PyPy will fare much better - but that remains to be seen. These constructs also help parallelisation (but only when combined with immutability), and thats a feature python is likely to be therefore unable to implement as far as I can imagine. Is this a big deal - frankly no, since the sweet spot of python is pretty broad. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] parsing xml
On Fri, Jul 29, 2011 at 4:41 PM, Venkatraman S venka...@gmail.com wrote: Noufal, I have nothing more to say than this(as i see some tangential replies which i am not interested in substantiating - for eg, i never suggested to use a regexp based parser - a regexp based xml parser is different from using 'a' regexp on a string!) : Read my replies properly. Read my assumptions properly w.r.t the xml structure and the requested value in the xml. Read the link that you have pasted again. If possible, read the comments in the link shared(from esr) again. Once done, think twice and tell me which is better. If you vouch for xml parsing in the case when all that you need from the string is a simple numeric value(not a string), then good luck; unlike esr i will not use adjectives; but i would not use your code either. To be fair here, I think what he is saying is that Kenneth's problem (getting at the particular value) can be solved by using an aptly written regular expression which might be the fastest - not in terms of CPU cycles alone, but in terms of time to code it up - solution. It is not impossible to write a regular expression which will work for bad (invalid) XML as well. Don't forget that a lot of XML/HTML parsers are actually implemented using regular expressions. You can take a look at sgmllib.SGMLParser, htmllib.HTMLParser etc. No complex text processing gets done without some kind of regular expression behind the scenes. Thanks. -V ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] parsing xml
On Mon, Aug 1, 2011 at 6:08 AM, Anand Chitipothu anandol...@gmail.comwrote: Hang around in #django or #python. The most elegant code that you *should* write would invariably be pretty fast (am not ref to asm). That doesn't mean that any code that is faster is elegant. IIRC, in python, map function runs slightly faster than list comprehensions, but list comprehensions is considered elegant. It is more subtler than that. List comprehensions are faster than map functions when the latter needs to invoke a user-defined function call or a lambda. Maps score over list comprehensions in most cases where the function is a Python built-in and when no lambda is used. Example of former: def f1(): map(sqr, range(1, 100)) ... def f2(): [sqr(x) for x in range(1, 100)] ... mytimeit.Timeit(f1) '37.91 usec/pass' mytimeit.Timeit(f2) '37.50 usec/pass' Example of latter: def f1(): map(hex, range(1, 100)) ... def f2(): [hex(x) for x in range(1, 100)] ... mytimeit.Timeit(f1) '49.41 usec/pass' mytimeit.Timeit(f2) '55.29 usec/pass' Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Opening in Noida
Please prefix [JOB] in the subject line for job postings or career related postings. --Anand On Fri, Jul 15, 2011 at 4:17 PM, Sibtey Mehdi sibtey.me...@gmail.comwrote: Hi, We are recruiting python developers having more than 2 years of experience, Interested candidates can send their resume to me at sibt...@brickred.com for more info - http://www.brickred.com/ Thanks, Sibtey ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Iterating list of tuples
On Mon, Jul 4, 2011 at 12:01 PM, Noufal Ibrahim nou...@gmail.com wrote: Asif Jamadar asif.jama...@rezayat.net writes: Suppose I have list of tuples data = [ (10, 25, 18, 17, 10, 12, 26, 5), ] for value in data: if data[value]5: print greater else: print lesser if the list has just one tuple, you need to iterate over it's individual elements. for i in data[0]: # Iterate over elements of the tuple if i 5: print greater else: print lesser `value` in your code does not mean the index, it's the actual element itself. This is the correct approach. If you don't like doing it like this, there is a 2nd approach where you can index inside the loop rather than on the loop data=[(10,25, 18, 17, 10, 12, 26, 5)] for value in zip(*data): ... if (value[0] 5): print 'Greater' ... else: print 'Lesser' ... Greater Greater Greater Greater Greater Greater Greater Lesser But then I might have confused you with that ! [...] -- ~noufal http://nibrahim.net.in I'm proud of my humility. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [Ipss] Python User Group International Survey
Hi Brian, Thank you for informing the list(s). I have already completed this survey on behalf of BangPypers. --Anand On Wed, Jun 29, 2011 at 8:45 AM, Brian Curtin brian.cur...@gmail.comwrote: The PSF is happy to launch today an international survey of Python user group organizers to help it better serve the large and ever-expanding international Python user community. The survey contains questions on user group organization, events, demographics, and growth. There are some questions with numerical answers, and while your best guess is fine, you may find it helpful to gather some statistics on your user group membership before starting the survey (example statistics include the number of active members and the size and topics for recent user group events). We expect this survey to take around 30 minutes to complete. We appreciate your time and honesty in answering these questions. The PSF blog post announcing the survey: http://pyfound.blogspot.com/2011/06/tell-us-about-your-user-group.html The survey was written by Jessica McKellar (http://jesstess.com), organizer for the Boston Python Meetup (http://meetup.bostonpython.com), and Jesse Noller (http://jessenoller.com/), PSF board member and PyCon chair with input and feedback from survey specialists and others. https://www.surveymonkey.com/s/BWLG8SZ The survey was pretested with a handful of user group organizers, and their answers were phenomenal. Organizers have tons to say about these topics, and we hope to get a lot of great, actionable data for strengthening the relationship between the PSF and Python user groups out of this effort. Outreach, education, diversity and community building are critical for Python as a community, and the Foundation - this data should greatly assist in our targeting our resources and furthering the mission of the Foundation in all ways. Thank you The Python Software Foundation Jessica McKellar Jesse Noller ___ Ipss mailing list i...@python.org http://mail.python.org/mailman/listinfo/ipss -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python WebDAV client library
On Thu, Jun 23, 2011 at 4:15 PM, kunal ghosh kunal...@gmail.com wrote: Hi all, Can anyone please suggest some actively developed python WebDAV client library ? I did my preliminary search and found quite a few libraries almost all of them are abandon ware. Haven't played with python and web-dav, but did you checkout https://launchpad.net/python-webdav-lib ? -- regards --- Kunal Ghosh Dept of Computer Sc. Engineering. Sir MVIT Bangalore,India permalink: member.acm.org/~kunal.t2 http://member.acm.org/%7Ekunal.t2 Blog:kunalghosh.wordpress.com Website:www.kunalghosh.net46.net ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] How to compare the relevancy between news headlines?
On Tue, Jun 14, 2011 at 5:16 PM, Gopalakrishnan Subramani gopalakrishnan.subram...@gmail.com wrote: Dear All, Thanks for very informative answers. I would follow NLT also try out Patra's advice as well. Post you my updates. You can also do this by utilizing the entity extraction/categorization provided by online Linked-data/clustering providers. One such service is OpenCalais provided by Thomson-Reuters. I had played around with Calais one year back and found it very useful to learn about Linked-data and entity extraction. In fact, there is an already existing news clustering service written on top of OpenCalais. http://www.opencalais.com/applications/interceder Klezio.com was also a very good example of this, but now it seems to be down. In fact I cooked up an application to pull out the cost of mobile phones using Opencalais and demoed it in a BangPypers meeting some time back, here is an archive of it. http://web.archiveorange.com/archive/v/nwVbqtZ9jcT56TZEpxjw HTH. --Anand -- Gopal On Tue, Jun 14, 2011 at 4:55 PM, Gora Mohanty g...@mimirtech.com wrote: On Tue, Jun 14, 2011 at 1:28 PM, Gopalakrishnan Subramani gopalakrishnan.subram...@gmail.com wrote: Thanks for suggestion. Can you give me a specific NLT toolset/approach with example if you have experience already? Try clustering with Python NLTK ( http://www.nltk.org/ ). NLTK is well documented, and what you are looking for will probably be available from nltk.cluster. The site has a free, downloadable book , and extensive documentation. See, e.g., http://www.opendocs.net/nltk/0.9.5/api/nltk.cluster-module.html If you are willing to go away from Python, there are various options, such as: * Carrot 2: http://search.carrot2.org/stable/search * Mahout: http://lucene.apache.org/mahout/ Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Image comparison using Python
On Tue, Jun 14, 2011 at 12:07 PM, Nitin Kumar nitin.n...@gmail.com wrote: we need to compare text also but most of the time Image Quality between two pdf. Image quality of what ? - Images embedded in PDF files ? - Raster images saved as PDF files ? If it is PDF, you need a pdf library like pyPdf to open the pdf file and extract images. Pull up the code and customize it yourself. --Anand On Tue, Jun 14, 2011 at 11:47 AM, Noufal Ibrahim nou...@gmail.com wrote: Depends on what you want out of it. You could extract text and just diff it or you can check sum the files and compare the hashes. On 6/14/11, Nitin Kumar nitin.n...@gmail.com wrote: HI All, We are looking for python comparison tool (Don't suggest PIL as it was not useful for us). please do let me know if you any good one. we are looking for the tool to compare two pdf files. -- Nitin K ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- ~noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Nitin K ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] This June Get In and Drive, Python, Android, Web3.0 and Cloud Computing with GuRu Prevails
Please don't spam... you won't prevail here if you do it. On Mon, Jun 13, 2011 at 11:52 PM, director guruprevails direc...@guruprevails.com wrote: Dear Python Members, We thank you for *register*ing your interest *in* one or more of our *cutting edge courses*. We are proud to announce our* *twelfth* **work-shop* with *live projects* on *Python, Web 3.0, Android and Cloud Computing* in* **Bangalore* at GuRu Prevails! For detailed syllabus *visit www.guruprevails.com * *Now watch *the following* videos* *IBM and Cloud Computing http://www.youtube.com/watch?v=PSq7hZ0shLs, Book writing Machine web 3.0 http://www.youtube.com/watch?v=m8WuGKyBR90, Google Employee on Python http://www.youtube.com/watch?v=oTFL7FPLnXY, Google on Android http://www.youtube.com/watch?v=1FJHYqE0RDgfeature=relmfu* * http://www.youtube.com/watch?v=1FJHYqE0RDgfeature=relmfu*Darshan (star alumnus and now Google employee!) speaks about GuRu Prevails : *I am an alumnus of GuRu Prevails. By the end of the course we were doing projects that were at par with the projects done at Stanford , MIT and Yahoo research. I am really grateful to GuRu Prevails for the quality of the course and transformation that they bring in the students. I am proud to say that I am a student of GuRu prevails.* Let us show you a list of *companies* that *need people* on *Python, Web3.0, Android and Hadoop* *FaceBook ,Google, Amazon, AOL, Samsung, Motorola, eBay, Yahoo, Microsoft , Nasa *and our own Indian IT companies like TCS, Infosys, Wipro among others. Dates and details are as follows: *Python* and* web 3.0 *: 25th,26th June, and 2nd, 3rd July *Android *and *Cloud Computing *: 9th,10th,16th, and 17th July Jobs in Python http://www.indeed.co.in/jobs?q=pythonl=, Jobs in Androidhttp://www.indeed.co.in/jobs?q=androidl= , Jobs in Web http://www.indeed.co.in/jobs?q=webl=, Jobs in Cloud Computing http://www.indeed.co.in/cloud-computing-jobs For *sign-up* details email to i...@guruprevails.com *before 17th June 2011* Make this *commit*ment *now*. *Join* *us* and *become special* in IT Industry. * * NB. Pre-requisite for the Android module is familiarity with Object Oriented programming and for the Hadoop module is familiarity with Python or Java.* Regards,* *GuRu Prevails Labs* Voice: +91 9972952810 www.guruprevails.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] The myth of free software
Dude, you seriously have lots of free time on your hands... Here is what I (used to) do when I had time to waste as you do. 1. Go to http://code.activestate.com/recipes 2. Think up a problem I like to solve on the day and write it up in Python 3. Submit as a Python recipe. Of course you can do it in Perl or PHP, but Python rulez there. Around 5 recipes of the total 35 I submitted with this thinking have been actively used and some of them were forked off by other Open source folks to projects of their own - well at least one (pyjavaproperties). So, next time you bash open source in general, give me a call and I could advise you on the fringe benefits open source gives you which I dont think you are truly aware. --Anand On Wed, May 18, 2011 at 8:10 AM, Santosh Rajan santra...@gmail.com wrote: As Sartaj Singh Kang, correctly pointed out, there are big bad trainwrecks in this world. I think this whole thread must be a cumpulsory reading for all students of computer science, all over the world. Attleast they need to now there are big bad trainwrecks still alive in this world. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] The myth of free software
On Wed, May 18, 2011 at 8:10 AM, Santosh Rajan santra...@gmail.com wrote: As Sartaj Singh Kang, correctly pointed out, there are big bad trainwrecks in this world. I think this whole thread must be a cumpulsory reading for all students of computer science, all over the world. Aiming rather too high , aren't we ? Attleast they need to now there are big bad trainwrecks still alive in this world. -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [commercial] python/django training
On Sun, May 15, 2011 at 3:00 PM, srinivasa rao srinivasaene...@gmail.comwrote: hi I have 5 years exp using Python/Django i want to give free training to all please contact bye srini The price wars have started... Come on, is there someone now who is willing to pay me to teach me Django ? -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] Gsoc - Mediawiki Parser in Python
If anyone is interested, https://wiki.mozilla.org/Community:SummerOfCode11:MediaWikiParser -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python equivalent for Pelmonks.org
On Fri, Mar 25, 2011 at 4:40 PM, Santosh Rajan santra...@gmail.com wrote: I think the perl monks have already answered your question. http://www.perlmonks.org/?node_id=511582 Short answer is No. Long answer is Python has no single centralized repository of knowledge which is an analogy to perlmonks.org. Still longer answer is Python has no single centralized repository of knowledge which is an analogy to perlmonks.org. It is more distributed all over the place - in c.l.p, stackoverflow, blogs, forums such as these. --Anand On Fri, Mar 25, 2011 at 4:23 PM, Jins Thomas jinstho...@gmail.com wrote: Hi all, Do we have some site which we can compare with perlmonks.org for Python. I have seen perlmonks.org is very helpful with lot's of QAs , some small practical tutorials, thoughts on programming etc, code snippets etc. Thanks Jins Thomas ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- http://about.me/santosh.rajan “The *young man* knows the rules but the *old man* knows the exceptions”. *Oliver Wendell Holmes* ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] indentation problems
On Thu, Feb 24, 2011 at 12:51 PM, Kenneth Gonsalves law...@gmail.comwrote: hi, I have a problem - whenever I load the code written by a particular team member indentation in many places vanishes. I have a feeling this has something to do with tabs and spaces - anyone faced this problem? tabnanny is your friend. *docs.python.org*/release/2.3/lib/module-*tabnanny*.html -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [Announcement] Delhi/NCR Python Users Group India - Started
On Tue, Feb 15, 2011 at 12:24 PM, Arulalan T arulal...@gmail.com wrote: Dear All, I am happy to announce that a new Python usergroup is created for Nation Capital Region consisting of * NCT Delhi * Haryana * Rajasthan *Uttar Pradesh . Do join us on the mailing list for NCR Python Users Group India . Mailing List : http://mail.python.org/mailman/listinfo/ncr-python.in Wiki Page : http://wiki.python.org/moin/Ncr-Python.in This mailing list is for all those who want to know about What is Python?, How to learn it? as a beginner etc.. If you are a Python Geek, then please join with us and share your Python coding stuff. So that all of us can improve our Python knowledge. All the best! Incidentally, we started the BangPypers list (originally in Yahoo! groups) also in a February (Feb 2005). We had a tremendous first month with close to 400 messages being posted in the list. Good to see Python community growing in India. -- Regards, Arulalan.T Project Associate Centre for Atmospheric Sciences Indian Institute of Technology Delhi My Experiments In Gnu/Linux ! : http://tuxcoder.wordpress.com Kanchi Linux User Group Rocks ! : http://kanchilug.wordpress.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] NoSQL
On Sun, Feb 13, 2011 at 2:21 PM, Noufal Ibrahim nou...@gmail.com wrote: On Sun, Feb 13 2011, Anand Balachandran Pillai wrote: I am sure many of you must have gone through this discussion, but sharing it anyway since I liked the analogy he makes with SQL against NoSQL compared to transmission in cars. I liked the analogy but don't agree with the second paragraph. It's not only about size. Thanks to the dominance of SQL databases, everyone tends to think of them as the default and use noSQL only if necessary. That needn't be the case. Small (non Google, non Facebook) applications that need to store documents (e.g. a wiki) *might* work better with a noSQL backend than a relational one Hmmm, better in what sense ? By better if you mean the programmer's or maintainer's work is reduced from designing schema, writing SQL to store/retrieve data, basically all the RDBMS stuff vs designing a rather flat key/value store using a Document store (nosql), I am not convinced. Does it really matter in a small-size wiki project whether you are using SQLite to store your data, vs a mongodb that just runs on your machine ? I would rather go for the sqlite solution since, 1. It is the most simplistic RDBMs one can think of. 2. You get the power of SQL, thereby chance of writing adhoc queries in the future. I don't agree with it. One of the basic premises from where the nosql platforms come is that they are trying to solve problems where your data is distributed in a scale that traditional RDBMs would find it difficult to address with sufficient performance. If I use the CAP terminology, nosql is solving the problems of A and P on a large scale while making no promises on the C side. Unless your wiki need to scale to at least 100K nodes or more, I don't see a real technical reason to use document stores apart from relieving you upfront of complex schema design and writing SQL queries. If you mean that is better for you, then we are talking of different problems here. Mileages vary. http://stackoverflow.com/questions/2559411/sql-mysql-vs-nosql-couchdb It might be a cliche, but I kind of feel the current NoSQL movement is simply a case of The grass must be greener on the other side. I don't really follow movements but disagree agree with your general statement. The kinds of data and hardware that people are dealing with have changed and different problems are cropping up. The constraints and requirements have changed as well. New technologies have come up to address these problems and given that we live in these times, it's quite possible that the problems we face might fall into the categories for which these systems have been designed. It's unwise to summarily dismiss document stores out of the box. Also, the transition is not abrupt (SQL yesterday, noSQL today). SQL databases have been used in a semi schemaless fashion e.g. Triple stores[1], Entity-attribute-value model[2] etc. For some kinds of datasets, sound RDMS rules are violated to gain performance. e.g. Denormalisation[3]. These kinds of things indicate that RDBMs systems are not designed to handle certain classes of problems that are cropping up and new solutions have to be sought out. It's an engineering problem. Different situations call for different tools and solutions. I personally tend to ignore the whippersnappers with their SQL suxx0rZ! noSQL roX! outlook and the grumpy SQL advocates with their Get off my lawn! attitude. You might have got me wrong. My point was that there seems to be a trend where programmers and designers choose to implicitly assume that just because their data is expected to scale to gigabytes or terabytes in the future, the right choice upfront is a Document store (I prefer to use this term as against the confusing nosql one), which is not the correct way to do this. I think any complex data storage problem will at the end consist of a mix of Document stores and Relational stores. For example, in the link I quoted the O.P seems to come from that kind of a thinking. Something to do with all the current thinking in terms of cloud and data out there and the fashion to think of SQL as that old thing and Document store as this flashy new thing. Looking at the hardware part of it, RDBMs have been severely limited by current storage technology, i.e platter spinning disks, which is a limiting factor when trying to optimize closer to the metal. SSDs could solve a whole lot of the problems at that level, though now a day's the trend is to blame the poor performance on the DB and think of a document store which scales to millions of nodes, like Digg did for example. Meanwhile, in a lighter vein, watch this NoSQL lightning talk by Brian Aker. It is fun, if you haven't seen it :) http://www.youtube.com/watch?v=LhnGarRsKnA [...] Footnotes: [1] http://en.wikipedia.org/wiki/Triplestore [2] http://en.wikipedia.org/wiki/Entity-attribute-value_model [3] http://en.wikipedia.org
Re: [BangPypers] BangPypers meeting February 2011
On Sun, Feb 13, 2011 at 8:33 AM, Ramdas S ram...@gmail.com wrote: Thought I will pick your brains on this. We are archiving a lot of information, some message format very similar to email in structure, through its not an RFC complaint format. Presently we are storing some basic seachable details in a data base, and the physical file is in a SAN box, with the location of file also in the database. It's fine now, but we are expecting the client to generate a few TB of information over the next 2 years. Does this make a good case of using NoSQL. Also I remember someone saying that NOSQL stuff like MongoDB does a miss a document once in a while. Wow, interesting discussion. I missed the crux of it I believe. Anyway here are my 2 cents on this. Document storage, query and retrieval always has 3 aspects - Data consistency, Data availability and Data distribution (partitioning). Traditional RDBMS (aka SQL) Databases focus mainly on the first one, i.e data consistency - hence we got the terms 'ACID' compliant and the like. On top of such structured data which always promise you consistency, they provide a structured query language, aka SQL. In this world, Availability and Partitioning are always add-ons, that painful process the DBM has to perform with DB replication, mirroring, modifying schema for partitioning, Clustered DB etc. The new generation DBs instead chose to focus on the latter two, i.e availability and distribution, while making some assumptions on the consistency part. They are natural evolutions from the data grid or cloud architecture where data is massively striped and scaled on to multiple nodes in multiple data centers thereby lowering your data retrieval latency to the scale of micro seconds. Hence they are a natural fit if you don't mind some inconsistency in data retrieval from say 2 clients across different geographical locations at the same time, but you are more concerned about how quick the data is stored and retrieved. These DBs also choose not to use SQL, hence the NoSQL term. The reason is that they don't need to use SQL since the focus is not so much on queries that span and join across multiple tables as in a fast fetch, given a key There are some problems which fit the NoSQL world and some which fit the the SQL one. If you are bank, you won't dare to dream not having data consistency, since data correctness and atomic transactions are so much essential in the financial world. But a twitter or Google can live with some minor inconsistencies, but they need fast response time, so map/reduce and NoSQL DBs is a natural fit there. So an approximate rule of thumb would be, 1. If your data is highly structured and you have complex queries and your clients expect consistent results, stick to RDBMs. 2. If your data is more like a simple key-value store and you are more worried about query/response times rather than the consistency of the data, perhaps a Document storage (no sql) design is the correct one. To me both these worlds are complimentary to each other. I don't believe in the so-called 'sql' vs 'nosql' wars. That is simply a media hype. --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [Ann] [Commercial] Weekend training program on Core Python
On Thu, Feb 3, 2011 at 9:50 AM, satyaakam goswami satyaa...@gmail.comwrote: On Thu, Feb 3, 2011 at 8:04 AM, Kenneth Gonsalves law...@au-kbc.org wrote: On Thu, 2011-02-03 at 01:16 +0530, Sudheer Satyanarayana wrote: On Thursday 03 February 2011 12:47 AM, Gora Mohanty wrote: On Thu, Feb 3, 2011 at 12:23 AM, Noufal Ibrahimnou...@gmail.com wrote: [Nothing at all] Er, either I am finally going blind due to unmentionable practices, or that message was blank. I am with you. Naufal missed it. The message is indeed blank. s/Noufal/Naufal/ - I am able to see the message I think that message was meant for The Invisible Man... -Satya ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] How to get class names from DLL file
On Tue, Feb 1, 2011 at 10:51 AM, Noufal Ibrahim nou...@gmail.com wrote: On Tue, Feb 01 2011, Sibtey Mehdi wrote: Hi, I am trying to get the class names from the DLL files in unix plateform. Any can please help me out to solve this problem. The format of Microsoft DLL files is detailed over here http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/pecoff_v8.docx I think it should be possible to parse the file and find out the entry points. I've never done it but it's the first thing that occurs to me. Apparently, they also release a tool called Dependency Walker http://en.wikipedia.org/wiki/Dependency_Walker which allows you to list functions exported by an executable which might work for you as well. I think he said unix :) DLL files on Unix are called shared libraries ending with a .so extension. If the library is not stripped you can view the symbols exported by it, including class names. E.g: $ nm /usr/lib64/python2.4/lib-dynload/regex.so However on production unix or any *nixes, the libraries are typically stripped of such additional data. In that case you can use readelf command (works only if your system supports ELF executables). $ readelf -s zlibmodule.so Symbol table '.dynsym' contains 45 entries: Num:Value Size TypeBind Vis Ndx Name 0: 0 NOTYPE LOCAL DEFAULT UND 1: 0ff8 0 SECTION LOCAL DEFAULT8 2: 0 NOTYPE GLOBAL DEFAULT UND PyModule_AddObject 3: 78 FUNCGLOBAL DEFAULT UND inflateEnd 4: 0 NOTYPE GLOBAL DEFAULT UND PyExc_ValueError ... objdump -T also works similarly. $ objdump -T zlibmodule.so zlibmodule.so: file format elf64-x86-64 DYNAMIC SYMBOL TABLE: 0ff8 ld .init .init D *UND* PyModule_AddObject DF *UND* 004e inflateEnd D *UND* PyExc_ValueError D *UND* PyModule_AddStringConstant w D *UND* __gmon_start__ w D *UND* _Jv_RegisterClasses DF *UND* 0a24 deflate Play with these and figure out which one does the trick for you. --Anand [...] -- ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] getpython.net Sprint (was Re: User group meeting)
Very useful project! I was looking for something like this the other day. Didn't know this was getting made right here :) Congrats to everyone who contributed to this! I guess this is the first project closer to a community project being executed by people in this group. --Anand On Mon, Jan 31, 2011 at 11:18 AM, Baiju M baiju.m.m...@gmail.com wrote: On Mon, Jan 31, 2011 at 11:07 AM, Vishal vsapr...@gmail.com wrote: Baiju, Small question...pardon me if it sounds stupid. What is the order in which the packages are listed here. http://getpython3.net/package Can we sort them by distribution name or something? Thanks for the suggestion ! Now it's sorted by distribution name. Regards, Baiju M ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] PSF Sprints - Call For Applications
On Fri, Jan 28, 2011 at 8:20 AM, Senthil Kumaran orsent...@gmail.comwrote: Hi Baiju, I think that was Call for Application for Sponsored Sprint. Like if we all decide upon a sprint date and chalk out of our tasks, then, we can approach PSF with the details (the tasks we are undertaking) and request them if they can sponsor it. *If they agree to sponsor it, then the money details can handled by organizer , it could be single person whom the group can trust. I don't think we should get to legal entity details here. If you like to consider getpython3.net site development as a part of sprint, then I think you should put forth the proposal with PSF. But personally, I think that it is a very good one/two person project and I would like sprints to be a community event. Like if we can get at least 10 people to work on enhancing/ bug fixing the existing projects (bluebream, django, twisted or python and similar) so that new-comers have an edge in joining the respective project communities, it would have a greater benefit. If we plan or decide upon such an event in the near future, we should take this opportunity extended by PSF. Also, if we plan for Sprints, we should allow remote participation too. (I can participate only remotely for bangpypers these days :) !) Yes, there is a formal procedure for applying for python sprints. It would be nice if we can have a mini meeting or discussion on topics where people in BangPypers are interested to submit proposals on. Proposals need not be on popular platforms such as Django, Twisted etc, it could be for some of these categories also apart from obvious ones such as contributing to Python core and standard library. I am giving a few examples below, which are not very obvious. 1. An unmaintained Python library which is still used by a sizeable number of people which you want to port to Python 3.0 or suggest some improvements as part of a sprint. 2. Improving documentation for an existing Python project. 3. Educational libraries, tools and websites. In short, any problem which is felt reasonably widely as a void in the community or sub-community is good for a sprint application. Please see the following URL for the new, wider scope of Python sprints, for more information. http://pythonsprints.com/2010/12/15/widening-our-scope/ If you have any questions, get in touch with Brian or Jesse Noller. I can also forward any questions if anyone gets in touch with me to the right people. Thanks, Senthil --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Multiplying very large matrices
On Sun, Jan 16, 2011 at 12:32 PM, kunal ghosh kunal...@gmail.com wrote: Hi all, I found numpy.memmap to be very suitable when matrices larger than the physical memory are required. 1. included in standard numpy installation 2. very low learning curve. Interesting package. Just went through the documentation. It is using mmap system call to map system virtual memory to the process. But this approach can also get clumsy if your matrices are too huge and you may get into all kinds of paging problems if your system doesn't handle virtual memory very well. But must be fine on Linux I think. pyTables seems to be more suitable but , i somehow found the learning curve too steep . Also pyTables needs lot of initializations before anything can be done with it as compared to memmap. At first look, PyTables might be better than memmap since it uses data compression with disk files so you won't hit the memory limit. The above reason made me use memmap over pyTable. -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [JOB] Python developer required in Pune with web development experience
On Thu, Jan 13, 2011 at 11:39 AM, Baishampayan Ghose b.gh...@gmail.comwrote: This interesting job comes with industry competitive compensation. how much? I wonder why in India people never mention salary range. One reason for not stating the actual range and just saying according to industry standards is that there is no such thing as a standard compensation. The actual pay differs with the person, the role the company. Nevertheless, it's a nice way of saying we won't short-change you. Good point. Industry standard is just euphemism and an urban myth, no such thing exists :) Regards, BG -- Baishampayan Ghose b.ghose at gmail.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Convert to Black and White to an image
On Mon, Jan 10, 2011 at 10:10 PM, Narendra Sisodiya naren...@narendrasisodiya.com wrote: On Mon, Jan 10, 2011 at 9:38 PM, Venkatraman S venka...@gmail.com wrote: On Sat, Jan 8, 2011 at 10:34 AM, Narendra Sisodiya naren...@narendrasisodiya.com wrote: Yes, I need black and white image, and I was having a grayscale image, I have posted initially this thing. you posted a RBG to black and white algorithm - even if somebody has RBG , why one should use at RBG level, the right way is to do is to convert to grayscale using avalable method. I would highly recommend Digital Image Processing by Gonzalez and Woods; your fundamentals are not right. Are you mentally sick ?? I have explained well, My code is working and Python image community guideed me for this. Try to post your code snippet on that mailing list and you will get answer that your code was poorer and incorrect. Damm !! Why i am wasting time with you !! I request you to please control the tone of your postings. Every poster here is a valuable member and nobody has given you any rights to abuse someone openly in the forum. Please give respect and take respect. We don't like trolls here. If you can't live with these simple rules, I suggest you to go and take a hike, a moderator of this forum. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Convert to Black and White to an image
On Tue, Jan 11, 2011 at 1:58 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Jan 10, 2011 at 10:10 PM, Narendra Sisodiya naren...@narendrasisodiya.com wrote: On Mon, Jan 10, 2011 at 9:38 PM, Venkatraman S venka...@gmail.com wrote: On Sat, Jan 8, 2011 at 10:34 AM, Narendra Sisodiya naren...@narendrasisodiya.com wrote: Yes, I need black and white image, and I was having a grayscale image, I have posted initially this thing. you posted a RBG to black and white algorithm - even if somebody has RBG , why one should use at RBG level, the right way is to do is to convert to grayscale using avalable method. I would highly recommend Digital Image Processing by Gonzalez and Woods; your fundamentals are not right. Are you mentally sick ?? I have explained well, My code is working and Python image community guideed me for this. Try to post your code snippet on that mailing list and you will get answer that your code was poorer and incorrect. Damm !! Why i am wasting time with you !! I request you to please control the tone of your postings. Every poster here is a valuable member and nobody has given you any rights to abuse someone openly in the forum. Please give respect and take respect. We don't like trolls here. If you can't live with these simple rules, I suggest you to go and take a hike, a moderator of this forum. Correction - as moderator of this forum, still you can go and take a hike. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Suggestion for GUI
On Mon, Jan 10, 2011 at 10:56 AM, Narendra Sisodiya naren...@narendrasisodiya.com wrote: code to run. I am just typing some random string , it comes out to be a PyQT code. How ? This is some skill if you ask me. some fellows are interested to buy it, I never tested using PyQT nor i am giving them suggestion to install PyQT. Client are doing by their own. How come I am making any violation Are you kidding ? You might have typed the code in your sleep, but as long as it is using library X and X stipulates a licensing scheme, which is non-free, you and your customers are bound by X's licensing terms. If you want a rough and dirty guide to open source licensing, here it is. 1. Using public domain/free licenses (BSD, MPL etc) - You are free to choose whatever licensing you want to. Typically people re-license code using BSD* libraries in BSD or compatible licenses. 2. Throw-away/free/utility code which you don't care - Put in public domain or use some arbit license. I suggest WTFL. 3. Code under LGPL - You can relicense in LGPL or stricter licenses such as GPL*. Can't re-licenses typically under a much freer license such as BSD. 4. Code under GPLv2/GPLv3 - Typically provides a lot of restrictions on commercial use of the source code. People re-license under same licenses. I suggest spending some time on http://www.opensource.org/licenses/index.html whenever you got time. It is worth your while. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Suggestion for GUI
On Mon, Jan 10, 2011 at 1:03 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Jan 10, 2011 at 10:56 AM, Narendra Sisodiya naren...@narendrasisodiya.com wrote: code to run. I am just typing some random string , it comes out to be a PyQT code. How ? This is some skill if you ask me. some fellows are interested to buy it, I never tested using PyQT nor i am giving them suggestion to install PyQT. Client are doing by their own. How come I am making any violation Are you kidding ? You might have typed the code in your sleep, but as long as it is using library X and X stipulates a licensing scheme, which is non-free, you and your customers are bound by X's licensing terms. If you want a rough and dirty guide to open source licensing, here it is. 1. Using public domain/free licenses (BSD, MPL etc) - You are free to choose whatever licensing you want to. Typically people re-license code using BSD* libraries in BSD or compatible licenses. Hmmm, getting old. I actually meant MIT, not MPL which is more strict. 2. Throw-away/free/utility code which you don't care - Put in public domain or use some arbit license. I suggest WTFL. it is WTFPL, very interesting license, if you ask me :) 3. Code under LGPL - You can relicense in LGPL or stricter licenses such as GPL*. Can't re-licenses typically under a much freer license such as BSD. 4. Code under GPLv2/GPLv3 - Typically provides a lot of restrictions on commercial use of the source code. People re-license under same licenses. I suggest spending some time on http://www.opensource.org/licenses/index.html whenever you got time. It is worth your while. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] moving/clicking the mouse cursor using python
On Fri, Jan 7, 2011 at 4:54 PM, Narendra Sisodiya naren...@narendrasisodiya.com wrote: On Fri, Jan 7, 2011 at 4:48 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: You should be using ncurses for applications like this which need mouse positions (x,y) on the console. http://pyncurses.sourceforge.net/ What will be the difference ? can I use pyncurses to generate global mousemovement ? like the way i did with xdotool. Also, What about Windows/Mac Platform ? Not sure what you mean by global, but ncurses turns your console into a matrix of x,y positions. It was widely used to provide a console interface to cli programs in the 90s, (I am reminded of my old favorite program mikmod for playing module music), but much less used now a days. I didn't read your post fully. If you want to generate clicks anywhere on desktop, ncurses won't work since it is tied to a terminal. You could try something like http://python-xlib.sourceforge.net/ See some discussion of this on http://stackoverflow.com/questions/2676434/x11-how-to-raise-another-applications-window-using-python Regarding ncurses, yes it will work on any console/terminal which supporse curses. That includes darwin (mac os x) and cygwin on windows. But of course not the DOS terminal. Please don't use X like the way you did in the 2nd approach, *nix really can do better than that. This ain't 1999 you know. Thanks for tip, but I never write such code so i am asking. --Anand -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] moving/clicking the mouse cursor using python
On Fri, Jan 7, 2011 at 5:08 PM, Noufal Ibrahim nou...@gmail.com wrote: On Fri, Jan 07 2011, Anand Balachandran Pillai wrote: You should be using ncurses for applications like this which need mouse positions (x,y) on the console. http://pyncurses.sourceforge.net/ Isn't ncurses used for CUI applications? I wasn't aware that you can control your graphical cursor using it or did I misunderstand something? It can't. Please read my 2nd post fully. [...] -- ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Fwd: [OT] Wikipedia
There are quite a few projects that create wikipedia dumps. What kind of dump are you talking about... --Anand On Wed, Dec 15, 2010 at 10:17 PM, Venkatraman S venka...@gmail.com wrote: Trying my luck here. -- Forwarded message -- From: Venkatraman S venka...@gmail.com Date: Wed, Dec 15, 2010 at 6:23 PM Subject: [OT] Wikipedia To: html5...@googlegroups.com Hi, Probably, not the right place, but does anyone have the Wikipedia dump in Bangalore?(i dont need the revisions) -V- http://blizzardzblogs.blogspot.com/ ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Fwd: [OT] Wikipedia
On Wed, Dec 15, 2010 at 11:28 PM, Venkatraman S venka...@gmail.com wrote: On Wed, Dec 15, 2010 at 11:22 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: There are quite a few projects that create wikipedia dumps. What kind of dump are you talking about... http://en.wikipedia.org/wiki/Wikipedia:Database_download#English-language_Wikipedia I need the pages-articles.xml.bz2 mentioned there. Well, what prevents you from downloading it ? ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Fwd: [OT] Wikipedia
On Thu, Dec 16, 2010 at 12:26 AM, JAGANADH G jagana...@gmail.com wrote: On Wed, Dec 15, 2010 at 11:44 PM, Venkatraman S venka...@gmail.com wrote: On Wed, Dec 15, 2010 at 11:35 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: Well, what prevents you from downloading it ? I do not want to consume so much of Wikipedia's bandwidth when it can be used for serving other users. Look at something like evopedia to create your own wikipedia dumps. http://gitorious.org/evopedia/ Do you have more than 600 GB space available ? The total volume of 7zip file is about 70 GB . Unzipping it will result around 600 GB -- ** JAGANADH G http://jaganadhg.freeflux.net/blog ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Refactoring
On Mon, Dec 6, 2010 at 9:41 PM, Vijay Ramachandran vijay...@gmail.comwrote: On Fri, Dec 3, 2010 at 11:35 AM, Anand Balachandran Pillai abpil...@gmail.com wrote: Sorry to follow up my post with another one, but here is an old link fro JOS related to this, which is still relevant. http://www.joelonsoftware.com/articles/fog69.html This post talks about completely throwing away the old code base - rewriting - and not refactoring. The former is typically motivated by the universal disdain one feels about inherited code and a certain amount of hubris, the second is motivated by pragmatism, and a need to change the code base to make it more maintainable and extensible. Two completely different things! Exactly. What I was trying to say is, refactor as much as possible and only throw away and rewrite in the absolutely worst case scenario which is what the article also illustrates with popular examples of the 90s. The moot point is that very few people actually throw away and rewrite, almost never in the open source world. Open source is equivalent to iterative refactoring in a way. cheers, Vijay -- http://www.wisdomtap.in/ - find the right products to buy! ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] refactoring
On Sun, Dec 5, 2010 at 3:03 PM, Siddharta G siddharta.li...@gmail.comwrote: Refactoring just means changing the internals without adding/removing functionality. The book is good, but refactoring can be applied in many other contexts too. It has been happening long before the book came out. The big insight in the book is not the refactoring patterns themselves. The big insight is that its possible to make fairly large changes using small steps where the application does not break at any of the intermediate steps. It changes your thinking from I need to rewrite retest to go from A - B, now its like how can I go there in small steps without breaking anything in the middle. Unless you plan to keep rewriting your app everything a change comes along, I do agree that a self respecting developer needs to know refactoring (the concept, not the book) Refactoring myths - - If I write perfect code the first time, then I don't need to refactor: Wrong! Requirements change, and then your perfect code is no longer suitable, so you'll have to go in and change the design before you can implement new functionality. Thats refactoring. - Refactoring means cleaning up bad code: Wrong! See above. - Refactoring is only for OO code: Wrong! You can refactor anything, even imperative of functional programs. I have used refactoring (including some patterns from the book) on C programs. - I have not seen refactoring used on open source projects: Wrong! At least on the django project refactoring occurs _very often_ to support new functionality. When multiple database support was introduced, the ORM design (which only supported single database) was refactored without changing existing functionality. After that the multi-database feature was added. Django has a policy of having unit tests for _all_ functionality, just to support easy refactoring. I'm pretty sure it happens in all large projects. - Refactoring is only for code. Wrong! We recently released a second product which sits along with our first one, and it required completely changing the architecture of the first one - we refactored the architecture to support the new product over 3 months deploying small changes at a time. Architecture changes, server configurations, database structure - everything was changed making small changes every week on a running production system with no downtime - thats refactoring too. That is re-architecting or re-designing depending on which side of the conference table you are - not re-factoring. -- Siddharta ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] refactoring
On Sun, Dec 5, 2010 at 4:53 PM, Siddharta G siddharta.li...@gmail.comwrote: On Sun, Dec 5, 2010 at 4:07 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: That is re-architecting or re-designing depending on which side of the conference table you are - not re-factoring. Err... Refactoring _is_ redesigning, that is the whole purpose of refactoring. The difference is that traditional rearchitecting/redesiging is taking down the existing design and rewriting the application with a new design. Refactoring is doing it in such a way that you can go from A - B in small steps without breaking the app at any point. I understand the difference. You mentioned Architecture changes which doesn't belong to re-factoring. In a way, the whole re-writing vs re-factoring thing is a bit blown-up since the answer to the most important question Who throws away an entire piece of code and re-writes it from scratch is Not many, unless the code is highly experimental, a prototype, is a personal project (with not many users), or has hit the critical limit of usability and extensibility in its current state, so that it has to be re-written from scratch. So, most of us do re-factoring or whatever you may want to call it, almost routinely, whether it is at a code, design or architectural level. -- Siddharta ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] refactoring
On Fri, Dec 3, 2010 at 2:44 PM, Kenneth Gonsalves law...@au-kbc.org wrote: On Fri, 2010-12-03 at 09:51 +0530, Sriram Narayanan wrote: Please point me to any use of strong words against of what many of us follow. http://article.gmane.org/gmane.org.user-groups.linux.ilugc/66657 Kenneth, you quoted somewhat out of context! If you had also quoted the 3 lines above the one we are discussing, I wouldn't even have bothered to reply in the first place : ) -- regards Kenneth Gonsalves ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] refactoring
On Fri, Dec 3, 2010 at 10:04 AM, Senthil Kumaran orsent...@gmail.comwrote: On Fri, Dec 03, 2010 at 09:51:43AM +0530, Sriram Narayanan wrote: Please point me to any use of strong words against of what many of us follow. That refactoring and that self-respect thing. The first is what many practise, and second is a strong word. :) +1. Many practice refactoring without the buzz surrounding it. Code reviews, rewrites etc are things software developers do daily - it is part of their bread and butter. However refactoring as discussed here is a more of a standardized process using tools and approaches designed for it, with some little buzz added to the mix. Refactoring assumes that the implementation of the code is not closely tied with its interfaces. In other words, it assumes some amount of separation of concerns which will allow to modify the inner guts without changing the external behavior of the code. This may not be true with badly written or maintained systems, which is why many people shudder at the thought of refactoring their code base. In such houses the thinking is, if it works, leave it alone, an attitude that is the exact opposite of the refactor. I think, the thread got a bit digressed. You should share your practises in the conferences and it would be well received by many. Thanks, Senthil ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] refactoring
On Fri, Dec 3, 2010 at 11:35 AM, Anand Balachandran Pillai abpil...@gmail.com wrote: Sorry to follow up my post with another one, but here is an old link fro JOS related to this, which is still relevant. http://www.joelonsoftware.com/articles/fog69.html -- --Anand -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Can two django projects be made to communicate to each other
On Wed, Dec 1, 2010 at 11:40 AM, Anubha Dadhich sethi.anu...@gmail.comwrote: Hi, Can two django projects be made to communicate with each other and share the same session, user_authentication etc., either at the application level or at the production server level (say apache) Explaining it further - Say there are two django projects, with different settings file, but sharing the same database, can they be made to run on the same port? Or else, say one project is running on port and the other project is running on port , can apache be configured in such a way that the user does not come to know about the switch in port when a request is sent from the url. i.e. say there are two requests i). www.test.com:/account/login -- project1 ii). www.test.com:/profile -- project2 can there be any configuration setting so that the user does not have to provide the port number explicitly to tell apache that the two requests are actually to two different projects and can simply send the request as i) www.test.com/account/login -- project1 ii) www.test.com/profile -- project2 Just wanted to confirm if such a setting is possible or not. If yes, then plz provide some information on how to achieve this. This is out of context to the question posted, but just wanted to point out this as a very GOOD example of how to make a post asking for help in forums like this. A bane of programming forums such as ours is badly posted questions, of which we get our good share every month. I don't remember the number of times I posted ESR's how to ask questions the smart way in this list as reply to badly posted questions. This is a very good illustration of posting questions the smarter way. +1 -- Anubha Dadhich ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Object Oriented Python - Advice on books
On Wed, Dec 1, 2010 at 3:24 PM, Kenneth Gonsalves law...@au-kbc.org wrote: also python in a nutshell. btw, I have been using classes for a long time - got into it with wxPython - but does using classes mean one is doing OOP? Fond memories of this book. Was the first and only Python book I ever bought. I learned most of my Python from this apart from the online tutorial. A couple of years later, realized this is supposed to be a heavy book and not meant for starters. But then I had already started with this, so never felt it that way... :) -- regards Kenneth Gonsalves ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] refactoring
On Wed, Dec 1, 2010 at 7:33 PM, Noufal Ibrahim nou...@gmail.com wrote: On Wed, Dec 01 2010, Kenneth Gonsalves wrote: [...] 'No self respecting developer could function without having read the refactoring book'. I just realized that I am not a self-respecting developer after reading this. Will try to keep it that way by continuing to avoid this book... -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python version 2.x or 3.x
On Wed, Dec 1, 2010 at 10:55 PM, Jins Thomas jinstho...@gmail.com wrote: Hi all, Would like to ask one more doubt regarding which version we should concentrate, considering a newbie to python. If your idea is to learn the language and its tools while being on cutting-edge you should start with Python 3.x. Especially if you don't plan to do any immediate projects in it that could require third-party libraries. If your idea is to learn the language to solve a problem at hand that could require third-party libraries, start with 2.6.x or 2.7.x. Most 3.x features are back-ported to either of these so you don't loose much but also can use many 3rd party stuff since they are all 2.x compatible. If someone asks me to say this in a single word, I always recommend 2.7.x. Cheers Jins Thomas ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Light a candle for 26/11 and Show you remember
On Mon, Nov 29, 2010 at 2:00 PM, Smrutilekha Swain smrutile...@gmail.comwrote: Hi bangpypers@python.org , I just light a candle for 26/11. It is time to show that we have neither forgiven nor forgotten 26/11. It is time to remember those who paid with their lives for the fanaticism of a few, to salute those who gave up their lives trying to shield others, and to honor those who survived the ordeal of terror. It is time to light a candle, to show that as we move on, we cherish their memories, we value their sacrifice and we hail their courage. Please Light a Candle Now at: http://www.indiajaiho.com/LightACandle.htm While appreciating the sentiment which we all share, this is not really the forum for sending such emails. This is a professional forum for only Python language related discussions only. Please refrain from posting non-topic related matters here. Warm Regards, Smrutilekha Swain ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers Regards, -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] regular expression for Indian landline numbers
On Thu, Nov 25, 2010 at 3:11 PM, Kenneth Gonsalves law...@au-kbc.orgwrote: hi, on looking at the telephone book, Indian landline numbers have three forms 3 digit STD code followed by 8 digits 4 digit STD code followed by 7 digits 5 digit STD code followed by 6 digits the first digit of the STD code has to be 0. The first digit of the landline number starts from 1-6. Of course I am not dead sure of the starting numbers, but I have seen mobile numbers starting with 9 and 8, and I think 7 is also reserved for mobile. I could not find any authorative info on this. This is the re: r'(^0\d{2}[-\s]{1}[1-6]{1}\d{7})|(^0\d{3}[-\s]{1}[1-6]{1}\d{6})|(^0 \d{4}[-\s]{1}[1-6]{1}\d{5})' It is doable, but you should really use pyparsing for this - this is UGLY ! :) Meanwhile, let me hack on it. any clues on how to make it shorter? And any info as to whether my assumptions as to the landline numbers is correct? -- regards Kenneth Gonsalves ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] regular expression for Indian landline numbers
On Thu, Nov 25, 2010 at 3:11 PM, Kenneth Gonsalves law...@au-kbc.orgwrote: hi, on looking at the telephone book, Indian landline numbers have three forms 3 digit STD code followed by 8 digits 4 digit STD code followed by 7 digits 5 digit STD code followed by 6 digits the first digit of the STD code has to be 0. The first digit of the landline number starts from 1-6. Of course I am not dead sure of the starting numbers, but I have seen mobile numbers starting with 9 and 8, and I think 7 is also reserved for mobile. I could not find any authorative info on this. This is the re: r'(^0\d{2}[-\s]{1}[1-6]{1}\d{7})|(^0\d{3}[-\s]{1}[1-6]{1}\d{6})|(^0 \d{4}[-\s]{1}[1-6]{1}\d{5})' any clues on how to make it shorter? And any info as to whether my assumptions as to the landline numbers is correct? Your regex is complicated because you are putting all rules into a single regex. There are different ways to make this shorter. The best option according to me is to define two regexes, one for the STD code part and the other for the number part. So in this case, it will be like, std=re.compile(r'(^0\d{2,4})') num=re.compile(r'([1-6]{1}\d{6,8})') number='080-25936609' Find out the lengths of the std and number parts. l1=len(std.findall(number.split('-')[0])[0]) l1 3 l2=len(num.findall(number.split('-')[1])[0]) l2 8 And do the rest in code. If (((l1==3) and (l2==8)) or ... ): print 'valid number' else: print 'invalid number' The second option which I don't favor is to split the rule into 3 regexes instead of ORing them together and then do a simple OR in code. r1=re.compile(r'(^0\d{2}[-\s]{1}[1-6]{1}\d{7})') r2=re.compile(r'(^0\d{3}[-\s]{1}[1-6]{1}\d{6})') r3=re.compile(r'(^0\d{4}[-\s]{1}[1-6]{1}\d{5})') Then of course, if (r1.match(num) or r2.match(num) or r3.match(num)): print 'valid' else: print 'invalid' If you can't use *any* code and absolutely has to do this directly in regex, revert back to your original one. There is no other way to do this using the re module. --Anand -- regards Kenneth Gonsalves ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] [Announcement] Training on Extending Python using C
On Wed, Nov 24, 2010 at 10:06 AM, Roshan Mathews rmath...@gmail.com wrote: On Wed, Nov 24, 2010 at 09:54, Noufal Ibrahim nou...@gmail.com wrote: I considered making it a free thing but dropped the idea. Preparing something complete with notes and stuff takes up a considerable amount of time (as I've found out) and I simply cannot just do it in my free time. I've put my projects on hold to do this properly. I've even half built an Emacs mode that will help in presenting the code. Designing and testing all aspects of this course is pretty much my day job right now. Fwiw, I still think this is fantastic. I don't think you should share the notes for a paid talk (except maybe a teaser) unless you want to, and I wouldn't have asked if I had realized it wasn't free. I see nothing wrong in Roshan asking for the material though he might have missed it is a paid talk. He has a point even if inadvertently. IMHO, now a days, the right thing to do is to actually share the material even if the actual talk is a paid one. People are paying mainly for being in the class and getting taught by the speaker, not only for the teaching material. If the lecture is good, people will still come though the material is free. If not the whole material, then at least the code samples. All the best for the talk. Roshan -- http://about.me/rosh ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Looking for recommendation for Python image-processing library
On Mon, Nov 15, 2010 at 4:20 PM, Senthil Kumaran orsent...@gmail.comwrote: On Mon, Nov 15, 2010 at 12:34:56AM +0530, Gora Mohanty wrote: Given this, we have no option but to start looking at other alternatives. ImageMagick is one possibility, and indeed, we are already using it in some areas. I would I have heard positively of ImageMagick's python wrapper for doing Image Processing where PIL is not sufficient. For most of my simple needs PIL was enough. If ImageMagick has what you are looking for, I think you should safely go for it. It well maintained when compared to PIL and sure it has wealth options too Have you used scipy ndimage ? http://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html -- Senthil ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] task tracker and issue manager
On Tue, Oct 26, 2010 at 10:20 AM, Kenneth Gonsalves law...@au-kbc.orgwrote: On Mon, 2010-10-25 at 18:00 +0530, Kenneth Gonsalves wrote: On Mon, 2010-10-25 at 17:51 +0530, Rajeev J Sebastian wrote: I'm currently developing a task/issue management system; Django based. Currently I havent made it open source (need to improve further before I do that), but I'm using it in production. open source it and we can help to improve it am serious about this - nothing like having a django based issue tracker. And for an open source project there is no need to wait for improvements before releasing it. It shouldn't be too difficult to implement one's own issue tracker on Django. Maybe I will give it a try one day. I expect 1-2 week of day-night hacking (coding) and it should be ready. Only one problem - I dont have the motivation to do one right now :) -- regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] When *not* to use Python
On Mon, Oct 25, 2010 at 7:33 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Wed, Oct 20, 2010 at 4:57 PM, Noufal Ibrahim nou...@gmail.com wrote: Assuming that most of the people here are mostly python enthusiasts or learners, I'm wondering when you would *not* use Python. Let's not conflate this with Open Source/Closed Source etc. Python is the language which has (what in business terms is coined as) the right of first refusal. ie. evaluate something whether it really makes sense in python, and if not in python then start exploring what else. The primary reasons which may encourage me to use a language other than python are : a. Need for raw CPU power. Yes there are a few of such use cases. When purely CPU driven and when you really really need the CPU badly (which is probably less than 5% cases) python performance is really poor. b. Need for high amounts of multithreading even while being largely CPU bound. Yes - both situations can be handled by escaping to C from python, but I would much rather handle these in Java (or languages based on JVM) rather than C unless I am in a very constrained hardware situation. On a separate note I do believe as we start heading towards the 32 core situation (say in 5 yrs time) - there better exist a better solution than the GIL :) I think we should move from the thinking that concurrency = threading and move over to better solutions in languages like Python which have better ways of solving the concurrency problem than actually having to create OS level threads. If you look at it differently, concurrency is the real problem and threading is just one approach to it which is kind of resource intensive and doesn't work great in Python due to the GIL. But instead of GIL bashing, one should look at other approaches to concurrency such as generator based co-operative threading and also look at numerous other concurrency libraries in Python before deciding that going the way of actual threads is his solution. The following article by Michele Simionato tries to drive home the same point. It is a good read, except the parts where he is trying to plug his concurrency library into it :) http://www.artima.com/weblogs/viewpost.jsp?thread=299551 Python should go the direction shown by languages such as Erlang which has true user-space multitasking with light-weight processes. It already has the infrastructure for it with generators etc but support for true multitasking at user level should be part of the language rather than added on by third party libraries. Right now if one decides to explore Python concurrency, the scene is truly confusing and a little scary, since there are too many approaches out there which also share a lot of similarities. Hopefully the futures have something to offer here :) --Anand -- ~noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] task tracker and issue manager
On Wed, Oct 20, 2010 at 11:57 AM, JAGANADH G jagana...@gmail.com wrote: On Wed, Oct 20, 2010 at 10:52 AM, Kenneth Gonsalves law...@au-kbc.org wrote: On Wed, 2010-10-20 at 10:49 +0530, Nigel Babu wrote: Have you tried Redmine? Its built on ruby and I was recommended it multiple times. Not sure how good it is though. heard good things about it - but as you said it is built on Ruby - I want python. Even if it is in Ruby it is good. I am using it to manage my team activities in my office . There is a bitnami stack available for Redmine which makes the installation easy Blasphemy ! How dare you discuss Ruby in a all-Python list ! :) :) -- ** JAGANADH G http://jaganadhg.freeflux.net/blog ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] When *not* to use Python
On Wed, Oct 20, 2010 at 4:57 PM, Noufal Ibrahim nou...@gmail.com wrote: The project management thread highlighted this issue of if it's not in Python, I don't want to use it. Assuming that most of the people here are mostly python enthusiasts or learners, I'm wondering when you would *not* use Python. Let's not conflate this with Open Source/Closed Source etc. I'm just interested in situations where you'd stay away from something *just* because it isn't in Python. The only reason I'd stay away from something like this is if I needed to work on it's code and it was in a language that I wasn't familiar with and didn't have the time to learn. Also, there are plently of situations where I'd jump to a language other than Python at the outset (e.g. for log file parsing, Perl still wins for me). Maybe for rough n dirty use-once-and-throw parsers, but if you want to write reusable parser classes, Python can do an amazing job at it. You should be pretty good at using the re module and if possible have experience writing custom parsers and preferably burnt your fingers trying to understand the HTMLParser module :) I spent like 2 months in HP developing a log file reverse parser application for finding out software install times from the log files. All code in Python. I guess (and hope) they still use it there :) Comments? -- ~noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers