diff --git a/README.md b/README.md index 2adf0cd09..3792bf558 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@

- + Join our Discord diff --git a/Sources/Samples/CSharp.Interactive.Sample.ipynb b/Sources/Samples/CSharp.Interactive.Sample.ipynb index 2ef6d6937..d16f85576 100644 --- a/Sources/Samples/CSharp.Interactive.Sample.ipynb +++ b/Sources/Samples/CSharp.Interactive.Sample.ipynb @@ -137,8 +137,7 @@ } ], "source": [ - "#r \"nuget:AngouriMath.Interactive, *-*\" // installing the Interactive package\n", - "Interactive.magic() // run this code to register all interacting stuff" + "#r \"nuget:AngouriMath, *-*\"" ] }, { @@ -180,7 +179,7 @@ "metadata": {}, "outputs": [], "source": [ - "MathS.Matrices.Matrix(new Entity[,]{\n", + "MathS.Matrix(new Entity[,]{\n", "{ \"x / 2\", \"beta - 2^3\", \"e / sqrt(pi)\" },\n", "{ \"epsilon\", \"integral(sin(k), k)\", \"e - pi\" },\n", "})" diff --git a/Sources/Samples/Interactive.Sample.ipynb b/Sources/Samples/Interactive.Sample.ipynb index dc3e99a04..e3984622d 100644 --- a/Sources/Samples/Interactive.Sample.ipynb +++ b/Sources/Samples/Interactive.Sample.ipynb @@ -6,8 +6,7 @@ "metadata": {}, "outputs": [], "source": [ - "#r \"nuget:AngouriMath.Interactive, *-*\" // installing the Interactive package\n", - "Interactive.magic() // run this code to register all interacting stuff" + "#r \"nuget:AngouriMath.Interactive, *-*\"" ] }, { @@ -16,9 +15,8 @@ "metadata": {}, "outputs": [], "source": [ - "open Functions\n", - "open Core\n", - "open Operators" + "open AngouriMath.FSharp.Core\n", + "open AngouriMath.FSharp.Functions" ] }, { @@ -42,7 +40,7 @@ } ], "source": [ - "parse \"x2 + sin(sqrt(x + 1/2)) + integral(sqrt(x + derivative(sin(y), y)), x)\"" + "parsed \"x2 + sin(sqrt(x + 1/2)) + integral(sqrt(x + derivative(sin(y), y)), x)\"" ] }, { @@ -66,7 +64,7 @@ } ], "source": [ - "differentiate \"x\" \"sqrt(sin(x) + 1 / (x + epsilon)) + e^(3x2)\"" + "derivative \"x\" \"sqrt(sin(x) + 1 / (x + epsilon)) + e^(3x2)\"" ] }, { @@ -90,7 +88,7 @@ } ], "source": [ - "solve \"x\" \"x > 0 and x ^ 2 = 9\"" + "solutions \"x\" \"x > 0 and x ^ 2 = 9\"" ] } ], diff --git a/binder/Dockerfile b/binder/Dockerfile new file mode 100644 index 000000000..034536f01 --- /dev/null +++ b/binder/Dockerfile @@ -0,0 +1,28 @@ +# The image mybinder.org builds for the README's "Try" button: Jupyter with the .NET Interactive +# kernels, and the sample notebooks from Sources/Samples. The notebooks install AngouriMath.Interactive +# from NuGet themselves. https://github.com/asc-community/AngouriMath/issues/1689 +FROM quay.io/jupyter/base-notebook:2026-10-05 + +USER root +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl libicu-dev \ + && rm -rf /var/lib/apt/lists/* + +# The .NET 10 SDK, which the dotnet-interactive tool targets. +ENV DOTNET_ROOT=/usr/share/dotnet \ + DOTNET_CLI_TELEMETRY_OPTOUT=1 \ + DOTNET_NOLOGO=1 \ + NUGET_XMLDOC_MODE=skip +RUN curl -sSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh \ + && bash /tmp/dotnet-install.sh --channel 10.0 --install-dir ${DOTNET_ROOT} \ + && ln -s ${DOTNET_ROOT}/dotnet /usr/bin/dotnet \ + && rm /tmp/dotnet-install.sh + +COPY Sources/Samples/Interactive.Sample.ipynb Sources/Samples/CSharp.Interactive.Sample.ipynb ${HOME}/ +RUN chown -R ${NB_UID}:${NB_GID} ${HOME} + +USER ${NB_USER} +ENV PATH="${PATH}:${HOME}/.dotnet/tools" +RUN dotnet tool install -g Microsoft.dotnet-interactive \ + && dotnet interactive jupyter install +WORKDIR ${HOME}