<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 28 mai 2014 à 16:56, Benjamin Ninassi a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Again thanks a lot, I made it work with this snipet of code in custom.js (for the record if someone search through this thread):<br><br>$([IPython.events]).on('notebook_loaded.Notebook', function(){<br>  var cells = IPython.notebook.get_cells();<br>  for(var i in cells){<br>    var cell = cells[i];<br>    if (!(cell instanceof IPython.CodeCell)) {<br>      cell.code_mirror.setOption('readOnly','nocursor');<br>    }<br>  }<br>})<br></div></blockquote><div><br></div>Be careful, with that if your student insert some markdown cell and reload it will prevent him/her from editing.</div><div>If you wrap it in a extension, you can probably make a pull request there :</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">  </span><a href="https://github.com/ipython-contrib/IPython-notebook-extensions">https://github.com/ipython-contrib/IPython-notebook-extensions</a></div><div><div><br></div><br><blockquote type="cite"><div>I'll be happy to provide you with feedback !<br><br>We're preparing a Mooc on robotic with some python exercices that will be available on the governmental french Mooc plateform <a href="https://www.france-universite-numerique-mooc.fr/">https://www.france-universite-numerique-mooc.fr/</a></div></blockquote><blockquote type="cite"><div>(which is based on EDX) at the end of the year, and we were looking for a solution to allow student to quickly be able to do the exercices without having to install python and all the stuff (numpy, matplotlib and so on) on their computer. </div></blockquote><div><br></div><div>Oh, great, will it be integrated into France-OS [1] ?</div><br><blockquote type="cite"><div>Skulpt and other javascript librairy still can't be used with numpy, so I turned on server-side execution with ipython.<br>And I'm pretty sure now that ipython will do the trick. :)<br></div></blockquote><div><br></div>Also please use Python 3 :-) <br><div><br></div><div>You might want to have a look at ipydra [2] for deployment.</div><div><br></div><blockquote type="cite"><div>We may also add some automatic evaluation to, I'll keep you inform on our progress !<br></div></blockquote><div><br></div><div>You should speak with :</div><div>- Jessica Hamrick who did something similar [3]</div><div><br></div><div>Miscs : </div><div><br></div><div>General thing in english  stuff</div><div><br></div><div>You might want to contact </div><div>-  Greg Wilson from software carpentry/Mozilla with whom you will share some interest in using notebook to teach</div><div><div>-  Mit Teach Julia using IPython notebook, they have custom stuff, you might want to ping the Julia List. I think that </div><div>    Aaron Culich at Berkeley EECS also probably made some mass deployment of IPython notebook.</div><div>- People from SageMath might be of help too as they have online IPython notebook. </div><div><br></div><div>- I prefer not to include link to companies, but ContinuumIO might also be of help as they already deploy wakari.</div><div>  Though, they will probably offer you to go with wakari enterprise[6].</div><div><br></div><div>(No explicit contact info private mail me if you can't find) </div><div><br></div><div>More French specific stuff</div></div><div><br></div><div>You might want to contact </div><div>- Emanuelle Gouillart and Gael Varoquaux who worked on python pour les classes préparatoires [4].</div><div>    (python for undergraduate student french program)<span class="Apple-tab-span" style="white-space: pre; ">      </span>They are near Paris though. </div><div>- Pierre Haessig was involved too in above project IIRC, and should be near you (at Bruz near Rennes), but is finishing his PhD, so might be busy[5].</div><div>- Enthought do not have python in the cloud IIRC, but do have French people in their team (Jonathan Rocher at least) which is great if you need support. </div><div><span class="Apple-tab-span" style="white-space:pre">   </span>they are also more hardware oriented than continuum from the demo I have seen, which tend to be better for robotics IIUC.</div><div><br></div><div>- You might want to join the other thread on internationalization as I know by experience that french</div><div>student tend to not speak english very well until pretty late (Stargate-SG1 you did a better job than my english teacher)</div><div><br></div><div>Shameless plug at the end, especially because this seem to be a big project,</div><div>and also there seem to be some buzz[8] around notre cher Ministre de l'Économie, </div><div>du Redressement productif et du Numérique[7]. We would highly appreciate</div><div>any contribution on IPython and Open  Source community, even more if you</div><div>could make your hierarchy understand that and officially put some extra people</div><div> (obviously you are already part of them) or fund to help.</div><div><br></div><div>If there is any need for someone from the IPython to come to convince peoples, </div><div>even despite [5], I am in France (for the time being), and Fernando Pérez, speak a </div><div>a perfect French, so I suppose if it is to convince a government agency to fund a project, </div><div>he might find some free time. There are also a handful of French speaking people </div><div>from the SciPy stack I can think of that are around, and I guess could be of help.</div><div><br></div><div>-- </div><div>M</div><div><br></div><div><br></div><div><br></div><div><br></div><blockquote type="cite"><div><br>-- <br>Benjamin Ninassi <br>INRIA - SEISM & Mooclab<br>Tél. (+33) 02 99 84 73 43 <br><a href="mailto:benjamin.ninassi@inria.fr">benjamin.ninassi@inria.fr</a> <br></div></blockquote><div><br></div><div><br></div><div><br></div><div>[1]  <a href="http://korben.info/franceos.html">http://korben.info/franceos.html</a>  <- french, stupid bad joke </div><div>[2] <a href="https://github.com/UnataInc/ipydra">https://github.com/UnataInc/ipydra</a> </div><div>[3] <a href="https://twitter.com/jhamrick/statuses/463930083447566336">https://twitter.com/jhamrick/statuses/463930083447566336</a></div><div>[4] <a href="https://github.com/python-prepa/python-prepa">https://github.com/python-prepa/python-prepa</a> (fr)</div><div>[5] i am too and i spend to much time on IPython ML.</div><div>[6]  <a href="http://enterprise.wakari.io/">http://enterprise.wakari.io/</a></div>[7] <a href="https://fr.wikipedia.org/wiki/Arnaud_Montebourg">https://fr.wikipedia.org/wiki/Arnaud_Montebourg</a>  (fr)</div><div>[8] <a href="http://www.numerama.com/magazine/29490-orange-travaille-deja-a-l-os-34made-in-france34-voulu-par-montebourg.html">http://www.numerama.com/magazine/29490-orange-travaille-deja-a-l-os-34made-in-france34-voulu-par-montebourg.html</a> (fr)<br><blockquote type="cite"><div><br>----- Mail original -----<br><blockquote type="cite">De: "Matthias BUSSONNIER" <<a href="mailto:bussonniermatthias@gmail.com">bussonniermatthias@gmail.com</a>><br></blockquote><blockquote type="cite">À: "IPython developers list" <<a href="mailto:ipython-dev@scipy.org">ipython-dev@scipy.org</a>><br></blockquote><blockquote type="cite">Envoyé: Mercredi 28 Mai 2014 15:49:27<br></blockquote><blockquote type="cite">Objet: Re: [IPython-dev] 2 questions about notebooks : disabling cells for<span class="Apple-tab-span" style="white-space:pre">  </span>edition and best hiding menu bar process<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Le 28 mai 2014 à 15:22, Benjamin Ninassi a écrit :<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Thanks a lot for your quick answears !<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">It should be possible by directly setting the read-only mode to some cell<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">in CodeMiror itself, but it will require a bit of javscript:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://codemirror.net/doc/manual.html#option_readOnly">http://codemirror.net/doc/manual.html#option_readOnly</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'll drill into that, thanks ! My major issue will be to identify the cells<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">that i want to disable through the DOM as they have no ID ... is-it<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">possible to give them one with metadata ?<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">You cannot (yet) get a dom identity through the metadata, but you can a list<br></blockquote><blockquote type="cite">of sell by<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">IPython.notebook.get_cells()<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">then loop on all cell and on each cell do approximatively a<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">var ro = (cell.metadata.my_namespace || {}).readonly<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">if(ro === true):<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>cell.editor.set_options('readOnly','nocursor')<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Which should do the desired effect.<br></blockquote><blockquote type="cite">You might want to capture a few other event like execution request on theses<br></blockquote><blockquote type="cite">cell by monkey patching<br></blockquote><blockquote type="cite">the CellClass.prototype.execute<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">CellClass.prototype.old_execute = CellClass.prototype.execute<br></blockquote><blockquote type="cite">CellClass.prototype.execute = function(){<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">      </span>if not read only :<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>this.old_execute(arguments)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">I suppose css with the same target and display:none in custom.css should<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">works.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I was supposing that to, but there is a  style="display: block;" generated<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">in the html for the header div that overwrite the custom.css<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">#header{   display:none; } …<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hum, we should probably fix that then.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">No, there is no list. You can grep through the source for IPython.events<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">out should give yo an idea of existing event,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The rest depend if when using IPython for a MOOC you will be providing the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">sever,in which case you can customize it a lot<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">or if you plan on users to install IPython in which case you probably want<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">to avoid too aggressive customization.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">We will be providing a server, so we can customize it a lot. I'm convince<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">ipython and notebooks are great tools for online education, providing some<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">minor adjustments !<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Then you can probably apply a patch on the template to remove whatever<br></blockquote><blockquote type="cite">element for the time being.<br></blockquote><blockquote type="cite">We'll be happy to get your feedback from using the notebook for teaching.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">M<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">IPython-dev mailing list<br></blockquote><blockquote type="cite"><a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br></blockquote><blockquote type="cite"><a href="http://mail.scipy.org/mailman/listinfo/ipython-dev">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br></blockquote><blockquote type="cite"><br></blockquote>_______________________________________________<br>IPython-dev mailing list<br><a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>http://mail.scipy.org/mailman/listinfo/ipython-dev<br></div></blockquote></div><br></body></html>