Tag Archives: jupyter-notebook

Estimating Estrogen

By: oxinabox.github.io

Re-posted from: https://www.oxinabox.net/2022/11/11/Estimating-Estrogen.html

As a trans-femme on HRT, I would like to know the concentrations of estradiol in my blood at all hours of day.
This is useful as the peak, the trough and average all have effects.
However, I only get blood tests a finite number of times per day – usually once.
I am not a medical doctor, but I am the kind of doctor who can apply scientific modelling to the task of estimating curves based on limited observations.
I am honestly surprised no one has done this.
The intersection of trans folk and scientific computing is non-trivial.
After all, the hardest problem in computer science is gender dysphoria.

To do this we are going to use probabilistic programming, to get a distribution of possible level curves.
This is a great use-case for probabilistic programming.
We have a ton of domain knowledge, but that domain knowledge has a few parameters we don’t know, and we have only a little data.
And crucially we are perfectly fine with getting a distribution of answers out, rather than a single answer.

Continue reading

Installing Julia on Ubuntu

By: DSB

Re-posted from: https://medium.com/coffee-in-a-klein-bottle/install-julia-1-5-on-ubuntu-bb8be4b2571d?source=rss-8bd6ec95ab58------2

A quick tutorial on how to install Julia on Ubuntu and add the kernel to Jupyter

Installing Julia on Ubuntu is very straightforward. As anything on Linux, there are several ways to do the installation.

1. Using Apt-Get

This is the first way, and it is the easiest. Just open the terminal and run

sudo apt-get install julia

The problem with this method is that you don’t get the latest stable version for Julia. In the time I’m writing this article, the Ubuntu repository contains the version 1.0.4 for Julia, while the current stable version is 1.5.2.

So this is not the method I recommend!

2. From the Website (recommended)

First, go to the Julia website download page. There, several ways to run Julia are shown. Go to the “Current stable release” table, and click on the link shown in the image below.

Donwload Julia by clicking on the “64-bit” inside the red square

Then, the Julia Language will be donwloaded (most likely to your Download directory). Next, go on your terminal and unzip the downloaded file.

tar -xvzf julia-1.5.2-linux-x86_64.tar.gz

You now have a folder with all the Julia files. No installation is required. Now, we move this folder to “/opt” (this is not strictly necessary, you can use any other location in your machine).

sudo mv julia-1.5.2/ /opt/

Finally, create a symbolic link to the Julia binary file. This will allow you to run the command “julia” in your terminal and start the Julia REPL.

sudo ln -s /opt/julia-1.5.2/bin/julia /usr/local/bin/julia

Done! Now Julia is already installed and working in your machine. Let’s now add it to Jupyter.

3. Adding Julia kernel to Jupyter

We assume that Jupyter is already installed in your machine. To add the Julia Kernel to it is quite easy. Just open your terminal and run “julia”. This will open the REPL, as shown in the image below.

Inside the REPL, we then run the following commands:

using Pkg
Pkg.add(“IJulia”)

The “Pkg” package is used in Julia to install different packages on Julia. By installing “IJulia”, it automatically adds the Julia kernel to Jupyter.

And that’s it. Julia should be working with your Jupyter Notebook and/or JupyterLab.


Installing Julia on Ubuntu was originally published in Coffee in a Klein Bottle on Medium, where people are continuing the conversation by highlighting and responding to this story.

JuliaLang Antipatterns

By: oxinabox.github.io

Re-posted from: https://white.ucc.asn.au/2020/04/19/Julia-Antipatterns.html

An antipattern is a common solution to a problem that over-all makes things worse than they could have been.
This blog post aims to highlight a few antipatterns common in Julia code.
I suspect a lot of this is due to baggage brought from other languages, where these are not Antipatterns, but are in fact good patterns.
This post is to clear things up.
Continue reading