ColasDroin / Jupyter-notebooks

A list of notebooks corresponding to the posts made on my blog.
MIT License
1 stars 0 forks source link

Broken links to blog and website #1

Closed CommonClimate closed 2 years ago

CommonClimate commented 2 years ago

Hello @ColasDroin, thank you for sharing these notebooks, which are a great resource for educators.

However, they link to your personal blog or some animation, but the links fail, probably because the domain name is vacant. Do those links live somewhere else now, and if so, where?

Thanks a lot - I'd love to see the animation!

ColasDroin commented 2 years ago

Hi @CommonClimate ,

Thank you for your interest! I'm currently building a new website/portfolio, and I've let my old personal website die in the meantime. I've got a pretty busy schedule, so I don't think I'll have a live version of the new website (including the notebooks) before a couple of months... I'll try to update the links in the notebook when everything is set up.

In the meanwhile, if you're interested in the animations and don't want to run the notebooks yourself, I believe you can do it with e.g. Colab (example for the Lorentz notebook: https://colab.research.google.com/github/ColasDroin/Jupyter-notebooks/blob/master/BeautifulLorenz.ipynb#scrollTo=0TowloxFdu8l ). Note that some cells may take a while to execute.

Tell me if you need any help :)

CommonClimate commented 2 years ago

Hello Colas - I understand that you are busy with other projects, but for the record my problem is different - let me clarify. I am perfectly capable of running notebooks on my own; there is nothing overwhelming about the Python done in there. Of particular interest to me is the animation in the Lotka Volterra notebook, which I cannot code myself. The notebook invokes some html page hosted on your site. like so:

from IPython.display import IFrame
IFrame('http://colasdroin.eu/DataScienceBlog/Misc/P5/index.html', width=1050, height=500)

Unfortunately, the URL returns an error, and so does the IFrame() command. Is there any other way to access this animation at the moment? In any case, good luck with your portfolio!

ColasDroin commented 2 years ago

I see @CommonClimate, this has actually nothing to do with the notebooks themselves: the Lotka-Volterra animation is a P5.js script (P5 is a javascript library for creative coding, mainly). To run the animation, you must build a HTML file in which you import both P5.js, and the file lotka.js. The simplest you can do is create an empty HTML file and paste the following:

<html>
  <head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.js"></script>
    <script src="lotka.js"></script>
  </head>
  <body>
    <div id="sketch-holder"></div>
  </body>
</html>

Hope this helps!

CommonClimate commented 2 years ago

Thanks @ColasDroin! This works. However, I will point out for other users that this solves a more elaborate problem than plain vanilla Lotka-Volterra equations, involving variations in space as well as time.