Skip to content

Instantly share code, notes, and snippets.

@mmattamala
mmattamala / conda_m1_rosetta.md
Created July 1, 2022 13:30
Setup rosetta environment on M1 conda installation

From conda-forge/miniforge#165 (comment)

CONDA_SUBDIR=osx-64 conda create -n rosetta python   # create a new environment called rosetta with intel packages.
conda activate rosetta
python -c "import platform;print(platform.machine())"
conda config --env --set subdir osx-64  # make sure that conda commands in this environment use intel packages
:root {
--root-font-size: 16;
--root-line-height: 1.2;
font-size: var(--root-font-size);
line-height: var(--root-line-height);
}
.font-inter {
--cap-height: 2048;
--ascent: 2728;
@simonw
simonw / vega-view-update.md
Created June 24, 2018 00:21
How to update an existing vega view with new fetched data

How to update an existing vega view with new fetched data

This took quite a bit of figuring out because the web is littered with Vega 2 examples but Vega 3 is a bit different.

https://vega.github.io/vega/docs/api/view/#view_change

var spec = {
  data: {"url": "https://fivethirtyeight.datasettes.com/fivethirtyeight-45d758d/most-common-name%2Fsurnames.json?_shape=array"},
  mark: "bar",