Skip to content

Instantly share code, notes, and snippets.

View bdunnette's full-sized avatar
💭
🤔

Brian Dunnette bdunnette

💭
🤔
View GitHub Profile
@bdunnette
bdunnette / compose.yml
Created December 23, 2025 17:14
Basic compose setup for Open Notebook
services:
open_notebook:
image: docker.io/lfnovo/open_notebook:v1-latest-single
ports:
- "8502:8502" # Web UI
- "5055:5055" # API (required!)
env_file:
- ./docker.env
pull_policy: always
volumes:
/**
* GOOGLE APPS SCRIPT: Auto-Invite to Groups.io on Sheet Edit
* * SETUP INSTRUCTIONS:
* 1. Open your Google Sheet.
* 2. Go to Extensions > Apps Script.
* 3. Paste this code into the editor.
* 4. Update the CONFIGURATION section below with your real API Key and Group Name.
* 5. Save the project.
* 6. Set up the Installable Trigger:
* - Click on the "Triggers" (alarm clock icon) in the left sidebar.
name: Deploy to AWS Lambda Dev environment
on:
push:
branches:
- dev
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@bdunnette
bdunnette / min-char-rnn.py
Created October 22, 2025 19:48 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/GitHub
export VIRTUALENVWRAPPER_SCRIPT=/usr/share/virtualenvwrapper/virtualenvwrapper.sh
source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
# One-liner to fix "no unqualified-search registries are defined" errors in Podman
mkdir -p ~/.config/containers && echo unqualified-search-registries = [\"docker.io\"] >> ~/.config/containers/registries.conf

Reading MS Access data in Pandas

  1. Download and install 32-bit Python 3.9 (this is the latest version that works with Access drivers) https://www.python.org/ftp/python/3.9.13/python-3.9.13.exe
  2. Create a virtualenv: mkvirtualenv -p 3.9 pandas-32bit
  3. Install pandas 2.0.3 (the last with 32-bit wheels) and pyodbc: pip install pandas==2.0.3 pyodbc sqlalchemy
  4. List drivers: import pyodbc; pyodbc.drivers() - the usual driver will be Microsoft Access Driver (*.mdb, *.accdb)
  5. Connect using sqlalchemy:
DRIVER = "Microsoft Access Driver (*.mdb, *.accdb)"
@bdunnette
bdunnette / .env
Last active August 17, 2023 16:07
Send email notifications if 6-hour precipitation is above threshold
SENDGRID_API_KEY=Paste key from https://app.sendgrid.com/settings/api_keys here
[email protected]
RECIPIENTS=${SENDER},[email protected]
NWS_STATION=KMIC
MIN_PRECIP=25
from datetime import datetime
import logging
import requests
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
# Start Configuration
NWS_STATION = "KMIC"
MIN_PRECIP = 10
@bdunnette
bdunnette / bc-parks-geopandas.ipynb
Last active July 16, 2024 20:46
bc-parks-geopandas.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.