Skip to content

Instantly share code, notes, and snippets.

package main
// Keycodes maps keys to their respective virtual key code from https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
var Keycodes = map[string]uint16{
" ": 0x20,
"-": 0xBD,
"0": 0x30,
"1": 0x31,
"2": 0x32,
"3": 0x33,
package main
import (
"log"
"syscall"
"unsafe"
)
type keyboardInput struct {
wVk uint16
func setupSystray() {
data, err := Asset("images/bitmap.ico")
if err != nil {
fmt.Println("Icon reading error", err)
return
}
systray.SetTemplateIcon(data, data)
systray.SetTitle("Insert Date")
<!DOCTYPE=html>
<html>
<body>
{% for img in images %}
<h1 > {{img}} </h1>
<img src="images/{{img}}" alt="{{img}}">
{% endfor %}
</body>
</html>`
@app.route('/images')
def show_images():
return render_template('images.html', images=os.listdir('static/images'))
@AlexeyGy
AlexeyGy / index-reduced.html
Last active December 6, 2020 11:55
smaller version of index-html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>webcam</title>
</head>
<body>
<script src="webcam.js"></script>
<div>
import unittest
import cv2 as cv
from model import recognize, set_up_inference
class TestDetection(unittest.TestCase):
def setUp(self):
self.net = set_up_inference()
import os
from logging import info
from typing import List
import numpy as np
import cv2 as cv
INPUT_FOLDER = "model/" # where we read the neural network from
# the image size that the neural network is trained to work on.
@AlexeyGy
AlexeyGy / set_up.py
Last active November 29, 2020 23:02
import os
from logging import info
from typing import List
import numpy as np
import cv2 as cv
INPUT_FOLDER = "model/" # where we read the neural network from
# a pretrained model from OpenVino, see https://docs.openvinotoolkit.org/2018_R5/_docs_Retail_object_detection_pedestrian_rmnet_ssd_0013_caffe_desc_person_detection_retail_0013.html
import os
from logging import info
from typing import List
import numpy as np
import cv2 as cv
INPUT_FOLDER = "model/" # where we read the neural network from
# the image size that the neural network is trained to work on.