Skip to content

Instantly share code, notes, and snippets.

View jasondavis's full-sized avatar

Jason Davis jasondavis

View GitHub Profile
@jasondavis
jasondavis / microgpt.py
Created February 12, 2026 02:09 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@karpathy
karpathy / microgpt.py
Last active February 14, 2026 12:54
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@jasondavis
jasondavis / RaindropTemplaterTemplate
Created September 9, 2025 19:34 — forked from rwmyers/RaindropTemplaterTemplate
Raindrop / Obsidian Integration
<%*
let raindrop = tp.user.raindrop;
let collections = await raindrop.collections();
let collection = await tp.system.suggester((item) => item.title, collections);
let raindrops = await raindrop.raindrops(collection._id);
let drop = await tp.system.suggester((item) => item.title, raindrops);
drop = await raindrop.raindrop(drop._id);
let title = drop.title
let url = drop.link
@jasondavis
jasondavis / index.html
Last active June 11, 2025 01:21
Multi-Tag Selector with Alphabetical Tag Lists and Tag Sets by Category
<div id="tagSelector"></div>
type status description aliases
project
🟡
Miscellaneous personal tasks
#p/personal

I use the project file to track tasks for a given project. I use tags like #p/personal to associate a task to a project. The alias in the YAML front matter allows me to navigate to this tasks page by clicking on the tag from a tasks query.

@dannberg
dannberg / obsidian-people-moc.txt
Created February 19, 2024 14:47
Dann Berg's Obsidian People MOC. Uses Metabind and Dataview plugins. View full People Note system: https://dannb.org/blog/2022/obsidian-people-note-template/
[[+Home]] #MOC
```meta-bind-button
label: New People Note
hidden: false
class: ""
tooltip: ""
id: ""
style: primary
actions:
var pages = dv.pages('#daily');
pages = pages.filter(p => p.file.name.includes('<% tp.date.now('YYYY-MM', 0, tp.file.title, 'YYYY-MM') %>'));
var titles = [], weights = [], eatingWindows = [];
pages.sort().forEach(p => {
	titles.push(p.file.name);
	weights.push(p.weight || 0);
	eatingWindows.push([p.startEating, p.endEating]);
});
@business24ai
business24ai / save_note_to_obsidian.py
Created December 31, 2023 11:29
An AutoGen Studio skill to store markdown content to our second brain obsidian
# A skill to store markdown content to our second brain obsidian
import os
def store_note_to_obsidian(filename, content):
"""
Store markdown content to our second brain in a local Obsidian vault
:param filename: str, filename of the note
:param content: str, content of the note as markdown
javascript: (function() {
var scripts = document.getElementsByTagName("script"),
regex = /(?<=(\"|\%27|\`))\/[a-zA-Z0-9_?&=\/\-\#\.]*(?=(\"|\'|\%60))/g;
const results = new Set;
for (var i = 0; i < scripts.length; i++) {
var t = scripts[i].src;
"" != t && fetch(t).then(function(t) {
return t.text()
}).then(function(t) {
var e = t.matchAll(regex);