Skip to content

Instantly share code, notes, and snippets.

use flake
@MMesch
MMesch / flake.lock
Created March 15, 2023 09:51
a jupyenv configuration for a bug report
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
@MMesch
MMesch / score-illustration.ipynb
Created December 7, 2020 19:55
Illustration of Monad-Bayes score function
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MMesch
MMesch / README.md
Created September 11, 2020 20:51
vega-cli and vega-lite packaged for nix (with node2nix)

This is packaging the vega command line tools for nix (https://vega.github.io/vega/usage/#cli). Vega is a handy declarative visualization tool and this cli allows to convert vega specifications directly to svg/pdf/png instead of looking at them online.

Basically what I did was to run:

nix-shell -p nodePackages.node2nix --command "node2nix -i <(echo '[\"vega-cli\", \"vega-lite\"]')"

Then I added a few extra dependencies to the generated default.nix such that the last lines look like this:

#!/usr/bin/env nix-shell
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/977000f149bd4ddb65bf1af09552898a0f305c72.tar.gz
#! nix-shell -i bash
#! nix-shell -p texlive.combined.scheme-small
#! nix-shell -p pandoc
export TEXINPUTS=~"./myclass/":$TEXINPUTS
pandoc README.md --listings -o README.pdf
@MMesch
MMesch / shell.nix
Last active July 29, 2023 17:25
a development shell for inkscape
{ pkgs ? import (builtins.fetchGit {
url = https://github.com/nixos/nixpkgs/;
rev = "ec97c20fff7fac51dc3eb3f2d91ff7f0376c8c8f";
}) {} }:
let
python3Env = pkgs.python37.withPackages(ps: with ps;
[ pytest ipdb pylint numpy lxml scour pyserial ]);
in
pkgs.stdenv.mkDerivation {
@MMesch
MMesch / haskell-overlay.nix
Last active January 14, 2020 12:06
data Haskell jupyter shell: hasktorch + hmatrix + monad-bayes + hvega + others
_: pkgs:
let
ihaskellSrc = pkgs.fetchFromGitHub {
owner = "gibiansky";
repo = "IHaskell";
rev = "2318ee2a90cfc98390651657aec434586b963235";
sha256 = "0svjzs81i77s710cfb7pxkfdi979mhjazpc2l9k9ha752spz04cj";
};
@MMesch
MMesch / MonadBayesImplementation.ipynb
Created January 13, 2020 15:07
monad-bayes walkthrough
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MMesch
MMesch / .gistup
Created January 13, 2020 15:06
monad-bayes walkthrough
gistup
@MMesch
MMesch / docker-compose.yml
Created June 19, 2019 19:33
elasticsearch neo4j dejavu tomcat docker compose file
version: '2.0'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.1
container_name: elasticsearch
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1