Skip to content

Instantly share code, notes, and snippets.

View AndrewAnnex's full-sized avatar
👨‍🚀
🌎🛰💻👨‍🚀📈

Dr. Andrew Annex AndrewAnnex

👨‍🚀
🌎🛰💻👨‍🚀📈
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndrewAnnex
AndrewAnnex / Rgb_encode_mars.ipynb
Last active November 27, 2022 21:46
Terrain RGB encoding for planets
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndrewAnnex
AndrewAnnex / 9_Build wheels for SpiceyPy 🌶️ 🥧.txt
Created July 27, 2022 01:05
spiceypy_cibuildwheels_arm64_log
2022-07-09T23:59:52.8522580Z ##[group]Run python -m cibuildwheel --output-dir wheelhouse
2022-07-09T23:59:52.8523000Z python -m cibuildwheel --output-dir wheelhouse
2022-07-09T23:59:52.8827550Z shell: /bin/bash -e {0}
2022-07-09T23:59:52.8827810Z env:
2022-07-09T23:59:52.8828030Z CIBW_ARCHS: arm64
2022-07-09T23:59:52.8828280Z MACOSX_DEPLOYMENT_TARGET: 10.11
2022-07-09T23:59:52.8828620Z pythonLocation: /Users/runner/hostedtoolcache/Python/3.9.13/x64
2022-07-09T23:59:52.8829050Z ##[endgroup]
2022-07-09T23:59:53.1989380Z
2022-07-09T23:59:53.1990440Z _ _ _ _ _ _ _
@AndrewAnnex
AndrewAnnex / riotest.py
Created July 31, 2020 23:51
rasterio read speed test helper function
import rasterio as rio
import concurrent.futures as cf
def fc(p,n=4):
with rio.open(p) as src:
blocks = [_[1] for _ in src.block_windows()]
def rf(w):
with rio.open(p) as src:
data=src.read(window=w)
return data
@AndrewAnnex
AndrewAnnex / simplejupyter.js
Created May 28, 2020 22:56
jupyter html hide code and in/out divs, run in console to get simpler notebook without code or cell number in/outs
document.querySelectorAll("div.input").forEach(function(a){a.remove()})
document.querySelectorAll("div.prompt.input_prompt").forEach(function(a){console.log(a.innerHTML='')})
document.querySelectorAll("div.prompt.output_prompt").forEach(function(a){console.log(a.innerHTML='')})
@AndrewAnnex
AndrewAnnex / ctx_mars_mro_stereo_sql_query_andrew_annex_may_2020.sql
Last active May 10, 2020 13:14
Example QGIS SQL query to select MRO CTX stereo pair candidate files from the Mars ODE footprint shapefile. Polygon text should be updated to wkt polygon for query region of interest. This is ugly but fast enough for a small query region of a few degrees. other settings can be tweaked as needed. Reference https://zenodo.org/record/3817469
SELECT
a.ProductId as left_pi,
b.ProductId as right_pi,
a.EmAngle as left_em,
b.EmAngle as right_em,
a.Ext2URL as left_url,
b.Ext2URL as right_url,
st_intersection(a.geometry, b.geometry) as geom,
st_area(st_intersection(a.geometry, b.geometry)) as ovarea,
st_area(st_intersection(a.geometry, b.geometry)) / st_area(a.geometry) * 100 as overlap_percentage,
@AndrewAnnex
AndrewAnnex / gist:bf867ff1300481080183c551446b8dc0
Created April 22, 2020 13:16
find unique SPICE errors using the silver searcher and bash
ag -o '(SPICE\([A-Z]+\))' --nonumbers --nofilename --nogroup --nobreak | sort | uniq
@AndrewAnnex
AndrewAnnex / spiceypy_msl_example.ipynb
Created April 15, 2020 20:43
spiceypy msl example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.