moving things
This commit is contained in:
parent
4a40cae300
commit
e5438eb9e1
0
cheatsheets/git.qmd
Normal file
0
cheatsheets/git.qmd
Normal file
0
cheatsheets/githubactions.qmd
Normal file
0
cheatsheets/githubactions.qmd
Normal file
0
cheatsheets/julia.qmd
Normal file
0
cheatsheets/julia.qmd
Normal file
0
installation/julia.qmd
Normal file
0
installation/julia.qmd
Normal file
0
installation/vscode.qmd
Normal file
0
installation/vscode.qmd
Normal file
@ -6,13 +6,13 @@
|
||||
|
||||
|
||||
# Environments
|
||||
### What is a environment**
|
||||
### What is a environment
|
||||
- A list of "installed" packages^[libraries, dlls, .so etc.] at certain versions
|
||||
- sometimes includes the operation system
|
||||
|
||||
### **Reproducible** vs. **Replicable**
|
||||
Reproducible: Someone else can get the same results given your code + data
|
||||
Replicable: Someone else can repeat the whole study on new data
|
||||
- **Reproducible**: Someone else can get the same results given your code + data
|
||||
- **Replicable**: Someone else can repeat the whole study on new data
|
||||
|
||||
### Why do I need it?
|
||||
- Version control
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
|
||||
## Environemnts in Julia
|
||||
## Environments in Julia
|
||||
Every folder with an `Project.toml` file has it's own environment (see below)
|
||||
|
||||
The "base" environment is active by default:
|
||||
|
@ -9,12 +9,12 @@
|
||||
The [julia manual](https://docs.julialang.org/en/v1/manual/getting-started/) is excellent!
|
||||
:::
|
||||
|
||||
At this point we assume that you have Julia 1.9 installed, VSCode ready, and installed the VSCode Julia plugin. There are some more [recommended settings in VSCode](vscode.qmd) which are not necessary, but helpful.
|
||||
At this point we assume that you have [Julia 1.9 installed](../../../installation/vscode.qmd), VSCode ready, and installed the VSCode Julia plugin. There are some more [recommended settings in VSCode](../../../installation/vscode.qmd) which are not necessary, but helpful.
|
||||
|
||||
We further recommend to not use the small "play" button on the top right (which opens a new julia process everytime you change something), but rather open a new Julia repl (`ctrl`+`shift`+`p` => `>Julia: Start Repl`) which you keep open as long as possible.
|
||||
|
||||
::: callout-tip
|
||||
VSCode automatically loads the `Revise.jl` package, which screens all your actively loaded packages/files and updates the methods instances whenever it detects a change. This is quite similar to `%autorelad 2` in python. If you use VSCode, you dont need to think about it, if you prefer a command line, you should put Revise.jl in your startup.jl file.
|
||||
VSCode automatically loads the `Revise.jl` package, which screens all your actively loaded packages/files and updates the methods instances whenever it detects a change. This is quite similar to `%autorelad 2` in ipython. If you use VSCode, you dont need to think about it, if you prefer a command line, you should put Revise.jl in your startup.jl file.
|
||||
:::
|
||||
|
||||
|
||||
@ -69,7 +69,11 @@ Each of those has a specific purpose, but most likely we will only need `a = not
|
||||
myfunction(0,5;keyword1 = "notdefault")
|
||||
```
|
||||
1. everything before the `;` => positional, after => `kwargs`
|
||||
2. returns two functions, due to the `b=123` optional positional argument
|
||||
2. List all methods with that function name - returns two functions, due to the `b=123` optional positional argument
|
||||
|
||||
:: callout-tip
|
||||
## Terminology function vs. method
|
||||
Methods are instantiations of a abstract `function`
|
||||
|
||||
```julia
|
||||
anonym = (x,y) -> x+y
|
||||
@ -83,8 +87,22 @@ function mylongfunction(x)
|
||||
end
|
||||
```
|
||||
|
||||
```julia
|
||||
myfunction(args...;kwargs...) = myotherfunction(newarg,args...;kwargs...)
|
||||
```
|
||||
|
||||
#### Excourse: splatting & slurping
|
||||
Think of it as unpacking / collecting something
|
||||
|
||||
```julia
|
||||
a = [1,2,3]
|
||||
+(a)
|
||||
+(a...) # <1>
|
||||
```
|
||||
1. equivalent to `+(1,2,3)`
|
||||
|
||||
#### elementwise-function / broadcasting
|
||||
Julia is very neat in regards of applying functions elementwise (also called broadcasting). (Matlab users know this already).
|
||||
Julia is very neat in regards of applying functions elementwise (also called broadcasting).
|
||||
|
||||
```julia
|
||||
a = [1,2,3,4]
|
||||
@ -139,7 +157,7 @@ And a nice sideeffect: by doing this, we get rid of any specialized "serialized"
|
||||
| variables | lowercase, lower_case|
|
||||
| Types,Modules | UpperCamelCase|
|
||||
| functions, macro | lowercase |
|
||||
| inplace / side-effects | `endwith!()` |
|
||||
| inplace / side-effects | `endwith!()`^[A functionname ending with a `!` indicates that inplace operations will occur / side-effects are possible. This is convention only, but in 99% of cases adopted] |
|
||||
|
||||
# Task 1
|
||||
Ok - lot of introduction, but I think you are ready for your first interactive task.
|
||||
@ -335,7 +353,8 @@ once defined, a type-definition in the global scope of the REPL cannot be re-def
|
||||
:::
|
||||
|
||||
# Task 2
|
||||
Follow [Task 2 here](tasks.qmd#2) )
|
||||
Follow [Task 2 here](tasks.qmd#2)
|
||||
|
||||
# Julia Basics III
|
||||
## Modules
|
||||
```julia
|
||||
|
25
schedule.qmd
25
schedule.qmd
@ -1,27 +1,4 @@
|
||||
---
|
||||
title: "Schedule"
|
||||
---
|
||||
|
||||
::: callout-note
|
||||
The schedule is very preliminary and will most likely change drastically :)
|
||||
:::
|
||||
|
||||
| | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday |
|
||||
|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
|
||||
| | Arrival | Basics of RSE and Julia | Julia+RSE | Julia+Viz+Simulation | Stats + Projects | Optimization + Project |
|
||||
| | | | | | | |
|
||||
| 09.00 | | | **Benjamin**: Advanced Git / Contributing (1+1) | **Hendrik**: All the nice Julia Features (1+1)? | **Marco** Resampling: Bootstrap & Permutation tests (2+2) | **Doug**: Optimized (bootstrap) code (1)? |
|
||||
| 10.00 | | **Benjamin**: Welcome / What and why RSE? (1) | **Benjamin/Bene**: Unittests (1+1) | **Bene** Vizualization in Julia (1+1) | \~\~\~ | Project Work |
|
||||
| 11.00 | | **Hendrik**: Why Julia? (1)? | \~\~\~\~ | \~\~\~ | | cont. |
|
||||
| 12.00 | | **Bene**: First Steps - "Hello World" + Types (1+1) | \~\~\~\~ | \~\~\~ | | |
|
||||
| 13.00 | | **Lunch** | **Lunch** | **Lunch** | **Lunch** | **Lunch** |
|
||||
| 14.00 | | \~\~\~ | **Benjamin**: Continuous Integration (1+1) | **Lisa**: Simulating Data (1+1) | Project Work | Project Work |
|
||||
| 15.00 | | **Bene**: Julia + Git + Packages/Environments (1+1) | **Lisa**: Code-Review (1+1)? | \~\~\~ | | cont. |
|
||||
| 16.00 | | \~\~\~ | \~\~\~ | **Doug**: Things to keep in mind for datastorage (1+1)? | | |
|
||||
| 17.00 | | **Bene**: MyFirstPackage.jl (1+1) | \~\~\~ | \~\~\~ | | Farewell |
|
||||
| 18.00 | | \~\~\~ | **Bene**: PkgTemplates.jl (0.5+0.5) =\> wed/hendrik? | \~\~\~ | | |
|
||||
| 19.00 | Pre-Get-together | Welcome-BBQ \@ SimTech | Social 1 | Social 2 | Social 3 | |
|
||||
|
||||
: {.striped .hover}
|
||||
|
||||
Missing Topics right now: Documentation, License, MultipleRegression? Simulating Data - Requirements regarding regression?
|
||||

|
Loading…
Reference in New Issue
Block a user