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
| import json | |
| import sys | |
| def grep_context(context, data): | |
| if isinstance(data, dict) and "context" in data: | |
| [context.add(key) for key in data["context"]] | |
| elif isinstance(data, list): | |
| [grep_context(context, d) for d in data] | |
| def main(): |
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
| import math | |
| try: | |
| from Tkinter import * # python 2.x | |
| except ImportError: | |
| from tkinter import * # python 3.x | |
| class Calculator(Frame): | |
| digits = [str(i) for i in range(10)] + ["."] |