Re: [BangPypers] Asynchronous method calls in python

2014-11-21 Thread Sriram Karra
On Fri, Oct 10, 2014 at 2:06 PM, Okan bhan rajalo...@gmail.com wrote: Hi, I'm working on an appengine + flask application which makes multiple requests to third party APIs as part of one request. All of these are independent. Have you explored Appengine Task Queues?

Re: [BangPypers] Return values

2014-09-20 Thread Sriram Karra
On Sat, Sep 20, 2014 at 2:50 PM, Senthil Kumaran sent...@uthcode.com wrote: One option to me looks like, don't have consolidate as parameter for this function, but do the operation outside. Like providing a function called get_consolidated_stats, which will call get_stats and provide the

Re: [BangPypers] Return values

2014-09-20 Thread Sriram Karra
On Sat, Sep 20, 2014 at 4:18 PM, Noufal Ibrahim KV nou...@nibrahim.net.in wrote: On Sat, Sep 20 2014, Harish Vishwanath wrote: Couple of approaches: - Break the api into two. get_stats and get_stats_consolidated. This way, the caller who doesn't know what is your default value of

Re: [BangPypers] Return values

2014-09-20 Thread Sriram Karra
On Sat, Sep 20, 2014 at 4:24 PM, Noufal Ibrahim KV nou...@nibrahim.net.in wrote: This approach (especially with many calls) will make the API really big. I don't remember but I've seen things with get_something, get_something_list, get_something_dict and what not which don't really help

Re: [BangPypers] Return values

2014-09-20 Thread Sriram Karra
On Sat, Sep 20, 2014 at 4:47 PM, Noufal Ibrahim KV nou...@nibrahim.net.in wrote: Of course but the API should hide that in a neat way from you shouldn't it? If I have two switches an operation, I'd still like to have just one function. Not 4 representing all the combinations. I will agree

Re: [BangPypers] Return values

2014-09-20 Thread Sriram Karra
On Sat, Sep 20, 2014 at 5:15 PM, Noufal Ibrahim KV nou...@nibrahim.net.in wrote: From the thread so far, Anand's solution is the one I like best. Although it's something tailored for my problem rather than a general pattern. Anand's solution is good. But with the added context you have

[BangPypers] [OT] [Commercial] HackerRank looking for freelancers to frame questions to test Python skills

2014-09-05 Thread Sriram Karra
based on quality and coverage. If you are interested in contributing, you can reply to me *off-list.* Thank you, -Karra -- Sriram Karra Director, Products HackerRank http://www.hackerrank.com/aboutus ___ BangPypers mailing list BangPypers@python.org

Re: [BangPypers] class instance getting passed to other class obj creation

2014-03-09 Thread Sriram Karra
If your login is a simple action I would not even make it a separate class. You should revisit your class hierarchy. On Mar 9, 2014 4:38 PM, Nitin Kumar nitin.n...@gmail.com wrote: Hi All, I am looking for some better way to implement below scenario. Say there is a class login class

[BangPypers] Best python source browsing tool for Mac + Emacs / Sublime

2013-12-30 Thread Sriram Karra
In a different era I used cscope and etags for browing massive C/C++ code bases. In this day and age I would like to believe there are better source browsing/navigation tools that should be available. Any particular tool(s) that really stand out? ___

Re: [BangPypers] Best python source browsing tool for Mac + Emacs / Sublime

2013-12-30 Thread Sriram Karra
On Mon, Dec 30, 2013 at 10:27 PM, Noufal Ibrahim KV nou...@nibrahim.net.inwrote: With Python, I don't really use tag jumping. With my own code base, if I'm tag jumping and moving around like that, I usually consider that an issue with the way my app is laid out. With other peoples code, I

[BangPypers] [JOB] [OT] Interviewstreet looking for hackers

2013-12-09 Thread Sriram Karra
this industry. Most come from startup backgrounds, and the rest yearn that their next job is a startup of their own. *Salary Perks* We offer excellent pay and perks that match your hacker chops. Let's just say no hacker we have made an offer to has been disappointed. -- Sriram Karra Sr

[BangPypers] Kivy (Was: Re: What are you using for developing desktop GUIs?)

