Skip to content

Instantly share code, notes, and snippets.

@shawwn
shawwn / M1 Air Pink Screen Of Death.txt
Created August 6, 2021 14:34
My M1 Air periodically reboots itself every week or so. It's like the old Windows BSOD, except it has a pink stripe on the screen. This is the "Problem Report for macOS" that was generated after my reboot today.
panic(cpu 0 caller 0xfffffe001f495798): "dart-disp0 (0xfffffe2332f08000): SMMU(SMMU) error: SID 0 PTE invalid exception on read with DVA 0x32dc000 (TTBR 0 SEG 0x1 PTE 0x4b7) ERROR_STATUS 0x80000004 TIME 0x6e4d29833f5d5 TTE 0 AXI_ID 0)"
Debugger message: panic
Memory ID: 0x6
OS release type: User
OS version: 20F71
Kernel version: Darwin Kernel Version 20.5.0: Sat May 8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101
Fileset Kernelcache UUID: FB10CC0AB8BAC020BC47A50D64476F11
Kernel UUID: 07259C53-9EF7-32FF-821D-8F28A5985DFA
iBoot version: iBoot-6723.120.36
secure boot?: YES

a conversation about the einops lib and why it's hard to optimize ML:

<PapuaHardyNet> the solution is obviously jax acc to shawn

which is why i'm thinking to also build a jax equivalent and compare all three: pytorch, pytorch + einops, jax. Let's see if I have the bandwidth to do so

<nshepperd2> einops is really cool imo

This file has been truncated, but you can view the full file.
{"points":[{"x":891,"y":778},{"x":891,"y":2727},{"x":2493,"y":2727},{"x":2493,"y":778}],"size":{"height":2848,"width":4288},"submitted":"Tue, 19 May 2020 13:58:08 GMT","tag":"sun_stealer","url":"https://battle.shawwn.com/sdc/imagenet/validation/ILSVRC2012_val_00039884.JPEG","user":"0PyTmucwwLZz1AZZLvS0lgEHiQ22","experimentId":"imagenet2012validation","color":"#a97304","box_center_x":0.394589552238806,"box_center_y":0.6153441011235955,"box_width":0.3736007462686567,"box_height":0.6843398876404494}
{"points":[{"x":2492.4833984375,"y":639.1000061035156},{"x":2492.4833984375,"y":1142.1000061035156},{"x":2636.4833984375,"y":1142.1000061035156},{"x":2636.4833984375,"y":639.1000061035156}],"size":{"height":2848,"width":4288},"submitted":"Tue, 19 May 2020 13:58:08 GMT","tag":"apfsds_anti_tank_ammuition","url":"https://battle.shawwn.com/sdc/imagenet/validation/ILSVRC2012_val_00039884.JPEG","user":"0PyTmucwwLZz1AZZLvS0lgEHiQ22","experimentId":"imagenet2012validation","color":"#1fad62","box_center_x":0.5980604940385961,
@shawwn
shawwn / books3_2.txt
Created July 4, 2021 11:13
books3 books that start with the number "2"
This file has been truncated, but you can view the full file.
Index of /books3/epub/books3/the-eye.eu/public/Books/Bibliotik/2/
(drwxrwxr-x) ../
(-rw-rw-r--) 2.4M 2 - La Vie intellectuelle en Fr - Collectif.epub.txt
(-rw-rw-r--) 1.4M 2 - Their Finest Hour - Winston Churchill.epub.txt
(-rw-rw-r--) 320.7k 2 a.m. at the Cat's Pajamas - Marie-Helene Bertino.epub.txt
(-rw-rw-r--) 578.1k 2 Billion Under 20 - Stacey Ferreira.epub.txt
(-rw-rw-r--) 410.9k 2 Bodies for the Price of 1.epub.txt
(-rw-rw-r--) 324.3k 2 Ennerdale Drive - Ainley, Rosa.epub.txt
(-rw-rw-r--) 435.6k 2 in the Hat - Raffi Yessayan.epub.txt
(-rw-rw-r--) 126.8k 2 Minutes & Under, Volume 1_ 70 Short Character Monologues for Actors (Smith & Kraus) - Glenn Alterman (retail).epub.txt
@shawwn
shawwn / test_tensorflow_metal.py
Created June 16, 2021 00:33
A script to test M1 GPU training via the tensorflow-metal plugin
import tensorflow.compat.v2 as tf
import tensorflow_datasets as tfds
tf.get_logger().setLevel('DEBUG')
tf.enable_v2_behavior()
from tensorflow.python.framework.ops import disable_eager_execution
disable_eager_execution()
@shawwn
shawwn / gpt_j.py
Last active June 9, 2021 13:58
Everything after line 26's `def ` was generated by GPT-J (top_p=1.0 temp=0.7): https://6b.eleuther.ai/
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
origins = [
"http://localhost",
"http://localhost:1234",
"http://localhost:8080",
]
app = FastAPI()
@shawwn
shawwn / morehn.js
Last active June 9, 2021 00:14
Show descendant count on Hacker News 'more' links
// ==UserScript==
// @name More Hacker News
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Show descendant count on Hacker News 'more' links
// @author Shawn Presser aka sillysaurusx (https://twitter.com/theshawwn)
// @match https://news.ycombinator.com/*
// @icon https://www.google.com/s2/favicons?domain=ycombinator.com
// @grant none
// ==/UserScript==
@shawwn
shawwn / vg_thread_338490437.md
Last active June 7, 2021 09:37
4chan-to-text demo
@shawwn
shawwn / sorted_braille.txt
Last active May 18, 2021 15:40
Braille unicode characters, sorted spatially (by hand).
A white line (——————) indicates something similar to reflection: the
characters on both sides of the lines are the same, but every other
char was swapped. E.g. 0A 1B 2C 3D becomes A0 B1 C2 D3 on the other
side of the line.
Almost all braile characters seem to come in "pairs", which I find
quite interesting.
@shawwn
shawwn / On Louis CK and guilt.md
Created May 17, 2021 10:31
A comment I posted to HN about why people don't admit their guilt, which I later deleted.

This was a comment I posted to HN in response to "I hate that it's so effective to pretend like you're not guilty after you've been caught cheating." That got me thinking about why, so I wrote this. But shortly after I posted it, I felt disappointed that I wrote these words. So I'm posting it here as a memory and a reminder.


https://news.ycombinator.com/item?id=27180717

I hate, immensely, how effective "double down and never admit guilt" is, but I don't think there's anything we can do about it as a society.

Thank goodness most people don't have the guts to hold firm long enough to get away with it...