Skip to content

Commit 4ebae43

Browse files
authored
Merge pull request #132 from pitmonticone/master
2 parents 8d8eb81 + 881cb8e commit 4ebae43

18 files changed

+37
-37
lines changed

src/homework/hw0.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ That’s it, but if you like you can do the _OPTIONAL_ exercises that follow."
6666

6767
# ╔═╡ 430a260e-6cbb-11eb-34af-31366543c9dc
6868
md"""# Installation
69-
Before being able to run this notebook succesfully locally, you will need to [set up Julia and Pluto.](/Spring21/installation/)
69+
Before being able to run this notebook successfully locally, you will need to [set up Julia and Pluto.](/Spring21/installation/)
7070
7171
One you have Julia and Pluto installed, you can click the button at the top right of this page and follow the instructions to edit this notebook locally and submit.
7272
"""

src/homework/hw1.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ student = (name = "Jazzy Doe", kerberos_id = "jazz")
5858

5959
# ╔═╡ 5f95e01a-ee0a-11ea-030c-9dba276aba92
6060
md"""
61-
#### Intializing packages
61+
#### Initializing packages
6262
6363
_When running this notebook for the first time, this could take up to 15 minutes. Hang in there!_
6464
"""
@@ -91,7 +91,7 @@ colored_line(example_vector)
9191
# ╔═╡ ad6a33b0-eded-11ea-324c-cfabfd658b56
9292
md"""
9393
$(html"<br>")
94-
#### Exerise 1.1
94+
#### Exercise 1.1
9595
👉 Make a random vector `random_vect` of length 10 using the `rand` function.
9696
"""
9797

@@ -149,7 +149,7 @@ begin
149149
end
150150

151151
# ╔═╡ 77adb065-bfd4-4680-9c2a-ad4d92689dbf
152-
md"#### Exerise 1.2
152+
md"#### Exercise 1.2
153153
👉 Make a function `my_sum` using a `for` loop, which computes the total of a vector of numbers."
154154

155155
# ╔═╡ bd907ee1-5253-4cae-b5a5-267dac24362a
@@ -185,7 +185,7 @@ hint(md"""Check out this page for a refresher on basic Julia syntax:
185185
[Basic Julia Syntax](https://computationalthinking.mit.edu/Spring21/basic_syntax/)""")
186186

187187
# ╔═╡ cf738088-eded-11ea-2915-61735c2aa990
188-
md"#### Exerise 1.3
188+
md"#### Exercise 1.3
189189
👉 Use your `my_sum` function to write a function `mean`, which computes the mean/average of a vector of numbers."
190190

191191
# ╔═╡ 0ffa8354-edee-11ea-2883-9d5bfea4a236
@@ -235,7 +235,7 @@ else
235235
end
236236

237237
# ╔═╡ e2863d4c-edef-11ea-1d67-332ddca03cc4
238-
md"""#### Exerise 1.4
238+
md"""#### Exercise 1.4
239239
👉 Write a function `demean`, which takes a vector `xs` and subtracts the mean from each value in `xs`. Use your `mean` function!"""
240240

241241
# ╔═╡ ea8d92f8-159c-4161-8c54-bab7bc00f290
@@ -426,7 +426,7 @@ RGB(0.1, 0.4, 0.7)
426426

427427
# ╔═╡ f52e4914-2926-4a42-9e45-9caaace9a7db
428428
md"""
429-
#### Exerise 2.1
429+
#### Exercise 2.1
430430
👉 Write a function **`get_red`** that takes a single pixel, and returns the value of its red channel.
431431
"""
432432

@@ -455,7 +455,7 @@ end
455455

456456
# ╔═╡ d8cf9bd5-dbf7-4841-acf9-eef7e7cabab3
457457
md"""
458-
#### Exerise 2.2
458+
#### Exercise 2.2
459459
👉 Write a function **`get_reds`** (note the extra `s`) that accepts a 2D color array called `image`, and returns a 2D array with the red channel value of each pixel. (The result should be a 2D array of _numbers_.) Use your function `get_red` from the previous exercise.
460460
"""
461461

@@ -507,7 +507,7 @@ md"""
507507
508508
Great! By extracting the red channel value of each pixel, we get a 2D array of numbers. We went from an image (2D array of RGB colors) to a matrix (2D array of numbers).
509509
510-
#### Exerise 2.3
510+
#### Exercise 2.3
511511
Let's try to visualize this matrix. Right now, it is displayed in text form, but because the image is quite large, most rows and columns don't fit on the screen. Instead, a better way to visualize it is to **view a number matrix as an image**.
512512
513513
This is easier than you might think! We just want to map each number to an `RGB` object, and the result will be a 2D array of `RGB` objects, which Julia will display as an image.
@@ -537,7 +537,7 @@ Use the ➕ button at the bottom left of this cell to add more cells.
537537
# ╔═╡ f7825c18-ff28-4e23-bf26-cc64f2f5049a
538538
md"""
539539
540-
#### Exerise 2.4
540+
#### Exercise 2.4
541541
👉 Write four more functions, `get_green`, `get_greens`, `get_blue` and `get_blues`, to be the equivalents of `get_red` and `get_reds`. Use the ➕ button at the bottom left of this cell to add new cells.
542542
"""
543543

