(defun org-random-entry (&optional arg) “Select and goto a random todo item from the global agenda” (interactive “P”) (if org-agenda-overriding-arguments (setq arg org-agenda-overriding-arguments)) (if (and (stringp arg) (not (string-match “\S-” arg))) (setq arg nil)) (let* ((today (org-today)) (date (calendar-gregorian-from-absolute today)) (kwds org-todo-keywords-for-agenda) (lucky-entry nil)
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
language: haskell | |
dist: trusty | |
cache: | |
directories: | |
- $HOME/.cabal/packages | |
- $HOME/.cabal/store | |
- $HOME/.stack | |
- $TRAVIS_BUILD_DIR/.stack-work |
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
#!/usr/bin/env stack | |
-- stack --install-ghc runghc --resolver nightly-2018-08-17 -- -Wall -O2 | |
{-# LANGUAGE RoleAnnotations #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE DerivingVia #-} |
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
#!/usr/bin/env stack | |
-- stack --install-ghc runghc --resolver lts-11.9 --package backprop-0.2.2.0 --package numhask-prelude-0.0.4.1 --package numhask-0.2.1.0 -- -Wall -O2 | |
{-# LANGUAGE NoImplicitPrelude #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FlexibleInstances #-} |
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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE NoImplicitPrelude #-} |
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
{-# language DataKinds, PolyKinds, ScopedTypeVariables, UndecidableInstances, | |
FlexibleInstances, FlexibleContexts, GADTs, TypeFamilies, RankNTypes, | |
LambdaCase, TypeOperators, ConstraintKinds #-} | |
import GHC.TypeLits | |
import Data.Proxy | |
import Data.Singletons.Prelude | |
import Data.Singletons.Decide | |
import Data.Constraint |
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
{-# LANGUAGE Arrows #-} | |
import Prelude hiding ((.), id) | |
import Control.Arrow (Arrow(arr, first), ArrowChoice(left)) | |
import Control.Category (Category((.), id)) | |
import Control.Foldl | |
import Control.Monad ((>=>)) | |
import Control.Monad.Trans.State.Strict (get, put) | |
import Pipes |
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
{-# LANGUAGE RankNTypes #-} | |
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-unused-do-bind -fno-warn-unused-imports -fno-warn-orphans #-} | |
-- | |
-- Random walk emitter with go and stop button | |
-- | |
module Main where | |
import Control.Applicative |
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 Main where | |
import Control.Concurrent hiding (yield) | |
import Control.Concurrent.Chan | |
import Data.Char (chr) | |
import Data.Maybe | |
import Control.Monad | |
import Control.Monad.Random ( RandomGen, Rand, getRandomR, evalRandIO) | |
import Control.Monad.Trans.State.Strict (StateT, get, put, evalStateT) | |
import Data.List |
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
{-# LANGUAGE ExistentialQuantification #-} | |
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-unused-do-bind -fno-warn-unused-imports -fno-warn-orphans #-} | |
module Main where | |
import Control.Applicative | |
import Data.List (foldl') | |
import Data.Monoid | |
import Data.Strict.Tuple | |
import Prelude hiding (sum, length) |
NewerOlder