Skip to content

Instantly share code, notes, and snippets.

@choffstein
choffstein / entropy_pooling.py
Last active February 3, 2024 21:09
Attilio Meucci's Entropy Pooling
import numpy
import scipy.optimize
import pandas
def probability_constraint(x):
j, n = x.shape
Aeq = numpy.ones([1, j])
beq = numpy.array([1.])
@tobi
tobi / kindle.rb
Last active September 25, 2022 02:37
Download your Kindle Highlights to local markdown files. Great for Obsidian.md.
#!/usr/bin/env ruby
# gem install active_support
require 'active_support/inflector'
require 'active_support/core_ext/string'
# gem install webrick (only ruby3)
require 'webrick'
# gem install mechanize
@sargonas
sargonas / cryptoPortfolio.gs
Last active April 5, 2022 13:27
crypto portfolio import for google sheets
/////////////////////////
//Section 1: Coin Value//
/////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
//coin market value lookup (works for all coins, just pass a single coin symbol as a parameter)
function getCoinPriceBySymbol(symbol) {
var url = 'https://api.coinmarketcap.com/v1/ticker/';
var response = UrlFetchApp.fetch(url);
var json = JSON.parse(response.getContentText());