Skip to content

Instantly share code, notes, and snippets.

View georgemarrows's full-sized avatar

George Marrows georgemarrows

  • Brussels, Belgium
View GitHub Profile
@georgemarrows
georgemarrows / perf.md
Last active April 11, 2017 14:03
Performance improvements for Julia Diagonal * Vector etc

Performance tests for JuliaLang/julia#21302

begin
    n = 1000
    mats = [ (Diagonal(randn(n)),
              randn(n, n)),

             (Diagonal(randn(n) + im * randn(n)),
              randn(n, n) + im*randn(n, n)),
@georgemarrows
georgemarrows / __notes.md
Last active October 5, 2016 19:32
Attempt at providing an `llvm39` homebrew formula for homebrew-versions

This is currently just a light SHA update of the current llvm formula, which is at 3.8.1. Not surprisingly it ends up looking a lot like Godin's update of llvm to 3.9.0 here: Homebrew/homebrew-core#4579 . LLVM switched to CMake-based builds after 3.8. This is why I haven't adapted the current llvm38 formula because it (probably) requires a good bit of changing to move it over from autoconfig.

Current status

  • brew install llvm39 builds to completion - see _latest_build.txt
  • creates /usr/local/opt/llvm39 directory as a symlink to /usr/local/Cellar/llvm39/3.9.0/
  • brew test llvm39 fails on the first C++ build with problems finding stdarg.h - see _test_failure.txt
{
"tilejson":"2.0.0",
"tiles":["http://services.arcgisonline.com/arcgis/rest/services/Demographics/USA_Population_Density/MapServer/WMTS/?Layer=0&Style=default&TileMatrixSet=EPSG:3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix={z}&TileCol={x}&TileRow={y}"]
}
@georgemarrows
georgemarrows / hash_clash.rb
Last active December 29, 2015 03:39
See hash_clash.rb for a description
# Produces a histogram illustrating key collisions.
# A round consists of repeatedly drawing a value from 0..255
# until we first see a duplicate value. We count how many draws
# were needed to hit that first duplicate.
# Repeat for 1 million rounds, then draw a histogram showing
# num draws vs num rounds with that num draws.
#
# English escapes me - just read the code!
#
# Written to illustrate comments in this article