# Tagging

## Tagging cells

### SIR model without vital dynamics

The [Susceptible-Infectious-Recovered (SIR) model](https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology) is an example of a compartmental model that is widely used to forecast the progress of disease epidemics.

\begin{align}
\frac{dS}{dt} & = -\frac{\beta I S}{N} \\
\frac{dI}{dt} & = \frac{\beta I S}{N} - \gamma I \\
\frac{dR}{dt} & = \gamma I
\end{align}

Where the **basic reproduction number** $R_0 = \frac{\beta}{\gamma}$


```python
%matplotlib inline

import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import solve_ivp

N = 10000.0
R0 = 2.4
gamma = 1/8.0
beta = gamma*R0

def deriv(t, y):
    S, I, R = y
    dSdt = -beta*I*S/N
    dIdt = beta*I*S/N - gamma*I
    dRdt = gamma*I
    return [dSdt, dIdt, dRdt]

t = np.linspace(0, 180, 181)
y0 = [N - 1.0, 1.0, 0.0]
soln = solve_ivp(deriv, [t[0], t[-1]], y0, t_eval=t)

plt.plot(soln.t, soln.y[0], label='Susceptible')
plt.plot(soln.t, soln.y[1], label='Infectious')
plt.plot(soln.t, soln.y[2], label='Recoverd')
plt.legend()
plt.xlabel('days')
plt.grid(True)
```

# Special formatting for special tags

### SIR model without vital dynamics

The [Susceptible-Infectious-Recovered (SIR) model](https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology) is an example of a compartmental model that is widely used to forecast the progress of disease epidemics.

\begin{align}
\frac{dS}{dt} & = -\frac{\beta I S}{N} \\
\frac{dI}{dt} & = \frac{\beta I S}{N} - \gamma I \\
\frac{dR}{dt} & = \gamma I
\end{align}

Where the **basic reproduction number** $R_0 = \frac{\beta}{\gamma}$

This cell has been tagged with "home-activity".

This cell has been tagged with "class-activity".

This cell has been tagged with "important-note".

## Tagging solutions in code cells

For teaching purposes, it is often useful to selecting remove code from cells a

### Exercise 1.

In the following cell write a function that returns the square of a number.


```python
# write a function that returns the square of a number

### BEGIN SOLUTION
def sqr(x):
    return x**2
### END SOLUTION

assert sqr(2) == 4
assert sqr(-1) == 1

### BEGIN HIDDEN TESTS
assert sqr(3) == 9
assert abs(sqr(3.3) - 10.89) < 0.001
### END HIDDEN TESTS
```


```python
assert sqr('string') == 12
```

a5be38f05ea0222f5708f212f8c41808a7f856ce
ipynb
Jupyter Notebook
notebooks/02.01-Tagging.ipynb
jckantor/nbcollection
37d75ddfb16b8cb4958ae963a6973aa428f5feee
MIT
notebooks/02.01-Tagging.ipynb
jckantor/nbcollection
37d75ddfb16b8cb4958ae963a6973aa428f5feee
MIT
notebooks/02.01-Tagging.ipynb
jckantor/nbcollection
37d75ddfb16b8cb4958ae963a6973aa428f5feee
MIT
Qwen/Qwen-72B
1. YES
2. YES