Skip to content

Instantly share code, notes, and snippets.

@n3wtron
n3wtron / converter.go
Created June 28, 2017 09:50
golang: grpc Struct converter fom map and golang struct
package util
import (
protobuf_struct "github.com/golang/protobuf/ptypes/struct"
"errors"
"fmt"
"reflect"
"github.com/fatih/structs"
)
@n3wtron
n3wtron / weightmean.go
Created May 12, 2016 09:03
weight mean
package main
import (
"fmt"
)
type WeightedAvgElement struct {
Weight float32
Value float32
}
@n3wtron
n3wtron / exifImageMover.py
Created June 25, 2013 14:33
Python rename image based on exif datetime
#!/usr/bin/python
from PIL import Image
import sys
import time
from os import path
import os
import shutil
from optparse import OptionParser
def main():
@n3wtron
n3wtron / simple_mjpeg_streamer_http_server
Last active December 22, 2023 13:32
Simple Python Motion Jpeg (mjpeg server) from webcam. Using: OpenCV,BaseHTTPServer
#!/usr/bin/python
'''
Author: Igor Maculan - n3wtron@gmail.com
A Simple mjpg stream http server
'''
import cv2
import Image
import threading
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
from SocketServer import ThreadingMixIn