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
/* Tailwind Based Utility Classes */ | |
.container { | |
width: 100%; | |
} | |
@media (min-width: 640px) { | |
.container { | |
max-width: 640px; | |
} |
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
// ==UserScript== | |
// @name MangaHub Image Resizer | |
// @namespace http://tampermonkey.net/ | |
// @version 2023-12-27 | |
// @description Resize images on MangaHub for better mobile viewing | |
// @author You | |
// @match https://mangahub.io/chapter/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=mangahub.io | |
// @grant none | |
// ==/UserScript== |
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
import os | |
import cv2 | |
import numpy as np | |
from sklearn.cluster import KMeans | |
import shutil | |
from PIL import Image | |
def descriptor(image, levels): | |
# Check if image is None | |
if image is None: |
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
// Usage: {{#if (isdefined x)}} ... {{/if}} | |
Handlebars.registerHelper('isdefined', function (value) { | |
return value !== undefined; | |
}) | |
// Read as: Equals | |
// Usage: {{#if (eq x y)}} ... x == y ... {{/if}} | |
// Usage: {{#if (eq 1 x y z)}} ... 1 == x && x == y && y == z [x, y and z ara all 1] ... {{/if}} | |
Handlebars.registerHelper('eq', function (...args) { | |
return args.slice(0, -1).map((x: any, i: number, v: any[]) => x == v[i+1]).slice(0, -1).every(x => x) |