Proposal for uber/h3.
Every H3 C source file includes a 15-line Apache 2.0 license header with copyright years:
/*| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = ["h3", "geopandas", "matplotlib"] | |
| # /// | |
| """ | |
| Gosper Island demo: polyfill a state, compact, and plot the outlines. | |
| Each compacted cell's children tile into a fractal Gosper-island shape | |
| rather than a regular hexagon. |
Proposal for uber/h3.
Every H3 C source file includes a 15-line Apache 2.0 license header with copyright years:
/*| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include "h3Index.h" | |
| #include "iterators.h" | |
| #include "polyfill.h" | |
| #include "polygon.h" | |
| #include "test.h" | |
| #include "utility.h" |
| typedef struct { | |
| double s; | |
| double c; | |
| double lng; | |
| } LatLngPre; | |
| static inline LatLngPre precompute_latlng(LatLng x) { | |
| double lat = x.lat / 2.0 + M_PI / 4.0; | |
| LatLngPre llp = {.s = sin(lat), .c = cos(lat), .lng = x.lng}; |
| # Justfile for https://github.com/uber/h3/pull/1042 | |
| _default: | |
| @just --list | |
| purge: | |
| rm -rf build | |
| build: | |
| -mkdir build |
| import h3 | |
| import geopandas | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| import contextily as cx | |
| h = '8c196938064c5ff' | |
| # convert to h3.LatLngPoly, which is compatible with |
How to get bat to highlight your justfiles.
From https://hynek.me/til/bat-justfile/
In the form of a justfile rule:
mkdir -p "$(bat --config-dir)/syntaxes"
cd "$(bat --config-dir)/syntaxes"
git clone https://github.com/nk9/just_sublime.git