Skip to content

Instantly share code, notes, and snippets.

View BlueNalgene's full-sized avatar

Wesley T. Honeycutt BlueNalgene

View GitHub Profile
@BlueNalgene
BlueNalgene / 21_K30_reader.ino
Created February 27, 2023 21:58
CO2 sensor reader
/*
* 21-sensorboard_slave.ino
* Wesley T. Honeycutt; 2021
*
* License: GPL-3.0
*
* This code is for the "CONEX Sensor Deployment" with the OU School of Architecture.
*
* This program controls a small breakout board (CO2x sensorboard_slave) with an Arduino nano
* controller. This breakout board is attached to a modified sensorboard (CO2x sensorboard) from
@BlueNalgene
BlueNalgene / processor.py
Created January 5, 2023 23:06
This is a quickie code to demonstrate the different computer visions methods I used for video tracking. The UnCanny code is included, as are 1) an adaptive filter, 2) automatic background subtraction, and 3) Laplacian differences. See usage example for the script in the header and run in terminal.
#!/bin/usr/python3 -B
# -*- coding: utf-8 -*-
'''
This is an example script written by Wesley T. Honeycutt for Sam Davis
For help with arguments, use terminal command:
python3 processor.py --help
@BlueNalgene
BlueNalgene / read_and_map_tropomi_ch4_ai.py
Created August 17, 2020 17:38
Script to make a table of CH4 column near a single lat lon from TROPOMI Sentinel 5 data
#!/usr/bin/python
'''
This code is adapted by Wesley T. Honeycutt from:
Module: read_and_map_tropomi_no2.py
==========================================================================================
Disclaimer: The code is for demonstration purposes only. Users are responsible to check for
accuracy and revise to fit their objective.
Author: Justin Roberts-Pierel, 2015
@BlueNalgene
BlueNalgene / fetch_s5p_CH4.py
Created July 17, 2020 22:22
Script to fetch CH4 data from ESA Sentinel-5 using a geojson data point.
#!/usr/bin/python3
# If you don't have the required package use:
# sudo -H pip3 install sentinelsat
import sentinelsat
# Enter user information here.
# Use s5pguest for Sentinel 5 data
# If you need a geojson file, try playing with https://geojson.io/
@BlueNalgene
BlueNalgene / switch_gtk_theme.cpp
Created July 15, 2020 19:11
Switches the style context of the button on click
#include <string>
#include <stdio.h>
#include <gtk/gtk.h>
GtkApplication *app;
GtkWidget *window;
GtkWidget *button_box;
GtkWidget *button;
GtkCssProvider *provider;
GList *listrunner;
// Includes
#include <fstream>
#include <numeric> // for accumulate
#include <string> // for string
#include <vector> // for vector
using std::string;
using std::vector;
#include "opencv2/opencv.hpp"
using namespace cv;
#! /usr/bin/python3
"""
Sort contoured video frames into directories based on ISR's findings.
"""
import csv
import os
import shutil
@BlueNalgene
BlueNalgene / isrframes.csv
Created October 21, 2019 18:44
1524943548 frames id'd by isr
65 133
249 262
340 356
978 988
1588 1619
1600 1635
1656 1674
2353 2378
2357 2378
2606 2638
import glob
import subprocess
for fff in glob.glob("/media/storage1/Moving_Images/TV/*/*/*"):
show = fff.split("/media/storage1/Moving_Images/TV/")[1].split("/")[0]
seas = fff.split("/media/storage1/Moving_Images/TV/")[1].split("/")[1].split("Season_")[1]
epis = fff.split("/media/storage1/Moving_Images/TV/")[1].split("/")[2].split("-")[0]
test = fff.split("/media/storage1/Moving_Images/TV/")[1].split("/")[2].split("-")[1:]
titl = ''.join(test).split(".mp4")[0]
# Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#