diff --git a/README.md b/README.md index ced2b3d07575886000a81dbf5c6c39897d6240ac..6a4021480fb5a4e532069e5a4139613a8efb99b0 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,32 @@ This repository is used to initialized learners environment by downloading noteb To manually update (using javascript console): +1. Open a javascript console (F12 o Ctrl + Shift + I) +2. Copy and paste the following script +3. Copy the json output +4. Paste it inside `notebooks.json` + ```js -const baseUrl = "https://github.com/INRIA/scikit-learn-mooc/raw/master/" -let datasets, notebooks; +const baseUrl = "https://github.com/INRIA/scikit-learn-mooc/raw/master/"; +const apiUrl = "https://api.github.com/repos/INRIA/scikit-learn-mooc/contents"; +let datasets, notebooks, wrapups; -fetch('https://api.github.com/repos/INRIA/scikit-learn-mooc/contents/datasets') -.then(function(response) { - return response.json() -}).then(function(data) { - datasets = data.map(item => item.path) - return fetch('https://api.github.com/repos/INRIA/scikit-learn-mooc/contents/notebooks') -}).then(function(response) { - return response.json() -}).then(function(data) { +fetch(`${apiUrl}/datasets`) +.then(function(response_datasets) { + return response_datasets.json() +}).then(function(data_datasets) { + datasets = data_datasets.map(item => item.path) + return fetch(`${apiUrl}/notebooks`) +}).then(function(response_notebooks) { + return response_notebooks.json() +}).then(function(data_notebooks) { // Filter out solutions - notebooks = data.map(item => item.path).filter(item => item.indexOf('sol') === -1) - console.log(JSON.stringify({baseUrl, notebooks, datasets}, null, 2)) + notebooks = data_notebooks.map(item => item.path).filter(item => item.indexOf('sol') === -1) + return fetch(`${apiUrl}/evaluation`) +}).then(function(response_wrapups) { + return response_wrapups.json() +}).then(function(data_wrapups) { + wrapups = data_wrapups.map(item => item.path.replace('.md', '.ipynb')) + console.log(JSON.stringify({baseUrl, notebooks, datasets, wrapups}, null, 2)) }); ``` diff --git a/notebooks.json b/notebooks.json index 346235f66f29493d27c1d13c825d8f3172028f02..2edb23dcf47ed123862d0c834c357dcb518d9584 100644 --- a/notebooks.json +++ b/notebooks.json @@ -75,5 +75,11 @@ "datasets/penguins.csv", "datasets/penguins_classification.csv", "datasets/penguins_regression.csv" + ], + "wrapups": [ + "evaluation/ensemble_questions.ipynb", + "evaluation/linear_models_questions.ipynb", + "evaluation/predictive_modeling_pipeline_questions.ipynb", + "evaluation/trees_questions.ipynb" ] }