Skip to content

Instantly share code, notes, and snippets.

View hyfen's full-sized avatar
💭
Building a Memex

Andrew Louis hyfen

💭
Building a Memex
View GitHub Profile
@rsms
rsms / example.txt
Last active March 11, 2023 23:00
source line-length histogram script
./linelen_hist.sh src '*.c'
COLS COUNT
2 1317 ████████████████████████████████████████████████████████████▌
4 583 ██████████████████████████▏
6 500 ██████████████████████▎
8 253 ███████████▊
10 264 ████████████▊
12 448 ████████████████████▋
14 417 ███████████████████▌
16 476 █████████████████████▍
package main
import (
"context"
"fmt"
"os"
"time"
"github.com/gdamore/tcell"
)
@pvh
pvh / week-1.md
Last active June 24, 2020 23:05
Cambria, Week 1

Cambria, Week 1

Welcome, one and all to the Cambria project. Cambria is an ongoing research project here at Ink & Switch exploring how we can operate on evolving data formats in a decentralized system. We hope this work will be exciting not just for folks working on decentralized systems but could also be applicable more broadly to other distributed systems.

What's the problem?

Cambria was motivated by some problems we kept seeing in our work. The most common problem was that someone would add an array field to a document. New documents would work fine (the array would be added at document creation time) but existing documents, or documents shared by older clients, would cause Javascript runtime errors when the code would try to call Array methods on the object.

This is a very common problem in all kinds of distributed systems, and in a centralised system is mostly managed by locking down how the system works. Database schemas prevent writing

It had been 13 days since I'd found a spreader, and I was starting to get worried.

The last time my sero levels had been this low, I'd gone down to the arrivals level of the international terminal at the airport. I mean, obviously there wouldn't be any spreaders there unless someone screwed up the pre-flight screening. But they say that low viral loads of unfamiliar strains could still boost you in a pinch, so I scanned the room for the most exotic-looking passengers I could find and tried to cozy up to them. Once, I managed to lick the handles of a few suitcases going around the carousel without too many people noticing.

Anyway, I guess what they say is true, because my sero bounced up. But I think I got lucky; there's no substitute for prolonged contact with someone who's gone full sympto.

I texted my doctor again.

ffs you're literally killing me here

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruthienachmany
ruthienachmany / gist:03f9a9241dfb2b050cbc93e4781472ce
Last active June 9, 2020 17:57
Biomaterials as UI: Designing New User Experiences // Strangeloop Talk // Resources to Learn More
https://www.thestrangeloop.com/2017/biomaterials-designing-new-user-experiences.html
BIOMATERIALS: DESIGNING NEW USER EXPERIENCES
As software developers, we build for the capabilities of the platform our customer consumes our software on.
While we can easily imagine the ways the gyroscope or haptic abilities of a smartphone shape what we build for mobile,
or the intent structure of a Google Home or Alexa app defines what we build for voice, as a software engineer at Warby Parker
I've observed the opportunity for software developers to consider the material of the products our companies sell as another
plane for creative technology and enhanced user experience. In this talk, I share some exciting trends in biomaterials:
materials derived from nature or synthetically produced materials that are inspired by nature. I offer a look at some unique
properties of these materials in the hope of inspiring people to explore the ways they can hack on these
Sometimes there's a terrible penalty for telling the truth.
—The Great Lie (1941)
Sometimes even Cupid needs a little help!
—The Model and the Marriage Broker (1951)
Sometimes any man can be a giant . . .
—Giant (1956)
Sometimes murder is just a way to pass the time.
@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dannguyen
dannguyen / shakespeare-ngrams-cli-ack.md
Last active May 30, 2023 16:04
How to tokenize and create n-grams in Shakespeare from the command-line

Creating Shakespearean n-grams with just the command-line and regexes

This is a quick example showing how to use regexes to find tri-grams in Shakespeare...well, 570,872 of them, anyway, if we do some basic filtering of non-dialogue.

Though tokenization and n-grams should typically be done using a proper natural language processing framework, it's possible to do in a jiffy from the command-line, using standard Unix tools and ack, the better-than-grep utility.

What are n-grams?

@dropmeaword
dropmeaword / browser_history.md
Last active July 19, 2024 00:09
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.