This file contains hidden or 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
| #!/usr/bin/python | |
| import itertools | |
| from collections import defaultdict | |
| from timeit import Timer | |
| class Feature(object): | |
| def __init__(self, name): | |
| self.name = name |
This file contains hidden or 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
| #!/usr/bin/python | |
| import unittest | |
| class Node(object): | |
| def __init__(self, data, children=None): | |
| self.children = [] | |
| self.right = None | |
| self.data = data |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import unittest | |
| class Stack(list): | |
| def push(self, item): | |
| self.append(item) | |
| def isEmpty(self): | |
| return not self | |
| def peek(self): |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import os | |
| import importlib | |
| for fn in os.listdir(): | |
| if fn.endswith(".py"): | |
| with open(fn, 'r') as f: | |
| for line in f: | |
| if "import" in line: |
NewerOlder