We will be comparing the following DB libraries:
- HRR
- Opaleye
- Persistent + Esqueleto
- Groundhog
- postgresql-simple (and postgresql-transactional)
let | |
nixpkgs-src = builtins.fetchTarball { | |
# master of 2021-01-05. | |
url = "https://github.com/NixOS/nixpkgs/archive/1a57d96edd156958b12782e8c8b6a374142a7248.tar.gz"; | |
sha256 = "1qdh457apmw2yxbpi1biwl5x5ygaw158ppff4al8rx7gncgl10rd"; | |
}; | |
pkgs = import nixpkgs-src { | |
config = { | |
# allowUnfree may be necessary for some packages, but in general you should not need it. |
# This file is an example of overriding a GHC core Haskell library (like | |
# bytestring, containers, text, unix, etc) when building a Haskell package. | |
let default-nixpkgs = | |
builtins.fetchTarball { | |
# nixpkgs haskell-updates branch as of 2019/09/15. | |
url = "https://github.com/NixOS/nixpkgs/archive/a51b3367ab6acc72630da0bad50ce14fa86996d0.tar.gz"; | |
sha256 = "05d3jxxk5dxzs9b3nan16lhkrjnzf0bjd4xy66az86fsafnrr9rd"; | |
}; | |
in |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GADTs #-} |
$ nix build -L .#pkgsMusl.postgresql
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/j76apgvazybh6fhiif7yj67xnfj6x7fr-postgresql-13.4.tar.bz2
source root is postgresql-13.4
setting SOURCE_DATE_EPOCH to timestamp 1628543016 of file postgresql-13.4/INSTALL
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/zv4waczq5k45138d2sdy7dyidas90lhh-disable-resolve_symlinks-94.patch
with import <nixpkgs> {}; | |
let | |
packageSet = fetchurl { | |
url = "https://github.com/purescript/package-sets/releases/download/psc-0.14.4-20210905/packages.dhall"; | |
# The hash below is a base64-encoded version of the base-16 hash that is | |
# specified in our local packages.dhall file: | |
# ``` | |
# $ cat packages.dhall | |
# let upstream = |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE PolyKinds #-} |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Monad.Except | |
import Control.Monad.State | |
import Control.Monad.Writer | |
import Data.Functor.Identity | |
import Data.Text (Text) |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Example where | |
import Control.Concurrent.MVar | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans.Cont | |
import Data.Foldable | |
import Data.Monoid |
This gist contains a shell.nix
file that can be used to create a Python environment for running training jobs in the GCP AI Platform.
This is specifically for the following tutorial:
https://cloud.google.com/ai-platform/docs/getting-started-keras
This uses code from https://github.com/GoogleCloudPlatform/cloudml-samples in the census/tf-keras
directory.