Skip to content

Instantly share code, notes, and snippets.

View soobrosa's full-sized avatar

Daniel Molnar soobrosa

View GitHub Profile
@soobrosa
soobrosa / tolkien.md
Created May 26, 2026 16:43
§213 Magnificia Humanitas

What makes §213 of Magnifica Humanitas such a pointed gesture is not just that Pope Leo XIV quotes Tolkien, but which Tolkien he quotes, and what political/cultural terrain that quotation crosses in doing so. Three claimants to Middle-earth, three radically different readings.

The Pope's Tolkien (§213). Leo XIV pulls from Gandalf's speech at the Last Debate in The Return of the King: "It is not our part to master all the tides of the world, but to do what is in us for the succour of those years wherein we are set, uprooting the evil in the fields that we know, so that those who live after may have clean earth to till." He then glosses it in his own voice: "The civilization of love will not arise from a single or spectacular gesture, but from the sum total of small and steadfast acts of fidelity that serve as a bulwark against dehumanization." The context is an encyclical on AI and the threat of dehumanization, and the rhetorical move is anti-mastery: against the demiurgic temptation to seize the le

@soobrosa
soobrosa / local_ai_on_apple_silicon.md
Last active March 1, 2026 14:21
Local AI on Apple Silicon

Local AI on Apple Silicon

Dec 15th, 2025

Why?

You might ask the question. We all know that LLMs are non-deterministic stochastic parrots and the “blurry JPEGs of the Web” or whatnot the thief overlords found laying around. Still they are useful with the proper leash.

Possible reasons to prefer a local AI:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@soobrosa
soobrosa / spitalfields.json
Created December 4, 2024 15:54
spitalfields.json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@soobrosa
soobrosa / recipe.sh
Created May 4, 2021 09:05
Two commands that got me closer to the nested things.
cat recipes_vegan.json | jq '.recipes[].extendedIngredients[]' | jq '[.id,.aisle,.image,.consistency,.name,.nameClean,.original,.originalString,.originalName,.amount,.unit,.meta[],.metaInformation[],.measures.metric.amount,.measures.metric.unitShort,.measures.metric.unitLong]' -c
cat recipes_vegan.json | jq '.recipes[].analyzedInstructions[].steps[]' | jq '[.number, .step, .ingredients[].id, .ingredients[].name, .ingredients[].localizedName, .ingredients[].image]' -c
CREATE OR REPLACE FUNCTION CLEAN_DEEP_JSON (j VARCHAR(65535), f VARCHAR(65535))
RETURNS VARCHAR(MAX)
STABLE AS $$
import json
if not j:
return None
try:
arr = json.loads(j)
except valueerror:
return None
@soobrosa
soobrosa / install_opencv_rpi.sh
Last active September 26, 2017 13:46
Install OpenCV on a Raspbian Jessie
# thanks to
# https://medium.com/r/?url=https%3A%2F%2Fncsforum.movidius.com%2Fdiscussion%2Fcomment%2F299%2F%23Comment%5C_299
# https://ahmedibrahimvt.wordpress.com/2017/02/19/fatal-error-hdf5-h-no-such-file-or-directory/
# http://www.pyimagesearch.com/2015/07/20/install-opencv-3-0-and-python-3-4-on-ubuntu/
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
@soobrosa
soobrosa / install_caffe_rpi.sh
Created September 4, 2017 09:56
Caffe install + benchmark script for Raspbian Jessie
# tested on a Raspbery Pi 3 running a Raspbian Jessie July 2017
# dependencies
apt-get update
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get install libopenblas-dev
sudo apt-get install libatlas-base-dev
@soobrosa
soobrosa / install_caffe_osx.sh
Last active June 16, 2018 05:33
Caffe install + benchmark script for OSX
# tested on Macbook Air 13", early 2015, 1,6 Ghz Intel Core i5, 8Gb RAM running macOS Sierra
# if you don't have brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
# dependencies
brew install -vd snappy leveldb gflags glog szip lmdb
brew tap homebrew/science
brew install hdf5 opencv
@soobrosa
soobrosa / export_spotify_tracks_you_liked.sh
Last active February 15, 2016 15:37
Own your list of favourite tracks on Spotify
#!/bin/bash
#
# you need
# https://github.com/jehiah/json2csv and
# https://stedolan.github.io/jq/
# to roll like this
#
# get your token at https://developer.spotify.com/web-api/console/get-current-user-saved-tracks/
#