Ask Your Question

Hivert's profile - activity

2021-05-01 22:28:01 +0100 received badge  Supporter (source)
2020-03-25 19:13:18 +0100 received badge  Good Question (source)
2020-03-23 10:28:22 +0100 received badge  Nice Question (source)
2019-10-14 21:19:57 +0100 received badge  Student (source)
2019-10-14 21:16:47 +0100 asked a question interact button reacting twice

I'm trying to update some old interact to the new Jupyter notebook. I'd like to have an interact with buttons, something like the following:

act = []
@interact
def play(move=selector([None] + ["Auto", "Reset"], buttons=True)):
      act.append(move)
      print(act)

However when I press a new button, the applet receive it twice. For example, if I press "Auto" and the "Reset" it prints

[None, 'Auto', 'Auto', 'Reset', 'Reset']

instead of

[None, 'Auto', 'Reset']

Is it expected ?

2019-06-10 17:52:58 +0100 received badge  Nice Answer (source)
2019-06-07 11:01:39 +0100 received badge  Good Answer (source)
2019-06-07 09:59:21 +0100 answered a question Cython problem with map-reduce

This has nothing to do with MapReduce. Cython cannot deal with definition of closure (here: lambda function) inside a c(p)def function. If you want to use MapReduce with Cython code, you should not use the short one line interface of map reduce but rely on the programmatic interface using inheritance (see the source code of RESetMPExample for an example).

2019-06-06 21:40:34 +0100 commented answer How to implement a parallelization?

Without looking at the code I can't debug the Cython problem. I've used map-reduce and Cython in the past and it worked. Please post another question with some minimal code to reproduce the problem.

2019-06-06 21:39:39 +0100 received badge  Nice Answer (source)
2019-06-06 21:33:39 +0100 answered a question How to use a GPU for HPC?

I don't think GPU are tailored for those kind of computation. That is GPU are mostly designed to do embarasingly parallel (ie: flat) number crunching, whereas the map reduce I wrote in Sage solve highly recursive parallel problem. Those are very different kinds of problems which need very different load balancing algorithms.

2012-10-23 16:26:14 +0100 received badge  Enlightened (source)
2012-10-23 13:06:12 +0100 received badge  Good Answer (source)
2012-10-23 11:16:01 +0100 received badge  Nice Answer (source)
2012-10-23 10:29:26 +0100 received badge  Teacher (source)
2012-10-23 08:49:30 +0100 answered a question Unique Representation

Currently in Sage, SetPartitions are not proper Parent and uses the old deprecated CombinatorialClass framework. This framework was writen before UniqueRepresentation. As a consequence

sage: isinstance(SetPartitions(5), UniqueRepresentation)

False

We are currently in the process of removing CombinatorialClass and cleaning the code depending of it. See for example trac ticket #13552, #12913, #9265. Nothing is currently done on set partitions.