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 #-} | |
| import qualified Data.Text as T | |
| import qualified Data.Text.IO as T | |
| import Data.Time | |
| import System.Exit | |
| import System.IO.Error | |
| import System.Locale | |
| format :: String | |
| format = "%Y-%m-%d %H:%M:%S,%q" |
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
| {- | |
| you need the memoize cabal package to use this. | |
| http://hackage.haskell.org/package/memoize-0.3 | |
| -} | |
| import System.IO.Unsafe | |
| import System.Posix.Files | |
| import System.Posix.Types | |
| import Data.Function.Memoize | |
| import Debug.Trace |
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 runghc | |
| import System.Environment | |
| import Control.Monad.Writer | |
| import Control.Applicative | |
| mySum :: (Num a, Show a) => [a] -> Writer [String] a | |
| mySum [] = return 0 | |
| mySum (x:xs) = censor ((show x):) ((x+) <$> mySum xs) | |
| main = 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 GeneralizedNewtypeDeriving, GADTs, StandaloneDeriving #-} | |
| import Control.Monad.Identity | |
| import Control.Monad.Reader | |
| import Control.Monad.Writer | |
| import Control.Monad.Error | |
| import Control.Applicative | |
| import Data.Map | |
| import Prelude hiding (lookup, log) | |
| type Name = String |
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
| require 'formula' | |
| class GtkMacIntegration < Formula | |
| homepage 'https://live.gnome.org/GTK+/OSX' | |
| url 'ftp://ftp.gnome.org/pub/gnome/sources/gtk-mac-integration/2.0/gtk-mac-integration-2.0.1.tar.xz' | |
| version '2.0.1' | |
| sha1 '9d939a2e4fb6c0ab4fe3d544ac712a152451249a' | |
| head 'git://git.gnome.org/gtk-mac-integration' | |
| depends_on 'pkg-config' => :build |
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
| -- tst | |
| import Control.Concurrent.Chan | |
| import Control.Concurrent | |
| import Control.Exception (finally) | |
| import System.IO.Unsafe (unsafePerformIO) | |
| type Result = Int | |
| execute_pig::String-> IO Result |
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
| while true; do | |
| echo "hlogster.test.count $i $(date +%s)" | /opt/graphite/bin/carbon-client.py localhost:2003:a; | |
| echo $i | |
| i=$((i+1)) | |
| i=$((i%10)) | |
| sleep 1 | |
| done |
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
| from kazoo.client import KazooClient | |
| config = { | |
| 'consumer_group': '<%= @consumer_group %>', | |
| 'topic': '<%= @topic %>' | |
| } | |
| def main(): | |
| zk = KazooClient() | |
| zk.start() |
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.PSQueue | |
| data Element = E Int String deriving (Show) | |
| type Buffer = PSQ Int Element | |
| instance Eq Element where | |
| (E a _) == (E b _) = a == b | |
| instance Ord Element where | |
| (E a _) < (E b _) = a < b |
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
| {badmatch, | |
| {error, | |
| {{{function_clause, | |
| [{rabbit_queue_index,journal_minus_segment1, | |
| [{no_pub,del,ack},undefined]}, | |
| {rabbit_queue_index,'-journal_minus_segment/2-fun-0-',4}, | |
| {array,sparse_foldl_3,7}, | |
| {array,sparse_foldl_2,9}, | |
| {rabbit_queue_index,'-recover_journal/1-fun-0-',1}, | |
| {dict,map_bucket,2}, |