Skip to content

Instantly share code, notes, and snippets.

// Build folders tree.
// Example how should result looks like
// folderTree = {
// folders: [{
// folders: [{
// id,
// name,
// folders: []
// }]
// }]
// Build folders tree.
// Example how should result looks like
// folderTree = {
// folders: [{
// folders: [{
// id,
// name,
// folders: []
// }]
// }]
/*
Update user video settings
POST /user_settings/video_settings
body: {
enableDisclaimer: boolean,
enableWatermark: boolean
}
*/
updateVideoSettings: function (req, res) {
const updateObj = {};
require 'rubygems'
require 'raudio'
require 'OpenCV'
class MotionDetector
def onChange(self, val) #Зворотній виклик коли користувач змінює поріг чутливості.
self.threshold = val
end
def self.initialize(threshold = 25, doRecord = true, showWindows = true)
import cv2.cv as cv
from datetime import datetime
import time
import pyaudio
import wave
class MotionDetectorAdaptative():
def onChange(self, val): #callback when the user change the detection threshold
self.threshold = val