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 OverloadedStrings #-} | |
module Main where | |
import Web.Scotty | |
import Control.Monad | |
import Control.Monad.Trans | |
import qualified Control.Monad.Trans.Resource as RT | |
import Control.Concurrent (threadDelay) |
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 System.Environment (getArgs) | |
import Control.Monad | |
import qualified Data.ByteString.Lazy.Char8 as BSL | |
import Network.AMQP | |
connect = do |
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
import logging | |
import pika | |
from myjson import json_dumps | |
LOGGING = { | |
'version': 1, | |
'handlers': { | |
'amqp': { | |
'()': 'utils.log.PikaHandler', |
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 OverloadedStrings, ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances, UndecidableInstances #-} | |
module PGSParseable where | |
import qualified Data.Attoparsec.Text as AP | |
import Data.Typeable (Typeable) | |
import qualified Data.Text as T | |
import Data.Text (Text) | |
import Data.Text.Encoding (decodeUtf8) |
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
""" | |
Or should i use bass-ackwards definitions?.. http://pika.readthedocs.org/en/0.9.6/examples/comparing_publishing_sync_async.html | |
""" | |
import pika | |
pika_conn = 'amqp://guest:guest@localhost:5672/%2F' | |
def call(uri, service, method, **query): |
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
-- * Stuff | |
import Database.SQL (connectDB, dbquery) | |
import Database.Cache (cacheGet, cacheSet) | |
import Network.SOAP (soap) | |
import Control.Monad (guard) | |
type Oven = String | |
type Product = String |
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
\documentclass{article} | |
\usepackage[utf8]{inputenc} | |
\title{42} | |
\author{Jane Doe} | |
\date{June 2011} | |
\usepackage{natbib} | |
\usepackage{graphicx} |
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
{ | |
"folders": | |
[ | |
{ | |
"path": "", | |
"folder_exclude_patterns": ["cabal-dev", "dist"] | |
} | |
], | |
"build_systems": | |
[ |
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
import Graphics.UI.Gtk | |
main :: IO () | |
main = do | |
initGUI | |
window <- windowNew | |
button <- buttonNew | |
set window [ containerBorderWidth := 10 | |
, containerChild := button ] | |
set button [ buttonLabel := "Hello World" ] |
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
#!../venv/bin/python | |
import pika, pprint, json | |
import time | |
import logging | |
logging.basicConfig() | |
def jsonlog(channel, method_frame, header_frame, body): | |
msg = json.loads(body) |