Skip to content

Instantly share code, notes, and snippets.

View PeterSprague's full-sized avatar

PSprague PeterSprague

View GitHub Profile
@PeterSprague
PeterSprague / FastAI_on_local_Jetson_as_host_user.txt
Last active January 19, 2022 23:43
Install and access FastAI course locally on a Nvidia Jetson natively as user
# Install and access FastAI course locally on a Nvidia Jetson natively as user
Steps
--------
1) set up host Jetson with newest v32.6.1 18.04 L4T w/ Jetpack
2) build custom Python3.6 Fastai Jupyter kernel on Jetson host to access full Cuda, etc. header files for compiling
3) test
# References
https://docs.fast.ai/
@PeterSprague
PeterSprague / BluetoothControl.ino
Created November 23, 2020 00:06 — forked from reefwing/BluetoothControl.ino
Control a DFRobot Devastator tank via a Romeo BLE (Uno equivalent) using Bluetooth (BLE).
/*
* BluetoothControl: Control a DFRobot Devastator tank via a Romeo BLE
* (Uno equivalent) using Bluetooth (BLE).
*
* Compatible with iPhone app AVA BLE - https://itunes.apple.com/au/app/ava-ble-remote/id1073023233?mt=8
*
* Version 0.3, August, 2018
* Copyright 2018 David Such
*
*/
@PeterSprague
PeterSprague / PAT_with_TH-D72
Last active July 8, 2019 22:00
PAT_with_TH-D72 configure
# living doc to record steps to use PAT Winlink client with Kenwood TH-D72
# Band A is Packet12
# Band B is APRS12 @144.390 NA APRS
# using Macbook Pro running Fedora 29
# installed tar binary
$ dnf install ax25-tools
$ dnf install chirp hamlib
@PeterSprague
PeterSprague / generate_RGNIR_image.py
Last active January 10, 2024 13:23
Function to create a RGNIR image from RGB & NIR images, then align the NIR channel to Red channel
def generate_RGNIR_image(iterations,acc):
import cv2
import numpy as np
# assumes images are exactly the same size
# safe in this case, but could include a test and/or a resize
RGB_image_bgr = cv2.imread(RGB_src_img_path)
#print('RGB src image shape: ', RGB_image_bgr.shape)
---
# A list of global configuration variables
# Uncomment lines as needed to edit default settings.
# Note this only works for settings with default values. Some commands like --rerun <module>
# or --force-ccd n will have to be set in the command line (if you need to)
# This line is really important to set up properly
project_path: '/'
# The rest of the settings will default to the values set unless you uncomment and change them
FROM amd64/debian:stretch
LABEL maintainer="(upstream master branch) OpenDroneMap contributors"
LABEL maintainer="(GeoVisionEnvironmental branches) Peter Sprague <peter.sprague@geovisionenvironmental.com>"
# git branch amd64-development
# Env variables
# Enable systemd
ENV version 0.0.0-1
root@96232780-f1f9-11e5-9e14-0019bbeaab30:/usr/local/src/mapbox-studio-classic # npm install --build-from-source
npm WARN package.json mapbox-studio@0.3.3 No license field.
npm WARN cannot run in wd mapbox-studio@0.3.3 node scripts/run.js scripts/vendor-node.sh (wd=/usr/local/src/mapbox-studio-classic)
-
> mapnik@3.4.16 install /usr/local/src/mapbox-studio-classic/node_modules/mapnik
> node-pre-gyp install --fallback-to-build
gmake: Entering directory '/usr/local/src/mapbox-studio-classic/node_modules/mapnik/build'
TOUCH binding_gyp_make_vector_tile_target_generate_protoc_files.intermediate
ACTION binding_gyp_make_vector_tile_target_generate_protoc_files binding_gyp_make_vector_tile_target_generate_protoc_files.intermediate
@PeterSprague
PeterSprague / gist:67eada86247d86cf2b0e
Created February 17, 2015 21:54
Mapnik Makefile with line 6 error
feb1620151354PST
OS := $(shell uname -s)
PYTHON = python
ifeq ($(JOBS),)
JOBS:=1
endif
@PeterSprague
PeterSprague / gist:a180edc4b88719dcd946
Created February 17, 2015 19:52
Mapnik build with Clang++36 for FreeBSD 10.1 error from config.log
feb1720151149PST
console.log
produced when attempt to compile Mapnik
run: scons configure CXX=/usr/local/bin/clang++36
file /usr/local/mapnik.git/SConstruct,line 1116:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
-I/usr/local/include/freetype2
@PeterSprague
PeterSprague / gist:6d2b8b73b2ac6a7e408d
Created February 17, 2015 17:51
Mapnik build with Clang 3.5 for FreeBSD 10.1 error from config.log
produced when attempt to compile Mapnik
run: scons configure CXX=/usr/local/bin/clang35
file /usr/local/mapnik.git/SConstruct,line 1116:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
-I/usr/local/include/freetype2
-L/usr/local/lib -lfreetype
scons: Configure: yes