@@ -886,7 +886,7 @@ end
886886
# ╔═╡ d896b7fd-20db-4aa9-bbcf-81b1cd44ec46
887887
md"""
888888
889-
#### Exerise 3.6
889+
#### Exercise 3.6
890890
Move the slider below to set the amount of noise applied to the image of Philip.
891891
"""
892892

src/homework/hw10.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ In the lecture notebook we introduced a _mutable struct_ `EBM` (_energy balance
367367
- a function `CO2`, which maps a time `t` to the concentrations at that year. For example, we use the function `t -> 280` to simulate a model with concentrations fixed at 280 ppm.
368368
369369
`EBM` also contains the simulation results, in two arrays:
370-
- `T` is the array of tempartures (°C, `Float64`).
370+
- `T` is the array of temperatures (°C, `Float64`).
371371
- `t` is the array of timestamps (years, `Float64`), of the same size as `T`.
372372
"""
373373

@@ -497,7 +497,7 @@ t = 1850:2100
497497

498498
# ╔═╡ 06c5139e-252d-11eb-2645-8b324b24c405
499499
md"""
500-
We are interested in how the **uncertainty in our input** $B$ (the climate feedback paramter) *propagates* through our model to determine the **uncertainty in our output** $T(t)$, for a given emissions scenario. The goal of this exercise is to answer the following by using *Monte Carlo Simulation* for *uncertainty propagation*:
500+
We are interested in how the **uncertainty in our input** $B$ (the climate feedback parameter) *propagates* through our model to determine the **uncertainty in our output** $T(t)$, for a given emissions scenario. The goal of this exercise is to answer the following by using *Monte Carlo Simulation* for *uncertainty propagation*:
501501
502502
> 👉 What is the probability that we see more than 2°C of warming by 2100 under the low-emissions scenario RCP2.6? What about under the high-emissions scenario RCP8.5?
503503
@@ -531,7 +531,7 @@ In the [lecture notebook](https://github.com/hdrake/simplEarth/blob/master/2_ebm
531531

532532
# ╔═╡ d6d1b312-2543-11eb-1cb2-e5b801686ffb
533533
md"""
534-
Below we have an empty diagram, which is already set up with a CO₂ vs $T$ diagram, with a logarthmic horizontal axis. Now it's your turn! We have written some pointers below to help you, but feel free to do it your own way.
534+
Below we have an empty diagram, which is already set up with a CO₂ vs $T$ diagram, with a logarithmic horizontal axis. Now it's your turn! We have written some pointers below to help you, but feel free to do it your own way.
535535
"""
536536

537537
# ╔═╡ 378aed18-252b-11eb-0b37-a3b511af2cb5
@@ -697,7 +697,7 @@ If you like, make the visualization more informative! Like in the lecture notebo
697697
md"""
698698
#### Exercise 2.2
699699
700-
👉 Find the **lowest CO₂ concentration** necessary to melt the Snowball, programatically (i.e., using code).
700+
👉 Find the **lowest CO₂ concentration** necessary to melt the Snowball, programmatically (i.e., using code).
701701
"""
702702

703703
# ╔═╡ 9eb07a6e-2687-11eb-0de3-7bc6aa0eefb0

src/homework/hw2.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ G_y = \begin{bmatrix}
557557
\end{bmatrix}
558558
```
559559
560-
We can think of these filterrs as derivatives in the $x$ and $y$ directions, as we discussed in lectures.
560+
We can think of these filters as derivatives in the $x$ and $y$ directions, as we discussed in lectures.
561561
562562
Then we combine them by finding the magnitude of the **gradient** (in the sense of multivariate calculus) by defining
563563

src/homework/hw3.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ student = (name = "Jazzy Doe", kerberos_id = "jazz")
5656

5757
# ╔═╡ 938185ec-f384-11ea-21dc-b56b7469f798
5858
md"""
59-
#### Intializing packages
59+
#### Initializing packages
6060
_When running this notebook for the first time, this could take up to 15 minutes. Hang in there!_
6161
"""
6262

src/homework/hw4.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Feel free to ask questions!
166166

167167
# ╔═╡ 938185ec-f384-11ea-21dc-b56b7469f798
168168
md"""
169-
#### Intializing packages
169+
#### Initializing packages
170170
_When running this notebook for the first time, this could take up to 15 minutes. Hang in there!_
171171
"""
172172

src/homework/hw5.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ student = (name = "Jazzy Doe", kerberos_id = "jazz")
4646

4747
# ╔═╡ aaa41509-a62d-417b-bca7-a120e3a5e5b2
4848
md"""
49-
#### Intializing packages
49+
#### Initializing packages
5050
_When running this notebook for the first time, this could take up to 15 minutes. Hang in there!_
5151
"""
5252

@@ -135,7 +135,7 @@ To begin, we will make a type to represent a rank-1 matrix. A *rank-1 matrix* is
135135
# ╔═╡ 8ce8c4bc-8505-11eb-2357-c50a70b8745c
136136
md"""
137137
#### Exercise 2.1
138-
Let's make a `FirstRankOneMatrix` type that contains two vectors of floats, `v` and `w`. Here `v` represents a column and `w` the multpliers for each column.
138+
Let's make a `FirstRankOneMatrix` type that contains two vectors of floats, `v` and `w`. Here `v` represents a column and `w` the multipliers for each column.
139139
140140
We include (in the same cell, due to requirements of Pluto) a constructor that takes a single vector `v` and duplicates it.
141141
"""
@@ -494,7 +494,7 @@ md"""
494494
495495
Why do we need a special type to represent special types of structured matrices? One reason is that not only do they give a more efficient representation in space (requiring less memory to store), they can also be more efficient in time, i.e. *faster*.
496496
497-
For example, let's look at **matrix--vector mutiplication**. This is a *fundamental* part of many, *many* algorithms in scientific computing, and because of this, we usually want it to be as fast as possible.
497+
For example, let's look at **matrix--vector multiplication**. This is a *fundamental* part of many, *many* algorithms in scientific computing, and because of this, we usually want it to be as fast as possible.
498498
499499
For a rank-one matrix given by $M = v w^T$, the matrix--vector product $M \cdot x$ is given by $(w \cdot x) v$. Note that $w \cdot x$ is a number (scalar) which is multiplying the vector element by element. This computation is much faster than the usual matrix-vector multiplication: we are taking advantage of structure!
500500

src/homework/hw6.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ student = (name = "Jazzy Doe", kerberos_id = "jazz")
5656

5757
# ╔═╡ aaa41509-a62d-417b-bca7-a120e3a5e5b2
5858
md"""
59-
#### Intializing packages
59+
#### Initializing packages
6060
_When running this notebook for the first time, this could take up to 15 minutes. Hang in there!_
6161
"""
6262

@@ -84,7 +84,7 @@ md"""
8484
#### Exercise 1.1
8585
👉 Write a function `counts` that accepts a vector `data` and calculates the number of times each value in `data` occurs.
8686
87-
The input will be an array of integers, **with duplicates**, and the result will be a dictionary that maps each occured value to its count in the data.
87+
The input will be an array of integers, **with duplicates**, and the result will be a dictionary that maps each occurred value to its count in the data.
8888
8989
For example,
9090
```julia

src/homework/hw7.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ end
235235

236236
# ╔═╡ 8692bf42-0403-11eb-191f-b7d08895274f
237237
md"""
238-
#### Exericse 1.4
238+
#### Exercise 1.4
239239
👉 Write a function `generate_agents(N)` that returns a vector of `N` freshly created `Agent`s. They should all be initially susceptible, except one, chosen at random (i.e. uniformly), who is infectious.
240240
241241
"""

src/homework/hw9.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ md"""
514514
515515
Write a function `interact!` that takes two `Agent`s and a `CollisionInfectionRecovery`, and:
516516
517-
- If the agents are at the same spot, causes a susceptible agent to communicate the desease from an infectious one with the correct probability.
517+
- If the agents are at the same spot, causes a susceptible agent to communicate the disease from an infectious one with the correct probability.
518518
- if the first agent is infectious, it recovers with some probability
519519
"""
520520

0 commit comments

Comments
 (0)