Skip to content

Instantly share code, notes, and snippets.

View rmcgibbo's full-sized avatar

Robert T. McGibbon rmcgibbo

View GitHub Profile
@rmcgibbo
rmcgibbo / install.md
Last active October 14, 2021 00:17
Scientific Python From Source, with MKL

Scientific Python From Source

This document will walk you through compiling your own scientific python distribution from source, without sudo, on a linux machine. The core numpy and scipy libraries will be linked against Intel MKL for maximum performance.

This procedure has been tested with Rocks Cluster Linux 6.0 (Mamba) and CentOS 6.3.

Compiling Python From Source

@rmcgibbo
rmcgibbo / mixture.gamma.py
Last active April 26, 2021 09:40
Fitting a mixture of gamma distributions.
import numpy as np
import scipy.special
from scipy.misc import logsumexp
def invpsi(y):
"""
Inverse digamma (psi) function. The digamma function is the
derivative of the log gamma function.
"""
# Adapted from matlab code in PMTK (https://code.google.com/p/pmtk3), copyright
@rmcgibbo
rmcgibbo / nixpkgs-review
Created March 24, 2021 17:37
system: x86_64-linux | build_time: a second | https://github.com/NixOS/nixpkgs/pull/117295
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
@rmcgibbo
rmcgibbo / nixFlakes
Created March 24, 2021 17:37
system: x86_64-linux | build_time: 50 minutes | https://github.com/NixOS/nixpkgs/pull/117295
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/wwlnj2kmyrrcw1r1s3n51p6nia59xb2p-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "autoreconfPhase" }
autoreconfPhase
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
@rmcgibbo
rmcgibbo / nix-update
Created March 24, 2021 17:37
system: x86_64-linux | build_time: a second | https://github.com/NixOS/nixpkgs/pull/117295
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
@rmcgibbo
rmcgibbo / nix-direnv
Created March 24, 2021 17:37
system: x86_64-linux | build_time: a moment | https://github.com/NixOS/nixpkgs/pull/117295
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/nzdrhpb4s4zl8kk86fv45i3aflb9brkz-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
@rmcgibbo
rmcgibbo / hydra-unstable
Created March 24, 2021 17:37
system: x86_64-linux | build_time: 40 seconds | https://github.com/NixOS/nixpkgs/pull/117295
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/bfpn2d2jylawzm1pm51can52i9crcjqc-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "autoreconfPhase" }
autoreconfPhase
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
@rmcgibbo
rmcgibbo / aws-sam-cli
Created March 21, 2021 22:07
system: x86_64-linux | build_time: a minute | https://github.com/NixOS/nixpkgs/pull/115742
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
@rmcgibbo
rmcgibbo / mint
Created March 20, 2021 16:22
system: x86_64-linux | build_time: 16 hours | https://github.com/NixOS/nixpkgs/pull/116981
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/q6s0c0srva5h5jhn8pj1p8fjn8va05vk-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
@rmcgibbo
rmcgibbo / mint
Created March 20, 2021 16:11
system: x86_64-linux | build_time: 15 hours | https://github.com/NixOS/nixpkgs/pull/116981
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/q6s0c0srva5h5jhn8pj1p8fjn8va05vk-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building