From de55abe9364a74afedde98f18ddbaacd0e79d42d Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Tue, 14 Jul 2026 10:43:57 -0400 Subject: [PATCH 1/4] Minor tweaks and fixes --- site/files/solutions-NO-PEEKING.ipynb | 4 +- site/files/tutorial.ipynb | 57 +++++++++++++-------------- site/requirements.txt | 4 +- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/site/files/solutions-NO-PEEKING.ipynb b/site/files/solutions-NO-PEEKING.ipynb index 6df949f..86c6866 100644 --- a/site/files/solutions-NO-PEEKING.ipynb +++ b/site/files/solutions-NO-PEEKING.ipynb @@ -30,7 +30,7 @@ "outputs": [], "source": [ "import piplite\n", - "await piplite.install(\"awkward==2.7.2\")\n", + "await piplite.install(\"awkward\")\n", "await piplite.install(\"hist\")\n", "await piplite.install(\"uproot\")\n", "await piplite.install(\"vector\")" @@ -566,7 +566,7 @@ "metadata": {}, "outputs": [], "source": [ - "with uproot.open(\"data/SMHiggsToZZTo4L.root\", handler=uproot.MemmapSource) as file:\n", + "with uproot.open(\"data/SMHiggsToZZTo4L.root\") as file:\n", " dataset = file[\"Events\"].arrays()" ] }, diff --git a/site/files/tutorial.ipynb b/site/files/tutorial.ipynb index 562a76a..ae6c5e6 100644 --- a/site/files/tutorial.ipynb +++ b/site/files/tutorial.ipynb @@ -73,7 +73,7 @@ "outputs": [], "source": [ "import piplite\n", - "await piplite.install(\"awkward==2.7.4\")\n", + "await piplite.install(\"awkward\")\n", "await piplite.install(\"hist\")\n", "await piplite.install(\"uproot\")\n", "await piplite.install(\"vector\")" @@ -365,32 +365,31 @@ "\n", " for i in range(len(x)):\n", " for j in range(i + 1, len(x)):\n", - " if i != j:\n", - " mi, mj = m[i], m[j]\n", - " xi, xj = x[i], x[j]\n", - " pi, pj = p[i], p[j]\n", - " displacement = [\n", - " xj[0] - xi[0],\n", - " xj[1] - xi[1],\n", - " xj[2] - xi[2],\n", - " ]\n", - " distance = np.sqrt(displacement[0]**2 + displacement[1]**2 + displacement[2]**2)\n", - " direction = [\n", - " displacement[0] / distance,\n", - " displacement[1] / distance,\n", - " displacement[2] / distance,\n", - " ]\n", - " force = [\n", - " G * mi * mj * direction[0] / distance**2,\n", - " G * mi * mj * direction[1] / distance**2,\n", - " G * mi * mj * direction[2] / distance**2,\n", - " ]\n", - " total_force[i, 0] += force[0]\n", - " total_force[i, 1] += force[1]\n", - " total_force[i, 2] += force[2]\n", - " total_force[j, 0] += -force[0]\n", - " total_force[j, 1] += -force[1]\n", - " total_force[j, 2] += -force[2]\n", + " mi, mj = m[i], m[j]\n", + " xi, xj = x[i], x[j]\n", + " pi, pj = p[i], p[j]\n", + " displacement = [\n", + " xj[0] - xi[0],\n", + " xj[1] - xi[1],\n", + " xj[2] - xi[2],\n", + " ]\n", + " distance = np.sqrt(displacement[0]**2 + displacement[1]**2 + displacement[2]**2)\n", + " direction = [\n", + " displacement[0] / distance,\n", + " displacement[1] / distance,\n", + " displacement[2] / distance,\n", + " ]\n", + " force = [\n", + " G * mi * mj * direction[0] / distance**2,\n", + " G * mi * mj * direction[1] / distance**2,\n", + " G * mi * mj * direction[2] / distance**2,\n", + " ]\n", + " total_force[i, 0] += force[0]\n", + " total_force[i, 1] += force[1]\n", + " total_force[i, 2] += force[2]\n", + " total_force[j, 0] += -force[0]\n", + " total_force[j, 1] += -force[1]\n", + " total_force[j, 2] += -force[2]\n", "\n", " return total_force" ] @@ -881,7 +880,7 @@ "id": "fe1c0e4e-e1e4-4f4e-bbb2-fc8c96648cf8", "metadata": {}, "source": [ - "Write a slice the selects these elements:\n", + "Write a slice that selects these elements:\n", "\n", "" ] @@ -1216,7 +1215,7 @@ "with open(\"data/SMHiggsToZZTo4L.root\", \"rb\") as file:\n", " file.seek(42104123)\n", " compressed_data = file.read(14718)\n", - " uncompressed_data = uncompressed_data = zlib.decompress(compressed_data)\n", + " uncompressed_data = zlib.decompress(compressed_data)\n", " array_of_uint8 = np.frombuffer(uncompressed_data, np.uint8, 12524)" ] }, diff --git a/site/requirements.txt b/site/requirements.txt index 690b957..2ca3bfd 100644 --- a/site/requirements.txt +++ b/site/requirements.txt @@ -1,4 +1,4 @@ -jupyterlite-core==0.8.0 +jupyterlite-core==0.8.0b0 jupyterlab==4.6.1 notebook==7.6.0 -jupyterlite-pyodide-kernel==0.8.1 +jupyterlite-pyodide-kernel==0.8.0b0 From 448cb54e9e09277f7c8945938cb8c18a2856c5d8 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Tue, 14 Jul 2026 10:55:59 -0400 Subject: [PATCH 2/4] Decrease pyodide version even further --- site/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/requirements.txt b/site/requirements.txt index 2ca3bfd..b5c5fb6 100644 --- a/site/requirements.txt +++ b/site/requirements.txt @@ -1,4 +1,4 @@ -jupyterlite-core==0.8.0b0 +jupyterlite-core==0.7.5 jupyterlab==4.6.1 notebook==7.6.0 -jupyterlite-pyodide-kernel==0.8.0b0 +jupyterlite-pyodide-kernel==0.7.2 From 85dbfed024e3c6792390490421dd9673e51d3f5d Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Tue, 14 Jul 2026 11:10:38 -0400 Subject: [PATCH 3/4] Fixed awkward version --- site/files/solutions-NO-PEEKING.ipynb | 2 +- site/files/tutorial.ipynb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/files/solutions-NO-PEEKING.ipynb b/site/files/solutions-NO-PEEKING.ipynb index 86c6866..36f3d87 100644 --- a/site/files/solutions-NO-PEEKING.ipynb +++ b/site/files/solutions-NO-PEEKING.ipynb @@ -30,7 +30,7 @@ "outputs": [], "source": [ "import piplite\n", - "await piplite.install(\"awkward\")\n", + "await piplite.install(\"awkward==2.8.5\")\n", "await piplite.install(\"hist\")\n", "await piplite.install(\"uproot\")\n", "await piplite.install(\"vector\")" diff --git a/site/files/tutorial.ipynb b/site/files/tutorial.ipynb index ae6c5e6..9c1e955 100644 --- a/site/files/tutorial.ipynb +++ b/site/files/tutorial.ipynb @@ -73,7 +73,7 @@ "outputs": [], "source": [ "import piplite\n", - "await piplite.install(\"awkward\")\n", + "await piplite.install(\"awkward==2.8.5\")\n", "await piplite.install(\"hist\")\n", "await piplite.install(\"uproot\")\n", "await piplite.install(\"vector\")" From 9db3b58232040f725e7b03e172314cfc8d905afd Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Tue, 14 Jul 2026 11:12:51 -0400 Subject: [PATCH 4/4] Consistency fix --- site/files/solutions-NO-PEEKING.ipynb | 8 ++++---- site/files/tutorial.ipynb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/site/files/solutions-NO-PEEKING.ipynb b/site/files/solutions-NO-PEEKING.ipynb index 36f3d87..2accde8 100644 --- a/site/files/solutions-NO-PEEKING.ipynb +++ b/site/files/solutions-NO-PEEKING.ipynb @@ -1656,13 +1656,13 @@ "100\n", "\n", "\n", - "mass GeV\n", + "mass (GeV)\n", "\n", "\n", "\n", "\n", "
\n", - "Regular(100, 0, 100, label='mass GeV')
\n", + "Regular(100, 0, 100, label='mass (GeV)')
\n", "
\n", "Double() Σ=271500.0 (272832.0 with flow)\n", "\n", @@ -1671,7 +1671,7 @@ "" ], "text/plain": [ - "Hist(Regular(100, 0, 100, label='mass GeV'), storage=Double()) # Sum: 271500.0 (272832.0 with flow)" + "Hist(Regular(100, 0, 100, label='mass (GeV)'), storage=Double()) # Sum: 271500.0 (272832.0 with flow)" ] }, "execution_count": 40, @@ -1682,7 +1682,7 @@ "source": [ "mu1, mu2 = ak.unzip(ak.cartesian([muon_plus, muon_minus]))\n", "\n", - "quickplot(100, 0, 100, ak.flatten((mu1 + mu2).mass), label=\"mass GeV\")" + "quickplot(100, 0, 100, ak.flatten((mu1 + mu2).mass), label=\"mass (GeV)\")" ] }, { diff --git a/site/files/tutorial.ipynb b/site/files/tutorial.ipynb index 9c1e955..a675508 100644 --- a/site/files/tutorial.ipynb +++ b/site/files/tutorial.ipynb @@ -2357,7 +2357,7 @@ "source": [ "cut = mu1.charge != mu2.charge\n", "\n", - "quickplot(100, 0, 100, ak.flatten((mu1[cut] + mu2[cut]).mass), label=\"mass GeV\")" + "quickplot(100, 0, 100, ak.flatten((mu1[cut] + mu2[cut]).mass), label=\"mass (GeV)\")" ] }, {