From c50c0b62ecdf5138d6c4b3677aba8035c8481f0c Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Sun, 20 Oct 2013 16:42:29 +0100 Subject: [PATCH] Added notes on using timeit --- cipher.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cipher.py b/cipher.py index 752efed..ebba6d6 100644 --- 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) -- 2.34.1