projects
/
cipher-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5bada5
)
Added notes on using timeit
author
Neil Smith
<neil.github@njae.me.uk>
Sun, 20 Oct 2013 15:42:29 +0000
(16:42 +0100)
committer
Neil Smith
<neil.github@njae.me.uk>
Sun, 20 Oct 2013 15:42:29 +0000
(16:42 +0100)
cipher.py
patch
|
blob
|
history
diff --git
a/cipher.py
b/cipher.py
index 752efed3582c9caba29f2bb7db35b36c1d38dbd2..ebba6d622c5c182b604dcef27fe92aa34565667c 100644
(file)
--- a/
cipher.py
+++ b/
cipher.py
@@
-4,6
+4,13
@@
import norms
import logging
from segment import segment
+# To time a run:
+#
+# import timeit
+# c5a = open('2012/5a.ciphertext', 'r').read()
+# timeit.timeit('keyword_break(c5a)', setup='gc.enable() ; from __main__ import c5a ; from cipher import keyword_break', number=1)
+
+
logger = logging.getLogger(__name__)
logger.addHandler(logging.FileHandler('cipher.log'))
logger.setLevel(logging.WARNING)