Skip to content

Instantly share code, notes, and snippets.

View andreemidio's full-sized avatar
😀

Andre Emidio andreemidio

😀
View GitHub Profile
from math import atan2, sqrt, pi, sin, cos
import cv2
import numpy as np
from shapely import LineString
from shapely.geometry import Point, Polygon
class MeasurementLens:
@andreemidio
andreemidio / run.sh
Last active September 12, 2022 21:25
#!/bin/bash
echo "Exportando OpenCV"
export OpenCV_DIR="/content/drive/MyDrive/Libs/opencv/opencv/build/"
clear
echo "Construindo Darknet"
cd /content/
git clone https://github.com/AlexeyAB/darknet
cd /content/darknet
import logging
import re
from django.conf import settings
from django.http import JsonResponse
from keycloak import KeycloakOpenID, KeycloakInvalidTokenError
from rest_framework.exceptions import PermissionDenied, NotAuthenticated, AuthenticationFailed
logger = logging.getLogger(__name__)
prometheus:
image: prometheus:latest
restart: always
build:
context: .docker/prometheus
dockerfile: Dockerfile
networks:
- frontend
- backend
https://drive.google.com/file/d/1b9sawsd-FolUGf-yUiBrM4r2aHJfn-QH/view?usp=sharing
https://drive.google.com/file/d/1NY4FQ6G2KpuF-xVPWCdTxqF7AUECSB1P/view?usp=sharing
error connecting to host: could not connect to server: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: cluster0.ior1q.mongodb.netnet:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection() : dial tcp 177.8.165.194:27017: i/o timeout }, ] }
2020-05-20T14:00:08.335-0300 connected to: mongodb+srv://[**REDACTED**]@cluster0.ior1q.mongodb.net/extracoes
2020-05-20T14:00:08.385-0300 Failed: read error on entry #1: line 2, column 1: bare " in non-quoted-field
2020-05-20T14:00:08.385-0300 0 document(s) imported successfully. 0 document(s) failed to import.
from PIL import Image
import os, sys
path = "C:\\Users\\Andre\\Desktop\\HelmetDetection\\dowloadImages\\downloads"
#path = "C:\\Users\\Andre\\Desktop\\HelmetDetection\\dowloadImages\\downloads\\ hard hat"
dirs = os.listdir( path )
final_size = 60
import random
import json
import datetime
from json import dumps
def main():
score = random.randint(1,999)
#print(score)
dateDaConsulta = str(datetime.datetime.now())
var spawn = require('child_process').spawn,
py = spawn('python', ['score.py']),
data = [],
dataString = '';
py.stdout.on('data', function(data){
dataString += data.toString();
});
py.stdout.on('end', function(){
console.log(dataString);