Skip to content

Instantly share code, notes, and snippets.

View mschrader15's full-sized avatar

Max Schrader mschrader15

View GitHub Profile
@jpswinski
jpswinski / geoparquet.cpp
Last active August 8, 2024 04:23
Minimal example C++ code to write a GeoParquet file using Apache Arrow
/*
* File: geoparquet.cpp
*
* Purpose: A minimal example to build a GeoParquet file using Apache Arrow.
*
* Prerequisites: The Apache Arrow library is needed and can be installed as follows
* $ git clone https://github.com/apache/arrow.git
* $ cd arrow/cpp
* $ mkdir build
* $ cd build
@kepano
kepano / obsidian-web-clipper.js
Last active April 21, 2025 06:17
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@azlen
azlen / bulletpaths.js
Last active February 28, 2025 16:24
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
@basaks
basaks / python3.9 on ubuntu 18.04
Last active December 12, 2024 12:08
Install python3.9 on ubuntu 18.04
## Install Python3.9 interpreter on ubuntu 18.04
[From here](http://devmartin.com/blog/2016/04/creating-a-virtual-environment-with-python3.4-on-ubuntu-16.04-xenial-xerus/), we can pretty much follow the exact same procedure.
Only this I needed to on top of that blog was the `libffi-dev` system dependency.
On a terminal just do the following steps:
Install dependencies:
@ericpre
ericpre / lowess.py
Last active February 11, 2023 00:41 — forked from agramfort/lowess.py
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,
volume 74, number 368, pp. 829-836.
William S. Cleveland and Susan J. Devlin: "Locally weighted regression: An
approach to regression analysis by local fitting", Journal of the American
@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active April 16, 2025 19:41
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
Copy this to roam/js page, including the "{{[[roam/js]]}}" node:
- {{[[roam/js]]}}
- ```javascript
/*
* Roam template PoC by @ViktorTabori
* 0.1alpha
*
* How to install it:
* - go to `roam/js` page`
@atabakd
atabakd / kl.py
Last active March 27, 2025 14:23
KL divergence for multivariate samples
# https://mail.python.org/pipermail/scipy-user/2011-May/029521.html
import numpy as np
def KLdivergence(x, y):
"""Compute the Kullback-Leibler divergence between two multivariate samples.
Parameters
----------
x : 2D array (n,d)
@GuillaumeDua
GuillaumeDua / cpp_legacy_inheritance_vs_std_variant.md
Last active March 28, 2025 02:47
C++ legacy inheritance vs CRTP + std::variant
@javipus
javipus / .gitignore
Last active April 14, 2024 14:05
Kullback-Leibler Divergence Estimator.
__pycache__/*