Cria uma stream de vídeo no nodejs plano (sem express ou outros módulos)
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 cv2 | |
from cvzone.FaceDetectionModule import FaceDetector | |
# Inicializa a captura de vídeo da webcam | |
video = cv2.VideoCapture(0) | |
# Verifica se a webcam foi inicializada corretamente | |
if not video.isOpened(): | |
print("Erro ao acessar a câmera") | |
exit() |
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 bcrypt | |
import mysql.connector | |
# Função para conectar ao banco de dados MySQL | |
def conectar_mysql(): | |
return mysql.connector.connect( | |
host="localhost", | |
user="root", | |
password="secret", # Senha configurada para o MySQL | |
database="safe_password" # Nome do banco de dados |
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 grpc | |
import examplo_pb2 | |
import examplo_pb2_grpc | |
def run_client(): | |
channel = grpc.insecure_channel("localhost:50051") | |
stub = examplo_pb2_grpc.GreeterStub(channel) | |
response = stub.SayHello(examplo_pb2.HelloRequest(name="gRPC")) | |
print("Greeter client received:", response.greeting) |
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 grpc | |
from concurrent import futures | |
import examplo_pb2 | |
import examplo_pb2_grpc | |
class GreeterServicer(examplo_pb2_grpc.GreeterServicer): | |
def SayHello(self, request, context): | |
return examplo_pb2.HelloResponse(greeting=f"Hello, {request.name}!") | |
def run_server(): |
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
fastboot oem fb_mode_set | |
fastboot flash partition gpt.bin | |
fastboot flash bootloader bootloader.img | |
fastboot flash logo logo.bin | |
fastboot flash boot boot.img | |
fastboot flash recovery recovery.img | |
fastboot flash dsp adspso.bin | |
fastboot flash oem oem.img | |
fastboot flash system system.img_sparsechunk.0 | |
fastboot flash system system.img_sparsechunk.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
#!/bin/bash | |
fastboot oem fb_mode_set | |
fastboot flash partition gpt.bin | |
fastboot flash bootloader bootloader.img | |
fastboot flash logo logo.bin | |
fastboot flash boot boot.img | |
fastboot flash recovery recovery.img | |
fastboot flash dsp adspso.bin | |
fastboot flash oem oem.img | |
fastboot flash system system.img_sparsechunk.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
version: '3.1' | |
services: | |
humhub: | |
image: mriedmann/humhub:1.6.2 | |
links: | |
- "db:db" | |
ports: | |
- "8080:80" | |
volumes: | |
- "config:/var/www/localhost/htdocs/protected/config" |
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
# App port to run on | |
PORT=3000 | |
# The name of the site where Kutt is hosted | |
SITE_NAME=Kutt | |
# The domain that this website is on | |
DEFAULT_DOMAIN=localhost:3000 | |
# Generated link length |
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
<?php | |
$hora_fixa = strtotime("13:18"); | |
$hora = strtotime(date('G:i')); //G 0-23 horas, i minutos | |
echo $hora .'<br>'; | |
if($hora == $hora_fixa) { | |
echo "ok"; | |
} | |
else { | |
echo "passou da hora"; |
NewerOlder