[IPython-User] Do IPython notebook from ANY computer?

Matthias BUSSONNIER bussonniermatthias@gmail....
Sun Nov 25 05:37:15 CST 2012


Le 25 nov. 2012 à 11:16, Lasse Nørfeldt a écrit :

> Played around with this a bit more. Here is my experience so far
> 	• It's impossible to get dropbox working on it since it is an ARM device (I'm not that techy so I know what that actually means, other than being an obstacle for getting dropbox). The only alternative way to do it would be using a bash script https://github.com/andreafabrizi/Dropbox-Uploader  
> 	• I can access my device via ssh by an android phone or computer. This allow me to turn on the notebook. But it terminates every time I disconnect the ssh connection... not really what I wanted.. Just wanted it to be running all the time.

use gnu screen.
$ screen -S notebook
(a shell open)
(launch ipython notebook) 
ctrl+A,D to detach screen . 
exit.
... some time passes

$ ssh box
$ screen -dr notebook
(re-attach detached screen) 
(do whatever you want like kill server)


> 	• Chancing the profile could easily be done by "nano notebook_profile.py"
> 	• ipython3 is not good for all scientific libs which is why I'll stick with ipython2 for now.
> Matthias: Could you give me an example code how to get the a module installed from within the notebook _________?
> as an example let's do sympy - could imagine something like this:


> <command to disable history logging>
> !pacman -S python2-sympy
> <command to disable history logging>

%config HistoryManager.enabled=False
...
%config HistoryManager.enabled=True

does not seem to work, buy if you can avoid to write your password in IPython cell, you have no reason to disable history.
-- 
Matthias

> 
> 
> Yours Sincerely / Venlig hilsen
> Lasse Nørfeldt 
> 
> MSc in Pharmaceutical Sciences
> mobil : +45 42585002
> mail: lasse@norfeldt.dk
> twitter: @Norfeldt
> 
> 
> 
> On Sun, Nov 18, 2012 at 3:43 PM, Matthias BUSSONNIER <bussonniermatthias@gmail.com> wrote:
> 
> Le 18 nov. 2012 à 14:50, Lasse Nørfeldt a écrit :
> 
> > Update on the pogoplug experiment:
> >       • Got the pogoplug hacked to run Arch Linux
> >       • Got the ipython notebook up and running on the network - any computer on the network could access it, even mobiles could through 3G (through they had some issues in the cells)
> > Problems that occurred and got solved along the way:
> >       • The tuturial on the web had some dead links to port the arch linux - SOLUTION: googled around and found an updated tutorial
> >       • Installed python >3 via pacman on the arch linux since it is default - SOLUTION: removed all python installs and used the "pacman -S python2 ipython2 python2-<package_name>" this meant that in order to initiate the notebook we had to run "ipython2 notebook --profile observer"
> >       • The notebook started on a wrong ip address (127.##..) which meant we couldn't see it - SOLUTION: changed the address in the notebook profile to 192.168.#.###
> 
> 'Wrong' is relative. We start with not listening on external IP adress for security reason.
> Hope you made it use https and password protected ! :-)
> 
> >       • Changing the notebook profile was done via dropbox. Opened a config file and changed the settings and got it onto the arch linux by the command: "wget https:link.to.config/file.py". Finding the directory on the arch was a bit tricky until we discovered the "ipython2 locate" command. It would be great if there existed some easy way to edit the profile within a ipython session.??
> 
> A hack would be to use %load `profilefile` to set the next prompt as the `profilefile`
> the use the `%%file profilefile` cell magic to re-write it on disk after editing.
> 
> > Next thing to do:
> >       • Figure out how to install modules from within the notebook onto the arch linux. Ex. getting openCV installed without using an ssh connection I would imagine something like executing %magicCommand pacman -S opencv
> 
> `! command` ? or `%%bash` magic ? You don't have stdin (yet) in notebook so sudo will not be able to ask for pwd.
> Sudo should have an option to give the password from command line, but be carefull to disable history before.
> 
> >       • Create a URL address to access the notebook from an remote internet connection.
> >       • Get dropbox on the arch linux so that my scripts are safe in case my hard-drive fails or get stolen.
> >       • Figure out howto properly shut it down in case I need to take the power off and move it around (such things happens :-) )
> > I think we got a long way and really close to what I wanted - in just a day. My good friend (the expert) and I (the amateur with big needs) need to find some time (often the most difficult task in such projects) to finish and polish it.
> 
> I think this will need IPython patches.
> 
> Happy you got it to work.
> --
> Matthias
> 
> 
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
> 
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user



More information about the IPython-User mailing list