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
import hashlib as hash | |
# Specify how many bytes of the file you want to open at a time | |
BLOCKSIZE = 1024 * 1024 * 8 # 8mb | |
def hash_file(fname: str): | |
sha = sha256() | |
with open(fname, 'rb') as fh: | |
while buff := fh.read(BLOCKSIZE): | |
sha.update(buff) |
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
# Subreddit to check | |
subreddit = 'subreddit' | |
# Mod flair name | |
mod_flair = 'Developer' | |
# Credentials, subreddit management required | |
user_agent = 'UserAgent' | |
client_id = 'ClientID' | |
client_secret = 'ClientSecret' | |
username = 'Username' |