Skip to content

Commit 51e37f1

Browse files
committed
Revert "spelling corrections using en_CA dictionary"
This reverts commit 104c305. en_GB is preferred for Carpentries episodes, according to carpentries/lesson-example#231
1 parent 104c305 commit 51e37f1

12 files changed

+32
-38
lines changed

_episodes/01-basics.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ keypoints:
1111
---
1212

1313
The most basic use of Python is to use it as a fancy calculator.
14-
It is very easy to do basic math in Python.
14+
It is very easy to do basic maths in Python.
1515

1616
```python
1717
print(5 + 1)
@@ -33,7 +33,7 @@ Notice how leaving out `print()` gives us the same result as above.
3333
```
3434
{: .output}
3535

36-
Python can do all of the normal basic math operations you'd expect.
36+
Python can do all of the normal basic maths operations you'd expect.
3737

3838
```python
3939
5 + 3
@@ -76,7 +76,7 @@ Remainder division (`%`), gives the remainder after division.
7676
```
7777
{: .output}
7878

79-
Python follows the normal order of operations for math.
79+
Python follows the normal order of operations for maths.
8080

8181
```python
8282
4 + 1 * 6
@@ -124,7 +124,7 @@ weight_kg
124124
```
125125
{: .output}
126126

127-
We can perform math on variables the same way we would normally.
127+
We can perform maths on variables the same way we would normally.
128128

129129
```python
130130
print('weight in pounds:', 2.2 * weight_kg)
@@ -269,7 +269,7 @@ and pointed an arrow (`^`) at the bad part.
269269
## Different types of data
270270

271271
Computers are not smart, and have to be explicitly told how to handle different types of data.
272-
Although a human might know that you can't do math on a word,
272+
Although a human might know that you can't do maths on a word,
273273
our computer does not.
274274
To work around this problem, programming languages store different types of data in different ways.
275275

@@ -336,7 +336,7 @@ For instance, we can even use the `+` sign to put strings together!
336336
```
337337
{: .output}
338338

339-
Note that math operations on strings will only work within reason.
339+
Note that maths operations on strings will only work within reason.
340340
Attempting to add a string to a number doesn't work!
341341

342342
```python
@@ -373,7 +373,7 @@ int
373373
```
374374
{: .output}
375375

376-
But what happens when we perform a math operation that would result in a decimal?
376+
But what happens when we perform a maths operation that would result in a decimal?
377377

378378
```python
379379
type(10 / 3)

_episodes/03-lists.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ objectives:
88
- "Learn to use lists and Numpy arrays, and explain the difference between each."
99
keypoints:
1010
- "Lists store a sequence of elements."
11-
- "Numpy allows vector math in Python."
11+
- "Numpy allows vector maths in Python."
1212
---
1313

1414
At the end of the last lesson, we saw noticed that `sys.argv` gave us a new data structure:
@@ -175,7 +175,7 @@ List 1 is: [1, 2, 3, 4, 5, 6, 7]
175175
Modifying `list2` actually modified `list1` as well.
176176
In Python, lists are objects.
177177
Objects are not copied when we assign them to a new value (like in R).
178-
This is an important optimization,
178+
This is an important optimisation,
179179
as we won't accidentally fill up all of our computer's memory by renaming a variable a couple of times.
180180
When we ran `list2 = list1`, it just created a new name for `list1`.
181181
`list1` still points at the same underlying object.
@@ -267,7 +267,7 @@ print(list1)
267267
{: .output}
268268

269269
> ## Dynamic resizing of lists
270-
> Python's lists are an extremely optimized data structure.
270+
> Python's lists are an extremely optimised data structure.
271271
> Unlike R's vectors, there is no time penalty to continuously adding elements to list.
272272
> You never need to pre-allocate a list at a certain size for performance reasons.
273273
{: .callout}
@@ -323,13 +323,13 @@ for element in ['a', True, None]:
323323
```
324324
{: .output}
325325

326-
## Vectorized operations with Numpy
326+
## Vectorised operations with Numpy
327327

328328
Numpy is a numerical library designed to make working with numbers
329329
easier than it would otherwise be.
330330

331331
For example, say we had a list of a thousand numbers.
332-
There's no way to do vector math without iterating through all the
332+
There's no way to do vector maths without iterating through all the
333333
elements!
334334

