Re: documentation on read.encode

2018-01-17 Thread Steven D'Aprano
On Wed, 17 Jan 2018 16:54:37 -0500, Larry Martell wrote: > The code that was receiving the > PNG was not reading and writing the file as binary. Strangely that > worked on Linux but not on Windows. Nothing strange about it -- on Unix and Linux systems (with the possible exception of Mac OS?) in

Re: documentation on read.encode

2018-01-17 Thread Larry Martell
On Tue, Jan 16, 2018 at 3:58 PM, MRAB wrote: > On 2018-01-16 19:52, Larry Martell wrote: >> >> On Tue, Jan 16, 2018 at 2:35 PM, Gene Heskett >> wrote: >>> >>> On Tuesday 16 January 2018 14:19:38 Larry Martell wrote: >>> On Tue, Jan 16, 2018 at 12:00 PM, Larry Martell >>> >>> wrote: >>>

Why does random.choice() reject sets? was Re: Speeding up the implementation of Stochastic Gradient Ascent in Python

2018-01-17 Thread Peter Otten
Chris Angelico wrote: > On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder > wrote: >> You'll have to replace random.choice() with >> random.choice(list(...)), since you can't random.choice from a set. >> > > Side point: why can't you? You can random.sample from a set, I'm not sure this was a goo

Re: Speeding up the implementation of Stochastic Gradient Ascent in Python

2018-01-17 Thread Chris Angelico
On Thu, Jan 18, 2018 at 7:19 AM, Ned Batchelder wrote: > On 1/17/18 2:45 PM, Chris Angelico wrote: >> >> On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder >> wrote: >>> >>> You'll have to replace random.choice() with >>> random.choice(list(...)), since you can't random.choice from a set. >>> >> Sid

Re: Speeding up the implementation of Stochastic Gradient Ascent in Python

2018-01-17 Thread Ned Batchelder
On 1/17/18 2:45 PM, Chris Angelico wrote: On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder wrote: You'll have to replace random.choice() with random.choice(list(...)), since you can't random.choice from a set. Side point: why can't you? You can random.sample from a set, but random.choice requi

Re: Speeding up the implementation of Stochastic Gradient Ascent in Python

2018-01-17 Thread Chris Angelico
On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder wrote: > You'll have to replace random.choice() with > random.choice(list(...)), since you can't random.choice from a set. > Side point: why can't you? You can random.sample from a set, but random.choice requires a sequence. It seems perfectly sane

Re: Speeding up the implementation of Stochastic Gradient Ascent in Python

2018-01-17 Thread Ned Batchelder
On 1/17/18 9:29 AM, leutrim.kal...@gmail.com wrote: Hello everyone, I am implementing a time-dependent Recommender System which applies BPR (Bayesian Personalized Ranking), where Stochastic Gradient Ascent is used to learn the parameters of the model. Such that, one iteration involves sampling

Re: Speeding up the implementation of Stochastic Gradient Ascent in Python

2018-01-17 Thread breamoreboy
On Wednesday, January 17, 2018 at 2:30:13 PM UTC, Leo wrote: > Hello everyone, > > I am implementing a time-dependent Recommender System which applies BPR > (Bayesian Personalized Ranking), where Stochastic Gradient Ascent is used to > learn the parameters of the model. Such that, one iteration

Speeding up the implementation of Stochastic Gradient Ascent in Python

2018-01-17 Thread leutrim . kaleci
Hello everyone, I am implementing a time-dependent Recommender System which applies BPR (Bayesian Personalized Ranking), where Stochastic Gradient Ascent is used to learn the parameters of the model. Such that, one iteration involves sampling randomly the quadruple (i.e. userID, positive_item

Re: python to C code generator

2018-01-17 Thread bartc
On 17/01/2018 11:04, kushal bhattacharya wrote: Hi, Is there any python framework or any tool as which can generate C code from python code as it is . What C code would you expect to see from this line of Python: a = b + c ? -- https://mail.python.org/mailman/listinfo/python-list

Re: python to C code generator

2018-01-17 Thread David Palao
Hi, Have a look at Cython. Best 2018-01-17 12:04 GMT+01:00 kushal bhattacharya : > Hi, > Is there any python framework or any tool as which can generate C code from > python code as it is . > > Thanks, > Kushal > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.

python to C code generator

2018-01-17 Thread kushal bhattacharya
Hi, Is there any python framework or any tool as which can generate C code from python code as it is . Thanks, Kushal -- https://mail.python.org/mailman/listinfo/python-list

c code generator from python

2018-01-17 Thread bhattacharya . kushal4
Hi, Is there any python framework or any tool as which can generate C code from python code as it is . Thanks, Kushal -- https://mail.python.org/mailman/listinfo/python-list