marked =require("marked");dateFns =import("https://cdn.jsdelivr.net/npm/date-fns@4.1.0/+esm")functionmd2html(text) {const template =document.createElement("template"); template.innerHTML= marked.parseInline(text);return template.content.cloneNode(true);}functionbuildLG(assignmentData) {const elems = []; elems.push(htl.html`<strong>Learning Goals:</strong><br>Once you complete this assignment, you should:`);let lg_assignment_items = assignmentData.lg_assignment.map(lg => htl.html`<li>${lg}</li>`); elems.push(htl.html`<ul>${lg_assignment_items}</ul>`); elems.push(htl.html`This assignment is connected to the following overall learning goals of the course:`);let lg_course_items = assignmentData.lg_course.map(lg => htl.html`<li>${lg}</li>`); elems.push(htl.html`<ul>${lg_course_items}</ul>`);return elems;}functionbuildDeadlines(assignmentData) {console.log("Prepping deadlines");return htl.html`<table class="table"> <thead> <tr> <th>Initial Feedback Deadline</th> <th>Final Autograder Deadline</th> <th>Final Revision Deadline</th> </tr> </thead> <tbody> <tr> <td>${assignmentData.initial_due}</td> <td>${assignmentData.autograder_due}</td> <td>${assignmentData.final_due}</td> </tr> <tr> <td colspan="3"><small><i>All deadlines are at 11:59PM EST. See the <a href="https://middcs.github.io/csci457-s25/resources/homework_policies.html">homework policies</a> for details about the three dealines.</i></small></td> </tr> </tbody> </table> `;}functionbuildDetails(assignmentData) {const elems = []; elems.push(htl.html`<h1>${assignmentData.title}</h1>`); elems.push(htl.html`<a href="${assignmentData.gradescope}" class="btn btn-outline-primary" role="button">Gradescope</a>`);if (assignmentData.download_link) {const download_label = assignmentData.download_label||"Starter Code + Data"; elems.push(htl.html`<a href="${assignmentData.download_link}" class="btn btn-outline-primary" role="button">${download_label}</a>`); } elems.push(buildDeadlines(assignmentData)); elems.push(md2html(assignmentData.desc)); elems.push(htl.html`<br>`); elems.push(...buildLG(assignmentData)); elems.push(htl.html`<strong>Submit these files</strong>: ${md2html(assignmentData.submit_files)}<br>`);if (assignmentData.omit_files) { elems.push(htl.html`<strong>Omit these files</strong>: ${md2html(assignmentData.omit_files)}<br>`); } elems.push(htl.html`<strong>Leaderboard:</strong> ${md2html(assignmentData.leaderboard_inst)}<br>`); elems.push(htl.html`<strong>Partners:</strong> ${assignmentData.partners? htl.html`👥 You may work with a partner <b>if</b> you meet the requirements described in the <a href="https://middcs.github.io/csci457-s25/resources/homework_policies.html">homework policies</a>.`: htl.html`👤 This is an individual assignment.`}<br>`);if (assignmentData.rc) { elems.push(htl.html`<strong>Responsible Computing:</strong> ⚖️ ${md2html(assignmentData.rc)}<br>`); }if (assignmentData.credits) { elems.push(htl.html`<strong>Credits:</strong> ${md2html(assignmentData.credits)}`); }return elems;}htl.html`<div class="hw-details">${buildDetails(assignmentData)}</div>`
Submission
When you submit to gradescope, your file must be called exactlyHW4.ipynb.
This homework assignment differs from homework assignments 1-3 in that you will complete it in a Colab notebook. The instructions are all listed in the notebook!
To submit this homework, you should download your notebook as a .ipynb file and submit that to gradescope (click File >> Download >> Download .ipynb). That is the only file you’ll need to submit (it will include your report).