335335
```python
@@ -350,7 +350,7 @@ print(new_vals[:5])
350350
{: .output}
351351

352352
That was a lot of work.
353-
Numpy lets us do vector math like in R, saving us a lot of effort.
353+
Numpy lets us do vector maths like in R, saving us a lot of effort.
354354
The most basic function is `np.array()` which creates a numerical
355355
array from a list.
356356
A numpy array is a collection of numbers that can have any number of dimensions.
@@ -449,6 +449,3 @@ array([ 0, 8, 16, 24, 32])
449449
> Retrieve everything defined in the range of
450450
> rows 4-5 and columns 1-4.
451451
{: .challenge}
452-
453-
<!-- LocalWords: sys argv th IndexError Traceback idx vals np timeit
454-
-->

_episodes/05-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ list(filter(less_than_3, values))
257257
That was very inconvenient.
258258
We had to define an entire function just to only use it once.
259259
The solution for this is to write a one-time use function that has no name.
260-
Such functions are called either anonymous functions or lambda functions (both mean the same thing).
260+
Such functions are called either anonymous functions or lamdba functions (both mean the same thing).
261261

262262
To define a lambda function in python, the general syntax is as follows:
263263

@@ -310,7 +310,7 @@ list(filter(lambda x: x<3, [1,2,3,4,5]))
310310
## map/filter style functionality with Numpy arrays
311311

312312
Although you *could* use a for-loop to apply a custom function to a numpy array in a single go,
313-
there is a handy `np.vectorize()` function you can use to convert your functions to a vectorized numpy equivalent.
313+
there is a handy `np.vectorize()` function you can use to convert your functions to a vectorised numpy equivalent.
314314
Note that this is purely for convenience - this uses a `for-loop` internally.
315315

316316
```python

_episodes/06-parallel.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The number of concurrent tasks that can be started at the same time, however is
4747
Now imagine that all workers have to obtain their paint form a central dispenser located at the middle of the room.
4848
If each worker is using a different colour, then they can work asynchronously.
4949
However, if they use the same colour, and two of them run out of paint at the same time,
50-
then they have to synchronize to use the dispenser -
50+
then they have to synchronise to use the dispenser -
5151
one should wait while the other is being serviced.
5252

5353
In our analogy, the paint dispenser represents access to the memory in your computer.
@@ -65,7 +65,7 @@ Suppose that worker A, needs a colour that is only available in the dispenser of
6565
worker A should request the paint to worker B and worker B should respond by sending the required colour.
6666

6767
Think of the memory distributed on each node/computer of a cluster as the different dispensers for your workers.
68-
A *fine-grained* parallel program needs lots of communication/synchronization between tasks,
68+
A *fine-grained* parallel program needs lots of communication/synchronisation between tasks,
6969
in contrast with a *course-grained* one that barely communicates at all.
7070
An embarrassingly/massively parallel problem is one where all tasks can be executed completely independent from each other (no communications required).
7171

@@ -88,7 +88,7 @@ each good at certain types of tasks:
8888
### Asynchronous programming
8989

9090
Often times, certain computations involve a lot of waiting.
91-
Perhaps you sent some information to a web server on the internet and are waiting back on a response.
91+
Perhaps you sent some information to a webserver on the internet and are waiting back on a response.
9292
In this case, if you needed to make lots of requests over the internet,
9393
your program would spend ages just waiting to hear back.
9494
In this scenario, it would be very advantageous to fire off a bunch of requests to the internet,
@@ -250,13 +250,13 @@ AttributeError: Can't get attribute 'sleeping' on <module '__main__'>
250250
The `multiprocessing` module has a major limitation:
251251
it only accepts certain functions, and in certain situations.
252252
For instance any class methods, lambdas, or functions defined in `__main__` wont' work.
253-
This is due to the way Python "pickles" (read: serializes) data
253+
This is due to the way Python "pickles" (read: serialises) data
254254
and sends it to the worker processes.
255255
"Pickling" simply can't handle a lot of different types of Python objects.
256256
257257
Fortunately, there is a fork of the `multiprocessing` module called `multiprocess`
258258
that works just fine (`pip install --user multiprocess`).
259-
`multiprocess` uses `dill` instead of `pickle` to serialize Python objects
259+
`multiprocess` uses `dill` instead of `pickle` to serialise Python objects
260260
(read: send your data and functions to the Python workers),
261261
and does not suffer the same issues.
262262
Usage is identical:

