Re: use Python to post image to Facebook

2012-04-10 Thread Shashank Singh
of which apparently Forgot the refs: [1]https://github.com/facebook/fbconsole; http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/ [2]https://github.com/jgorset/facepy -- http://mail.python.org/mailman/listinfo/python-list -- Regards Shashank Singh http

Re: How to filter a dictionary ?

2012-04-10 Thread Shashank Singh
value pairs -- Regards Shashank Singh http://www.flipora.com http://r http://www.cse.iitb.ac.in/~shashanksinghationalpie.wordpress.com -- http://mail.python.org/mailman/listinfo/python-list

Re: How to filter a dictionary ?

2012-04-10 Thread Shashank Singh
On Tue, Apr 10, 2012 at 12:16 AM, Dave Angel d...@davea.name wrote: On 04/10/2012 02:04 AM, Shashank Singh wrote: On Mon, Apr 9, 2012 at 10:49 PM, Nikhil Verma varma.nikhi...@gmail.com wrote: SNIP I am trying this but its giving me a generator object. In [9]: (k for k,v

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Shashank Singh
to [] by checking for None inside the function def f(a=None): if a is None: a = [] -- Regards Shashank Singh http://rationalpie.wordpress.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to insert sorted in a list

2011-06-17 Thread Shashank Singh
in a list ? -- http://mail.python.org/mailman/listinfo/python-list -- Regards Shashank Singh http://www.cse.iitb.ac.in/~shashanksingh -- http://mail.python.org/mailman/listinfo/python-list

Re: How to stop iteration

2011-06-05 Thread Shashank Singh
', 'le', ' p', 'yt', 'ho', 'n ', 'pr', 'og', 'ra', 'mm', 'in', 'g'] In this case you are actually using the return values (and not changing a global variable). HTH -- Regards Shashank Singh http://www.cse.iitb.ac.in/~shashanksingh -- http://mail.python.org/mailman/listinfo/python-list

Re: Final state of underlying sequence in islice

2010-11-06 Thread Shashank Singh
sure that the parameters are such that such cases don't arise but I would still like to see python doing the best possible thing as far as possible. -- Regards Shashank Singh shashank.sunny.si...@gmail.com http://www.cse.iitb.ac.in/~shashanksinghhttp://www.cse.iitb.ac.in/%7Eshashanksingh

Final state of underlying sequence in islice

2010-11-04 Thread Shashank Singh
://docs.python.org/library/itertools.html#itertools.islice -- Regards Shashank Singh shashank.sunny.si...@gmail.com http://www.cse.iitb.ac.in/~shashanksinghhttp://www.cse.iitb.ac.in/%7Eshashanksingh -- http://mail.python.org/mailman/listinfo/python-list

Re: That interesting notation used to describe how long a loop will take.

2010-10-04 Thread Shashank Singh
a concise name. Thanks, Tobiah -- http://mail.python.org/mailman/listinfo/python-list -- Regards Shashank Singh shashank.sunny.si...@gmail.com http://www.cse.iitb.ac.in/~shashanksinghhttp://www.cse.iitb.ac.in/%7Eshashanksingh -- http://mail.python.org/mailman/listinfo/python-list

Re: Reversing a List

2010-09-01 Thread Shashank Singh
-list -- Regards Shashank Singh Senior Undergraduate, Department of Computer Science and Engineering Indian Institute of Technology Bombay shashank.sunny.si...@gmail.com http://www.cse.iitb.ac.in/~shashanksingh -- http://mail.python.org/mailman/listinfo/python-list

Re: Two minor questions on Class

2010-07-30 Thread Shashank Singh
On Fri, Jul 30, 2010 at 10:53 PM, joy99 subhakolkata1...@gmail.com wrote: class Person(object): def _init_(self,name,age): self.name=name self.age=age constructor has double underscores (both as prefix and suffix) __init__ -- Regards Shashank Singh

Fastest way to apply a function to an iterable

2010-05-26 Thread Shashank Singh
suggestions will be appreciated. TIA -- Regards Shashank Singh Senior Undergraduate, Department of Computer Science and Engineering Indian Institute of Technology Bombay shashank.sunny.si...@gmail.com http://www.cse.iitb.ac.in/~shashanksingh -- http://mail.python.org/mailman/listinfo/python-list

Re: Fastest way to apply a function to an iterable

2010-05-26 Thread Shashank Singh
/imap. Another problem with map/imap is that the memory cost is dependent on the length of the list (because of the intermediate mapped list stored) which is not the case for simple for loop. I hope I have explained it better this time. -- Regards Shashank Singh Senior Undergraduate, Department

Re: Help regarding XML file manipulation

2010-05-25 Thread Shashank Singh
the value of nodes will not automatically do that. HTH -S Thanks ~S -- http://mail.python.org/mailman/listinfo/python-list -- Regards Shashank Singh Senior Undergraduate, Department of Computer Science and Engineering Indian Institute of Technology Bombay shashank.sunny.si...@gmail.com

Re: an element from a set

2010-05-15 Thread Shashank Singh
-- Regards Shashank Singh Senior Undergraduate, Department of Computer Science and Engineering Indian Institute of Technology Bombay shashank.sunny.si...@gmail.com http://www.cse.iitb.ac.in/~shashanksingh -- http://mail.python.org/mailman/listinfo/python-list

Re: Fastest way to calculate leading whitespace

2010-05-08 Thread Shashank Singh
of solutions people might have. Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list -- Regards Shashank Singh Senior Undergraduate, Department of Computer Science and Engineering Indian Institute of Technology Bombay shashank.sunny.si...@gmail.com http://www.cse.iitb.ac.in

Re:

2010-05-01 Thread Shashank Singh
then it should write that as doubtful and rest it should write as error. Thanks, -- http://mail.python.org/mailman/listinfo/python-list -- Regards Shashank Singh Senior Undergraduate, Department of Computer Science and Engineering Indian Institute of Technology Bombay shashank.sunny.si

Re: Help needed in downloading Brown corpus

2010-05-01 Thread Shashank Singh
how to solve my downloading problem or how to get Brown Corpus from some other link. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list -- Regards Shashank Singh Senior Undergraduate, Department of Computer Science and Engineering Indian Institute of Technology Bombay

Re: Behavior of default parameter in a function

2010-03-11 Thread Shashank Singh
.' Thanks Jitendra Kumar -- http://mail.python.org/mailman/listinfo/python-list -- Regards Shashank Singh Senior Undergraduate, Department of Computer Science and Engineering Indian Institute of Technology Bombay shashank.sunny.si...@gmail.com http://www.cse.iitb.ac.in/~shashanksingh

Re: Too Many Values To Unpack

2009-11-20 Thread Shashank Singh
, level = 0): MAXLEVEL = 7 if level MAXLEVEL: return #possibly the data has a cycle/loop for (nm, dt) in levelDict: Are you sure your key values are 2-tuples in levelDict? For-each on dicts enumerates the keys AFAIK -- Regards Shashank Singh Senior Undergraduate, Department of Computer

(Simple?) Unicode Question

2009-08-27 Thread Shashank Singh
Hi All! I have a very simple (and probably stupid) question eluding me. When exactly is the char-set information needed? To make my question clear consider reading a file. While reading a file, all I get is basically an array of bytes. Now suppose a file has 10 bytes in it (all is data, no