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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# brought to you by pythonforbeginners.com
import socket
import subprocess
import sys
from datetime import datetime
# Clear the screen
subprocess.call('clear', shell=True)
http://www.nlm.nih.gov
http://www.loc.gov
http://www.nal.usda.gov
http://n2t.net
http://www.wipo.int
http://libraries.ucsd.edu
http://library.ucsf.edu
http://library.berkeley.edu
http://rci.rutgers.edu
https://ark.archive.org
@datadavev
datadavev / install_python_bsddb3.md
Created June 8, 2023 12:40
install python 3.9 bsddb3 on os x
brew install berkeley-db@5
export LDFLAGS="-L/usr/local/opt/berkeley-db@5/lib"
export CPPFLAGS="-I/usr/local/opt/berkeley-db@5/include"
pip install bsddb3
@datadavev
datadavev / doi_rdf.md
Last active July 19, 2023 21:33
Referencing RDF with DOIs?

Find some RDF datasets in DataCite:

$ curl 'https://api.datacite.org/dois?query=formats:application%2Frdf%2Bxml' \
  | jq '{"id":.data[].id, "formats":.data[].attributes.formats}'
  
{
  "id": "10.18434/t4/1435037",
  "formats": [
    "application/rdf+xml",
    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@datadavev
datadavev / eg_point_primitive.js
Last active March 9, 2025 13:58
Simple example of large number of Cesium points with selection support
//
// Run this in the Sandcastle.
//
function randomCoordinateJitter(degree, margin) {
return degree + margin * (Math.random() - 0.5) / 0.5;
}
const viewer = new Cesium.Viewer("cesiumContainer", {
terrain: Cesium.Terrain.fromWorldTerrain()
@datadavev
datadavev / index.html
Created August 30, 2023 17:03
View a bunch of points in Cesium
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Include the CesiumJS JavaScript and CSS files -->
<script src="https://cesium.com/downloads/cesiumjs/releases/1.108/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.108/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<style>
.fullsize {
position:absolute;
@datadavev
datadavev / test_terminate_duplicate.yml
Created February 1, 2024 17:10
Example workflow that self terminates if another instance of same workflow is running
name: test_terminate_duplicate
on:
workflow_dispatch
jobs:
check_duplicate:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: show_vars