From 95bb3c544710dd5b9d69210c2ad989542d3b174f Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Wed, 25 Oct 2023 14:55:00 +0000 Subject: [PATCH] [create-pull-request] automated change --- episodes/01_Introduction.md | 4 ++-- episodes/04_Using_the_package_manager.md | 2 +- episodes/05_Write_functions.md | 16 ++++++++++--- episodes/07_Loops.md | 30 ++++++++++++------------ episodes/10_Adding_tests.md | 2 +- 5 files changed, 32 insertions(+), 22 deletions(-) diff --git a/episodes/01_Introduction.md b/episodes/01_Introduction.md index a0ef36e6..641bd4d3 100644 --- a/episodes/01_Introduction.md +++ b/episodes/01_Introduction.md @@ -79,7 +79,7 @@ This is captured the best by an analogy from [Sam Urmy](https://github.com/ElOce > together quickly and easily. > >

-> ![](https://global.discourse-cdn.com/business5/uploads/julialang/original/3X/5/2/52e63856ad9e23876cda4297a04171879fa625b4.jpeg){width="600" height="400" alt=""} +> ![](https://global.discourse-cdn.com/julialang/original/3X/5/2/52e63856ad9e23876cda4297a04171879fa625b4.jpeg){width="600" height="400" alt=""} >

> > OK, sure. Toy trucks are like linear algebra, though, a common request, and @@ -88,7 +88,7 @@ This is captured the best by an analogy from [Sam Urmy](https://github.com/ElOce > wings? And it should be as easy to build and use as a basic dump truck? > >

-> ![](https://global.discourse-cdn.com/business5/uploads/julialang/original/3X/2/8/2865d34fb35c181dc3c5c0f0b71915f31310269c.jpeg){ width="600" height="400" alt=""} +> ![](https://global.discourse-cdn.com/julialang/original/3X/2/8/2865d34fb35c181dc3c5c0f0b71915f31310269c.jpeg){ width="600" height="400" alt=""} >

> > There’s a reason that only Lego ever made anything like Dr. Cyber’s Flying diff --git a/episodes/04_Using_the_package_manager.md b/episodes/04_Using_the_package_manager.md index 4ad452da..3df83bfa 100644 --- a/episodes/04_Using_the_package_manager.md +++ b/episodes/04_Using_the_package_manager.md @@ -121,7 +121,7 @@ environment. ```` Status `~/projects/trebuchet/Project.toml` [f6369f11] ForwardDiff v0.10.36 - [295af30f] Revise v3.5.5 + [295af30f] Revise v3.5.7 [98b73d46] Trebuchet v0.2.2 ```` diff --git a/episodes/05_Write_functions.md b/episodes/05_Write_functions.md index a6889cc4..a01102f1 100644 --- a/episodes/05_Write_functions.md +++ b/episodes/05_Write_functions.md @@ -94,11 +94,11 @@ those that are not exported. What would the function call look like? 1. Both arguments are present, but `true` is presented without a keyword. This throws a `MethodError: no method matching names(::Module, ::Bool)` 2. This is a __correct__ call. - 3. This is also __correct__: you _can_ specify where the positional arguments - end with the `;`, but you do not have to. - 4. Two arguments are present, but the keyword `all` is not assigned a + 3. Two arguments are present, but the keyword `all` is not assigned a value. This throws a `MethodError: no method matching names(::Module, ::typeof(all))` + 4. This is also __correct__: you _can_ specify where the positional arguments + end with the `;`, but you do not have to. 5. This is the __most correct__ answer. :::::: @@ -118,6 +118,16 @@ Pkg.instantiate() ```` Activating project at `~/projects/trebuchet` +Precompiling project... + ✓ OpenSSL_jll + ✓ OpenSSL + ✓ HTTP + ✓ WebSockets + ✓ WebIO + ✓ JSExpr + ✓ Trebuchet + 7 dependencies successfully precompiled in 416 seconds. 160 already precompiled. + 3 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions ```` diff --git a/episodes/07_Loops.md b/episodes/07_Loops.md index a7821d95..c72f33e3 100644 --- a/episodes/07_Loops.md +++ b/episodes/07_Loops.md @@ -106,8 +106,8 @@ Trebuchet( rand() * 500, rand() * pi/2 ) ````output 2-element Trebuchet: - 325.16857513243514 - 1.4214156882736535 + 199.20577943788413 + 1.3175676282878894 ```` will give her a Trebuchet with a weight between 0 and 500 and a release angle between 0 and pi/2 radians at random. @@ -121,9 +121,9 @@ distances = [shoot_distance(Trebuchet(rand() * 500, rand() * pi / 2), env) for _ ````output 3-element Vector{Float64}: - 95.34228401250319 - 116.82589218537548 - 0.6815707596179541 + 109.63015948619828 + 26.241893505479297 + 42.721289252273955 ```` This is called an _array comprehension_. @@ -138,16 +138,16 @@ distances = [(w,a) => shoot_distance(Trebuchet(w, a), env) for (w, a) in zip(wei ````output 10-element Vector{Pair{Tuple{Float64, Float64}, Float64}}: - (39.64972003383499, 1.4356297441010255) => 11.866149878931637 - (164.42881179322788, 1.4640276154421406) => 22.174678100790018 - (367.9434185012257, 1.4375026271475015) => 29.142976299251053 - (137.99390039219506, 0.9643884432619938) => 84.81262654249787 - (222.0515164410986, 0.4063767373305969) => 104.28193737621544 - (436.7263816265339, 1.2139595368028047) => 68.51245438747303 - (180.62981502392094, 0.966166690591184) => 90.05903638111702 - (7.5342147342188355, 0.13669385275895293) => 0.6815707596179541 - (317.4431655220148, 1.2250401309666004) => 64.69560256895292 - (396.6491533236719, 0.12154258149162844) => 82.50509163157764 + (190.20671680295277, 0.46833555853995784) => 105.35107143909875 + (478.1865359891392, 0.5300556485613425) => 118.30720084397312 + (486.93150499743587, 0.3266640654580006) => 109.46465880298848 + (482.14935572302176, 0.12719150178861877) => 84.4818142924443 + (19.24228958100732, 1.1311868010145723) => 3.0834927704117057 + (233.70715374384997, 0.9844292611959172) => 92.48538338520068 + (322.8906658023918, 0.3793433438873054) => 110.49554634124097 + (70.71586061650947, 1.3112085094572539) => 33.712397304286064 + (369.04715755142337, 0.7897355893853809) => 112.25274271811487 + (417.9989625732521, 1.3286071027399737) => 47.89370694935854 ```` ### Gradient descent diff --git a/episodes/10_Adding_tests.md b/episodes/10_Adding_tests.md index f4e8cb0a..6d89a962 100644 --- a/episodes/10_Adding_tests.md +++ b/episodes/10_Adding_tests.md @@ -55,7 +55,7 @@ end ```` ````output -Test.DefaultTestSet("Test arithmetic equalities", Any[], 1, false, false, true, 1.694703469038899e9, 1.694703469081385e9, false) +Test.DefaultTestSet("Test arithmetic equalities", Any[], 1, false, false, true, 1.698245666140703e9, 1.698245666189045e9, false) ```` With this Melissa can run her test using the pkg mode of the REPL: