Skip to content

Instantly share code, notes, and snippets.

View gopher1980's full-sized avatar

Gopher1980 gopher1980

View GitHub Profile
package main
/*
#cgo pkg-config: python-3.7
#define PY_SSIZE_T_CLEAN
#include <Python.h>
int run (const char * code) {
return PyRun_SimpleString(code);
}
@gopher1980
gopher1980 / duktape.go
Last active September 25, 2019 02:27
duktape javascript go embed
package main
import (
"encoding/json"
"fmt"
"gopkg.in/olebedev/go-duktape.v3"
)
func evaljs(code string, objIn interface{}, fxs map[string]func(c *duktape.Context) int) interface{} {
var v interface{}
package main
import (
"errors"
"fmt"
)
type Neuron struct {
Umbral float64
Beta float64
package main
import (
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"time"
@gopher1980
gopher1980 / xml.go
Last active September 9, 2019 20:56
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"reflect"
)