X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=src%2Ftask5%2Ftask5-re.ipynb;h=d7832e33ebf897ecc1673658f2587a274510e283;hb=5fcd6565317ea77d297bf3c6a349754f9bbd94cf;hp=fc1458734e97ea88a7383ceae43fdea45fa69d94;hpb=6e2b9f4076f380e747db63e75ac8abaad3e6e2bf;p=summerofcode2018soln.git diff --git a/src/task5/task5-re.ipynb b/src/task5/task5-re.ipynb index fc14587..d7832e3 100644 --- a/src/task5/task5-re.ipynb +++ b/src/task5/task5-re.ipynb @@ -16,13 +16,13 @@ "metadata": {}, "outputs": [], "source": [ - "comment_mark = re.compile('<[^>]*>')\n", - "expand_mark = re.compile(':(\\d+):(\\d+):')" + "comment_mark = re.compile('<[^>]*>') # A < followed by some things that aren't > followed by >\n", + "expand_mark = re.compile(':(\\d+):(\\d+):') # A : followed by some digits, followed by another :, then some more digits, then a final :" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -38,7 +38,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -60,7 +60,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -69,7 +69,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -79,7 +79,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -88,7 +88,7 @@ "149043" ] }, - "execution_count": 31, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -99,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -108,7 +108,7 @@ "302266" ] }, - "execution_count": 32, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -119,7 +119,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -130,7 +130,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -139,7 +139,7 @@ "149043" ] }, - "execution_count": 34, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -150,7 +150,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -159,7 +159,7 @@ "302266" ] }, - "execution_count": 35, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -170,14 +170,14 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "27.5 ms ± 951 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" + "27.7 ms ± 908 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" ] } ], @@ -189,14 +189,14 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "875 ms ± 5.02 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n" + "861 ms ± 7.25 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n" ] } ],