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
#!/bin/sh | |
# Place script where steamcmd.sh is located | |
sudo wget https://itai-nelken.github.io/weekly-box86-debs/debian/box86.list -O /etc/apt/sources.list.d/box86.list | |
wget -qO- https://itai-nelken.github.io/weekly-box86-debs/debian/KEY.gpg | sudo apt-key add - | |
sudo dpkg --add-architecture armhf | |
sudo apt update && sudo apt install -y box64 box86:armhf libc6:armhf libncurses5:armhf libstdc++6:armhf libsdl2-2.0-0:armhf | |
# Launch & exit to download required files for steamcmd only | |
./steamcmd.sh +quit |
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 python3 | |
# Calculates an image's pixel hash as per the algorithm used by Danbooru | |
from pathlib import Path | |
import hashlib | |
from pyvips import Image, Error as VipsError | |
class DanbooruMediaFileImage: | |
"""Mimics Danbooru's MediaFile::Image, but for hash computation only. | |
See https://github.com/danbooru/danbooru/blob/bd0c6a37a81f851bd3e7862b97f7cf2fae7d5381/app/logical/media_file/image.rb |