2013-09-30 Thread Sriram Karra
On Kivy: It appears one of the core Kivy developers ( https://plus.google.com/111271939129335069945/posts - Akshay) is from India. Does anyone know more about him? ___ BangPypers mailing list BangPypers@python.org

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Sriram Karra
On Fri, Sep 27, 2013 at 2:19 AM, Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) I always write them as

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Sriram Karra
On Fri, Sep 27, 2013 at 7:06 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: a) What are sample installers one could use to install web based apps on user's machine (users more often than not use simple wizards to install apps) It is a standard python application with a web server

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Sriram Karra
On Fri, Sep 27, 2013 at 7:15 PM, Noufal Ibrahim nou...@nibrahim.net.inwrote: a) your app will look the same across all your platforms (at least the best it can be) as the front end is html/css/js I think you'll get the common denominator. Isn't that the case with any cross-platform

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Sriram Karra
On Fri, Sep 27, 2013 at 8:55 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: In most cases I find users want a installer. Basically just point and click. So if there is no installer where a user selects a install directory and presses a button called install (and perhaps a couple of app

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Sriram Karra
On Fri, Sep 27, 2013 at 7:35 PM, Noufal Ibrahim nou...@nibrahim.net.inwrote: I guess YMMV but if a local app launches a web server and a browser to get things done, it's a deal breaker for me. In this case starting a web server can be nothing more than executing a few hundreds of lines of

[BangPypers] Open Source API Management platforms in Python

2013-05-13 Thread Sriram Karra
Is there such a thing? I am looking for something along the lines of Mashery or Apiphany - roughly. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] SQLAlchemy and 'non-trivial' default values for a column

2013-02-19 Thread Sriram Karra
On Mon, Feb 18, 2013 at 2:29 PM, Kiran Jonnalagadda j...@pobox.com wrote: The trick is to override __init__ and set the value of the column to an SQL expression that is evaluated database-side on commit. In my case, I'm checking for the max value from existing instances that share the same

Re: [BangPypers] SQLAlchemy and 'non-trivial' default values for a column

2013-02-11 Thread Sriram Karra
On Wed, Feb 6, 2013 at 12:05 PM, Dhruv Baldawa dhruvbald...@gmail.comwrote: OK I misread. Let me see if I understood your problem correctly. 1. All the consultations will be stored in that table. 2. When you have a Consultation object, you need a `consultation_count` property for

Re: [BangPypers] SQLAlchemy and 'non-trivial' default values for a column

2013-02-11 Thread Sriram Karra
On Wed, Feb 6, 2013 at 1:37 PM, Thava Alagu thavam...@gmail.com wrote: Hi Karra, Since you want more flexible system, I recommend that you add more columns-- apt date, reservation date, actual visit date and *time* of consultation. I have some of those fields, but did not show them in my

Re: [BangPypers] SQLAlchemy and 'non-trivial' default values for a column

2013-02-11 Thread Sriram Karra
On Tue, Feb 12, 2013 at 9:08 AM, Dhruv Baldawa dhruvbald...@gmail.comwrote: Yes, this will be consistent. Just to explain in brief how it works. The default function gets executed in runtime, when a new record is created, it just go throughs the database, finds the number of records for that

Re: [BangPypers] SQLAlchemy and 'non-trivial' default values for a column

2013-02-11 Thread Sriram Karra
On Tue, Feb 12, 2013 at 11:38 AM, Dhruv Baldawa dhruvbald...@gmail.comwrote: try session.query(Consultation).filter_by(), sorry I am actually used to using the above specified syntax because I usually use Flask-SQLAlchemy. Oh, well. the session object is not available inside Consultation

Re: [BangPypers] Interactive shell for python application

2013-02-05 Thread Sriram Karra
On Mon, Jan 28, 2013 at 7:42 PM, JAGANADH G jagana...@gmail.com wrote: Is there any way to do the same. Any pointers to some examples or tutorials. Er, did you try printing some log messages to keep you updated about the progress? In case you want something more heavy weight: (and perhaps a

Re: [BangPypers] regarding profiling

2012-10-18 Thread Sriram Karra
On Wed, Oct 17, 2012 at 11:33 PM, Basil Kurian basilkur...@gmail.comwrote: Thanks Sriram for the suggestions. This is the puzzle that I 'm trying to solve. https://www.interviewstreet.com/challenges/dashboard/#problem/4ed3f9935ae8b . My program is giving correct output for the sample

Re: [BangPypers] regarding profiling

2012-10-17 Thread Sriram Karra
On Wed, Oct 17, 2012 at 7:42 PM, Basil Kurian basilkur...@gmail.com wrote: Hi I 'm trying out some python puzzles in interviewstreet.com. Most of the time , when I submit my code , during testing process , it will get timed out since the execution is taking too much time (for big input

Re: [BangPypers] Try Ninja IDE

2012-08-21 Thread Sriram Karra
Heh, replies are not mandatory, I, for one, wasn't really holding my breath to see a reply from you to Yoganand's email :) On Tue, Aug 21, 2012 at 9:39 PM, Baishampayan Ghose b.gh...@gmail.comwrote: Please provide links when talking about stuff. It's absurd to expect people to Google just to

Re: [BangPypers] Any standard way in which i can share contacts

2012-07-25 Thread Sriram Karra
On Wed, Jul 25, 2012 at 7:59 AM, Amit Sethi amit.pureene...@gmail.comwrote: Well I am actually not looking for a sync solution but programmatically send sms containing vcard . However the message does not seem to be received as a business card on the phone but as text . What could be the

