Thanks so much! However, 'options lang:de' does not exactly the same as would 'lr=lang_de'? Am I right? Since I need number of hits, I would like to have the best, most correct values! :-)
Sincerely, PM On Sat, Nov 20, 2010 at 12:00 PM, <python-list-requ...@python.org> wrote: > Send Python-list mailing list submissions to > python-l...@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-list > or, via email, send a message with subject or body 'help' to > python-list-requ...@python.org > > You can reach the person managing the list at > python-list-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Python-list digest..." > > Today's Topics: > > 1. Re: what's the precision of fractions.Fraction? (Mark Dickinson) > 2. Re: Is it possible to use Google's advanced search options? > (Stefan Sonnenberg-Carstens) > > > ---------- Forwarded message ---------- > From: Mark Dickinson <dicki...@gmail.com> > To: python-l...@python.org > Date: Sat, 20 Nov 2010 01:46:33 -0800 (PST) > Subject: Re: what's the precision of fractions.Fraction? > On Nov 19, 3:29 pm, RJB <rbott...@csusb.edu> wrote: >> Does Fractions remove common factors the way it should? >> >> If it does and you want to find the closest fraction with a smaller >> denominator i think tou'll need some number theory and continued >> fractions. > > Or perhaps just use the existing Fraction.limit_denominator method > (which does indeed use some number theory and continued fractions): > >>>> from fractions import Fraction >>>> from math import pi >>>> Fraction.from_float(pi).limit_denominator(1000) > Fraction(355, 113) > > -- > Mark > > > > ---------- Forwarded message ---------- > From: Stefan Sonnenberg-Carstens <stefan.sonnenb...@pythonmeister.com> > To: python-l...@python.org > Date: Sat, 20 Nov 2010 11:30:44 +0100 > Subject: Re: Is it possible to use Google's advanced search options? > Am 20.11.2010 10:37, schrieb Petar Milin: > > Hello! > Can anyone help me with getting number of hits from Google, but with > restricton on domain (e.g., .edu) and language (e.g., lang_de)? I have tried > with the Pygoogle (from: http://code.google.com/p/pygoogle/): > from pygoogle import pygoogle > word = u'something' > request_word = word.encode('utf-8') > request = ('%s+site:.edu' % request_word) > g = pygoogle(request) > g.get_result_count() > > Now, I realized that domain restriction works, but language does not, since > it cannot be specified in request like domain in example above. > Please, help! Is this possible with the Pygoogle? If not, how can I make that > happen? > > Thanks! > PM > > See below > > word = u'something' > request_word = word.encode('utf-8') > request = ('%s site:.edu options lang:de' % request_word) > g = pygoogle(request) > g.get_result_count() > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list