Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 23574ac6 authored by ROSPARS Benoit's avatar ROSPARS Benoit
Browse files

Add wrapups and update script to fetch wrapups

parent 87c8ad99
No related branches found
No related tags found
No related merge requests found
......@@ -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))
});
```
......@@ -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"
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment