Skip to content

Instantly share code, notes, and snippets.

@IntendedConsequence
IntendedConsequence / facelite.py
Created April 18, 2024 05:51
Face detection and recognition from insightface in one file and minimal dependencies, without cython and extension compilation nonsense
import glob
import hashlib
import os.path
import pickle
import sys
import zipfile
import cv2
import onnx
from onnx import numpy_helper
# some explanation
# I used pysfml-cython to do this, since I couldn't find needed function in PySFML
# that constructs RenderWindow from existing window handle. And after I found it
# (according to python-sfml wiki it was sf.Window.from_handle), I already finished
# this example and porting my own project from pygame to pysfml-cython.
# I know pysfml-cython is outdated and based on sfml2.0. All I had to do is
# clone SFML project, checkout tag 2.0, compile it. Then checkout pysfml-cython,
# compile it and that's it. I ended up with 7 sfml dlls and sfml.pyd which I put
# in the same dir as this file.
# Now, I did all this on Windows, just so you know. I have no idea if it even works
@IntendedConsequence
IntendedConsequence / MyAnimeList.js
Created May 30, 2009 04:07 — forked from aoikishu/MyAnimeList
A Firefox Ubiquity Parser 2 compatible version of MyAnimeList.net anime and character search command
// anime and character searches for MyAnimeList.net
// An advanced search command for MyAnimeList.net
CmdUtils.CreateCommand({
names: [ "mal-search", "anime-search" ], //mal as in MyAnimeList.net 8)
author: { name: "aoikishu"},
contributors: [ "Irwin1138" ],
description: "Searches anime on MyAnimeList.net",
help: "You can specify a type (ova, tv, movie, special or ona) and a score",
/// Parser 2 incompatible old format