Re: [BangPypers] [OT] Yahoo Big Thinkers talk
OMG. I was the one who was trying to suggest that we be lenient. But this looks that fodder for yet another discussion. :( On Wed, Nov 9, 2011 at 4:48 PM, Sanjay Padubidri sanjaypadubi...@gmail.com wrote: Off topic, but people on the list may be interested in this talk: http://in.bigthinkers.yahoo.com/event.php?id=19 Topic: Representing Knowledge in Computers: A Surprising Development from the 1980’s and Its Importance for Today’s World By: Dr. Ronald J. Brachman, Vice President of Yahoo! Labs and Research Operations -Sanjay Padubidri ___ 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
Re: [BangPypers] [OT] Yahoo Big Thinkers talk
On Wed, Nov 9, 2011 at 3:44 PM, Senthil Kumaran sent...@uthcode.com wrote: OMG. I was the one who was trying to suggest that we be lenient. But this looks that fodder for yet another discussion. :( I dont see a problem. The OP has clearly mentioned it as OT, and am sure this talk would benefit many. -V http://blizzardzblogs.blogspot.com/ ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] Seeks Professional Guidance ?
Hi to all Greetings from vishnu prasad gaddam, am working in call centre i would like to continue my carrer in open source especially in python language can u tell me python is related to web development how it is suppose to explore with django frame work ?is there any fresher job openings related to python ?how much knowledge they can expect as a fresher in python ? Please suggest and guide me? is there any meets regularly conducting in bangalore ? thanks and regards Vishnu Prasad ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Seeks Professional Guidance ?
On Wed, 2011-11-09 at 16:45 +0530, vishnu prasad wrote: Greetings from vishnu prasad gaddam, am working in call centre i would like to continue my carrer in open source especially in python language can u tell me python is related to web development how it is suppose to explore with django frame work ? could you explain what you mean? is there any fresher job openings related to python yes - many ?how much knowledge they can expect as a fresher in python ? you should know how to write a decorator. -- regards Kenneth Gonsalves ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] collections
hi, python collections are cool and I am dying to use them in production. But so far I am yet to find a use case for using them - any experiences? -- regards Kenneth Gonsalves ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] collections
On Wed, Nov 9, 2011 at 5:05 PM, Kenneth Gonsalves law...@gmail.com wrote: hi, python collections are cool and I am dying to use them in production. But so far I am yet to find a use case for using them - any experiences? I'm assuming you mean the Python collections package that provides 'High-performance container datatypes'. We use defaultdict to good effect at work, but as far as I can tell, that's the only one we use from that package; other than Callable that I used in a bunch of test utilities, but that usage wasn't really valuable. Sorry if I wan't much help. - d ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] collections
On Wed, 2011-11-09 at 17:23 +0530, Saager Mhatre wrote: python collections are cool and I am dying to use them in production. But so far I am yet to find a use case for using them - any experiences? I'm assuming you mean the Python collections package that provides 'High-performance container datatypes'. yes We use defaultdict to good effect at work, but as far as I can tell, that's the only one we use from that package; other than Callable that I used in a bunch of test utilities, but that usage wasn't really valuable. but it must be useful for *something* ;-) -- regards Kenneth Gonsalves ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Seeks Professional Guidance ?
On Wed, Nov 9, 2011 at 4:49 PM, Kenneth Gonsalves law...@gmail.com wrote: On Wed, 2011-11-09 at 16:45 +0530, vishnu prasad wrote: Greetings from vishnu prasad gaddam, am working in call centre i would like to continue my carrer in open source especially in python language can u tell me python is related to web development how it is suppose to explore with django frame work ? All the best. We will be glad to help you out, if you provide information like your programming background in case any ? could you explain what you mean? is there any fresher job openings related to python yes - many Don't target to learn python for particular job. Once you have basic foundation on python, you can pick things easily but you need to spend considerable amount of time. ?how much knowledge they can expect as a fresher in python ? That depends on company and job specification. -- * Talk is cheap, show me the code - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * ___ 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' ... HTH, cheers, - steve Kudos, Steve. This is definitely the best answer which I have seen in this discussion group, all these years. I think you have set an example on how an experienced hand should direct a not so-experienced one. Many Many Thanks Ramdas S +91 9342 583 065 ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] collections
On Wed, Nov 9, 2011 at 5:30 PM, Kenneth Gonsalves law...@gmail.com wrote: On Wed, 2011-11-09 at 17:23 +0530, Saager Mhatre wrote: [snip] other than Callable that I used in a bunch of test utilities, but that usage wasn't really valuable. but it must be useful for *something* ;-) Not really, initially I thought I might actually have to extend Callable for the callable function to consider objects of my class... callable. :) But, it turns out you pretty much just need a __call__ attribute in the object for callable to return true. So it's mostly vestigial in the code. - d ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Seeks Professional Guidance ?
vishnu prasad vishnuprasadgad...@gmail.com writes: Hi to all Greetings from vishnu prasad gaddam, am working in call centre i would like to continue my carrer in open source especially in python language can u tell me python is related to web development how it is suppose to explore with django frame work ?is there any fresher job openings related to python ?how much knowledge they can expect as a fresher in python ? Please suggest and guide me? is there any meets regularly conducting in bangalore ? [...] Do you have any prior programming experience? We'd probably be able to respond better then. -- ~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