Skip to content

Instantly share code, notes, and snippets.

View deadprogram's full-sized avatar
💭
Currently available for work. Let's talk!

Ron Evans deadprogram

💭
Currently available for work. Let's talk!
View GitHub Profile
// go run demo/style-transfer/main.go 1 data/starry_night.t7 opencv fp32
//
package main
import (
"fmt"
"image"
"os"
"gocv.io/x/gocv"
xxd 100000 512
00100000: eb 58 90 6d 6b 66 73 2e 66 61 74 00 02 10 20 00 .X.mkfs.fat... .
00100010: 02 00 00 00 00 f8 00 00 10 00 04 00 00 08 00 00 ................
00100020: 00 70 df 01 e0 3b 00 00 00 00 00 00 02 00 00 00 .p...;..........
00100030: 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00100040: 80 00 29 f1 32 21 be 4e 4f 20 4e 41 4d 45 20 20 ..).2!.NO NAME
00100050: 20 20 46 41 54 33 32 20 20 20 0e 1f be 77 7c ac FAT32 ...w|.
00100060: 22 c0 74 0b 56 b4 0e bb 07 00 cd 10 5e eb f0 32 ".t.V.......^..2
00100070: e4 cd 16 cd 19 eb fe 54 68 69 73 20 69 73 20 6e .......This is n
00100080: 6f 74 20 61 20 62 6f 6f 74 61 62 6c 65 20 64 69 ot a bootable di
@deadprogram
deadprogram / main.go
Created October 12, 2020 16:52 — forked from DazWilkin/main.go
Google Cloud IoT Core & Golang
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"io/ioutil"
"log"
"time"
# Only schema version 2.3 supports the nvidia GPU runtime
# https://developer.nvidia.com/blog/gpu-containers-runtime/
version: '2.3'
volumes:
config:
edge-data:
camera-data:
vision-data:
vision-saver-data:
$ traceroute github.com
traceroute to github.com (140.82.118.4), 30 hops max, 60 byte packets
1 192.168.1.1 (192.168.1.1) 3.786 ms 3.748 ms 3.732 ms
2 211.red-80-58-67.staticip.rima-tde.net (80.58.67.211) 8.468 ms 8.468 ms 8.452 ms
3 142.red-80-58-93.staticip.rima-tde.net (80.58.93.142) 21.418 ms 226.red-80-58-95.staticip.rima-tde.net (80.58.95.226) 23.454 ms 23.439 ms
4 * * *
5 249.red-81-46-3.customer.static.ccgg.telefonica.net (81.46.3.249) 21.318 ms 23.285 ms 23.291 ms
6 225.red-81-46-3.customer.static.ccgg.telefonica.net (81.46.3.225) 26.313 ms 21.659 ms 21.616 ms
7 46.red-81-46-0.customer.static.ccgg.telefonica.net (81.46.0.46) 25.412 ms 25.008 ms 24.925 ms
8 146.red-80-58-87.staticip.rima-tde.net (80.58.87.146) 20.647 ms 22.645 ms 20.589 ms
// +build gameboyadvance
package machine
import (
"image/color"
"runtime/volatile"
"unsafe"
)
// TinyGo flight stick using analog joystick and 5 buttons
// Outputs data via serial port in very simple space-delimited format
// End of each line of data has "CR-LF" aka 0x13 0x10
// Each update is sent every 50 ms.
package main
import (
"image/color"
"machine"
"strconv"
// This is a sensor station that uses a ESP8266 or ESP32 running on the device UART1.
// It creates an MQTT connection that publishes a message every second
// to an MQTT broker.
//
// In other words:
// Your computer <--> UART0 <--> MCU <--> UART1 <--> ESP8266 <--> Internet <--> MQTT broker.
//
// You must install the Paho MQTT package to build this program:
//
// go get -u github.com/eclipse/paho.mqtt.golang
cd {gopath}/src/github.com/hybridgroup/esp32-at
git pull
git branch arduino-nano33-iot
make clean
* success *
make
* success *
cp build/esp32/* {gopath}/src/tinygo.org/x/drivers/espat/flasher/
cd {gopath}/src/tinygo.org/x/drivers/espat/flasher/