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
// Create a dummy analytics object until real loaded | |
window.analytics || (window.analytics = []); | |
window.analytics.methods = ['identify', 'track', 'trackLink', 'trackForm', 'trackClick', 'trackSubmit', 'page', 'pageview', 'ab', 'alias', 'ready', 'group', 'on', 'once', 'off']; | |
window.analytics.factory = function(method) { | |
return function() { | |
var args = Array.prototype.slice.call(arguments); | |
args.unshift(method); | |
window.analytics.push(args); | |
return window.analytics; | |
}; |
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) |