Skip to content

Instantly share code, notes, and snippets.

View harrynull's full-sized avatar

Harry harrynull

View GitHub Profile
@harrynull
harrynull / random_anime_wallpaper.py
Last active November 23, 2023 19:24
Random Anime Wallpaper API using Reddit /r/Animewallpaper/
# MIT License
#
# Copyright (c) 2019 Null
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@harrynull
harrynull / qr_mosaic_recovery.py
Created October 30, 2021 13:05
Written for hackergame 2021
import math
import pickle
from collections import Counter
import numpy as np
import tqdm as tqdm
from PIL import Image
X, Y = 103, 137 # 马赛克左上角位置(单位为像素)
N = 20 # 马赛克块的数量(共N*N块)