Skip to content

Instantly share code, notes, and snippets.

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

Nyaundi Brian danleyb2

:octocat:
...
View GitHub Profile
{
"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"
@danleyb2
danleyb2 / package.json
Created July 23, 2020 12:06
License Plate Recognition on Plate Recognizer of remote image without saving to a tmp file
{
"name": "l1",
"version": "1.0.0",
"description": "",
"main": "remote_img_recognizer.js",
"dependencies": {
"form-data": "^3.0.0",
"node-fetch": "^2.6.0"
},
"devDependencies": {},
@danleyb2
danleyb2 / debugger pause beforeunload
Created May 30, 2020 10:03 — forked from carcinocron/debugger pause beforeunload
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)