Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
...

Nyaundi Brian danleyb2

:octocat:
...
View GitHub Profile
@danleyb2
danleyb2 / process_directory.py
Created Feb 26, 2021
Send images in a folder to Platerecognizer Snapshot SDK
View process_directory.py
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 Nov 24, 2020
Welcome file
View app.md


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 Nov 14, 2020 — forked from teknoraver/unixhttpc.go
HTTP over Unix domain sockets in golang
View unixhttpc.go
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@danleyb2
danleyb2 / package.json
Created Jul 23, 2020
License Plate Recognition on Plate Recognizer of remote image without saving to a tmp file
View package.json
{
"name": "l1",
"version": "1.0.0",
"description": "",
"main": "remote_img_recognizer.js",
"dependencies": {
"form-data": "^3.0.0",
"node-fetch": "^2.6.0"
},
"devDependencies": {},
View debugger pause beforeunload
// 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)
@danleyb2
danleyb2 / bot_example.py
Created May 2, 2020 — forked from EvieePy/bot_example.py
A Cogs Example for the rewrite version of - discord.py
View bot_example.py
import discord
from discord.ext import commands
import sys, traceback
"""This is a multi file example showcasing many features of the command extension and the use of cogs.
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic
understanding and platform for creating your own bot.
These examples make use of Python 3.6.2 and the rewrite version on the lib.
@danleyb2
danleyb2 / footer.php
Last active Mar 20, 2020
Php Include Header and Footer from a root
View footer.php
View fetch_csv.js
// const csvFile = 'latest_by_country.csv';
// fetch(csvFile).then(function(response) {
//
// return response.ok ? response.text() : Promise.reject(response.status);
//
//
// }).then(function(text) {
// console.log(text);
//
// });a
@danleyb2
danleyb2 / custom.element.js
Created Dec 12, 2019 — forked from argyleink/custom.element.js
custom element with shadow dom
View custom.element.js
export default class CustomElement extends HTMLElement {
constructor() {
super()
this.$shadow = this.attachShadow()
this.$shadow.innerHTML = this.render()
}
connectedCallback() {}
disconnectedCallback() {}
@danleyb2
danleyb2 / monitor.sh
Created Oct 1, 2019 — forked from indatawetrust/monitor.sh
redis-cli monitor grep
View monitor.sh
redis-cli monitor | grep -E ' "set" '