CREATE (:Value {value_ref: 42})
CREATE (:Value {value_ref: 1789})
CREATE (:Function)
MATCH (f:Function) WHERE id(f) = 33 SET f.function_name = "inc"
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| module Foo where | |
| import Control.Monad | |
| import qualified GHC.Generics as GHC | |
| import qualified Generics.SOP as SOP |
| import pandas as pd | |
| import math as math | |
| def loop(df, target): | |
| if df.columns.size > 1: | |
| gains = info_gains(df, target) | |
| res = max(gains, key=gains.get) | |
| df.groupby(res).apply(lambda v: loop(v, target)) |
| {-# LANGUAGE LambdaCase #-} | |
| {-# OPTIONS_GHC "-Wall" #-} | |
| import Data.Semigroup | |
| import Data.Char (toLower, isAlphaNum) | |
| import Data.List (group) | |
| import Data.Tagged (Tagged(..)) | |
| import Test.Tasty hiding (testGroup) | |
| import Test.Tasty.HUnit ((@=?), Assertion, testCase) | |
| import Test.Tasty.Options (IsOption (..)) |
| #!/usr/env/bin bash | |
| # vim: set ft=bash | |
| ROOT=$PWD | |
| read -r -d '' ADJECTIVES <<'EOF' | |
| agreeable | |
| brave | |
| calm |
| let | |
| # Use pinned packages | |
| _nixpkgs = import <nixpkgs> {}; | |
| nixpkgs = _nixpkgs.fetchFromGitHub | |
| ({ | |
| owner = "nmattia"; | |
| repo = "nixpkgs"; | |
| rev = "02359c639193103812f7356564326556cbb41ca4"; | |
| sha256= "1rg0czkxqynycw23v0dmk0vd2v17d6v3yr06bg23wqwpm3b5z0nd"; | |
| }); |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE InstanceSigs #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE NoMonomorphismRestriction #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE RebindableSyntax #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TupleSections #-} |
| # Store the nix-created `dist` in `localSrc/.nix-cache` after build (whether | |
| # successful or not) and re-injects it for subsequent builds. | |
| # | |
| # `./mask` should contain a haskell project with an `out.nix` file. That file | |
| # should describe a typical cabal derivation with the extra field: | |
| # | |
| # preUnpack = '' | |
| # localSrc=${toString ./.} | |
| # ''; | |
| # |
| {anyPkgs ? import <nixpkgs> { }}: | |
| let | |
| pkgs = import (anyPkgs.fetchFromGitHub { | |
| owner = "NixOS"; | |
| repo = "nixpkgs"; | |
| rev = "deec3c1dae62e8345451cd8c4ad41134ab95e88d"; | |
| sha256 = "1l951xzklxfi2c161mcrps9dfsq76sj8fgq8d60y093bry66d3yc"; | |
| }) {}; | |
| ghc = pkgs.haskell.compiler.ghc7103; | |
| # tweak haskellSrc2nix to disable (failing) tests |
| #!/usr/bin/env bash | |
| set -e | |
| the_pattern=$1 | |
| # We need to export because xargs runs in a subshell | |
| export the_file=$2 | |
| if [ -z "${the_pattern}" ]; then | |
| echo pattern missing |
CREATE (:Value {value_ref: 42})
CREATE (:Value {value_ref: 1789})
CREATE (:Function)
MATCH (f:Function) WHERE id(f) = 33 SET f.function_name = "inc"