Skip to content

Instantly share code, notes, and snippets.

View lucasbflopes's full-sized avatar

Lucas Bragança lucasbflopes

View GitHub Profile
@lucasbflopes
lucasbflopes / script.py
Created December 18, 2018 16:37
script
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():
@lucasbflopes
lucasbflopes / calculator.py
Last active August 13, 2025 00:28
An RPN Calculator in Python with GUI
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)] + ["."]