Re: [BangPypers] Any standard way in which i can share contacts

2012-07-24 Thread Sriram Karra
On Tue, Jul 24, 2012 at 7:35 PM, Amit Sethi amit.pureene...@gmail.comwrote: Has anybody here worked with phonebook contacts. Yes, I have. Is there a standard which major number of phone manufacturers support for electronic business card . Vcard seems to be not supported by

[BangPypers] [X-POST] Introducing PRS: a web-app in Python+SQLAlchemy+Tornado for clinic patient record maintenance

2012-07-23 Thread Sriram Karra
I am associated with a charity clinic in Delhi through a relative who is a consulting doctor there. On his request I have developed a very simple patient history and record management system on a full python stack and released under the GNU Affero GPL. PRS is written as a web application, and

Re: [BangPypers] virdual drive

2012-06-30 Thread Sriram Karra
On Fri, Jun 29, 2012 at 3:10 PM, Nitin Kumar nitin.n...@gmail.com wrote: windows 7/xp As per Tim Roberts: (Tim is very active on the Pywin32 mailing list and is undoubtedly an expert on all things Python+Windows) - Tiziano Bettio wrote: I'm looking for a simple solution of a win32 shell

Re: [BangPypers] converting python to assembly..

2012-06-01 Thread Sriram Karra
On Thu, May 31, 2012 at 11:40 AM, Vishal vsapr...@gmail.com wrote: 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. Have no personal experience with this

[BangPypers] ASynK - Flexible PIM synchronization across Google Contacts, Outlook, Emacs BBDB

2012-06-01 Thread Sriram Karra
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

Re: [BangPypers] ASynK - Flexible PIM synchronization across Google Contacts, Outlook, Emacs BBDB

2012-06-01 Thread Sriram Karra
On Fri, Jun 1, 2012 at 2:12 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: 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. https://github.com/skarra/ASynK As Mandar mentioned, all links on the project

Re: [BangPypers] ASynK - Flexible PIM synchronization across Google Contacts, Outlook, Emacs BBDB

2012-06-01 Thread Sriram Karra
On Fri, Jun 1, 2012 at 2:43 PM, Sriram Karra karra@gmail.com wrote: On Fri, Jun 1, 2012 at 2:12 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: 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

Re: [BangPypers] converting python to assembly..

2012-06-01 Thread Sriram Karra
On Fri, Jun 1, 2012 at 3:25 PM, Vishal vsapr...@gmail.com wrote: 2c-python seems to convert python to its own C equivalent which is then compiled and can be loaded dynamically into the interpreter. Cython / Swig etc can do this already. What interpreter are you referring to? From your

Re: [BangPypers] converting python to assembly..

2012-06-01 Thread Sriram Karra
On Fri, Jun 1, 2012 at 6:44 PM, Vishal vsapr...@gmail.com wrote: a) test.py a very simple 1KB python file with a main function b) _c_test.c a 35KB file that is generated by 2c-py (b) gets generated by the following cmd line: 2c-py -c test.py As you can see the 'c' file

[BangPypers] Expertise in Windows Sockets + Python

2012-06-01 Thread Sriram Karra
Does anyone here know about Windows Sockets enough to fix the problem described at the following link? Would be much appreciated. https://groups.google.com/d/msg/python-tornado/t2hSgydDYOg/czCH7KUQdhYJ Regards, -Karra ___ BangPypers mailing list

[BangPypers] [OT] Brand new Programming Python 4th Ed by Mark Lutz for sale

2012-05-30 Thread Sriram Karra
I ordered this book by mistake. It is a hard cover Indian edition ( http://www.flipkart.com/programming-python-9350232873/p/itmczzj4gpfrr6bs?pid=9789350232873ref=b18616f8-4be8-49ce-a158-1bf91a59540e). It just arrived in the mail and that's when I realized I had screwed up. So it's in mint

Re: [BangPypers] [OT] Brand new Programming Python 4th Ed by Mark Lutz for sale

2012-05-30 Thread Sriram Karra
Oh, well. I'll sell it for 600 if there are any takers... -Karra On Wed, May 30, 2012 at 7:05 PM, Anand Chitipothu anandol...@gmail.comwrote: On Wed, May 30, 2012 at 6:32 PM, Sriram Karra karra@gmail.com wrote: I ordered this book by mistake. It is a hard cover Indian edition

Re: [BangPypers] [OT] Brand new Programming Python 4th Ed by Mark Lutz for sale

2012-05-30 Thread Sriram Karra
Apologies for repeated posts (and top-posting at that). But make it *Rs 600 or best offer*. Now I'll take this off-list. Cheers -Karra On Wed, May 30, 2012 at 7:10 PM, Sriram Karra karra@gmail.com wrote: Oh, well. I'll sell it for 600 if there are any takers... -Karra On Wed, May 30