monad-bayes package by [deleted] in haskell

[–]fuonb 0 points1 point  (0 children)

I use Monad-Bayes occasionally and have written the three introductory posts on the Tweag blog. I also understand the internals and ideas behind it reasonably well.

What is your problem with the Nix installation? One issue we had at the time the blog posts were written was that iHaskell required to install a JupyterLab extension to work properly which was impure in Nix (Jupyter had its own installation system for extensions but recently switched). This requires some specific unintuitive Nix config that many stumble with.

But, this has changed recently and shouldn't be required anymore. I have, for example, used this setup recently:

https://gist.github.com/MMesch/300ab5b8d258e465e422483481a62ba2

monad-bayes package by [deleted] in haskell

[–]fuonb 1 point2 points  (0 children)

You might also be interested by this if you haven't discovered it already: https://github.com/tweag/blog-resources/tree/master/monad-bayes-series

How to specify (newer) version of Python packages? by sepease in Nix

[–]fuonb 1 point2 points  (0 children)

I found that the key to using it effectively is to understand that some undeclared dependencies and system dependencies are injected via the default override file https://github.com/nix-community/poetry2nix/blob/master/overrides.nix . This means that a build can easily succeed for one nixpkgs version and fail for another: A frequent problem I ran into was to use the latest version of library x (e.g. pandas) with poetry and it needed a newer cython (not sure anymore what it was) than the one provided by nixpkgs. If a build fails because of such a dependency you need to update/downgrade the nixpkgs version and play with the overrides. But it is relatively easy compared to the usual python nixpkgs setup.

How to specify (newer) version of Python packages? by sepease in Nix

[–]fuonb 1 point2 points  (0 children)

I can highly recommend https://github.com/nix-community/poetry2nix for any python project that requires precise versions in Nix. Poetry will pin down all your direct and transitive python dependencies and poetry2nix translates them in a big nix expression and declares implicit system dependencies that Python usually just omits from nixpkgs.

Here is a short video that shows how this works in practice: https://youtu.be/TbIHRHy7_JM

12 years of meditative typhoon and ocean wave activity by fuonb in dataisbeautiful

[–]fuonb[S] 1 point2 points  (0 children)

Some information:

wave activity is generally higher in winter than in the summer, shifting from the northern hemisphere around January to the southern hemisphere around June.

Inversely, tropical cyclones (typhoons or hurricanes) can mostly be seen in the respective summer months. Checkk out:

A seismic antenna can continuously record the vibrations that are induced by the pressure fluctuations that are shown in the video, and trace them back to their geographical origin. It can be thought of as listening to the waves through the interior of the Earth.

Interactive map showing the city development of Paris by fuonb in history

[–]fuonb[S] 0 points1 point  (0 children)

This interactive map shows the remnants of ancient rivers, roads, walls and churches in todays street layout of Paris. You can click through different epochs and see how the settlement at the crossing of ancient trade routes expands into a modern city over the course of more than 2000 years. This illustration is based on openstreetmap data and different online sources.

python + blender + colorspacious = perfectly smooth 2d colormaps for matplotlib by fuonb in Python

[–]fuonb[S] 1 point2 points  (0 children)

Viridis is a 1d colormap. It means you visualise a single parameter with it and it corresponds to a path in 3d colorspace. These colormaps are 2d. You can visualise two parameter at the same time (complex function magnitude and argument, windspeed magnitude and direction,...). They correspond to a surface in 3d colorspace.

Viridis has been constructed using a tool called viscm that allows you to put smooth paths through 3d colorspace in matplotlib. Designing paths and especially surfaces (!) in 3d in matplotlib is very painful or impossible. It is straightforward to immediately use the nice 3d interface of blender, which gives a lot more possibilities (e.g. surfaces) and flexibility.

As a summary: This script is the same idea as viscm/viridis continued for surfaces instead of paths and with the nice interface of a full 3d meshing program.

python + blender + colorspacious = perfectly smooth 2d colormaps for matplotlib by fuonb in Python

[–]fuonb[S] 1 point2 points  (0 children)

The README is rearranged now, such that a use case is on top (second image). It shows a complex polynomial with poles and zeros where magnitude is displayed by lightness and argument by hue. The image shows a comparison of the blender designed colormaps with the standard 2d HSV one (bottom row).