|
| 1 | +Here are the shell commands that were used to go through the exercise: |
| 2 | + |
| 3 | +$ git checkout -b work |
| 4 | +[ Edit indict to add feature, test, "discover" FPR bug ; |
| 5 | + edit bloom.py to fix bug, test, confirm bugfix ; |
| 6 | + edit README to document the new feature and change the version to 2.0. ] |
| 7 | +$ git add bloom.py |
| 8 | +$ git commit -m "bloom: in retrospect, I distrust the spirit vision" |
| 9 | +$ git add indict |
| 10 | +$ git add -p README |
| 11 | +[ Only stage the documentation part of the changes ] |
| 12 | +$ git commit -m "indict: add a '-f' option to print out the false-positive rate" \ |
| 13 | + -m "Also document it in README." |
| 14 | +$ git commit -a -m "Bump the version to 2.0" |
| 15 | +$ git checkout master |
| 16 | +$ git merge work |
| 17 | +$ git tag v2.0 |
| 18 | + |
| 19 | +The commits that were made are below: |
| 20 | + |
| 21 | +commit 66812117218588256fa0deca94ee104dfa04b7d3 |
| 22 | +Author: Peter Williams <peter@newton.cx> |
| 23 | +Date: Sun Aug 22 19:08:11 2010 -0700 |
| 24 | + |
| 25 | + SOLUTION: add list of shell commands used to arrive here |
| 26 | + |
| 27 | +commit 5ed944b2220a20e01f4550a85231a95e4bd066bf |
| 28 | +Author: Peter Williams <peter@newton.cx> |
| 29 | +Date: Sun Aug 22 19:00:07 2010 -0700 |
| 30 | + |
| 31 | + Bump the version to 2.0. |
| 32 | + |
| 33 | +commit 3fb6342317fc60761994c7228dd4871a1dcbfbe4 |
| 34 | +Author: Peter Williams <peter@newton.cx> |
| 35 | +Date: Sun Aug 22 18:59:51 2010 -0700 |
| 36 | + |
| 37 | + indict: add a '-f' option to print out the false-positive rate |
| 38 | + |
| 39 | + Also document it in README. |
| 40 | + |
| 41 | +commit e7fb3fd6318bc47b9eb56038a65845abf320447c |
| 42 | +Author: Peter Williams <peter@newton.cx> |
| 43 | +Date: Sun Aug 22 18:57:31 2010 -0700 |
| 44 | + |
| 45 | + bloom: in retrospect, I distrust the spirit vision |
| 46 | + |
| 47 | +commit 8b188ff7e323033350af4d2a9aff22d98e8fafb9 |
| 48 | +Author: Peter Williams <peter@newton.cx> |
| 49 | +Date: Sun Aug 22 18:48:25 2010 -0700 |
| 50 | + |
| 51 | + INSTRUCTIONS: add some instructions for the breakout session |
| 52 | + |
| 53 | +commit cc42b1f9892ba524b2bf09a8d7aa143f1427ba21 |
| 54 | +Author: Peter Williams <peter@newton.cx> |
| 55 | +Date: Sun Aug 22 17:53:08 2010 -0700 |
| 56 | + |
| 57 | + indict: add the "-s" option |
| 58 | + |
| 59 | + This option suppresses output for words that are definitely not |
| 60 | + in the dictionary. |
| 61 | + |
| 62 | +commit 38c262413dab2aaf2d5d7a6e2f7e03755580f3bd |
| 63 | +Author: Peter Williams <peter@newton.cx> |
| 64 | +Date: Sun Aug 22 17:39:52 2010 -0700 |
| 65 | + |
| 66 | + dictbf.dat.gz: import the filter data into the repo |
| 67 | + |
| 68 | + This way people don't need to recreate the filter data themselves, |
| 69 | + which can be quite time-consuming. |
| 70 | + |
| 71 | +commit 6a1a8c1c2b02a2c0e3bfd9c0c224348999999c69 |
| 72 | +Author: Peter Williams <peter@newton.cx> |
| 73 | +Date: Sun Aug 22 17:38:41 2010 -0700 |
| 74 | + |
| 75 | + README: update for recent changes |
| 76 | + |
| 77 | +commit 3b7833528fb932a54ebad2b39b4f779a9c1524c3 |
| 78 | +Author: Peter Williams <peter@newton.cx> |
| 79 | +Date: Sun Aug 22 17:16:28 2010 -0700 |
| 80 | + |
| 81 | + bloom,importdictdata: move the dictionary-loading stuff out of the generic BloomFilter class |
| 82 | + |
| 83 | + It didn't really belong there and since we need to pre-cache the filter data |
| 84 | + anyway it's not any more useful to have it there. |
| 85 | + |
| 86 | +commit c95e7e65f5f84602ee748ae901a3d7d085e8eb64 |
| 87 | +Author: Peter Williams <peter@newton.cx> |
| 88 | +Date: Sun Aug 22 16:57:56 2010 -0700 |
| 89 | + |
| 90 | + bloom: use "true" division in the module |
| 91 | + |
| 92 | + In Python 2.X, dividing two integers yields the integer floor of |
| 93 | + the result by default: 1 / 2 = 0. Change the module to activate |
| 94 | + "true" division, in which 1 / 2 = 0.5, by the use of a __future__ |
| 95 | + import. This only effects only place in the code where we had |
| 96 | + to multiply some numbers by -1. to floatify them; there are other |
| 97 | + places where we relied on the "classic" division behavior but |
| 98 | + used the "//" operator which maintains that behavior even when |
| 99 | + true division is activated. See PEP238 for more context. |
| 100 | + |
| 101 | +commit 5d6a3bb78769befaf85e36b8716f3b2b3b1e2b5f |
| 102 | +Author: Peter Williams <peter@newton.cx> |
| 103 | +Date: Sun Aug 22 16:26:18 2010 -0700 |
| 104 | + |
| 105 | + importdictdata,indict: gzip-compress the filter data file |
| 106 | + |
| 107 | + Space isn't a big deal, but Python makes it so easy to do, why not? |
| 108 | + |
| 109 | +commit e825de5bfbe7a917a612e89132fc99518cb09df7 |
| 110 | +Author: Peter Williams <peter@newton.cx> |
| 111 | +Date: Sun Aug 22 17:32:27 2010 -0700 |
| 112 | + |
| 113 | + Pre-cache the filter data since it takes a long time to compute everything |
| 114 | + |
| 115 | + To accomplish this, we add a new tool, "importdictdata", which fills in the filter |
| 116 | + and saves the state to disk. Then "indict" just loads the prefilled data, which |
| 117 | + is much faster than recomputing it all from scratch. |
| 118 | + |
| 119 | + Now that this is the case, change the desired false-positive rate from 50% to 5% |
| 120 | + when constructing the filter. |
| 121 | + |
| 122 | +commit 2f3774f2390a0990227bebd7cf037c587e4fb5a3 |
| 123 | +Author: Peter Williams <peter@newton.cx> |
| 124 | +Date: Sat Aug 21 17:25:51 2010 -0700 |
| 125 | + |
| 126 | + bloom: fix mistake in the name of the __setstate__ function |
| 127 | + |
| 128 | + (This was a real honest-to-god mistake! But if this weren't |
| 129 | + for the demo I'd probably merge this commit into the previous |
| 130 | + one using "git rebase -i HEAD~2".) |
| 131 | + |
| 132 | +commit 040c681b9c43a4e517e88f32ff479e2226734613 |
| 133 | +Author: Peter Williams <peter@newton.cx> |
| 134 | +Date: Sat Aug 21 17:17:04 2010 -0700 |
| 135 | + |
| 136 | + bloom: add code for serializing state |
| 137 | + |
| 138 | +commit 077ef67fae0d1e7c2af3f6284f255481a53128bc |
| 139 | +Author: Peter Williams <peter@newton.cx> |
| 140 | +Date: Sun Aug 22 17:26:40 2010 -0700 |
| 141 | + |
| 142 | + Bump the version to 1.0. |
| 143 | + |
| 144 | +commit d377994271e21828fad918bf0065e55699ebc81c |
| 145 | +Author: Peter Williams <peter@newton.cx> |
| 146 | +Date: Sun Aug 22 18:24:58 2010 -0700 |
| 147 | + |
| 148 | + bloom: make the FP rate math more explicit |
| 149 | + |
| 150 | +commit 90d761a8337b0dae19ff7e9c118c0d82c509609f |
| 151 | +Author: Peter Williams <peter@newton.cx> |
| 152 | +Date: Sun Aug 22 17:26:13 2010 -0700 |
| 153 | + |
| 154 | + Add a .gitignore file to clean up output of 'git status' |
| 155 | + |
| 156 | +commit f846ebf1a40833dc093ef86d2fcdda1c9edd9244 |
| 157 | +Author: Peter Williams <peter@newton.cx> |
| 158 | +Date: Sun Aug 22 17:25:37 2010 -0700 |
| 159 | + |
| 160 | + README: add some documentation |
| 161 | + |
| 162 | +commit d28e5fddbc769c66850d3c46c6b9771e268bf720 |
| 163 | +Author: Peter Williams <peter@newton.cx> |
| 164 | +Date: Sun Aug 22 17:23:31 2010 -0700 |
| 165 | + |
| 166 | + indict: add program to check if words are in the dictionary |
| 167 | + |
| 168 | +commit d9510f063c63ad70ac696fc54fbcaa18f69287f0 |
| 169 | +Author: Peter Williams <peter@newton.cx> |
| 170 | +Date: Sat Aug 21 17:13:34 2010 -0700 |
| 171 | + |
| 172 | + Import my quickie Bloom filter implementation. |
| 173 | + |
0 commit comments