Skip to content

Instantly share code, notes, and snippets.

View abecode's full-sized avatar

Abe Kazemzadeh abecode

View GitHub Profile

History

For a long time I've been really impacted by the ease of use Cassandra and CockroachDB bring to operating a data store at scale. While these systems have very different tradeoffs what they have in common is how easy it is to deploy and operate a cluster. I have experience with them with cluster sizes in the dozens, hundreds, or even thousands of nodes and in comparison to some other clustered technologies they get you far pretty fast. They have sane defaults that provide scale and high availability to people that wouldn't always understand how to achieve it with more complex systems. People can get pretty far before they have to become experts. When you start needing more extreme usage you will need to become an expert of the system just like any other piece of infrastructure. But what I really love about these systems is it makes geo-aware data placement, GDPR concerns potentially simplified and data replication and movement a breeze most of the time.

Several years ago the great [Andy Gross](ht

@lsloan
lsloan / ! Python QTI.md
Last active April 10, 2023 21:11 — forked from IanHopkinson/lxml_examples.py
QTI data processing in Python; examples using pyslet, beautifulsoup4, and lxml.

Examples of processing QTI data with Python.

I attempted to use pyslet, which was designed for this purpose, but I found it awkward to use and its documentation unclear. Instead, I tried to use beautifulsoup4, but I learned that library doesn't support XPath to query for specific elements of the data. I turned to using the simple XML processing library lxml. It has similarities to other XML parsing libraries I've used before, but it has many unique features of its own.

Note that of the examples below, each does something a little differently. They don't all have the same output.
That's because they were mostly tests to see whether we preferred working with one library over another. Some

You are making a Choose Your Own Adventure story for me to play.
Present a list of choices of Choose Your Own Adventure story genres, and let me choose one or enter my own choice of genre. Wait for my response.
After choosing the genre give a list of themes and wait for a response, or let me choose my own theme.
You will give the story a title. You will begin by describing the character that I am playing, including my character's name, age, and appearance. Choose an unusual or interesting name. Briefly describe the setting and world in which the story begins. Describe a tension, danger, or challenge that I must confront.
You are going to create a story one passage at a time. After each passage you will provide a numbered list of choices and wait for a response. Include one emoji for each choice.
import re, sys # this file requires python 3
def parse(tokens):
stack = ([], None)
for t in tokens:
if t == '(':
stack = ([], stack)
elif t == ')':
(finished_list, stack) = stack
stack[0].append(finished_list)
elif not t.startswith(';;'):
@gtallen1187
gtallen1187 / scar_tissue.md
Created November 1, 2015 23:53
talk given by John Ousterhout about sustaining relationships

"Scar Tissues Make Relationships Wear Out"

04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.

This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.

[Laughter]

> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation

@jclosure
jclosure / install_dia_osx.md
Created August 6, 2017 00:20
How to install Dia on OSX (and have it run)
brew cask install dia

After his it won't run because DISPLAY=:0 env var is not set

vim /Applications/Dia.app/Contents/Resources/bin/dia
@evertrol
evertrol / Makefiles.md
Last active April 1, 2024 19:11
Makefile cheat sheet

Makefile cheat sheet

Mostly geared towards GNU make

I've used ->| to indicate a tab character, as it's clearer to read than

  • Set a target, its dependencies and the commands to execute in order
target: [dependencies]
->| 
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@W4ngatang
W4ngatang / download_glue_data.py
Last active April 16, 2024 06:10
Script for downloading data of the GLUE benchmark (gluebenchmark.com)
''' Script for downloading all GLUE data.
Note: for legal reasons, we are unable to host MRPC.
You can either use the version hosted by the SentEval team, which is already tokenized,
or you can download the original data from (https://download.microsoft.com/download/D/4/6/D46FF87A-F6B9-4252-AA8B-3604ED519838/MSRParaphraseCorpus.msi) and extract the data from it manually.
For Windows users, you can run the .msi file. For Mac and Linux users, consider an external library such as 'cabextract' (see below for an example).
You should then rename and place specific files in a folder (see below for an example).
mkdir MRPC
cabextract MSRParaphraseCorpus.msi -d MRPC
@josephspurrier
josephspurrier / values_pointers.go
Last active April 28, 2024 16:41
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value