Skip to content

Instantly share code, notes, and snippets.

@Daan-Grashoff
Daan-Grashoff / google_search_maps_addon.js
Last active April 28, 2024 05:43
Bring back the google maps button when searching on google
// ==UserScript==
// @name Google maps addon
// @namespace http://tampermonkey.net/
// @version 2024-03-21
// @description Bring google maps button back
// @author You
// @match https://www.google.com/search*
// @include https://www.google.tld/search*
// @icon https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png
// @grant none
"""
estimate_coeffs
August, 2015
Anna C. Gilbert
input: xs = samples of signal
Λ = list of (freq,coeff) pairs in current approx
Ω = list of (freq,coeff) pairs found in this iteration
k = length of short filter
ENV["MOCHA_USE_CUDA"] = "true"
using HDF5, JLD, Mocha
X = Array[]
push!(X, rand(Float32, 128,11*129,1,1))
y = Array[]
push!(y, rand(Float32, 128, 129, 1, 1))
#data_layer = AsyncHDF5DataLayer("train", "train.txt", 128, 1000, [:features, :targets], false, [])
@daien
daien / simplex_projection.py
Created October 8, 2011 16:56
Compute Euclidean projections on the simplex or L1-ball
""" Module to compute projections on the positive simplex or the L1-ball
A positive simplex is a set X = { \mathbf{x} | \sum_i x_i = s, x_i \geq 0 }
The (unit) L1-ball is the set X = { \mathbf{x} | || x ||_1 \leq 1 }
Adrien Gaidon - INRIA - 2011
"""