Skip to content

Instantly share code, notes, and snippets.

@onlyforbopi
onlyforbopi / tkinterlist.py
Created June 18, 2019 06:57 — forked from athiyadeviyani/tkinterlist.py
Python GUI cheatsheet
# BASIC TKINTER CHEATSHEET
# Build basic GUIs with Python
from tkinter import *
from tkinter import scrolledtext
from tkinter import messagebox
from tkinter.ttk import Progressbar
from tkinter import filedialog
from tkinter import Menu
@onlyforbopi
onlyforbopi / hexdump.py
Last active October 5, 2018 08:16 — forked from sbz/hexdump.py
hexdump implementation in Python
def hexdump(src, length=16):
FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)])
lines = []
for c in range(0, len(src), length):
chars = src[c:c+length]
hex = ' '.join(["%02x" % ord(x) for x in chars])
printable = ''.join(["%s" % ((ord(x) <= 127 and FILTER[ord(x)]) or '.') for x in chars])
lines.append("%04x %-*s %s\n" % (c, length*3, hex, printable))
return ''.join(lines)
@onlyforbopi
onlyforbopi / 0_reuse_code.js
Created December 12, 2016 08:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console