Skip to content

Instantly share code, notes, and snippets.

__author__ = """Peter Davidson FIA"""
__email__ = 'peter.davidson@wefox.com'
__version__ = '0.1'
__license__ = 'If you find this helpful, please say thank you'
import pandas as pd, numpy as np
def shear_array(df):
# This function just shears an array
# E.g. x = np.arange(9).reshape(3,3)
# shear_array(x)
library(data.table)

q <- c(0.001,
       0.002,
       0.003,
       0.003,
       0.004,
       0.004,
 0.005,
@cpfiffer
cpfiffer / streaming-turing.jl
Created March 3, 2020 14:19
Stream Turing samples onto disk as they come.
using Turing, MCMCChains
using AbstractMCMC
using JLD2, FileIO
import Random: GLOBAL_RNG
# Create a model.
@model model(y) = begin
μ ~ Normal(0, 1)
s ~ InverseGamma(2,3)
@jkrumbiegel
jkrumbiegel / distance_grid.jl
Created January 31, 2020 17:34
get a grid of distances and durations between one location and a grid of locations
using HTTP
using Dates
using Printf
using JSON
using DataFrames
using CSV
hbf_location = "53.5527704,10.0065856"
@jmiserez
jmiserez / export_google_music.js
Last active December 20, 2023 01:45
(fixed/updated 2016-05-10) Export your Google Music Library and Playlists (Google Play Music All Access) (see http://webapps.stackexchange.com/questions/50311/print-playlist-from-google-play-music for more)
// Copyright 2016 Jeremie Miserez <jeremie@miserez.org>
//
// MIT License
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O
@nickloewen
nickloewen / bret_victor-reading_list.md
Last active March 7, 2024 18:14
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★