Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Setting up Python on OS X

Works for me.

Install homebrew

brew install coreutils
brew install direnv
brew install uv
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@datadavev
datadavev / list_packages
Created January 29, 2025 15:07
List of dataone managed packages on a CN
export CN="${CN:=cn-ucsb-1.dataone.org}"
ssh ${CN} 'for PKG in $(apt list --installed | grep dataone | cut -d "/" -f 1); do echo "package,file_name"; for FN in $(dpkg -L $PKG); do echo "${PKG},${FN}"; done; done' | gh gist create -p -f dataone_packages.csv -d "cn-ucsb-1 package list $(date -I). Created with 'https://gist.github.com/datadavev/df83ce3a324f858afa9a408c047b9489'"
@datadavev
datadavev / dataone_packages.csv
Last active January 29, 2025 14:51
cn-ucsb-1 package list 2025-01-29. Generated with `ssh cn-ucsb-1.dataone.org 'for PKG in $(apt list --installed | grep dataone | cut -d "/" -f 1); do echo "package,file_name"; for FN in $(dpkg -L $PKG); do echo "${PKG},${FN}"; done; done' | gh gist create -p -f dataone_packages.csv -d "cn-ucsb-1 package list $(date -I)"`
package file_name
dataone-cn-index /.
dataone-cn-index /etc
dataone-cn-index /etc/init.d
dataone-cn-index /etc/init.d/d1-index-task-generator
dataone-cn-index /etc/init.d/d1-index-task-processor
dataone-cn-index /usr
dataone-cn-index /usr/share
dataone-cn-index /usr/share/dataone-cn-index
dataone-cn-index /usr/share/dataone-cn-index/d1_index_build_tool.jar
We can't make this file beautiful and searchable because it's too large.
Z,X,Y,File_SHA256
8,446,27,988a93b911f3cfe141726031620a42aab6fe8fdba07c8f91b99c3ed42b24fc90
8,446,28,91d5b00fbbaebe8c5b31d4a90116162bca74765429a1e63b3726ec4546826957
8,21,31,34d98a7f1c5efc510bbcd4b37522b6b7dd84a2a032d7ecff6fb007c1b7e7564a
8,21,35,e5735a4e1c76a2b4f428a8a74d1c75e51eeac6f185c0e8e3e3bd591d5059a012
8,21,38,f9667fcef2c8afa5d5f9ea7eee4019a8195824eb4359c71aa6c46e100ece6b90
8,21,36,99fbb22456978315da928806b0b81a6df3a22e43849b725b27cfff582803afa2
8,21,41,ec9a4b069475227ec36f24677bffd65903110b1b4701a7fe9038b35faa51d487
8,21,39,722211d18e25c4892a1ce87fdab4a21e325b7db9dc8409dc191cdf042acacd11
8,21,34,6fcb315f9563c38b7831b0272a573a64609c8caa87aa44ed479925c86b088f45
@datadavev
datadavev / zfile.zsh
Created January 13, 2025 17:17
Quickie for retrieving a specific file from Zenodo
#!/usr/bin/env zsh
usage() {
echo "List files for a Zotero DOI."
echo "Usage: zfile DOI [FNAME]"
echo " Show file contents on stdout if FNAME provided"
echo "example:"
echo " zfile 10.5281/zenodo.11400483 stac.json"
exit 1
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@datadavev
datadavev / computeviewRectangle2,js
Last active August 4, 2024 18:57
Cesium computeViewRectangle heading south
/**************************************************************************************************
* "Patch" for Cesium camera computeViewRectangle.
*
* This path provides a modified implementation of computeViewRectangle that
* returns the correct view rectangle when the camera is oriented towards the south
* and the horizon is visible. The default implementation truncates the view rectangle
* at a lower corner of the view which can significantly reduce the reported view
* rectangle.
*
* Load this in sandcastle.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.