Skip to content

Instantly share code, notes, and snippets.

@thomaspinder
thomaspinder / SparseSpectrumGPFlow2
Created November 27, 2020 19:37
Sparse spectrum Gaussian process inmplemented in GPFlow 2.0
import gpflow
import tensorflow as tf
import matplotlib.pyplot as plt
from gpflow.models import GPModel, InternalDataTrainingLossMixin, GPR
from gpflow.kernels import SquaredExponential, Kernel
from gpflow.likelihoods import Gaussian
from gpflow.mean_functions import Zero
from gpflow.base import Parameter
from time import time
from gpflow.utilities import print_summary
@woodbri
woodbri / get-wind.py
Last active July 15, 2025 16:58
Python script to fetch GFS wind data and create a JSON file
#!/usr/bin/env python3
'''
get-winds.py
- get the latest data from nomads.ncep.noaa.gov unless we have it already
- generate file /maps/wms/data/windy.json
- generate windy.latest file with time stamp
'''
@crittermike
crittermike / wget.sh
Last active September 9, 2026 21:09
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@sim642
sim642 / boost-windows.md
Last active September 14, 2026 01:37
Installing boost libraries for GCC (MinGW) on Windows

Installing boost libraries for GCC (MinGW) on Windows

Folder setup

  1. Extract downloaded boost source, e.g. C:\Program Files\boost_1_59_0.
  2. Create a folder for Boost.Build installation, e.g. C:\Program Files\boost-build.
  3. Create a folder within for building, i.e. C:\Program Files\boost_1_59_0\build.
  4. Create a folder for installation, e.g. C:\Program Files\boost.

GCC setup

  1. Open Command Prompt.
@calstad
calstad / TDA_resources.md
Last active April 15, 2026 18:22
List of resources for TDA

Quick List of Resources for Topological Data Analysis with Emphasis on Machine Learning

This is just a quick list of resourses on TDA that I put together for @rickasaurus after he was asking for links to papers, books, etc on Twitter and is by no means an exhaustive list.

Survey Papers

Both Carlsson's and Ghrist's survey papers offer a very good introduction to the subject

Other Papers and Web Resources

@rrnewton
rrnewton / memory_minimized.c
Created March 16, 2015 02:41
memory papi example minimized
#include "papi.h"
#include <stdlib.h>
#include <stdio.h>
// Make sure to create some cache misses:
void do_misses() {
int i;
int sz = 30 * 1000 * 1000;
double* data = malloc(sz * sizeof(double));
for(i=0; i<sz; i++) data[i] = i*100;
@chenshuo
chenshuo / 2012.cc
Created February 2, 2012 11:39
A puzzle solved with breadth-first search
// FIXME: memory leaks
#include <stdio.h>
#include <deque>
#include <set>
struct Node
{
int value;
Node* parent;