Skip to content

Instantly share code, notes, and snippets.

View gmatcha's full-sized avatar

Gary Leung gmatcha

View GitHub Profile
@gmatcha
gmatcha / CropsClassifyTraining-HP-354_RDC-5-10.c
Created March 27, 2023 04:11
Bosch AI Studio Generated Header from Crops Classification Algorithm
#include <stdint.h>
extern const uint8_t bsec_config_selectivity[2285];
//
#include "bsec_serialized_configurations_selectivity.h"
const uint8_t bsec_config_selectivity[2285] =
{0,0,2,2,189,1,0,0,0,0,0,0,213,8,0,0,52,0,1,0,0,168,19,73,64,49,119,76,0,192,40,72,0,192,40,72,137,65,0,191,205,204,204,190,0,0,64,191,225,122,148,190,10,0,3,0,216,85,0,100,0,0,96,64,23,183,209,56,28,0,2,0,0,244,1,150,0,50,0,0,128,64,0,0,32,65,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,13,0,5,0,0,0,0,0,100,254,131,137,87,88,0,9,0,7,240,150,61,0,0,0,0,0,0,0,0,28,124,225,61,52,128,215,63,0,0,160,64,0,0,0,0,0,0,0,0,205,204,12,62,103,213,39,62,230,63,76,192,0,0,0,0,0,0,0,0,145,237,60,191,251,58,64,63,177,80,131,64,0,0,0,0,0,0,0,0,93,254,227,62,54,60,133,191,0,0,64,64,12,0,10,0,0,0,0,0,0,0,0,0,173,6,11,0,0,0,2,173,187,130,62,122,98,216,62,199,66,142,190,35,54,103,62,223,0,181,62,241,103,188,189,95,181,200,189,232,200,199,62,133,247,133,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@gmatcha
gmatcha / px4-env.txt
Created March 26, 2023 23:08
PX4-Autopilot conda environment python3
# packages in environment at /opt/anaconda3/envs/px4-env:
#
# Name Version Build Channel
ca-certificates 2023.01.10 hecd8cb5_0
certifi 2022.12.7 py38hecd8cb5_0
future 0.18.3 pypi_0 pypi
kconfiglib 14.1.0 pypi_0 pypi
libcxx 14.0.6 h9765a3e_0
libffi 3.4.2 hecd8cb5_6
lxml 4.9.2 pypi_0 pypi
@gmatcha
gmatcha / pixycam_bottle_chaser.py
Created December 3, 2019 09:09
AI4R hardware challenge python script
from __future__ import print_function
import pixy
from ctypes import *
from pixy import *
import picar
import time
from picar import front_wheels
from picar import back_wheels
@gmatcha
gmatcha / delete_git_submodule.md
Created July 10, 2019 05:41 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@gmatcha
gmatcha / macos_init.sh
Created July 1, 2019 18:06
macos brew cask install script
#!/bin/bash
##set -e
echo "macos_init.sh => fresh install..."
echo "installing xcode..."
##xcode-select --install || exit 1
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@gmatcha
gmatcha / z_offset_calibration.gcode
Last active January 9, 2019 06:13
Sample gcode to calibrate z-offset for auto bed leveling
; for PLA calibration
M140 S60 ; head up bed first for thermal expansion
M104 S190 T0 ; start heating T0 to 190 degrees Celsius
; inspect probe placement & ensure safe Z home return is enabled
;
M851 Z0 ; reset z-offset to zero
G28 ; safe-z home all x,y,z while the extruder is still heating
M109 S190 T0 ; wait for T0 to reach 190 degrees before continuing with any other commands
;
G1 X110 Y110 ; move center of bed with offset zero
@gmatcha
gmatcha / uninstall.sh
Created February 8, 2018 05:24 — forked from klarstil/uninstall.sh
Uninstall git on Mac OS X
#!/bin/bash
if [ ! -r "/usr/local/git" ]; then
echo "Git doesn't appear to be installed via this installer. Aborting"
exit 1
fi
echo "This will uninstall git by removing /usr/local/git/**/*, /etc/paths.d/git, /etc/manpaths.d/git"
printf "Type 'yes' if you sure you wish to continue: "
read response
if [ "$response" == "yes" ]; then
sudo rm -rf /usr/local/git/
@gmatcha
gmatcha / forked-up.md
Last active February 5, 2018 21:50
GIT Forked Up-to-date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream