Skip to content

Instantly share code, notes, and snippets.

View vickyliau's full-sized avatar

Vicky Liau vickyliau

View GitHub Profile
@syoh
syoh / README.md
Last active January 5, 2025 21:17
Interfacing one C++ codebase with both Python and R

Interfacing one C++ codebase with both Python and R

Python

The input numpy array is mapped to the input of a C++ wrapper function using pybind11. Then, core function myfunc with templated input type is executed on the mapped matrix.

To execute the test function and profile memory usage, run

/usr/bin/time -v python test.py
@systemed
systemed / gist:be2d6bb242d2fa497b5d93dcafe85f0c
Last active February 19, 2025 08:29
Routing algorithm implementations
(Dijkstra and plain A* are generally not included here as there are thousands of
implementations, though I've made an exception for rare Ruby and Crystal versions,
and for Thor, Mapzen's enhanced A*. )
A* Ruby https://github.com/georgian-se/shortest-path
A* Crystal https://github.com/petoem/a-star.cr
A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla
NBA* JS https://github.com/anvaka/ngraph.path
NBA* Java https://github.com/coderodde/GraphSearchPal
NBA* Java https://github.com/coderodde/FunkyPathfinding
@agramfort
agramfort / lowess.py
Last active April 7, 2025 08:22
LOWESS : Locally weighted regression
"""
This module implements the Lowess function for nonparametric regression.
Functions:
lowess Fit a smooth nonparametric regression curve to a scatterplot.
For more information, see
William S. Cleveland: "Robust locally weighted regression and smoothing
scatterplots", Journal of the American Statistical Association, December 1979,