This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Composable(object): | |
''' A function decorator that allows you to use Haskell style dot notation for function composition ''' | |
fns = {} | |
def __init__(self, fn): | |
self.fn = fn | |
Composable.fns[fn.__name__] = fn | |
def __call__(self, *args, **kwargs): | |
''' simply calls the function ''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Module directly collated from | |
http://nbviewer.ipython.org/github/adrn/ipython/blob/1.x/examples/notebooks/Importing%20Notebooks.ipynb | |
""" | |
import io, os, sys, types | |
from IPython.nbformat import current | |
from IPython.core.interactiveshell import InteractiveShell | |
def find_notebook(fullname, path=None): | |
"""find a notebook, given its fully qualified name and an optional path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sorting where | |
-- See https://www.twanvl.nl/blog/agda/sorting | |
open import Level using () renaming (zero to ℓ₀;_⊔_ to lmax) | |
open import Data.List hiding (merge) | |
open import Data.List.Properties | |
open import Data.Nat hiding (_≟_;_≤?_) | |
open import Data.Nat.Properties hiding (_≟_;_≤?_;≤-refl;≤-trans) | |
open import Data.Nat.Logarithm | |
open import Data.Nat.Induction |