Skip to content

Instantly share code, notes, and snippets.

import heapq
def find_k_mins(matrix, k):
ptrs = [0 for _ in matrix]
curr_min = float("inf")
min_ind = -1
heap = []
heapq.heapify(heap)
while len(heap) < k:
@chrisbodhi
chrisbodhi / sammann.md
Last active June 30, 2023 02:22
Start of a proposal for a protocol for broadcasting data to local applications

A protocol for distributing data between applications, and then reacting to it appropriately

#bradfield

The push to share data on [[Protocols]], and not platforms, is gathering steam on the Web. For years now, both consumers and creators of numerous web systems have bemoaned the lack of interoperability of a single user’s data between systems. It is these silos that people have been attempting to bridge or bring down since time immemorial (or at least since attempts to section off swaths of the Web became commonplace). What has gone unchallenged in this discourse is the siloing of data between applications on our local machines.

This document proposes an open protocol for sharing data between applications in order to make our local computing more responsive and adaptable to our changing conditions. This document also proposes bringing the well-regarded and explored concept of the Unix [[pipe]] to GUI

@chrisbodhi
chrisbodhi / garage-door-up.scpt
Created May 19, 2023 22:30
Work with the garage door up: this script snapshots your entire desktop through the day, and then stitches the images together into a gif
--Requires ImageMagick
-- Set up the variables
set screenshotFolder to "/Users/YR_NAME/Desktop/Screenshots" -- Change this to whatever folder you'd like to save the screenshots in
set screenshotInterval to 600 -- Change this to the number of seconds between each screenshot
set screenshotCount to 30 -- Change this to the number of screenshots you'd like to take
-- Take the screenshots
delay screenshotInterval
repeat with i from 1 to screenshotCount
@chrisbodhi
chrisbodhi / cat.ttl
Created February 7, 2023 15:37
catalog
@prefix : <http://pretend.co/cat/> .
@prefix dwec-database: <https://dwec.data.world/v0/database-types/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dwec: <https://dwec.data.world/v0/> .
@prefix csvw: <http://www.w3.org/ns/csvw#> .
@prefix dwec-jdbc: <https://dwec.data.world/v0/jdbc-types/> .
@chrisbodhi
chrisbodhi / braindump.org
Created March 27, 2022 15:35
Dump of ideas for Bradfield CSI capstone project

Final Project Ideas

TCP/IP for energy

read bret victor’s climate change treatise, take notes

discard duplicate copies of all files in a directory

compare two photos; are they the same, even if they are different formats or of different dimensions? discard one, according to user’s preference (recency, size, format, etc)

Golang compiler flag that favors a smaller build in exchange for longer start time

Addressing this complaint: https://www.cockroachlabs.com/blog/go-file-size/

Contribute to esbuild

https://github.com/evanw/esbuild/

Contribute to any NASA open source project

@chrisbodhi
chrisbodhi / notes-how-to-read-a-paper.md
Created March 5, 2022 21:51
Notes from "How to read a paper"

"How to read a paper"

S. Keshav

Three pass approach

  1. Get a general idea of the paper
    • Should take five to ten minutes
    • Read title, abstract, and intro
  • Read section, subsection headings
@chrisbodhi
chrisbodhi / .zshrc
Created April 20, 2021 16:26
My current zshrc
# Path to your oh-my-zsh installation.
export ZSH=/Users/chrisboette/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# Installed Feb. 4, 2018: https://github.com/denysdovhan/spaceship-prompt
ZSH_THEME="spaceship"
# Uncomment the following line to display red dots whilst waiting for completion.

Ex 1.1: Experiment with “hello world” program

int main(void) {
    printf("hello, world\n");
    return 0;
}
[user]
email = TODO
name = chrisbodhi
[core]
excludesfile = /Users/TODO/.gitignore_global
pager = diff-so-fancy | less --tabs=4 -RFX
[commit]
template = /Users/TODO/.gitmessage
[color]
ui = true
*~
.DS_Store
.vscode/
node_modules/