Skip to content

Commit 7d0b2bd

Browse files
committed
alt text
1 parent 92ab5c2 commit 7d0b2bd

File tree

19 files changed

+65
-63
lines changed

19 files changed

+65
-63
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ A pdf view of how this notebook renders in Quarto can be found [here](https://dr
9595

9696
To give you the most control when inserting images, we use html with the following format to center images/figs and control their size:
9797

98-
```<center><img src = "IMAGE_NAME" width = "IMAGE_WIDTH_IN_PIXELS"></img></a></center>```
98+
```<center><img src = "IMAGE_NAME" width = "IMAGE_WIDTH_IN_PIXELS" alt="alt text here"></img></a></center>```
9999

100-
For example, `<center><img src = "images/updated_basic.png" width = "700"></img></a></center>`.
100+
For example, `<center><img src = "images/updated_basic.png" width = "700" alt="description of image"></img></a></center>`.
101+
102+
In some instances, the images may be completely described in the text of the page. In these cases, you may leave the alt text blank i.e. `alt=""`. BUT THE ALT TEXT MUST STILL BE INCLUDED.
101103

102104

103105
## Generating Output + Rendering Website

autograder_gradescope/autograder_gradescope.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ jupyter:
3434

3535
When you pass a test, you'll see a nice message and a cute emoji!
3636

37-
<center><img src = "passing_autograder.png" width = "200"></img></a></center>
37+
<center><img src = "passing_autograder.png" width = "200" alt="Screenshot of a grader cell for question q2a with cell ouput 'q2a passed'"></img></a></center>
3838

3939
When you don't, however, the message can be a little confusing.
4040

41-
<center><img src = "autograder_error.png" width = "600"></img></a></center>
41+
<center><img src = "autograder_error.png" width = "600" alt="Example of a cell output for a failing autograder test showing what test failed, what the code that was evaluated was, the expected output, and an error that was raised during the course of the test."></img></a></center>
4242
<br>
4343

4444
The best course of action is to find the test case that failed and use that as a starting point to debug your code.
4545

46-
<center><img src = "autograder_error_annot.png" width = "700"></img></a></center>
46+
<center><img src = "autograder_error_annot.png" width = "700" alt="An annotated version of the previous image which includes the note 'The most useful error message is usually at the bottom'"></img></a></center>
4747

4848
In the example above, we see that the test case in green, `max_swing in set(bus['name'])`, is not passing. The actual output (in blue) is often hard to parse, so the best course of action is to:
4949

@@ -100,11 +100,11 @@ This can happen if you import external packages when you are not instructed to d
100100

101101
If your Gradescope submission page has been stuck running on this page for a while:
102102

103-
<center><img src = "gradescope_loading.png" width = "350"></img></a></center>
103+
<center><img src = "gradescope_loading.png" width = "350" alt="Autograder Results. The autograder hasn't finish running yet."></img></a></center>
104104

105105
or if it times out:
106106

107-
<center><img src = "gradescope_timeout.png" width = "650"></img></a></center>
107+
<center><img src = "gradescope_timeout.png" width = "650" alt="Autograder Results. In a red box 'The autograder failed to respond in the expected amount of time. If the autograder continues to fail, contact your course staff for help in debugging this issue. Make sure to include a link to this page so they can help you most effectively.'"></img></a></center>
108108

109109
it means that the Gradescope autograder failed to execute in the expected amount of time. TThis could be due to an inefficiency in your code or an issue on Gradescope's end, so we recommend resubmitting and allowing the autograder to rerun. If the issue persists after a few attempts, you may need to investigate your code for inefficiencies.
110110

docs/Data-100-Debugging-Guide.pdf

0 Bytes
Binary file not shown.

docs/autograder_gradescope/autograder_gradescope.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,16 @@ <h2 class="anchored" data-anchor-id="autograder">Autograder</h2>
228228
<h3 class="anchored" data-anchor-id="understanding-autograder-error-messages">Understanding autograder error messages</h3>
229229
<p>When you pass a test, you’ll see a nice message and a cute emoji!</p>
230230
<center>
231-
<img src="passing_autograder.png" width="200">
231+
<img src="passing_autograder.png" width="200" alt="Screenshot of a grader cell for question q2a with cell ouput 'q2a passed'">
232232
</center>
233233
<p>When you don’t, however, the message can be a little confusing.</p>
234234
<center>
235-
<img src="autograder_error.png" width="600">
235+
<img src="autograder_error.png" width="600" alt="Example of a cell output for a failing autograder test showing what test failed, what the code that was evaluated was, the expected output, and an error that was raised during the course of the test.">
236236
</center>
237237
<p><br></p>
238238
<p>The best course of action is to find the test case that failed and use that as a starting point to debug your code.</p>
239239
<center>
240-
<img src="autograder_error_annot.png" width="700">
240+
<img src="autograder_error_annot.png" width="700" alt="An annotated version of the previous image which includes the note 'The most useful error message is usually at the bottom'">
241241
</center>
242242
<p>In the example above, we see that the test case in green, <code>max_swing in set(bus['name'])</code>, is not passing. The actual output (in blue) is often hard to parse, so the best course of action is to:</p>
243243
<ol type="1">
@@ -291,11 +291,11 @@ <h3 class="anchored" data-anchor-id="why-do-i-see-multiple-nameerror-name-___-is
291291
<h3 class="anchored" data-anchor-id="my-autograder-keeps-runningtimed-out">My autograder keeps running/timed out</h3>
292292
<p>If your Gradescope submission page has been stuck running on this page for a while:</p>
293293
<center>
294-
<img src="gradescope_loading.png" width="350">
294+
<img src="gradescope_loading.png" width="350" alt="Autograder Results. The autograder hasn't finish running yet.">
295295
</center>
296296
<p>or if it times out:</p>
297297
<center>
298-
<img src="gradescope_timeout.png" width="650">
298+
<img src="gradescope_timeout.png" width="650" alt="Autograder Results. In a red box 'The autograder failed to respond in the expected amount of time. If the autograder continues to fail, contact your course staff for help in debugging this issue. Make sure to include a link to this page so they can help you most effectively.'">
299299
</center>
300300
<p>it means that the Gradescope autograder failed to execute in the expected amount of time. TThis could be due to an inefficiency in your code or an issue on Gradescope’s end, so we recommend resubmitting and allowing the autograder to rerun. If the issue persists after a few attempts, you may need to investigate your code for inefficiencies.</p>
301301
<p>For example, if you rerun all cells in your Jupyter notebook and notice that some cells take significantly longer to run than others, you might need to optimize those cells. Keep in mind that the time it takes to run all tests in your Jupyter notebook is not equivalent to the time it takes on Gradescope/Pensieve. However, it is proportional—if your notebook runs slowly on Datahub, it will likely run even more slowly on Gradescope/Pensieve, as the difference in runtime is amplified.</p>

docs/jupyter101/jupyter101.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ <h2 class="anchored" data-anchor-id="running-cells">Running Cells</h2>
250250
</ul></li>
251251
</ul>
252252
<center>
253-
<img src="run_all.gif" width="500">
253+
<img src="run_all.gif" width="500" alt="Gif showing exactly where to click to run all cells">
254254
</center>
255255
</section>
256256
<section id="saving-your-notebook" class="level2">
@@ -266,14 +266,14 @@ <h2 class="anchored" data-anchor-id="restarting-kernel">Restarting Kernel</h2>
266266
<li><code>Restart Kernel and Run All Cells</code></li>
267267
</ul>
268268
<center>
269-
<img src="kernel.gif" width="500">
269+
<img src="kernel.gif" width="500" alt="Gif showing exactly where to click to access the mostly frequently used kernel options.">
270270
</center>
271271
</section>
272272
<section id="automatically-closing-brackets" class="level2">
273273
<h2 class="anchored" data-anchor-id="automatically-closing-brackets">Automatically Closing Brackets</h2>
274274
<p>Many IDEs like VSCode have a functionality that automatically closes brackets. For example, pressing <code>(</code>, <code>{</code>, or <code>[</code> would automatically add the second bracket at the other end <code>)</code>, <code>}</code>, and <code>]</code>, respectively. Datahub does not have this functionality turned on by default, but you can do so by going into <code>Settings</code> -&gt; <code>Auto Close Brackets</code>. If you see a check mark to the left of <code>Auto Close Brackets</code>, then it’s enabled.</p>
275275
<center>
276-
<img src="autoclose_brackets.gif" width="500">
276+
<img src="autoclose_brackets.gif" width="500" alt="Gif showing how to toggle autoclose bracket">
277277
</center>
278278

279279

docs/jupyter_datahub/jupyter_datahub.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ <h2 class="anchored" data-anchor-id="my-kernel-died-restarted-or-is-very-slow">M
222222
</ol>
223223
<p>When you see a message like this:</p>
224224
<center>
225-
<img src="kernel_die.png" width="500">
225+
<img src="kernel_die.png" width="500" alt="Screenshot of dead kernel messaging">
226226
</center>
227227
<ol type="1">
228228
<li>Either press the “Ok” button or reload the page</li>
@@ -241,7 +241,7 @@ <h2 class="anchored" data-anchor-id="i-cant-edit-a-cell">I can’t edit a cell</
241241
<li>Under “Common Tools”, you can toggle between “Editable” (can edit the cell) and “Read-Only” (cannot edit the cell)</li>
242242
</ol>
243243
<center>
244-
<img src="toggle_edit.gif" width="500">
244+
<img src="toggle_edit.gif" width="500" alt="Gif showing how to toggle between 'Editable' and 'Read-Only' for a cell">
245245
</center>
246246
</section>
247247
<section id="my-text-cell-looks-like-code" class="level2">
@@ -252,7 +252,7 @@ <h2 class="anchored" data-anchor-id="my-text-cell-looks-like-code">My text cell
252252
<h2 class="anchored" data-anchor-id="my-text-cell-changed-to-a-code-cell-my-code-cell-changed-to-a-text-cell">My text cell changed to a code cell / My code cell changed to a text cell</h2>
253253
<p>Sometimes, a text (markdown) cell was changed to a code cell, or a code cell can’t be run because it’s been changed to a text (markdown) or raw cell. To fix this, toggle the desired cell type in the top bar.</p>
254254
<center>
255-
<img src="toggle_cell_type.gif" width="700">
255+
<img src="toggle_cell_type.gif" width="700" alt="Gif showing how to toggle the cell type from code to text and back again.">
256256
</center>
257257
</section>
258258
<section id="why-does-running-a-particular-cell-cause-my-kernel-to-die" class="level2">
@@ -268,26 +268,26 @@ <h2 class="anchored" data-anchor-id="i-accidentally-deleted-something-in-a-cell-
268268
<h2 class="anchored" data-anchor-id="click-here-to-download-zip-file-is-not-working">“Click <u>here</u> to download zip file” is not working</h2>
269269
<p>When this happens, you can download the zip file through the menu on the left.</p>
270270
<center>
271-
<img src="zip_left_menu.png" width="400">
271+
<img src="zip_left_menu.png" width="400" alt="Left menu showing files with the zip file highlighted by a red box.">
272272
</center>
273273
<p>Right click on the generated zip file and click “Download”.</p>
274274
<center>
275-
<img src="zip_download.png" width="500">
275+
<img src="zip_download.png" width="500" alt="After right/force clicking on the zip file, click 'Download' which is highlighted in this screenshot with a red box.">
276276
</center>
277277
</section>
278278
<section id="autograder-could-not-locate-my-pdf" class="level2">
279279
<h2 class="anchored" data-anchor-id="autograder-could-not-locate-my-pdf">Autograder could not locate my PDF</h2>
280280
<p>Sometimes when running the <code>grader.export(run_tests=True)</code> cell at the end of the notebook, you run into an error where the autograder could not locate the PDF:</p>
281281
<center>
282-
<img src="pdf_not_located.png" width="700">
282+
<img src="pdf_not_located.png" width="700" alt="Screenshot showing 'UserWarning: Could not locate a PDF to include'">
283283
</center>
284284
<p>To fix this, make sure you have not accidentally converted any cells to <code>raw</code> type. All cells should either be <code>markdown</code> or <code>code</code> cells. You can easily convert cells by following <a href="https://ds100.org/debugging-guide/jupyter_datahub/jupyter_datahub.html#my-text-cell-changed-to-a-code-cell-my-code-cell-changed-to-a-text-cell">these instructions</a> earlier in the debugging guide.</p>
285285
</section>
286286
<section id="i-cant-export-my-assignment-as-a-pdf-due-to-a-latexfailed-error" class="level2">
287287
<h2 class="anchored" data-anchor-id="i-cant-export-my-assignment-as-a-pdf-due-to-a-latexfailed-error">I can’t export my assignment as a PDF due to a <code>LatexFailed</code> error</h2>
288288
<p>Occasionally when running the <code>grader.export(run_tests=True)</code> cell at the end of the notebook, you run into an error where the PDF failed to generate:</p>
289289
<center>
290-
<img src="LatexError.png" width="500">
290+
<img src="LatexError.png" width="500" alt="Screenshot of a latex error that begins with 'LatexFailed: PDF creating failed, captured latex output:...'">
291291
</center>
292292
<p>Converting a Jupyter notebook to a PDF involves formatting some of the markdown text in <a href="https://www.latex-project.org/">LaTeX</a>. However, this process will fail if your free response answers have (unresolved) LaTeX characters like <code>\n</code>, <code>$</code>, or <code>$$</code>. There are several ways to resolve this:</p>
293293
<ol type="1">

docs/pandas/pandas.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ <h1 class="title"><span class="chapter-title">Pandas</span></h1>
231231
<h2 class="anchored" data-anchor-id="understanding-pandas-errors">Understanding <code>pandas</code> errors</h2>
232232
<p><code>pandas</code> errors can look red, scary, and very long. Fortunately, we don’t need to understand the entire thing! The most important parts of an error message are at the <strong>top</strong>, which tells you which line of code is causing the issue, and at the <strong>bottom</strong>, which tells you exactly what the error message is.</p>
233233
<center>
234-
<img src="pandas_error.png" width="700">
234+
<img src="pandas_error.png" width="700" alt="A screenshot of an error output by running a pandas command. The screenshot is annotated, with the first annotation reading 'The arrow points to the line of code that is erroring' next to a green arrow in the error output. Also highlighted and annotated is the last line of the error message, 'The most useful error messages are usually at the bottom'">
235235
</center>
236236
<p><br></p>
237237
<p>This note is (mostly) structured around the error messages that show up at the bottom.</p>

docs/projA2/projA2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ <h3 class="anchored" data-anchor-id="general-debugging-tips">General Debugging T
239239
<h3 class="anchored" data-anchor-id="my-training-rmse-is-low-but-my-validationtest-rmse-is-high">My training RMSE is low, but my validation/test RMSE is high</h3>
240240
<p>Your model is likely overfitting to the training data and does not generalize to the test set. Recall the bias-variance tradeoff discussed in lecture. As you add more features and make your model more complex, it is expected that your training error will decrease. Your validation and test error may also decrease initially, but if your model is too complex, you end up with high validation and test RMSE.</p>
241241
<center>
242-
<img src="under_overfit.png" width="500">
242+
<img src="under_overfit.png" width="500" alt="Plot showing a conceptual understanding of underfitting and overfitting. Model complexity is on the x-axis and Error/Variance is on the y axis. As you increase model complexity, Variance increases and training error decreases. Above the curves that represent Variance and Training Error, a third curve labeled Validtion Error exists in a U-shape. The chosen complexity level is represented by a dashed vertical line that intersections with the lowest y-value for the Validation Error curve. To the left of the dashed line is underfitting and to the right of the dashed line is overfitting.)">
243243
</center>
244244
<p>To decrease model complexity, consider visualizing the relationship between the features you’ve chosen with the <code>(Log) Sale Price</code> and removing features that are not highly correlated. Removing outliers can also help your model generalize better and prevent it from fitting to noise in the data. Methods like cross-validation allow you to get a better sense of where you lie along the validation error curve. Feel free to take a look at the <a href="https://ds100.org/fa24/resources/assets/lectures/lec16/lec16.html">code used in Lecture 16</a> if you’re confused on how to implement cross-validation.</p>
245245
</section>

docs/regex/regex.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ <h2 class="anchored" data-anchor-id="how-to-interpret-regex101">How to Interpret
256256
<section id="example-1-basic" class="level3">
257257
<h3 class="anchored" data-anchor-id="example-1-basic">Example 1: Basic</h3>
258258
<center>
259-
<img src="images/updated_basic.png" width="700">
259+
<img src="images/updated_basic.png" width="700" alt="A screenshot of regex101 with five different components of the website highlighted. On the left is region 0. In the upper middle is region 1. In the lower middle is region 3. On the upper right is region 2. On the lower right is region 4.">
260260
</center>
261261
<p><br></p>
262262
<ol start="0" type="1">
@@ -271,7 +271,7 @@ <h3 class="anchored" data-anchor-id="example-1-basic">Example 1: Basic</h3>
271271
<h3 class="anchored" data-anchor-id="example-2-greedy">Example 2: Greedy</h3>
272272
<p>For this example, let’s replace the <code>100</code> in our original expression with <code>\d+</code> so that our pattern is <code>Data \d+</code></p>
273273
<center>
274-
<img src="images/updated_greedy.png" width="700">
274+
<img src="images/updated_greedy.png" width="700" alt="Screenshot of regex 101 highlighting part of the explanation, described more below.">
275275
</center>
276276
<p><br></p>
277277
<p><code>\d</code> and <code>+</code> are both special operators, and the explanation on the top right (boxed in red) tells us what they do:</p>
@@ -292,7 +292,7 @@ <h3 class="anchored" data-anchor-id="example-3-capturing-groups">Example 3: Capt
292292
</ul>
293293
<p>That’s great! This pattern will match the entirety of <code>DD/Month/YYYY</code>, but what if we want to access <code>DD</code> individually? What about <code>YYYY</code>? This is where <strong>capturing groups</strong> comes in handy. Capturing groups are RegEx expressions surrounded by parenthesis <code>()</code> that are used to remember the text they match so that it can be referenced later. Putting capturing groups around <code>\d+</code> and <code>\w+</code> to get <code>r"(\d+)\/(\w+)\/(\d+)"</code>gives us the following:</p>
294294
<center>
295-
<img src="images/updated_capturing_groups.png" width="700">
295+
<img src="images/updated_capturing_groups.png" width="700" alt="">
296296
</center>
297297
<p><br></p>
298298
<ul>
@@ -351,7 +351,7 @@ <h3 class="anchored" data-anchor-id="the-three-uses-of">The three uses of <code>
351351
<h3 class="anchored" data-anchor-id="whats-the-difference-between-all-the-re-functions">What’s the difference between all the <code>re</code> functions?</h3>
352352
<p>The exam reference sheets give a few <code>re</code> functions, but how can you determine which one to use?</p>
353353
<center>
354-
<img src="images/ref_sheet_re_methods.png" width="800">
354+
<img src="images/ref_sheet_re_methods.png" width="800" alt="Screenshot of the exam reference sheet showing re.match(), re.search(), re.findall(), and re.sub()">
355355
</center>
356356
<p><br></p>
357357
<p><code>re.match</code> and <code>re.search</code> only return <em>one</em> instance of a match between string and pattern (or None if there’s no match) - <code>re.match</code> only considers characters at the beginning of a string - <code>re.search</code> considers characters anywhere in the string - For example: ``` pattern = r”Data 100” example1 = “Data 100 is the best!” example2 = “I love Data 100!”</p>

0 commit comments

Comments
 (0)