Skip to content

Commit 6601f2a

Browse files
committed
clear lesson-check errors
1 parent 43a1e2e commit 6601f2a

File tree

7 files changed

+44
-30
lines changed

7 files changed

+44
-30
lines changed

_episodes/02-00-environment-modules.md renamed to _episodes/00-environment-modules.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ When Lola sits down to tackle her next project, she wants to get a feeling on wh
2727
~~~
2828
$ python3
2929
~~~
30-
{: .bash}
30+
{: .language-bash}
3131

3232
~~~
3333
bash: python3: command not found
@@ -55,7 +55,7 @@ Lena demonstrates that inside the folder where `fdate` was unzipped, it can be e
5555
~~~
5656
$ ./fdate
5757
~~~
58-
{: .bash}
58+
{: .language-bash}
5959

6060
~~~
6161
-----------------------------
@@ -69,7 +69,7 @@ However, when omitting the leading `./`, the command doesn't work anymore.
6969
~~~
7070
$ fdate
7171
~~~
72-
{: .bash}
72+
{: .language-bash}
7373

7474
~~~
7575
bash: fdate: command not found...
@@ -85,7 +85,7 @@ What is likely to happen in a good library: a sign will be put up which tells a
8585
~~~
8686
$ echo ${PATH}
8787
~~~
88-
{: .bash}
88+
{: .language-bash}
8989

9090
which may yield something along the lines of:
9191

@@ -101,7 +101,7 @@ To proceed and make `/home/lola/from_lena/fdate` available to `PATH`, Lena shows
101101
~~~
102102
$ export PATH=${PATH}:/home/lola/from_lena/
103103
~~~
104-
{: .bash}
104+
{: .language-bash}
105105

106106
As you can see only directories (not paths to files) are added to `PATH` (similar to the example above where only signs to the fantasy corner and not to Harry Potter V are put up).
107107

