Skip to content

Commit e23b14f

Browse files
author
Quarto GHA Workflow Runner
committed
Built site for gh-pages
1 parent 0ae50cc commit e23b14f

4 files changed

Lines changed: 28 additions & 28 deletions

File tree

.nojekyll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7604d913
1+
a3b78ae3

111_debugging.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ <h2 data-number="13.5" class="anchored" data-anchor-id="exercises"><span class="
534534
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">with</span> zipfile.ZipFile(source_file) <span class="im">as</span> <span class="bu">file</span>:</span>
535535
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> <span class="bu">file</span>.extractall(target_dir)</span>
536536
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a></span>
537-
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a>project_path <span class="op">=</span> Path(<span class="st">"/home/fdamicel/projects/pycourse"</span>)</span>
537+
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a>project_path <span class="op">=</span> Path(<span class="st">"pycourse"</span>)</span>
538538
<span id="cb11-9"><a href="#cb11-9" aria-hidden="true" tabindex="-1"></a></span>
539539
<span id="cb11-10"><a href="#cb11-10" aria-hidden="true" tabindex="-1"></a>source <span class="op">=</span> project_path<span class="op">/</span><span class="st">"data/ds005588-main.zip"</span></span>
540540
<span id="cb11-11"><a href="#cb11-11" aria-hidden="true" tabindex="-1"></a>target <span class="op">=</span> project_path<span class="op">/</span><span class="st">"data"</span></span>

search.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@
614614
"href": "111_debugging.html#exercises",
615615
"title": "13  Debugging",
616616
"section": "13.5 Exercises",
617-
"text": "13.5 Exercises\nHere’s a piece of code that will fail at run-time:\n\ndef f(p):\n assert p == 0\n \ndef main():\n a = 0\n f(a)\n b = 1 \n f(b)\n c = 0\n f(c)\n\n\nRun the code to see the error\nSet a breakpoint inside main to use the debugger\nStep through the code using n (next) and another time using s (step)\nSet a second breakpoint inside mainand run again the code but this time use c (continue)\nDownload this public dataset as zip file into the folder /pycourse/data/ (create it if you don’t yet have it)\n\nHere’s a bit of code to unzip the file.\n\nfrom pathlib import Path\nimport zipfile\n\ndef unzip(source_file, target_dir):\n with zipfile.ZipFile(source_file) as file:\n file.extractall(target_dir)\n\nproject_path = Path(\"/home/fdamicel/projects/pycourse\")\n\nsource = project_path/\"data/ds005588-main.zip\"\ntarget = project_path/\"data\"\nunzip(source, target)\n\nNow, your collaborator has written this script to extract the mean value of the “SAR” entry from across all subjects bold data.\n\nPut this script into the folder (create if it does not yet exist) pycourse/scripts/sar_mean.py and make the necessary modifications to make it run as a script.\nRun it using uv run scripts/sar_mean.py and see it fail. Set a breakpoint inside the get_subjects_sar_mean function. Run it again and try to find the bug inside the debugger.\nAdd some error handling to make sure the script runs.\n\n\nimport json\nfrom glob import glob\nfrom pathlib import Path\n\ndef get_subjects_sar_mean(data_dir):\n # Grab all files matching this filename pattern\n files = glob(str(data_dir/\"**/*_bold.json\"), recursive=True)\n \n sar_sum = 0\n n = 0\n for file in files:\n content = json.loads(Path(file).read_text())\n sar_sum += content[\"SAR\"]\n n += 1\n return sar_sum/n\n\n# TODO: add whatever code you need to make this code a proper script\n# that prints the sar-mean when run\n\nTo recap, so far our project should have these files:",
617+
"text": "13.5 Exercises\nHere’s a piece of code that will fail at run-time:\n\ndef f(p):\n assert p == 0\n \ndef main():\n a = 0\n f(a)\n b = 1 \n f(b)\n c = 0\n f(c)\n\n\nRun the code to see the error\nSet a breakpoint inside main to use the debugger\nStep through the code using n (next) and another time using s (step)\nSet a second breakpoint inside mainand run again the code but this time use c (continue)\nDownload this public dataset as zip file into the folder /pycourse/data/ (create it if you don’t yet have it)\n\nHere’s a bit of code to unzip the file.\n\nfrom pathlib import Path\nimport zipfile\n\ndef unzip(source_file, target_dir):\n with zipfile.ZipFile(source_file) as file:\n file.extractall(target_dir)\n\nproject_path = Path(\"pycourse\")\n\nsource = project_path/\"data/ds005588-main.zip\"\ntarget = project_path/\"data\"\nunzip(source, target)\n\nNow, your collaborator has written this script to extract the mean value of the “SAR” entry from across all subjects bold data.\n\nPut this script into the folder (create if it does not yet exist) pycourse/scripts/sar_mean.py and make the necessary modifications to make it run as a script.\nRun it using uv run scripts/sar_mean.py and see it fail. Set a breakpoint inside the get_subjects_sar_mean function. Run it again and try to find the bug inside the debugger.\nAdd some error handling to make sure the script runs.\n\n\nimport json\nfrom glob import glob\nfrom pathlib import Path\n\ndef get_subjects_sar_mean(data_dir):\n # Grab all files matching this filename pattern\n files = glob(str(data_dir/\"**/*_bold.json\"), recursive=True)\n \n sar_sum = 0\n n = 0\n for file in files:\n content = json.loads(Path(file).read_text())\n sar_sum += content[\"SAR\"]\n n += 1\n return sar_sum/n\n\n# TODO: add whatever code you need to make this code a proper script\n# that prints the sar-mean when run\n\nTo recap, so far our project should have these files:",
618618
"crumbs": [
619619
"<span class='chapter-number'>13</span>  <span class='chapter-title'>Debugging</span>"
620620
]

