projects
/
cipher-training.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added cat commands to slides
[cipher-training.git]
/
slides
/
caesar-encipher.html
diff --git
a/slides/caesar-encipher.html
b/slides/caesar-encipher.html
index 4afd78dad4f3367c5107a99d0f40ff8f1e0aa037..279c2bdf8aa96de2b978f9e012381fcb57705a71 100644
(file)
--- a/
slides/caesar-encipher.html
+++ b/
slides/caesar-encipher.html
@@
-90,7
+90,7
@@
Before doing anything, create a new branch in Git
Experiment in IPython (ephemeral, for us)
Experiment in IPython (ephemeral, for us)
-Once you've got something working,
copy
the code into a `.py` file (permanent and reusable)
+Once you've got something working,
export
the code into a `.py` file (permanent and reusable)
```python
from imp import reload
```python
from imp import reload
@@
-224,6
+224,15
@@
ciphertext = [caesar_encipher_letter(p, key) for p in plaintext]
''.join()
```
''.join()
```
+You'll be doing this a lot, so define a couple of utility functions:
+
+```python
+cat = ''.join
+wcat = ' '.join
+```
+
+`cat` after the Unix command (_concatenate_ files), `wcat` for _word concatenate_.
+
</textarea>
<script src="http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type="text/javascript">
</script>
</textarea>
<script src="http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type="text/javascript">
</script>