Skip to content

Instantly share code, notes, and snippets.

import altair as alt
from vega_datasets import data
source = alt.topo_feature(data.world_110m.url, "countries")
osm_url, otm_url = ('https://tile.openstreetmap.org/', 'https://tile.opentopomap.org/')
select_urls = alt.binding_select(options=[osm_url, otm_url], name='select tile service')
param_urls = alt.param(bind=select_urls, value=osm_url)
param_tx = alt.param(expr="width / 2")
param_ty = alt.param(expr="height / 2")
param_base_tile_size = alt.param(value=256)

How to get firmware onto mutable modules

I had the best luck with the Black Magic Probe and gdb.

Install compiler

First install the arm compiler:

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
@willb
willb / expenv.sh
Created December 2, 2019 19:48 — forked from sophwats/expenv.sh
#!/bin/sh
while getopts ":if:" opt; do
case $opt in
f)
useFile=$OPTARG
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
## temporary installing Strimzi
oc apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.8.2/strimzi-cluster-operator-0.8.2.yaml
# Simple Cluster with one ZK and one Kafka node
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/master/examples/kafka/kafka-persistent-single.yaml

oc get pods -n myproject -w 

wait...

@willb
willb / explanation.md
Created September 14, 2016 21:29 — forked from masak/explanation.md
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

// 'small' was a subsample of meta-full parquet
scala> small.orderBy(small("@timestamp")).map(utils.toJSON).saveAsTextFile("/home/eje/logdemo/logs_ordered.json")
@willb
willb / heapy.txt
Created October 5, 2011 12:13 — forked from anonymous/mem leak test script
leaky.py
Partition of a set of 702256 objects. Total size = 93752736 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 28141 4 29491768 31 29491768 31 dict of qmf.console.Object
1 56293 8 15762040 17 45253808 48 dict of qmf.console.ObjectId
2 180702 26 13130552 14 58384360 62 tuple
3 85356 12 10054240 11 68438600 73 list
4 136839 19 7397808 8 75836408 81 str
5 56625 8 6191896 7 82028304 87 unicode
6 56293 8 4053096 4 86081400 92 qmf.console.ObjectId
7 28141 4 1801024 2 87882424 94 qmf.console.Object
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <deque>
#define MAX_LINE_LEN 1024
struct Poller