CS 2 (Winter 2021) Exploration Workshops

This is a series of workshops (approximately one a week) on topics the TAs find interesting. They will show demos, help you code up a prototype, and more. Each session will only be offered once and will be limited to 15 students via RSVP. Every session will be on a Friday from 12pm to 1pm PST.

These sessions are limited to 15 students each; so, RSVP is required. If you want to attend, you can RSVP here.

Week 2 (Jan 15): Web Apps with Flask [aabbas]

Sick of being confined to the backend? Desperate to leave the terminal, and show off your python scripts while simultaneously flaunting your web development skills? Come learn how to use Flask - a micro web framework - to integrate python into your web pages!

We’ll go over how to launch and access Flask’s built in local web server, and display some basic messages - then step things up by incorporating forms and learning how to access and use their data. We’ll tie it all together by using Jinja to create HTML templates that can interface with Python and take advantage of control flow, so that we can build whole websites. The remaining time will be “office hour” style - using what you learned, you’ll get to build your own web app!

Week 3 (Jan 22): Streams (+ other important Java Libraries) [dchotzen]

Have you ever been written a for-each loop to extract some kind of data out of a list, map, set, or another collection in Java? Maybe you were looking for one element that satisfies a certain condition, maybe you wanted to create a new collection with some of the original elements, or maybe you wanted to perform an operation on every element of the collection. Java’s Streams provide a convenient, simple, and efficient way of writing code to perform these tasks, by giving the language some features of functional programming. All of these tasks are now possible to perform with just one line of code! In this exploration, we’ll explore some of the many features of Streams, along with related features like lambdas and optionals. At the end, we’ll explore how to use Streams with data structures you implement.

Week 4 (Jan 29): What is testing? Why is testing? How is testing? [eordentl]

Throughout term, we’ve been providing you with automated tests that you run against your code. Testing is the process by which we verify the software we write is “correct”, but what does this actually mean? In this exploration, we’ll discuss three questions:

Week 7 (Feb 19): Web Scraping [jbowden]

There’s an enormous wealth of information stored on the web, but the majority of it isn’t formatted in an easily accessible manner nor stored all in one place. At the same time, science, business, and society are becoming increasingly data-driven, especially as data-hungry statistical and machine learning approaches gain popularity. While web data can be collected manually via browsing, this is incredibly slow and limited. Enter: scraping. We’ll cover three main components:

Week 8 (Feb 26): Image Classification with PyTorch [esmir]

PyTorch is a state of the art machine learning library in Python. It was created to allow for the easy creation of machine learning solutions for a variety of different applications. Usually, machine learning is very math-intensive, but PyTorch handles it all for you in a neat package. In this workshop, we will cover the basics of how machine learning works, work up to a neural network, and you will implement your own basic neural network to classify handwritten digits! No prior experience is necessary, though some CS1 level Python is helpful.

Week 9 (Mar 05): Implementing “Baby” PyTorch [jjma]

Machine learning frameworks like PyTorch and TensorFlow have made ML development much simpler than before, providing simple high-level abstractions for programmers to develop model architectures on. However, under the hood, how do these packages actually work? Using what we’ll learn about graphs in CS2 as well as basic calculus relationships, we’ll cover the following in this exploration:

  1. How Do Models Learn? A basic introduction to how ML models iteratively learn by minimizing an objective function.
  2. What is Graph-based Computation? How can we represent mathematical formulas as nodes in a graph?
  3. How does PyTorch work? How do machine learning frameworks use computational graphs to auto-differentiate and compute exact derivatives?