I hereby claim:
- I am hlian on github.
- I am hao (https://keybase.io/hao) on keybase.
- I have a public key ASCf_0xWrJ2RajE5uHqk_tjPngCqpxLWFvaJYuqRvevlWQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| from slacker import Slacker | |
| import itertools | |
| slack = Slacker('<API TOKEN>') | |
| pages = slack.files.list(page=1).body['paging']['pages'] | |
| all_the_files = list(itertools.chain(*[slack.files.list(page=i).body['files'] for i in range(1,pages + 1)])) | |
| biggest_first = sorted(all_the_files, key=lambda f: f['size'], reverse=True) |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| module Singular where | |
| import BasePrelude hiding (fold) | |
| import Control.Monad.State |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE InstanceSigs #-} | |
| {-# OPTIONS_GHC -Wall -fwarn-incomplete-uni-patterns #-} | |
| module AS2 where |
| module D23 where | |
| import BasePrelude hiding ((&), lookup, loop) | |
| import Control.Lens | |
| import qualified Data.Vector as Vector | |
| import D23Input | |
| type State = (Int, Map Char Int, Vector Op) | |
| env :: Int -> State | |
| env i = (0, Map.empty & at 'a' ?~ i, input) |
| ==================================================================================== | |
| Lawful Neutral Chaotic | |
| ------------------------------------------------------------------------------------ | |
| Good Lisp Haskell Shell | |
| Neutral Java Perl | |
| Evil JavaScript | |
| ===================================================================================== |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| module Main where | |
| import Data.Text (Text) | |
| import Network.HTTP.Types (status200) | |
| import Network.Wai (Application, responseLBS) |
| import Data.ByteString | |
| import Network.Wreq | |
| main :: IO () | |
| main = do | |
| r <- postWith defaults "http://requestb.in/oqbxb4oq" empty | |
| print r |
| {"swagger":"2.0","info":{"version":"","title":""},"definitions":{"OptionTemplateAlgorithm":{"required":["name"],"type":"object","properties":{"name":{"type":"string"},"id":{"type":"integer"}}},"OptionIntAlgorithm":{"required":["name"],"type":"object","properties":{"name":{"type":"string"},"id":{"type":"integer"}}},"OptionDayPartAlgorithm":{"required":["name"],"type":"object","properties":{"name":{"type":"string"},"id":{"type":"integer"}}},"SelectorUTCTime":{"type":"object","description":"Could either be 'explicit', 'algorithmic', or empty","properties":{"algorithmic":{"maximum":9223372036854775807,"format":"int64","minimum":-9223372036854775808,"type":"integer"},"explicit":{"$ref":"#/definitions/UTCTime"}}},"SelectorTimeOfDay":{"type":"object","description":"Could either be 'explicit', 'algorithmic', or empty","properties":{"algorithmic":{"maximum":9223372036854775807,"format":"int64","minimum":-9223372036854775808,"type":"integer"},"explicit":{"$ref":"#/definitions/TimeOfDay"}}},"ExperimentVariantRevision":{ |
| #!/usr/bin/env stack | |
| -- stack --resolver lts-4.2 --install-ghc runghc --package file-embed --package aeson --package lens --package lens-aeson | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| module JSONBaby where | |
| import Control.Lens | |
| import Data.Aeson |