@@ -112,7 +112,7 @@ As you can see only directories (not paths to files) are added to `PATH` (simila
112112
> ~~~~~
113113
> $ export PATH=/home/lola/from_lena/:${PATH}
114114
> ~~~~~
115-
> {: .bash}
115+
> {: .language-bash}
116116
>
117117
> This means though that you have trust, that `/home/lola/from_lena/` does not contain applications which would shadow applications which are already accessible through `PATH`.
118118
>
@@ -155,7 +155,7 @@ As you can see only directories (not paths to files) are added to `PATH` (simila
155155
> $ cd /tmp
156156
> $ ls
157157
> ~~~~~
158-
> {: .bash}
158+
> {: .language-bash}
159159
>
160160
> > ## Solution
161161
> > `fdate.zip` can be downloaded from [here]({{ page.root }}/code/02_parallel_jobs/fdate.zip).
@@ -172,7 +172,7 @@ $ fdate
172172
$ cd /tmp
173173
$ fdate
174174
~~~
175-
{: .bash}
175+
{: .language-bash}
176176
177177
~~~
178178
-----------------------------
@@ -191,7 +191,7 @@ To have a look, what software is available through the `module` system, a user i
191191
~~~
192192
$ module available
193193
~~~
194-
{: .bash}
194+
{: .language-bash}
195195
196196
~~~
197197
--------------------------------- /opt/modulefiles/ ---------------------------------------
@@ -206,7 +206,7 @@ The structure of each entry is usually the same `<software>/<version>`, where `s
206206
~~~
207207
$ module load python/3.6.5
208208
~~~
209-
{: .bash}
209+
{: .language-bash}
210210
211211
~~~
212212
python version 3.6.5 for x86_64 architecture loaded.
@@ -218,7 +218,7 @@ The exact content of the above differs from system to system and depends on how
218218
~~~
219219
$ python --version
220220
~~~
221-
{: .bash}
221+
{: .language-bash}
222222
223223
~~~
224224
Python 3.6.5
@@ -233,7 +233,7 @@ Python 3.6.5
233233
> ~~~
234234
> $ python --version
235235
> ~~~
236-
> {: .bash}
236+
> {: .language-bash}
237237
>
238238
{: .callout }
239239
@@ -242,14 +242,14 @@ The real hallmark of the module system comes with the facility to switch off app
242242
~~~
243243
$ module unload python/3.6.5
244244
~~~
245-
{: .bash}
245+
{: .language-bash}
246246
247247
When one tries again now, the above mentioned effect is gone again:
248248
249249
~~~
250250
$ python --version
251251
~~~
252-
{: .bash}
252+
{: .language-bash}
253253
254254
~~~
255255
Python 2.7.15
@@ -259,12 +259,15 @@ Python 2.7.15
259259
260260
> ## The others do it too
261261
>
262-
> The idea of programmatically changing the environment of a running terminal is offered by many other software stacks. In the python eco system, `virtualenv` is a prime example. of such. From the [`virtualenv` docs](https://virtualenv.pypa.io/en/stable/userguide/#activate-script):
262+
> The idea of programmatically changing the environment of a running terminal
263+
> is offered by many other software stacks. In the python eco system,
264+
> `virtualenv` is a prime example. of such. From the [`virtualenv`
265+
> docs](https://virtualenv.pypa.io/en/stable/userguide/#activate-script):
263266
>
264267
> ~~~~~
265268
> $ source bin/activate
266269
> ~~~~~
267-
> { .bash }
270+
> {: .language-bash}
268271
>
269272
> "... This will change your $PATH so its first entry is the virtualenv’s bin/ directory. (You have to use source because it changes your shell environment in-place.)"
270273
>
@@ -274,7 +277,7 @@ Python 2.7.15
274277
> $ conda create -n our_workshop python=3.6 numpy mpi4py line_profiler
275278
> $ source activate our_workshop
276279
> ~~~~~
277-
> { .bash }
280+
> {: .language-bash}
278281
>
279282
> The last line above changes the environment of the current shell, so that `python=3.6 numpy mpi4py line_profiler` are available.
280283
{: .callout }

_episodes/02-01-estimate-of-pi.md renamed to _episodes/01-estimate-of-pi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ If need be, to install the profiler, please issue the following command:
8686
~~~
8787
$ pip3 install line_profiler
8888
~~~
89-
{: .language-bash }
89+
{: .language-bash}
9090

9191
When this is done and your command line offers the `kernprof-3` executable, you are ready to go on.
9292

@@ -146,7 +146,7 @@ $ kernprof-3 -l ./serial_numpi_annotated.py 50000000
146146
[serial version] pi is 3.141728 from 50000000 samples
147147
Wrote profile results to serial_numpi_annotated.py.lprof
148148
~~~
149-
{: .language-bash }
149+
{: .language-bash}
150150

151151
You can see that the profiler just adds one line to the output, i.e. the last line. In order to view, the output we can use the `line_profile` module in python:
152152

@@ -358,6 +358,8 @@ So this is a prime candidate for acceleration.
358358
> > 48 else:
359359
> > 49 sys.exit(1)
360360
> > ~~~~~
361+
> > {: .output}
362+
> >
361363
> > The `word_count` function takes the longest time. Inside it, `re.split` hogs runtime the most.
362364
> {: .solution}
363365
{: .challenge}

_episodes/02-04-mapreduce-of-files.md renamed to _episodes/04-mapreduce-of-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ She tests her python program on a single input file. As she knows how long it'll
8686
~~~
8787
{: .output}
8888

89-
> ## The `bash` can do that too
89+
> ## The shell can do that too
9090
>
9191
> Filtering out any lines starting with `3.1` can be done with pure bash commands as well.
9292
>

setup.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,45 @@ permalink: /setup/
66

77
## Software requirements
88

9-
Please bring your laptop to the course. Your laptop should have a program called `ssh` or any clients thereof installed and ready for use.
9+
Please bring your laptop to the course. Your laptop should have a program
10+
called `ssh` or any clients thereof installed and ready for use.
1011

1112
### Linux
1213

13-
Please make sure that ssh is in your PATH or to install ssh with your distribution's package manager (like xterm, terminal, konsole, etc. available as well).
14+
Please make sure that ssh is in your PATH or to install ssh with your
15+
distribution's package manager (like xterm, terminal, konsole, etc. available
16+
as well).
1417

1518
### macOS / OS X
1619

17-
`ssh` is typically preinstalled, however be sure to have a terminal program (like e.g. [`iTerm`](https://www.iterm2.com/) available as well).
20+
`ssh` is typically preinstalled, however be sure to have a terminal program
21+
(like e.g. [`iTerm`](https://www.iterm2.com/) available as well).
1822

1923
### Windows
2024

21-
It depends on your version of windows how and if you have to install a terminal and/or a ssh client. Typically, [putty](http://www.putty.org), [bitvise SSH](https://www.bitvise.com/ssh-client-download) or [mRemoteNG](https://mremoteng.org/) are a good choices.
25+
It depends on your version of windows how and if you have to install a terminal
26+
and/or a ssh client. Typically, [putty](http://www.putty.org), [bitvise
27+
SSH](https://www.bitvise.com/ssh-client-download) or
28+
[mRemoteNG](https://mremoteng.org/) are a good choices.
2229

2330

2431
## Logging in
2532

2633
In this lesson, we will be working on the command-line on a remote computer.
27-
This means that the commands we enter into the command-line will be run
28-
on a different computer than our laptop/workstation.
34+
This means that the commands we enter into the command-line will be run on a
35+
different computer than our laptop/workstation.
2936

30-
The first step will be to connect to this computer.
31-
This is known as a remote login.
37+
The first step will be to connect to this computer. This is known as a remote
38+
login.
3239

3340
If you run Mac OS X or any other Unix-based operating system on your machine,
3441
you can log in remotely by opening a terminal and using the `ssh` command:
3542

3643
~~~
3744
$ ssh username@{{ site.workshop_login_host }}
3845
~~~
46+
{: .language-bash}
3947

40-
Make sure to change `username` to the username you will have on the remote machine. Also, please change `{{ site.workshop_login_host }}` to what your instructors tells you.
41-
48+
Make sure to change `username` to the username you will have on the remote
49+
machine. Also, please change `{{ site.workshop_login_host }}` to what your
50+
instructors tells you.

0 commit comments

Comments
 (0)