This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cournal-server.py b/cournal-server.py | |
index 75cf46a..44c99cd 100755 | |
--- a/cournal-server.py | |
+++ b/cournal-server.py | |
@@ -41,12 +41,14 @@ USERNAME = "test" | |
PASSWORD = "testpw" | |
class Page: | |
+ """ | |
+ A page in a document, having multiple strokes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This is on python 2.7: | |
In [1]: a = '12345678' | |
In [2]: %timeit [a[max(i-3,0):i] for i in range(len(a), 0, -3)][::-1] | |
1000000 loops, best of 3: 1.91 us per loop | |
In [3]: %timeit format(int(a), ',').split(',') | |
1000000 loops, best of 3: 1.62 us per loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ "x$1" = "x" ]]; then | |
echo "Usage:" | |
echo " $0 <searchpath>" | |
exit 1 | |
fi | |
find "$(readlink -f "$1")" -type d -name STREAM | while read M ; do | |
cd "$M" |