sitemap.xml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,102 +2,102 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://fabridamicelli.github.io/python-course/index.html</loc>
5-
<lastmod>2025-11-06T11:42:55.192Z</lastmod>
5+
<lastmod>2025-11-06T11:53:09.694Z</lastmod>
66
</url>
77
<url>
88
<loc>https://fabridamicelli.github.io/python-course/01_1_getting_started.html</loc>
9-
<lastmod>2025-11-06T11:42:55.186Z</lastmod>
9+
<lastmod>2025-11-06T11:53:09.689Z</lastmod>
1010
</url>
1111
<url>
1212
<loc>https://fabridamicelli.github.io/python-course/01_2_executing_code.html</loc>
13-
<lastmod>2025-11-06T11:42:55.186Z</lastmod>
13+
<lastmod>2025-11-06T11:53:09.689Z</lastmod>
1414
</url>
1515
<url>
1616
<loc>https://fabridamicelli.github.io/python-course/02_types_data_structures.html</loc>
17-
<lastmod>2025-11-06T11:42:55.186Z</lastmod>
17+
<lastmod>2025-11-06T11:53:09.689Z</lastmod>
1818
</url>
1919
<url>
2020
<loc>https://fabridamicelli.github.io/python-course/03_1_flow_control.html</loc>
21-
<lastmod>2025-11-06T11:42:55.186Z</lastmod>
21+
<lastmod>2025-11-06T11:53:09.689Z</lastmod>
2222
</url>
2323
<url>
2424
<loc>https://fabridamicelli.github.io/python-course/03_2_error_handling.html</loc>
25-
<lastmod>2025-11-06T11:42:55.186Z</lastmod>
25+
<lastmod>2025-11-06T11:53:09.689Z</lastmod>
2626
</url>
2727
<url>
2828
<loc>https://fabridamicelli.github.io/python-course/04_functions.html</loc>
29-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
29+
<lastmod>2025-11-06T11:53:09.689Z</lastmod>
3030
</url>
3131
<url>
3232
<loc>https://fabridamicelli.github.io/python-course/05_comprehensions.html</loc>
33-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
33+
<lastmod>2025-11-06T11:53:09.690Z</lastmod>
3434
</url>
3535
<url>
3636
<loc>https://fabridamicelli.github.io/python-course/lab_builtin_for_the_win.html</loc>
37-
<lastmod>2025-11-06T11:42:55.192Z</lastmod>
37+
<lastmod>2025-11-06T11:53:09.695Z</lastmod>
3838
</url>
3939
<url>
4040
<loc>https://fabridamicelli.github.io/python-course/06_imports.html</loc>
41-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
41+
<lastmod>2025-11-06T11:53:09.690Z</lastmod>
4242
</url>
4343
<url>
4444
<loc>https://fabridamicelli.github.io/python-course/062_read_and_write.html</loc>
45-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
45+
<lastmod>2025-11-06T11:53:09.690Z</lastmod>
4646
</url>
4747
<url>
4848
<loc>https://fabridamicelli.github.io/python-course/061_dependencies.html</loc>
49-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
49+
<lastmod>2025-11-06T11:53:09.690Z</lastmod>
5050
</url>
5151
<url>
5252
<loc>https://fabridamicelli.github.io/python-course/063_common_data_formats.html</loc>
53-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
53+
<lastmod>2025-11-06T11:53:09.690Z</lastmod>
5454
</url>
5555
<url>
5656
<loc>https://fabridamicelli.github.io/python-course/111_debugging.html</loc>
57-
<lastmod>2025-11-06T11:42:55.190Z</lastmod>
57+
<lastmod>2025-11-06T11:53:09.693Z</lastmod>
5858
</url>
5959
<url>
6060
<loc>https://fabridamicelli.github.io/python-course/08_numpy.html</loc>
61-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
61+
<lastmod>2025-11-06T11:53:09.690Z</lastmod>
6262
</url>
6363
<url>
6464
<loc>https://fabridamicelli.github.io/python-course/081_pandas.html</loc>
65-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
65+
<lastmod>2025-11-06T11:53:09.690Z</lastmod>
6666
</url>
6767
<url>
6868
<loc>https://fabridamicelli.github.io/python-course/09_plotting.html</loc>
69-
<lastmod>2025-11-06T11:42:55.190Z</lastmod>
69+
<lastmod>2025-11-06T11:53:09.693Z</lastmod>
7070
</url>
7171
<url>
7272
<loc>https://fabridamicelli.github.io/python-course/10_tests.html</loc>
73-
<lastmod>2025-11-06T11:42:55.190Z</lastmod>
73+
<lastmod>2025-11-06T11:53:09.693Z</lastmod>
7474
</url>
7575
<url>
7676
<loc>https://fabridamicelli.github.io/python-course/11_cli.html</loc>
77-
<lastmod>2025-11-06T11:42:55.190Z</lastmod>
77+
<lastmod>2025-11-06T11:53:09.693Z</lastmod>
7878
</url>
7979
<url>
8080
<loc>https://fabridamicelli.github.io/python-course/13_tools.html</loc>
81-
<lastmod>2025-11-06T11:42:55.190Z</lastmod>
81+
<lastmod>2025-11-06T11:53:09.693Z</lastmod>
8282
</url>
8383
<url>
8484
<loc>https://fabridamicelli.github.io/python-course/051_oop.html</loc>
85-
<lastmod>2025-11-06T11:42:55.187Z</lastmod>
85+
<lastmod>2025-11-06T11:53:09.689Z</lastmod>
8686
</url>
8787
<url>
8888
<loc>https://fabridamicelli.github.io/python-course/lab_explore_data_exercises.html</loc>
89-
<lastmod>2025-11-06T11:42:55.192Z</lastmod>
89+
<lastmod>2025-11-06T11:53:09.695Z</lastmod>
9090
</url>
9191
<url>
9292
<loc>https://fabridamicelli.github.io/python-course/notebook_workflow.html</loc>
93-
<lastmod>2025-11-06T11:42:55.195Z</lastmod>
93+
<lastmod>2025-11-06T11:53:09.698Z</lastmod>
9494
</url>
9595
<url>
9696
<loc>https://fabridamicelli.github.io/python-course/999_glossary.html</loc>
97-
<lastmod>2025-11-06T11:42:55.190Z</lastmod>
97+
<lastmod>2025-11-06T11:53:09.693Z</lastmod>
9898
</url>
9999
<url>
100100
<loc>https://fabridamicelli.github.io/python-course/references.html</loc>
101-
<lastmod>2025-11-06T11:42:55.195Z</lastmod>
101+
<lastmod>2025-11-06T11:53:09.698Z</lastmod>
102102
</url>
103103
</urlset>

0 commit comments

Comments
 (0)