Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .translate/state/about_py.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 3213613a05778899068ddb92336dfe6a58517936
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 3
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/autodiff.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 05ce95691fd97e48da39dd6d58fe032c03e8813d
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 5
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/debugging.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 678d8ffa60705071883c1e5d98ef37ba5a1e139f
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 4
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/functions.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 1b356ab5e60d8f6939446fd5f47c243593a2abd3
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 7
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/getting_started.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 6d0df81899e042268a0081b71af2cedc438613b5
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 7
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/intro.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: a2a37636bb525ddcad0c82f6825bcd3287807c4b
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 0
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/jax_intro.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: d08a73d48a409509d7d6f6585b99c2c8909c9a28
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 7
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/matplotlib.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 678d8ffa60705071883c1e5d98ef37ba5a1e139f
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 5
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/names.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: fe42b933280691390a2a4741b7bcbccaa86a5c2b
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 9
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/need_for_speed.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 06af1a96c7a831653842bc655bbff3192f0b6f82
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 5
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/numba.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: f2c6503b5cecfbb61b638a25a137504275fc347b
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 5
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/numpy.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: a2b929f15e703b6942e8b80a29011c51f234b1e0
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 8
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/numpy_vs_numba_vs_jax.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: d08a73d48a409509d7d6f6585b99c2c8909c9a28
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 3
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/oop_intro.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 126eb49056ad1b685638c1820ebb7b4c89cabf89
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 6
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/pandas.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 02e57a5befc2a9a081019edc748aba15e4b2f02a
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 5
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/pandas_panel.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 126eb49056ad1b685638c1820ebb7b4c89cabf89
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 6
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/python_advanced_features.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: dcf952a9a05ba3bf8763c21d89dac3c7480b8d45
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 7
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/python_by_example.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 3241a07f00b1fb4d2bebc6989d1f480847e08e31
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 6
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/python_essentials.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: c5711217457a71e75710450b7b379fac9d05af1b
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 7
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/python_oop.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 8973c2e03fe820f44b841b2e13ed4107500a1226
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 5
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/scipy.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: fb75a07e49cbec97c2c3e698a81ee008203b1fab
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 8
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/status.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 9045b9f1cdfade87ba16f5b0bc530fe9a4b71e74
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 0
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/sympy.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 5b5e342a8bbb24f4b1a1b4c7d6b0140aff4771b6
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 7
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/troubleshooting.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 6d0df81899e042268a0081b71af2cedc438613b5
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 2
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/workspace.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: b4ebdd49fbe75f99571b4c798d7379c542a63681
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 6
tool-version: 0.15.0
6 changes: 6 additions & 0 deletions .translate/state/writing_good_code.md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source-sha: 6d0df81899e042268a0081b71af2cedc438613b5
synced-at: "2026-07-14"
model: claude-opus-4-8
mode: NEW
section-count: 5
tool-version: 0.15.0
37 changes: 37 additions & 0 deletions TRANSLATION-REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation Report

**Generated**: 2026-07-14T23:51:01.096Z

## Summary

- **Total Lectures**: 26
- **Successfully Translated**: 26
- **Failed**: 0
- **Total Tokens Used**: 687,236
- **Total Time**: 34.0 minutes
- **Average Time per Lecture**: 78.4 seconds

## Configuration

- **Source**: /Users/mmcky/work/quantecon/lecture-python-programming
- **Target**: /Users/mmcky/work/quantecon/lecture-python-programming.fr
Comment on lines +16 to +17
- **Source Language**: en
- **Target Language**: fr
- **Model**: claude-opus-4-8
- **Localization Rules**: code-comments, figure-labels, i18n-font-config
- **Glossary Terms**: 364

## Next Steps

1. Review translated lectures in `/Users/mmcky/work/quantecon/lecture-python-programming.fr`
2. Set up repo-level files if not already present:
- `.github/workflows/` — CI/CD and `action-translation` sync workflow
- `environment.yml` or `requirements.txt` — Python dependencies
- `LICENSE`
3. Build to verify: `jupyter-book build /Users/mmcky/work/quantecon/lecture-python-programming.fr`
4. Push to GitHub repository
5. Configure `action-translation` for incremental updates

---

Generated by `translate init`
80 changes: 80 additions & 0 deletions lectures/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
title: Python Programming for Economics and Finance
author: Thomas J. Sargent & John Stachurski
logo: _static/qe-logo.png
description: This website presents a set of lectures on python programming for economics, designed and written by Thomas J. Sargent and John Stachurski.

execute:
execute_notebooks: "cache"
timeout: 600 # 10 minutes

html:
baseurl: https://python-programming.quantecon.org/

latex:
latex_documents:
targetname: quantecon-python-programming.tex