_episodes/11-snakemake-intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ keypoints:
1414
Let's imagine that we're interested in
1515
seeing the frequency of various words in various books.
1616

17-
We've compiled our raw data i.e. the books we want to analyze
17+
We've compiled our raw data i.e. the books we want to analyse
1818
and have prepared several Python scripts that together make up our
1919
analysis pipeline.
2020

@@ -37,7 +37,7 @@ we will be working with:
3737
{: .output}
3838

3939
The first step is to count the frequency of each word in a book.
40-
The first argument (`books/isles.txt`) to wordcount.py is the file to analyze,
40+
The first argument (`books/isles.txt`) to wordcount.py is the file to analyse,
4141
and the last argument (`isles.dat`) specifies the output file to write.
4242

4343
```bash
@@ -85,7 +85,7 @@ to 1515 2.38057825267
8585
```
8686
{: .output}
8787

88-
Let's visualize the results.
88+
Let's visualise the results.
8989
The script `plotcount.py` reads in a data file and plots the 10 most
9090
frequently occurring words as a text-based bar plot:
9191

_episodes/12-snakefiles.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ rule count_words_abyss:
237237
jobid: 0
238238
239239
Finished job 0.
240-
1 of 1 steps (100%) done
240+
1 of 1 steps (100%) doneat
241241
```
242242
{: .output}
243243

@@ -475,6 +475,3 @@ The following figure shows the dependencies embodied within our
475475
Makefile, involved in building the `results.txt` target:
476476

477477
![results.txt dependencies represented within the Makefile](../fig/02-challenge-dag.svg "results.txt dependencies represented within the Makefile")
478-
479-
<!-- LocalWords: wordcount Snakefiles
480-
-->

_episodes/14-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ rule count_words:
2727

2828

2929
`{file}` is another arbitrary [wildcard]({{ page.root }}/reference/#wildcard),
30-
that we can use as a placeholder for any generic book to analyze.
30+
that we can use as a placeholder for any generic book to analyse.
3131
Note that we don't have to use `{file}` as the name of our wildcard -
3232
it can be anything we want!
3333

_episodes/15-snakemake-python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ keypoints:
1717
Despite our efforts, our pipeline still has repeated content,
1818
for instance the names of output files/dependencies.
1919
Our `zipf_test` rule, for instance, is extremely clunky.
20-
What happens if we want to analyze `books/sierra.txt` as well?
20+
What happens if we want to analyse `books/sierra.txt` as well?
2121
We'd have to update everything!
2222

2323
```python

_episodes/16-resources.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ is use a Python multiline string (begin and end with `'''`)
239239
One important addition we should be aware of is the `&&` operator.
240240
`&&` is a bash operator that runs commands as part of a chain.
241241
If the first command fails, the remaining steps are not run.
242-
This is more forgiving than bash's default "hit an error and keep going" behaviour.
242+
This is more forgiving than bash's default "hit an error and keep going" behavior.
243243
After all, if the first command failed, it's unlikely the other steps will work.
244244

245245
```python
@@ -334,7 +334,7 @@ Snakemake will assume that the resources in question are unlimited.
334334
> Or maybe a type of rule uses a lot of network bandwidth as it downloads data.
335335
> In all of these cases, `resources` can be used to constrain access
336336
> to arbitrary compute resources so that each rule can run at it's most efficient.
337-
> Snakemake will run your rules in such a way as to maximize throughput given your
337+
> Snakemake will run your rules in such a way as to maximise throughput given your
338338
> resource constraints.
339339
{: .callout}
340340

_episodes/17-cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ ssh -X yourUsername@graham.computecanada.ca
136136
> You can use this feature for this tutorial
137137
> (I've already added all of the files to version control for you),
138138
> but if you want to use this feature in your own work,
139-
> you should familiarize yourself with a VCS tool like Git.
139+
> you should familiarise yourself with a VCS tool like Git.
140140
>
141141
> For more information on how to use this feature, see
142142
> [http://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html](http://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html)

0 commit comments

Comments
 (0)