From 3e89e278cc6062c2e9381932394156100c0de520 Mon Sep 17 00:00:00 2001 From: ashryaagr Date: Wed, 1 Apr 2020 17:47:29 +0530 Subject: [PATCH 1/2] README update --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 851cfcee..39b70daa 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ When it's time to push updates, **only** use `include("deploy.jl")` (assuming yo ### Modifying literate scripts 1. add packages if you need additional ones (`] add ...`), make sure to update explicit compat requirements in the `Project.toml` file -1. add/modify tutorials in the `scripts/` folder +1. add/modify tutorials in the `_literate/` folder 1. to help display things neatly on the webpage (no horizontal overflow), prefer `pprint` from `PrettyPrinting.jl` to display things like `NamedTuple` 1. add `;` at the end of final lines of code blocks if you want to suppress output @@ -99,13 +99,13 @@ The last thing to do is to add a link to the page in `_layout/head.html` so that ```julia cd("path/to/MLJTutorials") -using JuDoc +using Franklin serve() ``` -If you have changed the *code* of some of the literate scripts, JuDoc will need to re-evaluate some of the code which may take some time, progress is indicated in the REPL. +If you have changed the *code* of some of the literate scripts, Franklin will need to re-evaluate some of the code which may take some time, progress is indicated in the REPL. -If you decide to change some of the code while `serve()` is running, this is fine, JuDoc will detect it and trigger an update of the relevant web pages (after evaluating the new code). +If you decide to change some of the code while `serve()` is running, this is fine, Franklin will detect it and trigger an update of the relevant web pages (after evaluating the new code). **Notes**: - avoid modifying the literate file, killing the Julia session, then calling `serve()` that sequence can cause weird issues where Julia will complain about the age of the world... @@ -132,13 +132,13 @@ Do not forget to add the `# hide` which will ensure the line is not displayed on #### Stale files -It can happen that something went wrong and you'd like to force JuDoc to re-evaluate everything to clear things up. To do this, head to the parent markdown file (e.g. `my-tutorial.md`) and add below the other ones: +It can happen that something went wrong and you'd like to force Franklin to re-evaluate everything to clear things up. To do this, head to the parent markdown file (e.g. `my-tutorial.md`) and add below the other ones: ```julia @def reeval = true ``` -save the file, wait for JuDoc to complete its update and then remove it (otherwise it will reevaluate the script every single pass which can slow things down a lot). +save the file, wait for Franklin to complete its update and then remove it (otherwise it will reevaluate the script every single pass which can slow things down a lot). If you get an "age of the world" error, the `reeval` steps above usually works as well. @@ -166,7 +166,7 @@ the first command will remove all stale generated HTML which may conflict with o *Requirements*: * admin access to the repo -* `] add Literate JuDoc NodeJS` +* `] add Literate Franklin NodeJS` * install `highlight.js` and `gh-pages` from within Julia: ``run(`sudo $(npm_cmd()) i highlight.js gh-pages`)`` Assuming you have all that, just run From 5029373c558d61fbe70830322a378cbd879dc0a0 Mon Sep 17 00:00:00 2001 From: ashryaagr Date: Wed, 1 Apr 2020 19:57:21 +0530 Subject: [PATCH 2/2] fix to UCI certificate issue --- _literate/EX-horse.jl | 6 +++--- _literate/EX-wine.jl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_literate/EX-horse.jl b/_literate/EX-horse.jl index 1566f979..b6ecd980 100644 --- a/_literate/EX-horse.jl +++ b/_literate/EX-horse.jl @@ -1,6 +1,6 @@ # ## Initial data processing # -# In this example, we consider the [UCI "horse colic" dataset](https://archive.ics.uci.edu/ml/datasets/Horse+Colic) +# In this example, we consider the [UCI "horse colic" dataset](http://archive.ics.uci.edu/ml/datasets/Horse+Colic) # # This is a reasonably messy classification problem with missing values etc and so some work should be expected in the feature processing. # @@ -11,8 +11,8 @@ using MLJ, StatsBase MLJ.color_off() # hide using HTTP, CSV, DataFrames -req1 = HTTP.get("https://archive.ics.uci.edu/ml/machine-learning-databases/horse-colic/horse-colic.data") -req2 = HTTP.get("https://archive.ics.uci.edu/ml/machine-learning-databases/horse-colic/horse-colic.test") +req1 = HTTP.get("http://archive.ics.uci.edu/ml/machine-learning-databases/horse-colic/horse-colic.data") +req2 = HTTP.get("http://archive.ics.uci.edu/ml/machine-learning-databases/horse-colic/horse-colic.test") header = ["surgery", "age", "hospital_number", "rectal_temperature", "pulse", "respiratory_rate", "temperature_extremities", diff --git a/_literate/EX-wine.jl b/_literate/EX-wine.jl index 802c56aa..1c19a7b4 100644 --- a/_literate/EX-wine.jl +++ b/_literate/EX-wine.jl @@ -1,15 +1,15 @@ # ## Initial data processing # -# In this example, we consider the [UCI "wine" dataset](https://archive.ics.uci.edu/ml/datasets/wine) +# In this example, we consider the [UCI "wine" dataset](http://archive.ics.uci.edu/ml/datasets/wine) # # > These data are the results of a chemical analysis of wines grown in the same region in Italy but derived from three different cultivars. The analysis determined the quantities of 13 constituents found in each of the three types of wines. # # ### Getting the data -# Let's download the data thanks to the [HTTP.jl](HTTP.get("https://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data")) package and load it into a DataFrame via the [CSV.jl](https://github.com/JuliaData/CSV.jl) package: +# Let's download the data thanks to the [HTTP.jl](HTTP.get("http://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data")) package and load it into a DataFrame via the [CSV.jl](https://github.com/JuliaData/CSV.jl) package: using HTTP, CSV, MLJ, StatsBase, PyPlot MLJ.color_off() # hide -req = HTTP.get("https://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data") +req = HTTP.get("http://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data") data = CSV.read(req.body, header=["Class", "Alcool", "Malic acid", "Ash", "Alcalinity of ash", "Magnesium",