Skip to content

Instantly share code, notes, and snippets.

View district10's full-sized avatar
😀
good good study, day day up

TANG ZhiXiong district10

😀
good good study, day day up
View GitHub Profile
This file has been truncated, but you can view the full file.
@district10
district10 / cheap-ruler.py
Created July 12, 2023 08:19
cheap-ruler: Fast approximations for common geodesic measurements 🌐 (python version)
import numpy as np
def cheap_ruler_k(latitude: float) -> np.ndarray:
'''
in meters
'''
# based on https://github.com/mapbox/cheap-ruler-cpp
RE = 6378.137
FE = 1.0 / 298.257223563
E2 = FE * (2 - FE)
@district10
district10 / lts_2021_11_02.patch
Created May 24, 2022 02:20
abseil QNX build, based on lts_2021_11_02 (commit: 215105818)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 750a475..110a1b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,16 @@
# and then issuing `yum install cmake3` on the command line.
cmake_minimum_required(VERSION 3.5)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
@district10
district10 / abseil-qnx-patch.diff
Last active May 18, 2023 14:13
based on 20200225.2 (c51510d1). Don't forget to add `-Wl,--start-group`, `-Wl,--end-group` when linking. Related: https://github.com/abseil/abseil-cpp/issues/566#issuecomment-1013611434
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48cb6eb..f730711 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,15 @@
# (https://fedoraproject.org/wiki/EPEL#Extra_Packages_for_Enterprise_Linux_.28EPEL.29)
# and then issuing `yum install cmake3` on the command line.
cmake_minimum_required(VERSION 3.5)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
@district10
district10 / concave_hulls.ipynb
Created March 9, 2023 05:14 — forked from dwyerk/concave_hulls.ipynb
concave hulls using shapely and scipy
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.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@district10
district10 / dbg.h
Last active September 9, 2020 06:06
sfinae-example-test-is-member-function-is-static-function-is-vector-is-map-etc.cpp
#error "you should download from https://raw.githubusercontent.com/sharkdp/dbg-macro/master/dbg.h"
@district10
district10 / .block
Created September 4, 2018 07:25
dots on a map: setup-gl
license: mit