Skip to content

Remove jupylite code and use wasm pyodide #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
395 changes: 395 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
# project.lecture-wasm
A project repository to test WASM compatibility and limitations for QuantEcon Lectures
# QuantEcon WASM project

This repository contains a subset of the [lecture-python-intro](https://intro.quantecon.org/intro.html).

This project is powered by Pyodide kernel which allows us to run the lectures in the browser without
any installaion.

## Development

The script `update_lectures.py` is used to fetch the latest version of lectures from the
[wasm branch of lecture-python-intro series](https://github.com/QuantEcon/lecture-python-intro/tree/wasm).

In order to build and test the project locally, please install the required libraries using
```
pip install -r requirements.txt
```

And run a local server using
```
teachbooks serve
```

To stop the server use:
```
teachbooks serve stop
```

### Update a lecture?

In order to update any lecture, it's recommended to update the same lecture in the
[wasm branch of lecture-python-intro series](https://github.com/QuantEcon/lecture-python-intro/tree/wasm) and
run the script
```
python update_lectures.py
```

This allows us the keep all the lectures up-to-date in a single place and keep this repository a mirror of the
main repository.
83 changes: 83 additions & 0 deletions _config_copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
author: QuantEcon team

execute:
execute_notebooks: "off"

only_build_toc_files: true

html:
favicon : "figures/favicon.ico"
baseurl : "https://quantecon.org/"

sphinx:
config:
html_js_files:
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
thebe_config:
use_thebe_lite: true
exclude_patterns: ["**/_*.yml", "**/*.md", "**/*.ipynb"]
html_theme_options:
logo:
text: QuantEcon Intro Lectures
image_light: figures/qe-logo.png
image_dark: figures/qe-logo.png
authors:
- name: Thomas J. Sargent
url: http://www.tomsargent.com/
- name: John Stachurski
url: https://johnstachurski.net/
header_organisation_url: https://quantecon.org
header_organisation: QuantEcon
repository_url: https://github.com/QuantEcon/lecture-python-advanced.myst
nb_repository_url: https://github.com/QuantEcon/lecture-python-advanced.notebooks
twitter: quantecon
twitter_logo_url: https://assets.quantecon.org/img/qe-twitter-logo.png
og_logo_url: https://assets.quantecon.org/img/qe-og-logo.png
description: This website presents a set of lectures on advanced quantitative economic modeling, designed and written by Thomas J. Sargent and John Stachurski.
keywords: Python, QuantEcon, Quantitative Economics, Economics, Sloan, Alfred P. Sloan Foundation, Tom J. Sargent, John Stachurski
analytics:
google_analytics_id: G-KZLV7PM9LL
launch_buttons:
thebe: true
#colab_url : https://colab.research.google.com
mathjax3_config:
tex:
macros:
"argmax": "arg\\,max"
"argmin": "arg\\,min"
"col": "col"
"Span": "span"
"epsilon": "\\varepsilon"
"EE": "\\mathbb{E}"
"PP": "\\mathbb{P}"
"RR": "\\mathbb{R}"
"NN": "\\mathbb{N}"
"ZZ": "\\mathbb{Z}"
"aA": "\\mathcal{A}"
"bB": "\\mathcal{B}"
"cC": "\\mathcal{C}"
"dD": "\\mathcal{D}"
"eE": "\\mathcal{E}"
"fF": "\\mathcal{F}"
"gG": "\\mathcal{G}"
"hH": "\\mathcal{H}"
html_show_copyright: false
html_last_updated_fmt: '%B %-d, %Y'
html_static_path: ["figures"] # add folders that contain files that need to be included, such as the location of the logo(s)
mathjax3_config:
chtml: {
mtextInheritFont: true # To typeset text within math prettier
}
extra_extensions:
- sphinx.ext.imgconverter
- jupyterbook_patches
- download_link_replacer
- sphinx.ext.extlinks
- sphinx_image_inverter
- sphinx_exercise
- sphinx_proof
- sphinx_tojupyter
- sphinx_reredirects

bibtex_bibfiles:
- references.bib
Binary file added book/_build/.doctrees/about.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/ar1_processes.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/business_cycle.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/cagan_adaptive.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/cagan_ree.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/cobweb.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/commod_price.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/complex_and_trig.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/cons_smooth.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/eigen_I.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/eigen_II.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file added book/_build/.doctrees/french_rev.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/geom_series.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/greek_square.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/heavy_tails.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/inequality.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/inflation_history.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/input_output.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/intro.doctree
Binary file not shown.
Binary file not shown.
Binary file added book/_build/.doctrees/laffer_adaptive.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/lake_model.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/linear_equations.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/lln_clt.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/long_run_growth.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/lp_intro.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/markov_chains_I.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/markov_chains_II.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/mle.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/money_inflation.doctree
Binary file not shown.
Binary file not shown.
Binary file added book/_build/.doctrees/monte_carlo.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/networks.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/olg.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/prob_dist.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/pv.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/scalar_dynam.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/schelling.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/short_path.doctree
Binary file not shown.
Binary file not shown.
Binary file added book/_build/.doctrees/solow.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/status.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added book/_build/.doctrees/troubleshooting.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/unpleasant.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/zreferences.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions book/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 50cb353efd1d91078461a3644c2c991f
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added book/_build/html/_images/Hamilton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/Irre_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/Irre_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/Temple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/example4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/graph2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/graph3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/graph4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/lake_model_worker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/mc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/poverty_trap_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/poverty_trap_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/tooze_ch1_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/_build/html/_images/weighted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions book/_build/html/_sources/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# About These Lectures


## About

This lecture series introduces quantitative economics using elementary
mathematics and statistics plus computer code written in
[Python](https://www.python.org/).

The lectures emphasize simulation and visualization through code as a way to
convey ideas, rather than focusing on mathematical details.

Although the presentation is quite novel, the ideas are rather foundational.

We emphasize the deep and fundamental importance of economic theory, as well
as the value of analyzing data and understanding stylized facts.

The lectures can be used for university courses, self-study, reading groups or
workshops.

Researchers and policy professionals might also find some parts of the series
valuable for their work.

We hope the lectures will be of interest to students of economics
who want to learn both economics and computing, as well as students from
fields such as computer science and engineering who are curious about
economics.

## Level

The lecture series is aimed at undergraduate students.

The level of the lectures varies from truly introductory (suitable for first
year undergraduates or even high school students) to more intermediate.

The
more intermediate lectures require comfort with linear algebra and some
mathematical maturity (e.g., calmly reading theorems and trying to understand
their meaning).

In general, easier lectures occur earlier in the lecture
series and harder lectures occur later.

We assume that readers have covered the easier parts of the QuantEcon lecture
series [on Python
programming](https://python-programming.quantecon.org/intro.html).

In
particular, readers should be familiar with basic Python syntax including
Python functions. Knowledge of classes and Matplotlib will be beneficial but
not essential.

## Credits

In building this lecture series, we had invaluable assistance from research
assistants at QuantEcon, as well as our QuantEcon colleagues. Without their
help this series would not have been possible.

In particular, we sincerely thank and give credit to

- [Aakash Gupta](https://github.com/AakashGfude)
- [Shu Hu](https://github.com/shlff)
- Jiacheng Li
- [Jiarui Zhang](https://github.com/Jiarui-ZH)
- [Smit Lunagariya](https://github.com/Smit-create)
- [Maanasee Sharma](https://github.com/maanasee)
- [Matthew McKay](https://github.com/mmcky)
- [Margaret Beisenbek](https://github.com/mbek0605)
- [Phoebe Grosser](https://github.com/pgrosser1)
- [Longye Tian](https://github.com/longye-tian)
- [Humphrey Yang](https://github.com/HumphreyYang)
- [Sylvia Zhao](https://github.com/SylviaZhaooo)

We also thank Noritaka Kudoh for encouraging us to start this project and providing thoughtful suggestions.

Loading
Loading