Skip to content

Instantly share code, notes, and snippets.

View mortenboldt's full-sized avatar

Morten Boldt mortenboldt

View GitHub Profile
@mortenboldt
mortenboldt / face_mtcnn.py
Last active December 19, 2018 08:33
mtcnn face detect
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import cv2
from mtcnn.mtcnn import MTCNN
detector = MTCNN()
image = cv2.imread("lone.jpg")
result = detector.detect_faces(image)
# -*- coding: utf-8 -*-
import numpy as np
import cv2
import subprocess as sp
from mtcnn.mtcnn import MTCNN
detector = MTCNN()
VIDEO_URL = "/home/morten/kode/videofaces/testvideo.mp4"
# -*- coding: utf-8 -*-
import cv2
from mtcnn.mtcnn import MTCNN
detector = MTCNN()
for number in range(360):
if number % 10 != 0:
continue

Keybase proof

I hereby claim:

  • I am mortenboldt on github.
  • I am mortenboldt (https://keybase.io/mortenboldt) on keybase.
  • I have a public key ASDW6BR9UYvFAJW7vTd166Rv3l_t9jiEh3JNAYPk9e-2nAo

To claim this, I am signing this object:

#!/usr/bin/env bash
# Run with: curl -s https://gist.githubusercontent.com/mortenboldt/7ecdba22cc191569c8bdedfebcb6e9ad/raw/e68f2436b59c2d5b64f37ab6d0da678bd2abc462/update_solr_log4j.sh | bash -s
VERSION=${1:-2.17.1}
# Download new log4j lib
wget -O /tmp/log4j.tar.gz https://dlcdn.apache.org/logging/log4j/$VERSION/apache-log4j-$VERSION-bin.tar.gz
# Unpack new log4j
@mortenboldt
mortenboldt / clouflare-worker-static-page-backblaze.js
Created January 27, 2022 18:19 — forked from maltechx/clouflare-worker-static-page-backblaze.js
Host a static page on Backblaze and distribute it via Cloudflare and their Workers.
// Imprved the script from this blog https://www.grahn.io/posts/2020-02-08-s3-vs-b2-static-web-hosting/
// Backblaze Url
const baseURL = "https://f000.backblazeb2.com/file/yourbucket"
addEventListener('fetch', event => {
event.respondWith(handleRequest(event))
})
async function handleRequest(event) {