Skip to content

Commit f3aa5bf

Browse files
committed
improve colab command
1 parent f18ef98 commit f3aa5bf

7 files changed

+35
-154
lines changed

1-iris-data-analysis-rust.ipynb

+5-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"id": "f4e8c1d9-c986-44cf-96cf-52328f5af66d",
66
"metadata": {},
77
"source": [
8-
"## Google Colab & Binder Rust Setup\n",
8+
"## Google Colab Rust Setup\n",
99
"\n",
10-
"The following cell is used to set up a Rust environment on Colab and Binder. Don't execute it locally!\n",
10+
"The following cell is used to set up a Rust environment on Colab. Don't execute it locally!\n",
1111
"\n",
1212
"Many thanks to [`mateusvmv`](https://github.com/mateusvmv) for this hack in [`gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3`](https://gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3?permalink_comment_id=4715636#gistcomment-4715636)."
1313
]
@@ -19,26 +19,9 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"!rm -rf /root/.local/share/jupyter/kernels\n",
23-
"\n",
24-
"# Nix install\n",
25-
"!curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm\n",
26-
"!ln -s /root/.nix-profile/bin /opt/bin\n",
27-
"\n",
28-
"# Install evcxr\n",
29-
"!nix-env -f '<nixpkgs>' -iA cargo rustc evcxr sccache\n",
30-
"!evcxr_jupyter --install\n",
31-
"\n",
32-
"# Configure evcxr\n",
33-
"!mkdir -p /root/.config/evcxr\n",
34-
"!printf \":timing\\n:sccache 1\" > /root/.config/evcxr/init.evcxr\n",
35-
"\n",
36-
"# IPC Proxy (https://stackoverflow.com/a/74821762)\n",
37-
"!wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
38-
"!python install_ipc_proxy_kernel.py --quiet --kernel=rust --implementation=ipc_proxy_kernel.py > /dev/null\n",
39-
"\n",
40-
"# To avoid confusion between kernel names\n",
41-
"!sed -i 's/\"display_name\": \"Rust\"/\"display_name\": \"Rust-TCP\"/g' /root/.local/share/jupyter/kernels/rust_tcp/kernel.json"
22+
"# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. \n",
23+
"!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1\n",
24+
"!bash setup_evcxr_kernel.sh"
4225
]
4326
},
4427
{

2-ndarray-tutorial.ipynb

+5-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"id": "c5b88d62-9e09-466d-9eb9-07f175a03faa",
66
"metadata": {},
77
"source": [
8-
"## Google Colab & Binder Rust Setup\n",
8+
"## Google Colab Rust Setup\n",
99
"\n",
10-
"The following cell is used to set up a Rust environment on Colab and Binder. Don't execute it locally!\n",
10+
"The following cell is used to set up a Rust environment on Colab. Don't execute it locally!\n",
1111
"\n",
1212
"Many thanks to [`mateusvmv`](https://github.com/mateusvmv) for this hack in [`gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3`](https://gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3?permalink_comment_id=4715636#gistcomment-4715636)."
1313
]
@@ -19,26 +19,9 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"!rm -rf /root/.local/share/jupyter/kernels\n",
23-
"\n",
24-
"# Nix install\n",
25-
"!curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm\n",
26-
"!ln -s /root/.nix-profile/bin /opt/bin\n",
27-
"\n",
28-
"# Install evcxr\n",
29-
"!nix-env -f '<nixpkgs>' -iA cargo rustc evcxr sccache\n",
30-
"!evcxr_jupyter --install\n",
31-
"\n",
32-
"# Configure evcxr\n",
33-
"!mkdir -p /root/.config/evcxr\n",
34-
"!printf \":timing\\n:sccache 1\" > /root/.config/evcxr/init.evcxr\n",
35-
"\n",
36-
"# IPC Proxy (https://stackoverflow.com/a/74821762)\n",
37-
"!wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
38-
"!python install_ipc_proxy_kernel.py --quiet --kernel=rust --implementation=ipc_proxy_kernel.py > /dev/null\n",
39-
"\n",
40-
"# To avoid confusion between kernel names\n",
41-
"!sed -i 's/\"display_name\": \"Rust\"/\"display_name\": \"Rust-TCP\"/g' /root/.local/share/jupyter/kernels/rust_tcp/kernel.json"
22+
"# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. \n",
23+
"!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1\n",
24+
"!bash setup_evcxr_kernel.sh"
4225
]
4326
},
4427
{

3-polars-tutorial-part-1.ipynb

+5-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"id": "3b86ffc2-eefc-493c-9828-727b5b882ed4",
66
"metadata": {},
77
"source": [
8-
"## Google Colab & Binder Rust Setup\n",
8+
"## Google Colab Rust Setup\n",
99
"\n",
10-
"The following cell is used to set up a Rust environment on Colab and Binder. Don't execute it locally!\n",
10+
"The following cell is used to set up a Rust environment on Colab. Don't execute it locally!\n",
1111
"\n",
1212
"Many thanks to [`mateusvmv`](https://github.com/mateusvmv) for this hack in [`gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3`](https://gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3?permalink_comment_id=4715636#gistcomment-4715636)."
1313
]
@@ -19,26 +19,9 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"!rm -rf /root/.local/share/jupyter/kernels\n",
23-
"\n",
24-
"# Nix install\n",
25-
"!curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm\n",
26-
"!ln -s /root/.nix-profile/bin /opt/bin\n",
27-
"\n",
28-
"# Install evcxr\n",
29-
"!nix-env -f '<nixpkgs>' -iA cargo rustc evcxr sccache\n",
30-
"!evcxr_jupyter --install\n",
31-
"\n",
32-
"# Configure evcxr\n",
33-
"!mkdir -p /root/.config/evcxr\n",
34-
"!printf \":timing\\n:sccache 1\" > /root/.config/evcxr/init.evcxr\n",
35-
"\n",
36-
"# IPC Proxy (https://stackoverflow.com/a/74821762)\n",
37-
"!wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
38-
"!python install_ipc_proxy_kernel.py --quiet --kernel=rust --implementation=ipc_proxy_kernel.py > /dev/null\n",
39-
"\n",
40-
"# To avoid confusion between kernel names\n",
41-
"!sed -i 's/\"display_name\": \"Rust\"/\"display_name\": \"Rust-TCP\"/g' /root/.local/share/jupyter/kernels/rust_tcp/kernel.json"
22+
"# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. \n",
23+
"!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1\n",
24+
"!bash setup_evcxr_kernel.sh"
4225
]
4326
},
4427
{

4-polars-tutorial-part-2.ipynb

+5-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"id": "3d3de788-4962-4e37-b74c-40d12f939401",
66
"metadata": {},
77
"source": [
8-
"## Google Colab & Binder Rust Setup\n",
8+
"## Google Colab Rust Setup\n",
99
"\n",
10-
"The following cell is used to set up a Rust environment on Colab and Binder. Don't execute it locally!\n",
10+
"The following cell is used to set up a Rust environment on Colab. Don't execute it locally!\n",
1111
"\n",
1212
"Many thanks to [`mateusvmv`](https://github.com/mateusvmv) for this hack in [`gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3`](https://gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3?permalink_comment_id=4715636#gistcomment-4715636)."
1313
]
@@ -19,26 +19,9 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"!rm -rf /root/.local/share/jupyter/kernels\n",
23-
"\n",
24-
"# Nix install\n",
25-
"!curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm\n",
26-
"!ln -s /root/.nix-profile/bin /opt/bin\n",
27-
"\n",
28-
"# Install evcxr\n",
29-
"!nix-env -f '<nixpkgs>' -iA cargo rustc evcxr sccache\n",
30-
"!evcxr_jupyter --install\n",
31-
"\n",
32-
"# Configure evcxr\n",
33-
"!mkdir -p /root/.config/evcxr\n",
34-
"!printf \":timing\\n:sccache 1\" > /root/.config/evcxr/init.evcxr\n",
35-
"\n",
36-
"# IPC Proxy (https://stackoverflow.com/a/74821762)\n",
37-
"!wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
38-
"!python install_ipc_proxy_kernel.py --quiet --kernel=rust --implementation=ipc_proxy_kernel.py > /dev/null\n",
39-
"\n",
40-
"# To avoid confusion between kernel names\n",
41-
"!sed -i 's/\"display_name\": \"Rust\"/\"display_name\": \"Rust-TCP\"/g' /root/.local/share/jupyter/kernels/rust_tcp/kernel.json"
22+
"# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. \n",
23+
"!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1\n",
24+
"!bash setup_evcxr_kernel.sh"
4225
]
4326
},
4427
{

5-probability-theory-tutorial.ipynb

+5-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"id": "e01fb3ac-9ab7-4723-8cbc-08434c9e158f",
66
"metadata": {},
77
"source": [
8-
"## Google Colab & Binder Rust Setup\n",
8+
"## Google Colab Rust Setup\n",
99
"\n",
10-
"The following cell is used to set up a Rust environment on Colab and Binder. Don't execute it locally!\n",
10+
"The following cell is used to set up a Rust environment on Colab. Don't execute it locally!\n",
1111
"\n",
1212
"Many thanks to [`mateusvmv`](https://github.com/mateusvmv) for this hack in [`gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3`](https://gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3?permalink_comment_id=4715636#gistcomment-4715636)."
1313
]
@@ -19,26 +19,9 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"!rm -rf /root/.local/share/jupyter/kernels\n",
23-
"\n",
24-
"# Nix install\n",
25-
"!curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm\n",
26-
"!ln -s /root/.nix-profile/bin /opt/bin\n",
27-
"\n",
28-
"# Install evcxr\n",
29-
"!nix-env -f '<nixpkgs>' -iA cargo rustc evcxr sccache\n",
30-
"!evcxr_jupyter --install\n",
31-
"\n",
32-
"# Configure evcxr\n",
33-
"!mkdir -p /root/.config/evcxr\n",
34-
"!printf \":timing\\n:sccache 1\" > /root/.config/evcxr/init.evcxr\n",
35-
"\n",
36-
"# IPC Proxy (https://stackoverflow.com/a/74821762)\n",
37-
"!wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
38-
"!python install_ipc_proxy_kernel.py --quiet --kernel=rust --implementation=ipc_proxy_kernel.py > /dev/null\n",
39-
"\n",
40-
"# To avoid confusion between kernel names\n",
41-
"!sed -i 's/\"display_name\": \"Rust\"/\"display_name\": \"Rust-TCP\"/g' /root/.local/share/jupyter/kernels/rust_tcp/kernel.json"
22+
"# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. \n",
23+
"!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1\n",
24+
"!bash setup_evcxr_kernel.sh"
4225
]
4326
},
4427
{

6-plotters-tutorial-part-1.ipynb

+5-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"id": "7c29a52e-53d1-48fc-9f9d-b7cccbe16187",
66
"metadata": {},
77
"source": [
8-
"## Google Colab & Binder Rust Setup\n",
8+
"## Google Colab Rust Setup\n",
99
"\n",
10-
"The following cell is used to set up a Rust environment on Colab and Binder. Don't execute it locally!\n",
10+
"The following cell is used to set up a Rust environment on Colab. Don't execute it locally!\n",
1111
"\n",
1212
"Many thanks to [`mateusvmv`](https://github.com/mateusvmv) for this hack in [`gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3`](https://gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3?permalink_comment_id=4715636#gistcomment-4715636)."
1313
]
@@ -19,26 +19,9 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"!rm -rf /root/.local/share/jupyter/kernels\n",
23-
"\n",
24-
"# Nix install\n",
25-
"!curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm\n",
26-
"!ln -s /root/.nix-profile/bin /opt/bin\n",
27-
"\n",
28-
"# Install evcxr\n",
29-
"!nix-env -f '<nixpkgs>' -iA cargo rustc evcxr sccache\n",
30-
"!evcxr_jupyter --install\n",
31-
"\n",
32-
"# Configure evcxr\n",
33-
"!mkdir -p /root/.config/evcxr\n",
34-
"!printf \":timing\\n:sccache 1\" > /root/.config/evcxr/init.evcxr\n",
35-
"\n",
36-
"# IPC Proxy (https://stackoverflow.com/a/74821762)\n",
37-
"!wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
38-
"!python install_ipc_proxy_kernel.py --quiet --kernel=rust --implementation=ipc_proxy_kernel.py > /dev/null\n",
39-
"\n",
40-
"# To avoid confusion between kernel names\n",
41-
"!sed -i 's/\"display_name\": \"Rust\"/\"display_name\": \"Rust-TCP\"/g' /root/.local/share/jupyter/kernels/rust_tcp/kernel.json"
22+
"# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. \n",
23+
"!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1\n",
24+
"!bash setup_evcxr_kernel.sh"
4225
]
4326
},
4427
{

7-calculus-tutorial-part-1.ipynb

+5-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"id": "0f6d8195-c607-4a0a-babe-00ea6cf6d575",
66
"metadata": {},
77
"source": [
8-
"## Google Colab & Binder Rust Setup\n",
8+
"## Google Colab Rust Setup\n",
99
"\n",
10-
"The following cell is used to set up a Rust environment on Colab and Binder. Don't execute it locally!\n",
10+
"The following cell is used to set up a Rust environment on Colab. Don't execute it locally!\n",
1111
"\n",
1212
"Many thanks to [`mateusvmv`](https://github.com/mateusvmv) for this hack in [`gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3`](https://gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3?permalink_comment_id=4715636#gistcomment-4715636)."
1313
]
@@ -19,26 +19,9 @@
1919
"metadata": {},
2020
"outputs": [],
2121
"source": [
22-
"!rm -rf /root/.local/share/jupyter/kernels\n",
23-
"\n",
24-
"# Nix install\n",
25-
"!curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm\n",
26-
"!ln -s /root/.nix-profile/bin /opt/bin\n",
27-
"\n",
28-
"# Install evcxr\n",
29-
"!nix-env -f '<nixpkgs>' -iA cargo rustc evcxr sccache\n",
30-
"!evcxr_jupyter --install\n",
31-
"\n",
32-
"# Configure evcxr\n",
33-
"!mkdir -p /root/.config/evcxr\n",
34-
"!printf \":timing\\n:sccache 1\" > /root/.config/evcxr/init.evcxr\n",
35-
"\n",
36-
"# IPC Proxy (https://stackoverflow.com/a/74821762)\n",
37-
"!wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n",
38-
"!python install_ipc_proxy_kernel.py --quiet --kernel=rust --implementation=ipc_proxy_kernel.py > /dev/null\n",
39-
"\n",
40-
"# To avoid confusion between kernel names\n",
41-
"!sed -i 's/\"display_name\": \"Rust\"/\"display_name\": \"Rust-TCP\"/g' /root/.local/share/jupyter/kernels/rust_tcp/kernel.json"
22+
"# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. \n",
23+
"!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1\n",
24+
"!bash setup_evcxr_kernel.sh"
4225
]
4326
},
4427
{

0 commit comments

Comments
 (0)