sphinx:
extra_extensions: [sphinx_multitoc_numbering, sphinxext.rediraffe, sphinx_tojupyter, sphinx_exercise, sphinx_togglebutton, sphinx.ext.intersphinx]
config:
# bibtex_reference_style: author_year #TODO: enable if bibtex bibliography is used in series
# false-positive links
linkcheck_ignore: ['https://github.com/matplotlib/matplotlib/blob/v3.6.2/lib/matplotlib/axes/_axes.py#L1417-L1669',
'https://ieeexplore.ieee.org/document/8757088',
'https://www.sciencedirect.com/science/article/pii/S1477388021000177',
'https://keras.io/',
'https://data.oecd.org/',
'https://www.reddit.com/',
'https://openai.com',
'https://chatgpt.com/',
'https://fred.stlouisfed.org/.*']
nb_merge_streams: true
# sphinx-exercise
exercise_style: "solution_follow_exercise"
html_favicon: _static/lectures-favicon.ico
html_theme: quantecon_book_theme
html_static_path: ['_static']
html_theme_options:
authors:
- name: Thomas J. Sargent
url: http://www.tomsargent.com/
- name: John Stachurski
url: https://johnstachurski.net/
dark_logo: quantecon-logo-transparent.png
header_organisation_url: https://quantecon.org
header_organisation: QuantEcon
repository_url: https://github.com/QuantEcon/lecture-python-programming
nb_repository_url: https://github.com/QuantEcon/lecture-python-programming.notebooks
Comment on lines +46 to +47
path_to_docs: lectures
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 python programming for economics, 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-X7DH1M2DPY
sticky_contents: true
launch_buttons:
notebook_interface : classic # The interface interactive links will activate ["classic", "jupyterlab"]
colab_url : https://colab.research.google.com
thebe : false # Add a thebe button to pages (requires the repository to run on Binder)
intersphinx_mapping:
jax:
- "https://jax.quantecon.org/"
- null
mathjax_path: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
rediraffe_redirects:
index_toc.md: intro.md
tojupyter_static_file_path: ["source/_static", "_static"]
tojupyter_target_html: true
tojupyter_urlpath: "https://python-programming.quantecon.org/"
tojupyter_image_urlpath: "https://python-programming.quantecon.org/_static/"
tojupyter_lang_synonyms: ["ipython", "ipython3", "python"]
tojupyter_kernels:
python3:
kernelspec:
display_name: "Python"
language: python3
name: python3
file_extension: ".py"
tojupyter_images_markdown: true
7 changes: 7 additions & 0 deletions lectures/_static/includes/header.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. raw:: html

<div id="qe-notebook-header" align="right" style="text-align:right;">
<a href="https://quantecon.org/" title="quantecon.org">
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
</a>
</div>
7 changes: 7 additions & 0 deletions lectures/_static/includes/lecture_howto_py.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. raw:: html

<div id="qe-notebook-header" style="text-align:right;">
<a href="https://quantecon.org/" title="quantecon.org">
<img style="width:250px;display:inline;" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
</a>
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 lectures/_static/lecture_specific/about_py/qs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions lectures/_static/lecture_specific/about_py/qs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import norm
from matplotlib import cm

xmin, xmax = -4, 12
x = 10
α = 0.5

m, v = x, 10

xgrid = np.linspace(xmin, xmax, 200)

fig, ax = plt.subplots()

ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
ax.spines['left'].set_color('none')
ax.xaxis.set_ticks_position('bottom')
ax.spines['bottom'].set_position(('data', 0))

ax.set_ylim(-0.05, 0.5)
ax.set_xticks((x,))
ax.set_xticklabels((r'$x$', ), fontsize=18)
ax.set_yticks(())

K = 3
for i in range(K):
m = α * m
v = α * α * v + 1
f = norm(loc=m, scale=np.sqrt(v))
k = (i + 0.5) / K
ax.plot(xgrid, f.pdf(xgrid), lw=1, color='black', alpha=0.4)
ax.fill_between(xgrid, 0 * xgrid, f.pdf(xgrid), color=cm.jet(k), alpha=0.4)


ax.annotate(r'$Q(x,\cdot)$', xy=(6.6, 0.2), xycoords='data',
xytext=(20, 90), textcoords='offset points', fontsize=16,
arrowprops=dict(arrowstyle="->", connectionstyle="arc3,rad=-0.2"))
ax.annotate(r'$Q^2(x,\cdot)$', xy=(3.6, 0.24), xycoords='data',
xytext=(20, 90), textcoords='offset points', fontsize=16,
arrowprops=dict(arrowstyle="->", connectionstyle="arc3,rad=-0.2"))
ax.annotate(r'$Q^3(x,\cdot)$', xy=(-0.2, 0.28), xycoords='data',
xytext=(-90, 90), textcoords='offset points', fontsize=16,
arrowprops=dict(arrowstyle="->", connectionstyle="arc3,rad=0.2"))
fig.show()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
9 changes: 9 additions & 0 deletions lectures/_static/lecture_specific/pandas/data/test_pwt.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"country","country isocode","year","POP","XRAT","tcgdp","cc","cg"
"Argentina","ARG","2000","37335.653","0.9995","295072.21869","75.716805379","5.5788042896"
"Australia","AUS","2000","19053.186","1.72483","541804.6521","67.759025993","6.7200975332"
"India","IND","2000","1006300.297","44.9416","1728144.3748","64.575551328","14.072205773"
"Israel","ISR","2000","6114.57","4.07733","129253.89423","64.436450847","10.266688415"
"Malawi","MWI","2000","11801.505","59.543808333","5026.2217836","74.707624181","11.658954494"
"South Africa","ZAF","2000","45064.098","6.93983","227242.36949","72.718710427","5.7265463933"
"United States","USA","2000","282171.957","1","9898700","72.347054303","6.0324539789"
"Uruguay","URY","2000","3219.793","12.099591667","25255.961693","78.978740282","5.108067988"
Loading