Skip to content

Instantly share code, notes, and snippets.

View thatbudakguy's full-sized avatar

Nick Budak thatbudakguy

  • San Francisco, CA
  • 00:03 (UTC -07:00)
View GitHub Profile
@thatbudakguy
thatbudakguy / hopkins.json
Last active June 10, 2026 13:57
hopkins index map
{
"id": "stanford-qh585jp8667",
"dct_title_s": "Hopkins Marine Station; Monterey County, California : aerial photographs, Index",
"dct_description_sm": [
"This is an index to the map series 'Hopkins Marine Station; Monterey County, California : aerial photographs.' The maps were originally created by the Aero-Geodetic Corporation. in 2000. This layer provides an index map that can be used to locate individual aerial photographs."
],
"dct_language_sm": [
"eng"
],
"dct_creator_sm": [
@thatbudakguy
thatbudakguy / flower.json
Last active June 9, 2026 22:53
flowers.json
{
"id": "flowers",
"dct_title_s": "Flowers (Raster PMTile)",
"schema_provider_s": "PMTiles.io",
"gbl_resourceClass_sm": ["Imagery"],
"dcat_bbox": "ENVELOPE(121.523691,121.527747,25.015462,25.014723)",
"dct_accessRights_s": "Public",
"gbl_mdVersion_s": "Aardvark",
"dct_references_s": "{\"https://github.com/protomaps/PMTiles\":\"https://air.mtn.tw/flowers.pmtiles\"}"
}
@thatbudakguy
thatbudakguy / cog.json
Last active June 9, 2026 18:19
COG test OGM record
{
"id": "stanford-vq494qx9344",
"dct_title_s": "Orthophoto of O'Donohue Family Stanford Educational Farm",
"dct_description_sm": [
"This photo was created using WebODM (OpenDroneMap), and images collected using a DJI Phantom 3 UAV."
],
"dct_creator_sm": [
"Maples, Stace D"
],
"dct_issued_s": "2025",
@thatbudakguy
thatbudakguy / weather_report.py
Created April 24, 2024 20:23
weather reporting bot for MQTT
"""
Report weather data via MQTT.
"""
import sys
import os
import requests
import time
import paho.mqtt.client as mqtt
@thatbudakguy
thatbudakguy / make_conll.py
Created January 6, 2024 23:21
CoNLL-2002 and CoNLL-U generators (spaCy)
"""Auto-generate CoNLL-2002 (IOB) entities by tagging a text file."""
from pathlib import Path
from typing import Optional
from typing_extensions import Annotated
import spacy
from spacy.training import offsets_to_biluo_tags
from spacy.training import biluo_to_iob
import typer
@thatbudakguy
thatbudakguy / circ_index_profile.rb
Created May 19, 2023 17:43
FOLIO circ rules evaluation
# frozen_string_literal: true
# require 'ruby-prof'
require 'csv'
# locations
## institution
SU_ID = '8d433cdd-4e8f-4dc1-aa24-8a4ddb7dc929'
## campus
@thatbudakguy
thatbudakguy / supar.py
Last active October 15, 2021 14:43
supar-kanbun tokenizer
class SuParKanbunTokenizer(object):
to_disk = lambda self, *args, **kwargs: None
from_disk = lambda self, *args, **kwargs: None
to_bytes = lambda self, *args, **kwargs: None
from_bytes = lambda self, *args, **kwargs: None
def __init__(self, bert, segment, vocab) -> None:
self.bert = bert
self.vocab = vocab
self.simplify = {}
@thatbudakguy
thatbudakguy / visual_tests.py
Created July 8, 2021 14:04
percy scrapy crawler
from percy import percy_snapshot
from scrapy.spiders import SitemapSpider
from selenium import webdriver
class PercySpider(SitemapSpider):
"""Sitemap crawler that uploads DOM snapshots to Percy."""
name = "cdhweb"
sitemap_urls = ["http://localhost:8000/sitemap.xml"]
@thatbudakguy
thatbudakguy / docker-compose.yml
Created February 4, 2020 19:32
single solr compose file
version: '3'
services:
index:
image: solr
ports:
- "8983:8983"
volumes:
- ./solr_conf:/opt/solr/server/solr/configsets/core-name:ro
command:
- solr-precreate
@thatbudakguy
thatbudakguy / docker-compose.yml
Created January 6, 2020 18:44
django docker devenv
FROM node:8
RUN mkdir /code
WORKDIR /code
COPY package.json /code/
RUN npm -g config set user root
RUN npm install -g node-sass postcss-cli autoprefixer
RUN npm install
FROM python:3.5
ENV PYTHONUNBUFFERED 1