This file contains 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
# https://gist.github.com/fs0c131y/f498b21cba9ee23956fc7d7629262e9d | |
# save it as packages.txt | |
# get packages with adb and "pm list packages" | |
# remove "package:" | |
# and save the list it as in.txt | |
with open("packages.txt") as ptxt: | |
bp = ptxt.readlines() | |
with open("in.txt") as itxt: | |
ip = itxt.readlines() |
This file contains 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
* |
This file contains 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
from PIL import Image | |
def make_bitplanes(path): | |
img = Image.open(path) | |
bitplanes = [[],[],[],[],[],[],[],[]] | |
for color in img.convert("L").getdata(): | |
bincolor = bin(color)[2:] | |
bincolor = ("0"*(8 - len(bincolor)))+bincolor | |
for i, v in enumerate(bincolor): |