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():