Skip to content

Instantly share code, notes, and snippets.

from __future__ import print_function
import os
import sys
import zipfile
import requests
def main(argv):
@max-mapper
max-mapper / datagovmetadata.json
Created February 14, 2017 21:54
EOP-GOV Metadata
{"help": "https://catalog.data.gov/api/3/action/help_show?name=package_search", "success": true, "result": {"count": 48, "sort": "views_recent desc", "facets": {}, "results": [{"license_title": "License not specified", "maintainer": "New Media", "relationships_as_object": [], "private": false, "maintainer_email": "newmedia@whitehouse.gov", "num_tags": 5, "id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "metadata_created": "2016-07-02T10:06:26.199575", "metadata_modified": "2016-07-02T10:06:26.199575", "author": null, "author_email": null, "state": "active", "version": null, "creator_user_id": "47303a9e-1187-4290-85a3-1fc02dc49e4a", "type": "dataset", "resources": [{"cache_last_updated": null, "package_id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "webstore_last_updated": null, "id": "3a8a0ad1-19e7-4153-bb2f-d70cf88aaaf8", "size": null, "state": "active", "hash": "", "description": "", "format": "CSV", "tracking_summary": {"total": 32, "recent": 1}, "last_modified": null, "url_type": null, "no_real_name": "True",
@laurenancona
laurenancona / twitterUserInfoFunctions.gs
Last active November 19, 2021 12:51
Add custom functions to a Google sheet to pull user info directly from Twitter REST API
// Based on script by @SarahMarshall here:
// http://sarahmarshall.io/post/70812214349/how-to-add-twitter-follower-counts-to-a-google
var id = '@username'; // Replace with your username, then delete this line after running script 1st time
var CONSUMER_KEY = 'INSERT CONSUMER KEY'; // Create an application at https://dev.twitter.com
var CONSUMER_SECRET = 'INSERT CONSUMER SECRET'; // Create an application at https://dev.twitter.com
function getTwitterUserFollowers(id) {