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 October 6, 2022 11:36
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 October 9, 2024 02:27
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 August 16, 2023 06:19
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,