Skip to content

Instantly share code, notes, and snippets.

@o1lo01ol1o
o1lo01ol1o / ubuntu16_tensorflow_cuda8.sh
Created May 31, 2017 16:17 — forked from ksopyla/ubuntu16_tensorflow_cuda8.sh
How to set up tensorflow with CUDA 8 cuDNN 5.1 in virtualenv with Python 3.5 on Ubuntu 16.04 http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# This is shorthened version of blog post
# http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# update packages
sudo apt-get update
sudo apt-get upgrade
#Add the ppa repo for NVIDIA graphics driver
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
@o1lo01ol1o
o1lo01ol1o / script.fsx
Created June 2, 2017 23:04
Failing python deployment on VS2017 with MBrace
#I "../packages/MBrace.Thespian/tools"
#I "../packages/Streams/lib/net45"
#r "../packages/Streams/lib/net45/Streams.dll"
#I "../packages/Vagabond/lib/net45"
#r "../packages/Vagabond/lib/net45/Vagabond.dll"
#r "../packages/Vagabond/lib/net45/Vagabond.AssemblyParser.dll"
#I "../packages/MBrace.Flow/lib/net45"
#I "../packages/MBrace.Core/lib/net45"
#I "../packages/MBrace.Runtime/lib/net45"
#r "../packages/MBrace.Runtime/lib/net45/MBrace.Runtime.dll"
@o1lo01ol1o
o1lo01ol1o / gadtgraph.hs
Last active July 18, 2017 22:52
(Unsuccessful) Attempt at encoding type-level graph with constraints
--Pragmas are needed additionally for the project in which this snippet is included
{-# LANGUAGE TypeInType, DataKinds, PolyKinds, ScopedTypeVariables,
FlexibleInstances, FlexibleContexts, GADTs, TypeFamilies,
RankNTypes, LambdaCase, TypeOperators, TemplateHaskell,
ConstraintKinds, PolyKinds, NoImplicitPrelude,
UndecidableInstances, MultiParamTypeClasses, GADTSyntax,
AllowAmbiguousTypes, InstanceSigs, DeriveFunctor,
FunctionalDependencies #-}
-- Algebra.Graph is from the algebraic-graphs package
@o1lo01ol1o
o1lo01ol1o / keybase.md
Created November 9, 2017 15:36
keybase.md

Keybase proof

I hereby claim:

  • I am o1lo01ol1o on github.
  • I am o1lo01ol1o (https://keybase.io/o1lo01ol1o) on keybase.
  • I have a public key ASAohfPzXdT8Wyi8YU0niXf89Jq--Mei5gg4FDVPwtKnbAo

To claim this, I am signing this object:

@o1lo01ol1o
o1lo01ol1o / dataFamiliesVsTypeFamiliesVsGADTs.md
Last active December 6, 2017 22:14
Cheat sheet for haskell type level extenions.

To your other, more general question, "the uses of data families as distinct from type families and GADTs". Here's the space of possibilities: ​

  1. Is the type constructor generative and injective, and can it be partially applied?
  2. Is there a runtime tag passed along with the value to pattern match on?
  3. Can it be closed, can it be open? ​ And here's where GADTs and type/data families lie in this space: ​
@o1lo01ol1o
o1lo01ol1o / default.nix
Created April 27, 2018 21:58
transient-universe and nix
# default.nix
{}:
(import ./reflex-platform{}).project ({ pkgs, ... }:
{
packages = {
common = ./common;
backend = ./backend;
frontend = ./frontend;
@o1lo01ol1o
o1lo01ol1o / ghcopts.cabal
Created July 28, 2018 20:41
ghc warning flags
# ghc-options:
# - -Weverything
# - -Wno-missing-exported-signatures # missing-exported-signatures turns off the more strict -Wmissing-signatures. See https://ghc.haskell.org/trac/ghc/ticket/14794#ticket
# - -Wno-missing-import-lists # Requires explicit imports of _every_ function (e.g. '$'); too strict
# - -Wno-missed-specialisations # When GHC can't specialize a polymorphic function. No big deal and requires fixing underlying libraries to solve.
# - -Wno-all-missed-specialisations # See missed-specialisations
# - -Wno-unsafe # Don't use Safe Haskell warnings
# - -Wno-missing-local-signatures # Warning for polymorphic local bindings. Don't think this is an issue
# - -Wno-monomorphism-restriction # Don't warn if the monomorphism restriction is used
traverseConcurrentlyWith :: Traversable f => Int -> (a -> IO b) -> f a -> IO (f b)
traverseConcurrentlyWith count f t0 = do
(queue, t1) <- atomically $ do
queueDList <- newTVar id
t1 <- for t0 $ \x -> do
res <- newEmptyTMVar
modifyTVar queueDList (((x, res):) .)
pure . atomically $ takeTMVar res
dlist <- readTVar queueDList
queue <- newTVar $ dlist []
@o1lo01ol1o
o1lo01ol1o / .spacemacs
Last active October 31, 2018 19:48
nixos CI pipes
;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
@o1lo01ol1o
o1lo01ol1o / Readme.md
Last active November 7, 2018 05:33
Axiom and Reflex project skeleton