Add LICENSE and trivially reorganise
dkl9

dkl9 commited on 2025-203 13:20:45
Showing 3 changed files, with 16 additions and 2 deletions.

... ...
@@ -0,0 +1,15 @@
1
+dost orders inputs to reduce redundancy in early samples.
2
+Copyright (C) 2025 dkl9
3
+
4
+This program is free software: you can redistribute it and/or modify
5
+it under the terms of the GNU Affero General Public License as
6
+published by the Free Software Foundation, either version 3 of the
7
+License, or (at your option) any later version.
8
+
9
+This program is distributed in the hope that it will be useful,
10
+but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
+GNU Affero General Public License for more details.
13
+
14
+You should have received a copy of the GNU Affero General Public License
15
+along with this program.  If not, see <https://www.gnu.org/licenses/>.
... ...
@@ -3,7 +3,6 @@ import argparse
3 3
 from collections import defaultdict
4 4
 import re
5 5
 import sys
6
-import time
7 6
 from typing import Generator
8 7
 
9 8
 def cost(token_child: tuple[str, "Trie"]) -> tuple:
... ...
@@ -81,7 +80,7 @@ if __name__ == "__main__":
81 80
     args = parser.parse_args()
82 81
     if args.in_place and len(args.files) != 1:
83 82
         sys.exit(1)
84
-    re_flags = re.MULTILINE | re.DOTALL
83
+    RE_FLAGS = re.MULTILINE | re.DOTALL
85 84
     if args.token:
86 85
         token_pattern = args.token
87 86
     else:
88 87