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
| # https://stackoverflow.com/questions/39040944/convert-yuv444-to-yuv422-images | |
| # https://stackoverflow.com/questions/58293187/opencv-real-time-streaming-video-capture-is-slow-how-to-drop-frames-or-get-sync | |
| # v4l2-ctl --set-fmt-video=width=1344,height=376,pixelformat=0 && v4l2-ctl --set-parm=100 | |
| import cv2 | |
| import numpy as np | |
| import pyzed.sl as sl | |
| import time | |
| from threading import Thread | |
| frames_to_read = 100 |
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
| // <textarea> in Label Studio requires A MOUSE CLICK to focus, ain't nobody got time for that | |
| $('body').keydown((e) => (e.which==190) ? setTimeout(() => $("textarea[name='transcription']").focus(), 50) : console.log('aaa') ) | |
| // 190 is this character: . (period) | |
| // because alt+. is move to next region => automatically focus on the textarea that appears | |
| // for another key: https://css-tricks.com/snippets/javascript/javascript-keycodes/ | |
| // as a bookmarklet: | |
| // javascript: (() => { $('body').keydown((e) => (e.which==190) ? setTimeout(() => $("textarea[name='transcription']").focus(), 50) : console.log('aaa') ) })(); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 tkinter as tk | |
| import threading | |
| import time | |
| def loop(): | |
| while True: | |
| print('from loop') | |
| time.sleep(1) |