From 7153d8bbe8cb849bd92a311a106fa4034a898b75 Mon Sep 17 00:00:00 2001 From: Spiros Chavlis Date: Tue, 27 Jun 2023 10:43:24 +0300 Subject: [PATCH] add snippets (#103) * add snippets * Process tutorial notebooks --------- Co-authored-by: GitHub Action --- .../W0D3_LinearAlgebra/W0D3_Tutorial3.ipynb | 109 +++++++++++++++++- .../instructor/W0D3_Tutorial3.ipynb | 109 +++++++++++++++++- .../student/W0D3_Tutorial3.ipynb | 109 +++++++++++++++++- 3 files changed, 324 insertions(+), 3 deletions(-) diff --git a/tutorials/W0D3_LinearAlgebra/W0D3_Tutorial3.ipynb b/tutorials/W0D3_LinearAlgebra/W0D3_Tutorial3.ipynb index 4092767..357f8fc 100644 --- a/tutorials/W0D3_LinearAlgebra/W0D3_Tutorial3.ipynb +++ b/tutorials/W0D3_LinearAlgebra/W0D3_Tutorial3.ipynb @@ -67,6 +67,35 @@ "# Setup" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Install and import feedback gadget\n", + "\n", + "!pip3 install vibecheck datatops --quiet\n", + "\n", + "from vibecheck import DatatopsContentReviewContainer\n", + "def content_review(notebook_section: str):\n", + " return DatatopsContentReviewContainer(\n", + " \"\", # No text prompt\n", + " notebook_section,\n", + " {\n", + " \"url\": \"https://pmyvdlilci.execute-api.us-east-1.amazonaws.com/klab\",\n", + " \"name\": \"neuromatch-precourse\",\n", + " \"user_key\": \"8zxfvwxw\",\n", + " },\n", + " ).render()\n", + "\n", + "\n", + "feedback_prefix = \"W0D3_Bonus\"" + ] + }, { "cell_type": "code", "execution_count": null, @@ -311,6 +340,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_A_neural_circuit_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -501,6 +543,19 @@ " plot_circuit_responses(a, W)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Implementing_the_circuit_Exercise\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -637,6 +692,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Looking_at_activity_along_an_eigenvector_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -759,6 +827,19 @@ "\"\"\";" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Changing_the_eigenvalue_Interactive_Demo\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -824,6 +905,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Understanding_general_dynamics_using_eigenstuff_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -1009,6 +1103,19 @@ "\"\"\";" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Changing_both_eigenvalues_Interactive_Demo\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -1074,7 +1181,7 @@ "\n", "
\n", "\n", - "Importantly, these ideas extend far beyond our toy neural circuit. Discrete dynamical systems with the same structure of update rule are common. While the exact dependencies on eigenvalues will change, we will see that we can still use eigenvalues/vectors to understand continuous dynamical systems in W2D2: Linear Dynamics." + "Importantly, these ideas extend far beyond our toy neural circuit. Discrete dynamical systems with the same structure of update rule are common. While the exact dependencies on eigenvalues will change, we will see that we can still use eigenvalues/vectors to understand continuous dynamical systems in [Linear Systems day](https://compneuro.neuromatch.io/tutorials/W2D2_LinearSystems/chapter_title.html)." ] } ], diff --git a/tutorials/W0D3_LinearAlgebra/instructor/W0D3_Tutorial3.ipynb b/tutorials/W0D3_LinearAlgebra/instructor/W0D3_Tutorial3.ipynb index 705ae94..5c0fc51 100644 --- a/tutorials/W0D3_LinearAlgebra/instructor/W0D3_Tutorial3.ipynb +++ b/tutorials/W0D3_LinearAlgebra/instructor/W0D3_Tutorial3.ipynb @@ -67,6 +67,35 @@ "# Setup" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Install and import feedback gadget\n", + "\n", + "!pip3 install vibecheck datatops --quiet\n", + "\n", + "from vibecheck import DatatopsContentReviewContainer\n", + "def content_review(notebook_section: str):\n", + " return DatatopsContentReviewContainer(\n", + " \"\", # No text prompt\n", + " notebook_section,\n", + " {\n", + " \"url\": \"https://pmyvdlilci.execute-api.us-east-1.amazonaws.com/klab\",\n", + " \"name\": \"neuromatch-precourse\",\n", + " \"user_key\": \"8zxfvwxw\",\n", + " },\n", + " ).render()\n", + "\n", + "\n", + "feedback_prefix = \"W0D3_Bonus\"" + ] + }, { "cell_type": "code", "execution_count": null, @@ -311,6 +340,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_A_neural_circuit_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -503,6 +545,19 @@ " plot_circuit_responses(a, W)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Implementing_the_circuit_Exercise\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -639,6 +694,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Looking_at_activity_along_an_eigenvector_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -761,6 +829,19 @@ "\"\"\";" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Changing_the_eigenvalue_Interactive_Demo\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -826,6 +907,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Understanding_general_dynamics_using_eigenstuff_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -1011,6 +1105,19 @@ "\"\"\";" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Changing_both_eigenvalues_Interactive_Demo\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -1076,7 +1183,7 @@ "\n", "
\n", "\n", - "Importantly, these ideas extend far beyond our toy neural circuit. Discrete dynamical systems with the same structure of update rule are common. While the exact dependencies on eigenvalues will change, we will see that we can still use eigenvalues/vectors to understand continuous dynamical systems in W2D2: Linear Dynamics." + "Importantly, these ideas extend far beyond our toy neural circuit. Discrete dynamical systems with the same structure of update rule are common. While the exact dependencies on eigenvalues will change, we will see that we can still use eigenvalues/vectors to understand continuous dynamical systems in [Linear Systems day](https://compneuro.neuromatch.io/tutorials/W2D2_LinearSystems/chapter_title.html)." ] } ], diff --git a/tutorials/W0D3_LinearAlgebra/student/W0D3_Tutorial3.ipynb b/tutorials/W0D3_LinearAlgebra/student/W0D3_Tutorial3.ipynb index 056c4d3..559240d 100644 --- a/tutorials/W0D3_LinearAlgebra/student/W0D3_Tutorial3.ipynb +++ b/tutorials/W0D3_LinearAlgebra/student/W0D3_Tutorial3.ipynb @@ -67,6 +67,35 @@ "# Setup" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Install and import feedback gadget\n", + "\n", + "!pip3 install vibecheck datatops --quiet\n", + "\n", + "from vibecheck import DatatopsContentReviewContainer\n", + "def content_review(notebook_section: str):\n", + " return DatatopsContentReviewContainer(\n", + " \"\", # No text prompt\n", + " notebook_section,\n", + " {\n", + " \"url\": \"https://pmyvdlilci.execute-api.us-east-1.amazonaws.com/klab\",\n", + " \"name\": \"neuromatch-precourse\",\n", + " \"user_key\": \"8zxfvwxw\",\n", + " },\n", + " ).render()\n", + "\n", + "\n", + "feedback_prefix = \"W0D3_Bonus\"" + ] + }, { "cell_type": "code", "execution_count": null, @@ -311,6 +340,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_A_neural_circuit_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -467,6 +509,19 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Implementing_the_circuit_Exercise\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -603,6 +658,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Looking_at_activity_along_an_eigenvector_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -708,6 +776,19 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Changing_the_eigenvalue_Interactive_Demo\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -773,6 +854,19 @@ "display(tabs)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Understanding_general_dynamics_using_eigenstuff_Video\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -944,6 +1038,19 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "execution": {} + }, + "outputs": [], + "source": [ + "# @title Submit your feedback\n", + "content_review(f\"{feedback_prefix}_Changing_both_eigenvalues_Interactive_Demo\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -1009,7 +1116,7 @@ "\n", "
\n", "\n", - "Importantly, these ideas extend far beyond our toy neural circuit. Discrete dynamical systems with the same structure of update rule are common. While the exact dependencies on eigenvalues will change, we will see that we can still use eigenvalues/vectors to understand continuous dynamical systems in W2D2: Linear Dynamics." + "Importantly, these ideas extend far beyond our toy neural circuit. Discrete dynamical systems with the same structure of update rule are common. While the exact dependencies on eigenvalues will change, we will see that we can still use eigenvalues/vectors to understand continuous dynamical systems in [Linear Systems day](https://compneuro.neuromatch.io/tutorials/W2D2_LinearSystems/chapter_title.html)." ] } ],