I hereby claim:
- I am alexwlchan on github.
- I am alexwlchan (https://keybase.io/alexwlchan) on keybase.
- I have a public key whose fingerprint is 82FE A59D 07EE 6274 20D7 E85D F859 A49F A148 6C23
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| # -*- encoding: utf-8 -*- | |
| """ | |
| Utility functions for dealing with URL query strings in Python, | |
| i.e., URLs of the form | |
| http://example.net?field1=value1&field2=value2 | |
| This module includes a pair of helper functions: one for getting the values | |
| associated with a particular field; another for setting the query string |
| import json | |
| import httpx | |
| import keyring | |
| # 1. Retrieve the Wikimedia API token from the system keychain | |
| api_token = keyring.get_password("flickypedia_backfillr_bot", "api_token") | |
| # 2. Create an HTTP client | |
| client = httpx.Client( |
| #!/usr/bin/env python | |
| """ | |
| This is a script designed to be "safe" drop-in replacements for the | |
| shutil move() and copyfile() functions. | |
| These functions are safe because they should never overwrite an | |
| existing file. In particular, if you try to move/copy to dst and | |
| there's already a file at dst, these functions will attempt to copy to | |
| a slightly different (but free) filename, to avoid accidental data loss. |
| #!/usr/bin/env python | |
| import urllib2 | |
| import json | |
| HOSTNAME = "example.tumblr.com" | |
| API_KEY = "abcdefg" | |
| URL = "http://api.tumblr.com/v2/blog/{host}/posts?api_key={key}".format(host=HOSTNAME, key=API_KEY) |
| #!/usr/bin/python | |
| """elapsed.py - a script for providing a human-readable string of how much time | |
| has elapsed since a given date, implemented only using the standard library. | |
| Modelled on the style of dates used on Stack Overflow posts. | |
| """ | |
| from datetime import datetime, timedelta | |
| def print_date(date, incl_year=True, short_months=True): | |
| """Prints a datetime object as a full date, stripping off any leading |
| { | |
| "version": 4, | |
| "terraform_version": "1.0.9", | |
| "serial": 1, | |
| "lineage": "693cb572-091c-756e-8b64-65f51416d352", | |
| "outputs": {}, | |
| "resources": [ | |
| { | |
| "mode": "managed", | |
| "type": "aws_s3_bucket", |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| # -*- encoding: utf-8 -*- | |
| """I have a TaskPaper file I keep in Dropbox that contains some tasks for my | |
| daily routine. | |
| This script runs once a day and resets every item on that list, removing | |
| the @done tag and replacing the file. | |
| """ |
| // auto_collapse_deferred_items.js | |
| // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| // | |
| // This script collapses any projects with the @defer tag in the frontmost | |
| // window. Useful for tidying up the window, so I don't have to see the | |
| // detail associated with those projects. | |
| 'use strict' | |
| function TaskPaperCollapseDeferredItems(editor, options) { |