What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-05 07:11:03
face detection python
import face_recognition import os import cv2 KNOWN_FACES_DIR = 'known_faces' UNKNOWN_FACES_DIR = 'unknown_faces' TOLERANCE = 0.6 FRAME_THICKNESS = 3 FONT_THICKNESS = 2 MODEL = 'cnn' # default: 'hog', other one can be 'cnn' - CUDA accelerated (if availa... Add solution -
Python 2021-09-04 21:44:03
python socket select
import select import socket import sys import Queue # Create a TCP/IP socket server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.setblocking(0) # Bind the socket to the port server_addr = ('localhost', 10000) print('starting server on {ser... Add solution -
Python 2021-09-04 08:45:03
import os in python meaning
import os Executing a shell command os.system() Get the users environment os.environ() #Returns the current working directory. os.getcwd() Return the real group id of the current process. os.getgid() Return the current process&rsquo... Add solution -
Javascript 2021-09-04 08:02:02
how to make an express server
const express = require('express'); const app = express(); const PORT = process.env.PORT || 3000; app.get('/', (req, res) => { res.send('<h1>Some HTML</h1>'); res.send('<p>Even more HTML</p>'); }); app.listen(PORT, () =>... Add solution -
Python 2021-09-04 04:32:03
send data from b;uetooth to python script raspberry pi
#!/usr/bin/env python #Run.py import os from bluetooth import * from wifi import Cell, Scheme import subprocess import time wpa_supplicant_conf = "/etc/wpa_supplicant/wpa_supplicant.conf" sudo_mode = "sudo " def wifi_connect(ssid, psk)... Add solution -
Javascript 2021-09-03 16:42:02
nodejs cluster example
const cluster = require('cluster'); const http = require('http'); const numCPUs = require('os').cpus().length; if (cluster.isMaster) { console.log(`Master ${process.pid} is running`); // Fork workers. for (let i = 0; i < numCPUs; i++) { clu... Add solution -
Shell/Bash 2021-09-03 11:44:01
debian 10 sources
$ cat /etc/apt/sources.list deb http://httpredir.debian.org/debian buster main non-free contrib deb-src http://httpredir.debian.org/debian buster main non-free contrib deb http://security.debian.org/debian-security buster/updates main contrib non-free d... Add solution