234 karma · joined March 25, 2015
A few months ago, I was playing with Apple's live text tool which allows the user to select text from images. I noticed the quality of the text extraction was unreasonably good, and it worked offline. As someone who has studied free, on-device OCR libraries extensively, I had not seen anything with such high quality that works locally.
I built out Textra over a few weeks as a response, which is a command-line tool for Mac OS 13+ (needed to access the latest high quality APIs) that gives the user easy access to Apple's on-device text extraction APIs. The tool is in early stages but has hit a point where it feels like it's approaching a good mix of stability and utility.
The text extraction (OCR) quality is among the best and fastest I've seen for on-device recognition (approaches the quality of cloud services like AWS/Google). The speech extraction is not as high quality as recent alternatives like OpenAI's Whisper, but it is very fast, efficient, and probably good enough for many use cases (and doesn't require a large download).
It is my hope that this open source tool can help journalists and the public with text extraction needs.
I connected a bike computer magnetic pickup to the fan wheel, spliced it into a headphone cable, and plugged the headphone into a USB sound card connected to my laptop. On my laptop, I can monitor the microphone input and see each revolution of the fan wheel as a pulse. I wrote a program to convert these pulses to power (using Airdyne conversion formulas I found online) and then broadcast a Bluetooth power meter compatible with Zwift.
This is a test project I hacked together to see how efficiently I could build an explorable, procedurally generated 3D world. I'd previously tested some infinite terrain ideas in Three.JS but the resulting code was hundreds of kilobytes and slowed down my computer significantly.
I learned the basics of vertex and fragment shaders for this project, and realized that infinite terrain could be rendered efficiently by creating a fixed plane mesh and modulating its vertices with the vertex shader using a noise function that takes into account player movement. The resulting demo app runs smoothly on my laptop and mobile device.
Source code here: https://github.com/freedmand/infiniteterrain
I couldn't find a richly interactive COVID-19 map anywhere that includes historical data, so I made my own. I used SvelteJS and deck.gl to create a fast and functional frontend. The dataset comes from USAFacts[1].
Source code can be found here: https://github.com/freedmand/covid19map
[1] https://usafacts.org/visualizations/coronavirus-covid-19-spr...
I created Distinguish because I was frustrated with how messy naming CSS classes and IDs can be. There was (for me at least) no simple system that could reduce class names and work across any file extensions. So I reasoned that employing the author to add a little extra information to the class name (the "_cls-" prefix) was a reasonable compromise that only adds clarity and intent.
I've used Google's Closure Stylesheets before to great results, but it depends on a very specific build system. My intent with Distinguish is for it to be very lightweight, modular, and fast (and it can work for any type, not just CSS classes and IDs, though that's what I've found the most useful).
process.on('exit', () => (process.exitCode = 1));
I didn't want to assume that people are executing the code in-browser or terminal for the purpose of this Gist, but feel free to fork for your needs.