Hah - convergent evolution, I've been looking at Jupyter lab. in that kind
of context recently too.

The rest of this is off-topic, but I encourage people to play with the
Jupyter *lab* (not notebook) UI for Leo ideas.
It's basically multiple notebooks in multiple kernels plus consoles and
regular text file editing, file browsing, etc.

Here's an amusing trick to get Google to give you a free computer (for 12
hours, but then another one, and so on).

Sign up for

https://colab.research.google.com/

now you have a Jupyter *notebook* on a machine somewhere which can mount
your Google drive.  But no one who's used Jupyter lab. wants a Jupyter
notebook.  No problem, this notebook:
https://medium.com/@swaroopkml96/jupyterlab-and-google-drive-integration-with-google-colab-42a8d64a9b63
lets you run Jupyter lab. in the notebook, then you can access the lab. UI
instead.

I guess the machines are for learning machine learning, but there seems to
be no restriction on what you do with them, they're Ubuntu 18.04.  I think
they only last for 12 hours but if you mount your google drive storage
there is permanent.  I also noticed going from free 15 Gb Google drive
storage to 100 Gb is quite affordable, $16/*year* maybe?

I think something was broken in the above recipe for me, so I'll post the
code blocks I'm using below.

Leo docker wise not really, although I think I recently tested this Leo as
a web app. hack and found it still worked:
https://github.com/tbnorth/leo-docker  so that is Leo running in a headless
Docker container available via the web.

Cheers -Terry

Block 1

!pip install jupyterlab

Block 2

from google.colab import drive
drive.mount('/content/gdrive', force_remount=True)

Block 3

jupyter_running = !jupyter notebook list | grep 8888
if not jupyter_running:
  !mkdir -p /root/.jupyter
  !echo '{ "NotebookApp": { "password": "sha1:6f..MAKE YOUR OWN..9c" } }' >
/root/.jupyter/jupyter_notebook_config.json
  print(open("/root/.jupyter/jupyter_notebook_config.json").read())
  get_ipython().system_raw('jupyter lab &')
!ssh -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -R
YOURNAMEHERE:80:localhost:8888 serveo.net 1>/dev/null

(the MAKE YOUR OWN etc. parts are explained in the linked article)


On Tue, Jul 30, 2019 at 9:39 AM Kent Tenney <kten...@gmail.com> wrote:

> Indeed.
> I haven't used Leo in a while, been playing with docker containers
> which configure and serve Jupyter lab on non-gui machines.
> This time machine kind of capability is the kind of thing to lure
> me back to Leo.
>
> Terry, I remember you mentioning that you're using Docker, do
> you have Leo related Dockerfile or docker-compose.yml ?
>
> Thanks,
> Kent
>
>
> On Mon, Jul 29, 2019 at 2:31 PM Terry Brown <terrynbr...@gmail.com> wrote:
>
>> That is very cool.  I hope Kent sees it, he's talked about such things
>> more than once.
>>
>> Cheers -Terry
>>
>> On Mon, Jul 29, 2019 at 2:11 PM vitalije <vitali...@gmail.com> wrote:
>>
>>> It has been a very long time since I've got this idea of combining Leo
>>> with fossil. For all these years I felt that there was a great potential in
>>> this mixture, but I haven't got the time to do anything about it until
>>> recently.
>>>
>>> Fossil uses an extremely good algorithm to calculate the difference
>>> between two texts. And the deltas produced by this algorithm are very
>>> compact and nice to work with. If the input texts are texts, than the delta
>>> is also a plain text. I have ported this algorithm from C in which fossil
>>> is originally written, to Rust programming language. The ported code is
>>> published on crates.io as fossil-delta
>>> <https://crates.io/crates/fossil-delta>. Using this library, I wrote a
>>> small web server which accepts snapshots sent from Leo periodically at idle
>>> time and calculates the delta between the previous one and the current one,
>>> and stores those deltas in the sqlite database. The server also serves
>>> small web application that allows user to browse history of any recorded
>>> Leo outline. Using two scale widgets user can choose any recorded version
>>> of the outline shape, and history of the selected node.
>>>
>>> Sending snapshots from Leo is done by the plugin which keeps track of
>>> the time passed since the last Leo command has been executed. When 5s pass
>>> since the last executed command, Leo calculates the snapshot and if it is
>>> different than the previous one it sends it in separate thread to the
>>> server. The whole process is almost unnoticeable by the user. The server
>>> stores the deltas in the database file (one database per Leo outline) which
>>> is located in the same folder as the Leo document, and has the '.history'
>>> appended to its name. For example: outline test.leo will have it's history
>>> stored in the database test.leo.history in the same folder.
>>>
>>> Below is the link to the video demonstration (if you have read
>>> everything above you can skip to the 3:00). There are some issues with the
>>> sound which I couldn't fix, but there are captions in English.
>>>
>>> The demo <https://youtu.be/apqc1iri1hA?t=174>
>>>
>>> Vitalije
>>>
>>> PS: the outline is about 210Kb, and database with about 625 recorded
>>> versions is about 450Kb. Those 625 versions were recorded during the 30
>>> hours time span.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "leo-editor" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to leo-editor+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/leo-editor/897a3b7a-554b-4db6-8501-ebafc1746214%40googlegroups.com
>>> <https://groups.google.com/d/msgid/leo-editor/897a3b7a-554b-4db6-8501-ebafc1746214%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "leo-editor" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to leo-editor+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/leo-editor/CAFPg46QO%2B_nGcyPs-OV1V8aUbr1JZAooF0CT98NK63XhGTUuCQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/leo-editor/CAFPg46QO%2B_nGcyPs-OV1V8aUbr1JZAooF0CT98NK63XhGTUuCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAAa_k2dUMHu_X%3DwUSM9F0buxBKAgtAsnwc29gKWbZ%3DtZYdj6fw%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAAa_k2dUMHu_X%3DwUSM9F0buxBKAgtAsnwc29gKWbZ%3DtZYdj6fw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAFPg46Sx3JhX1x0PmOzHw%2B152dH9m_5uunaprhNBXBtq2%3DOEpg%40mail.gmail.com.

Reply via email to