Ver Fonte

Remove some unused code

Taddeus Kroes há 5 anos atrás
pai
commit
a5c321a1f7
3 ficheiros alterados com 0 adições e 9 exclusões
  1. 0 2
      2015/12_json.py
  2. 0 4
      2016/10_bots.py
  3. 0 3
      2016/11_rtg.py

+ 0 - 2
2015/12_json.py

@@ -1,8 +1,6 @@
 #!/usr/bin/env python3
 import sys
 import json
-import re
-from pprint import pprint
 
 def jsum(data, ignore=None):
     if isinstance(data, int):

+ 0 - 4
2016/10_bots.py

@@ -15,10 +15,6 @@ class Simulation:
         self = cls()
         dests = {'bot': self.bots, 'output': self.outputs}
 
-        def set_dest(mapping, bot, ty, nr):
-            dest = (self.bots if ty == 'bot' else self.outputs)
-            mapping[bot] = (self.outputs, int(nr))
-
         for line in f:
             words = line.split()
             if words[0] == 'value':

+ 0 - 3
2016/11_rtg.py

@@ -1,7 +1,5 @@
 #!/usr/bin/env python3
-import re
 from collections import namedtuple
-from itertools import chain
 from queue import PriorityQueue
 
 State = namedtuple('State', 'floors elevator')
@@ -73,7 +71,6 @@ def min_steps(initial):
     worklist = PriorityQueue()
     seen = {initial}
     worklist.put((get_score(initial), 0, initial))
-    nprocessed = 0
     while not worklist.empty():
         score, steps, state = worklist.get()
         if score == (0, 0):