This file contains hidden or 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 python | |
import sys | |
import time | |
import os | |
import subprocess | |
def main(): | |
if sys.argv[1:] == ["path", "--project-root", "--verbosity", "silent"]: | |
print "/home/tom/src/intero" |
This file contains hidden or 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
$ cat .git/config | |
... | |
[diff "nixops"] | |
textconv = nixops export -s | |
$ cat .gitattributes | |
production/secrets/**/* filter=git-crypt diff=nixops | |
This file contains hidden or 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
{%- extends 'full.tpl' -%} | |
{%- block input_group -%} | |
{%- endblock input_group -%} |
This file contains hidden or 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
{ fetchurl, stdenv }: | |
stdenv.mkDerivation rec { | |
name = "pies-1.2"; | |
src = fetchurl { | |
url = "mirror://gnu/pies/${name}.tar.bz2"; | |
sha256 = "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"; | |
}; |
This file contains hidden or 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
import numpy | |
import timeit | |
import numba | |
@numba.autojit(locals=dict( | |
best_k=numba.int64, | |
pos=numba.int64, | |
ins_del_count=numba.int64, | |
i=numba.int64, | |
j=numba.int64, |
This file contains hidden or 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
-- NO ! | |
record :: (Show a, Show label, MonadIO m) => label -> Pipe a a m () | |
record label = do | |
x <- await | |
print (label, x) | |
yield x | |
-- yes: | |
record :: (Show a, Show label, MonadIO m) => label -> Pipe a a m () | |
record label = do |
This file contains hidden or 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 OverloadedStrings #-} | |
module Main where | |
import Control.Concurrent (forkIO) | |
import Control.Monad (forever) | |
import Network.Wai.Handler.Warp (run) | |
import Network.Wai.Handler.WebSockets as WaiWS | |
import Network.WebSockets (acceptRequest, receiveDataMessage, sendTextData, PendingConnection, defaultConnectionOptions, DataMessage(..)) | |
import Data.ByteString.Lazy (ByteString) |
This file contains hidden or 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
$ nix-shell -p "haskell.packages.ghcjs.ghcWithPackages (pkgs: [pkgs.reflex-dom])" |
This file contains hidden or 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
import Reactive.Banana (compile) | |
import Reactive.Banana.Frameworks (newAddHandler, fromAddHandler, actuate, reactimate) | |
import Control.Concurrent (threadDelay, forkIO) | |
import Control.Monad (forever) | |
import Data.Char (toUpper) | |
main = do | |
-- newAddHandler returns an AddHandler (roughly a callback) and a | |
-- way to fire the callback (fire). | |
(es, fire) <- newAddHandler |
This file contains hidden or 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
import Data.ReactiveValue ((=:>), ReactiveFieldWrite(..), ReactiveFieldRead(..)) | |
import Hails.Polling (pollingReactive) | |
main :: IO () | |
main = do | |
hello <- pollingReactive (return "hello") (Just 1000000) | |
let out = ReactiveFieldWrite print | |
hello =:> out | |
getLine >> return () |