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
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) |
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 GADTs #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# OPTIONS_GHC -Wall -fwarn-incomplete-uni-patterns #-} | |
module AS2 where |
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 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) |
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
{"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":{ |
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
#!/bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
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 ruby | |
%w{rubygems hmac-sha1 base64 cgi net/https uri openssl}.each{ |f| require f } | |
KEY = '<YOUR KEY>'; | |
SECRET = '<YOUR SECRET>'; | |
# encodes strings that make twitter oauth happy | |
def encode( string ) | |
URI.escape( string, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]") ).gsub('*', '%2A') | |
end |