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
from cvzone.FaceMeshModule import FaceMeshDetector | |
import cv2 | |
cap = cv2.VideoCapture(0) | |
detector = FaceMeshDetector(maxFaces=2) | |
while True: | |
success, img = cap.read() | |
img, faces = detector.findFaceMesh(img) | |
if faces: | |
print(faces[0]) |
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
################################################################################ | |
## compile quickjs as a static library | |
set(QUICKJS_GIT_TAG master) | |
include(FetchContent) | |
FetchContent_Declare( | |
quickjs | |
GIT_REPOSITORY https://github.com/bellard/quickjs.git | |
GIT_TAG ${QUICKJS_GIT_TAG} |
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
#ADD data/ca-bundle.crt /usr/share/ca-certificates/mycompany/ca-bundle.crt | |
#RUN << EOF | |
cd /usr/share/ca-certificates/mycompany | |
i=1; while openssl x509 -out cert$i.pem; do | |
echo mycompany/cert$i.pem >> /etc/ca-certificates.conf | |
i=$((i+1)) | |
done < ca-bundle.crt | |
update-ca-certificates | |
#EOF |
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
# - Find lemon executable and provides macros to generate custom build rules | |
# The module defines the following variables: | |
# | |
# LEMON_EXECUTABLE - path to the LEMON program | |
# LEMON_VERSION - version of LEMON | |
# LEMON_FOUND - true if the program was found | |
# | |
# If LEMON is found, the module defines the macro: | |
# | |
# LEMON_TARGET(<Name> <LEMONInp>) |
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
#include <ESP8266WiFi.h> | |
extern "C" { | |
#include "user_interface.h" | |
#include "wpa2_enterprise.h" | |
#include "c_types.h" | |
} | |
// SSID to connect to | |
char ssid[] = "TEST_KRA"; |
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 sys, traceback, logging, json | |
from flask import Flask, request, Response, url_for | |
class JsonRpc: | |
def __init__(self, server, save_js_to=None): | |
self.server = server | |
self.endpoints = {} | |
self.services = {} | |
self.save_js_to = save_js_to |
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
from flask import Flask, request, Response | |
from shelljob import proc | |
app = Flask(__name__) | |
@app.route('/tts/<lang>.mp3') | |
def text_to_speech(lang): | |
text = request.args.get('text') | |
g = proc.Group() | |
p = g.run(['bash', '-c', 'espeak-ng -v mb-fr1 -q --pho "'+text+'" | mbrola -t 1.2 -f 1.0 /usr/share/mbrola/fr1/fr1 - -.au' + "|ffmpeg -i 'pipe:0' -vn -ar 16000 -ac 1 -b:a 48k -f mp3 'pipe:1'"]) |
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 ctypes, subprocess, sys | |
def elevate(): | |
if ctypes.windll.shell32.IsUserAnAdmin(): | |
return | |
else: | |
class ShellExecuteInfo(ctypes.Structure): | |
_fields_ = [('cbSize', ctypes.wintypes.DWORD), | |
('fMask', ctypes.c_ulong), | |
('hwnd', ctypes.wintypes.HWND), |
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
package com.demo.rpc; | |
import com.fasterxml.jackson.databind.JavaType; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.node.ArrayNode; | |
import com.fasterxml.jackson.databind.node.ObjectNode; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
#include <AppCore/App.h> | |
#include <AppCore/Window.h> | |
#include <AppCore/Overlay.h> | |
#include <AppCore/JSHelpers.h> | |
#include <iostream> | |
#include <Ultralight/Ultralight.h> | |
#include <spdlog/spdlog.h> | |
#include <SFML/Window/VideoMode.hpp> | |
#include "ui_def.hpp" |
NewerOlder