Skip to content

Instantly share code, notes, and snippets.

View danleyb2's full-sized avatar
:octocat:
...

Nyaundi Brian danleyb2

:octocat:
...
View GitHub Profile
version: "3.6"
services:
db:
image: platerecognizer/parkpow-postgres
# restart: unless-stopped
volumes:
- /tmp/parkpow-volumes/postgres:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=parkpow
{
"filename": "car.jpg",
"timestamp": "2021-10-11 05:43:58.514896",
"camera_id": null,
"results": [
{
"box": {
"xmin": 146,
"ymin": 481,
"xmax": 276,
{
"hook": {
"target": "https://webhook.site/3d1d46aa-ee9d-49ba-bd5f-6e8ab14ff3de",
"id": "camera-1",
"event": "recognition",
"filename": "camera-1_screenshots/21-09-29/05-56-13.606935.jpg"
},
"data": {
"camera_id": "camera-1",
"filename": "camera-1_screenshots/21-09-29/05-56-13.606935.jpg",
{
"original_width": 2373,
"original_height": 1582,
"results": [
{
"texts": [
{
"value": "3186881",
"score": 0.94188763
}
@danleyb2
danleyb2 / parkpow.py
Created September 14, 2021 06:25
Send Camera Images and License Plate Data
import requests
API_TOKEN = '4805bee1222ce85e#############################'
gcPlateRecognizerToken = '98f98d713ba11###########################'
glDebug = True
def run_rec(i):
with open(i, 'rb') as fp:
@danleyb2
danleyb2 / PlaterecognizerLookupMemory.java
Created August 26, 2021 14:04
Use in-memory image in Plate Recognizer
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
public class PlaterecognizerLookupMemory {
static final String charset = "UTF-8";
static final String PLATERECOGNIZER_API_TOKEN = "08b1a7048080dfef0bf######################";
@danleyb2
danleyb2 / docker-stats.py
Created May 31, 2021 08:51
Benchmark Platerecognizer Stream by capturing Docker Stats and Health Score from Docker logs
import subprocess
import time
import humanfriendly
MAX_CAPTURES = 4
DOCKER = 'docker' #
# DOCKER = 'docker -H=satellite:2376'
def main(stop):
samples = [] #
@danleyb2
danleyb2 / process_directory.py
Created February 26, 2021 07:59
Send images in a folder to Platerecognizer Snapshot SDK
import os
import requests
# API_TOKEN = '77c2fabd94b7d0c9b6ac63c4###################'
DIRECTORY = '/tmp/SonnyCarwash-Genetech-US/'
regions = ['in'] # Change to your country
def run_rec(i):
@danleyb2
danleyb2 / app.md
Last active November 24, 2020 07:48
Welcome file


Project Management Application

System Structure

The application is built using the Django web framework
There will be a frontend for normal users and backend for administrators.

The backend is gives an overview of the whole system and provides restricted functionality
@danleyb2
danleyb2 / unixhttpc.go
Created November 14, 2020 11:26 — forked from teknoraver/unixhttpc.go
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"