Skip to content

Instantly share code, notes, and snippets.

View risicle's full-sized avatar

Robert Scott risicle

View GitHub Profile
@risicle
risicle / src-inspector.nix
Last active June 26, 2022 13:08
src-inspector.nix
{ lib, stdenv, unzip, toInspect }:
builtins.mapAttrs (
name: value: let
res = builtins.tryEval value.src or null;
in if (builtins.match "" name) != null && res.success && res.value != null then (stdenv.mkDerivation {
inherit name;
src = res.value;
sourceRoot = ".";
@risicle
risicle / _flapackmodule.c
Created March 11, 2022 22:50
scipy flapack intermediate files generated with numpy 468142495461319f06a8debf57a3c0aa2703f9df (bad)
This file has been truncated, but you can view the full file.
/* File: _flapackmodule.c
* This file is auto-generated with f2py (version:1.21.99).
* f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
* written by Pearu Peterson <pearu@cens.ioc.ee>.
* Generation date: Fri Feb 4 14:45:41 2022
* Do not edit this file directly unless you know what you are doing!!!
*/
#ifdef __cplusplus
extern "C" {
@risicle
risicle / _flapackmodule.c
Created March 11, 2022 22:45
scipy flapack intermediate files generated with numpy 26e656e7989e776a9292b9eba88cef7ec9fec5cb (good)
This file has been truncated, but you can view the full file.
/* File: _flapackmodule.c
* This file is auto-generated with f2py (version:1.21.99).
* f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
* written by Pearu Peterson <pearu@cens.ioc.ee>.
* Generation date: Fri Feb 4 14:45:41 2022
* Do not edit this file directly unless you know what you are doing!!!
*/
#ifdef __cplusplus
extern "C" {
#0 dlar1v (n=10, b1=1, bn=10, lambda=6.206329040168803e-15, d=..., l=..., ld=..., lld=..., pivmin=2.2250738585072014e-308, gaptol=0, z=..., wantnc=.TRUE., negcnt=0, ztz=<optimized out>, mingma=6.3108872417680944e-30, r=8, isuppz=..., nrminv=3.6057425056094288, resid=1.4901161193847656e-08, rqcorr=2.0984948872810358, work=...)
at dlar1v.f:405
#1 0x0000000017cc6ed9 in dlarrv (n=10, vl=-0.34647963093462386, vu=3.6057425056094288, d=..., l=..., pivmin=2.2250738585072014e-308, isplit=..., m=10, dol=1, dou=10, minrgp=0.001, rtol1=1.4901161193847656e-08, rtol2=7.4505805969238283e-11, w=..., werr=..., wgap=..., iblock=..., indexw=..., gers=..., z=..., ldz=10, isuppz=...,
work=..., iwork=..., info=0) at dlarrv.f:875
#2 0x0000000017d40767 in dstemr (jobz=..., range=..., n=10, d=..., e=..., vl=0, vu=1, il=1, iu=10, m=10, w=..., z=..., ldz=10, nzc=10, isuppz=..., tryrac=.FALSE., work=..., lwork=330, iwork=..., liwork=100, info=0, _jobz=1, _range=1) at dstemr.f:669
#3 0x0000000017d005df in dsyevr (jobz=..., r
#0 0x00000000174ef025 in dlar1v_ () from /nix/store/413dlxvbzrsfaakf00ffsgw7f1qapx3f-lapack-3/lib/liblapack.so.3
#1 0x00000000174f5ed9 in dlarrv_ () from /nix/store/413dlxvbzrsfaakf00ffsgw7f1qapx3f-lapack-3/lib/liblapack.so.3
#2 0x000000001756f767 in dstemr_ () from /nix/store/413dlxvbzrsfaakf00ffsgw7f1qapx3f-lapack-3/lib/liblapack.so.3
#3 0x000000001752f5df in dsyevr_ () from /nix/store/413dlxvbzrsfaakf00ffsgw7f1qapx3f-lapack-3/lib/liblapack.so.3
#4 0x00000000273b45e1 in f2py_rout.flapack_dsyevr () from /nix/store/gmcby9wc7c5agdilcqq8ngzvn0psz2gy-python3.9-scipy-1.8.0/lib/python3.9/site-packages/scipy/linalg/_flapack.cpython-39-x86_64-linux-gnu.so
#5 0x0000000004906aa9 in _PyObject_Call (kwargs=<optimized out>, args=(), callable=<fortran at remote 0x13e90720>, tstate=0x50589e0) at Objects/call.c:281
#6 PyObject_Call (callable=<fortran at remote 0x13e90720>, args=(), kwargs=<optimized out>) at Objects/call.c:293
#7 0x00000000048bbe0d in do_call_core (kwdict={'a': <numpy.ndarray at remote 0x40eb8900>,
@risicle
risicle / netplan-to-nixos.jq
Created May 2, 2021 21:18
jq expression to turn netplan yaml configs into nixos network configurations, supporting bonding and vlans
{
systemd: {
network: {
netdevs: (
.network.ethernets | with_entries(.value |= {
netdevConfig: {Name: ."set-name"},
matchConfig: {MACAddress: .match.macaddress}
})
)
}
@risicle
risicle / word2vec.fail
Last active September 17, 2020 22:18
macos 10.14 failures
=================================== FAILURES ===================================
____________________________ test_run_word2clusters ____________________________
@pytest.mark.data
def test_run_word2clusters():
> word2vec.word2clusters(input_text, output_clusters, 10)
word2vec/tests/test_core.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
word2vec/scripts_interface.py:182: in word2clusters
@risicle
risicle / local.nix
Created September 9, 2020 12:47
will use `pkgs`-provided aws-vault if >= 5.0.0, otherwise will substitute its own 6.0.0 (defined elsewhere)
args: oldAttrs: let
aws-vault = if
(builtins.compareVersions (builtins.parseDrvName args.pkgs.aws-vault.name).version "5.0.0") != -1 then args.pkgs.aws-vault
else (import ../aws-vault-6.nix {
inherit (args.pkgs) buildGoModule fetchFromGitHub;
inherit (args.pkgs.stdenv) lib;
});
in oldAttrs // {
buildInputs = oldAttrs.buildInputs ++ [
args.pkgs.vim
@risicle
risicle / aws-vault-6.nix
Created September 9, 2020 12:44
aws-vault 6.0.0 for nixpkgs 20.03
{ buildGoModule, lib, fetchFromGitHub }:
buildGoModule rec {
pname = "aws-vault";
version = "6.0.0";
src = fetchFromGitHub {
owner = "99designs";
repo = pname;
rev = "v${version}";
sha256 = "0ssm58ksk5jb28w1ipa57spzf6wixjy1m7flw61ls8k86cy7qb7c";
{ stdenv, buildGo116Module, aws-vault, makeWrapper, yubikey-manager, git }:
buildGo116Module rec {
pname = "gds-cli";
version = "5.1.0";
src = (builtins.fetchGit {
url = "ssh://git@github.com/alphagov/gds-cli.git";
ref = "v${version}";
rev = "b6f70d89f9055f76a76607422e8caba137c2a22e";
});