I hereby claim:
- I am codersquid on github.
- I am codersquid (https://keybase.io/codersquid) on keybase.
- I have a public key whose fingerprint is 73BE 52A0 5FC7 5DAC 8EAC 2911 E5FF 3C81 AD16 8F70
To claim this, I am signing this object:
{I hereby claim:
To claim this, I am signing this object:
{| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from __future__ import unicode_literals | |
| import json | |
| from steve.util import ( | |
| get_from_config, | |
| get_project_config, | |
| save_json_files | |
| ) | |
| from apiclient.discovery import build |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import re | |
| def match_doi(query): | |
| """ match doi from query """ | |
| # pattern is from a very helpful SO question. I <3 SO | |
| # http://stackoverflow.com/questions/27910/finding-a-doi-in-a-document-or-page | |
| match = re.search(r'\b(10[.][0-9]{4,}(?:[.][0-9]+)*/(?:(?!["&\'<>])\S)+)\b', query) |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import datetime | |
| import internetarchive as ia | |
| import os | |
| from tempfile import NamedTemporaryFile | |
| ACCESS_KEY = os.environ.get('IAS3_ACCESS_KEY') | |
| SECRET_KEY = os.environ.get('IAS3_SECRET_KEY') |
| { | |
| "3": { | |
| "abstract": "Lessons learned when building a client for a fully distributed system and trying to minimize context-switching pains when using multiple languages.", | |
| "collection": "opensource_movies", | |
| "conference": "EuroPython 2014", | |
| "date": "2014-07-24T14:00:00+0200", | |
| "description": "Last year we decided to create official clients for the most popular languages, Python included.\r\n\r\nSome of the goals were:\r\n\r\n* support the complete API of elasticsearch including all parameters\r\n* provide a 1-to-1 mapping to the rest API to avoid having opinions and provide a familiar interface to our users consistent across languages and evironments\r\n* degrade gracefully when the es cluster is changing (nodes dropping out or being added)\r\n* flexibility - allow users to customize and extend the clients easily to suit their, potentially unique, environment\r\n\r\nIn this talk I would like to take you through the process of designing said client, the challenges |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import argparse | |
| if __name__ == '__main__': | |
| parser = argparse.ArgumentParser(description=""" | |
| I never freaking remember argparse syntax and the docs are so all over the place | |
| that I need this for an example. |
| #!/usr/bin/env python | |
| import os, urllib | |
| import bitly_api | |
| import csvify | |
| import secrets | |
| class BitlyPresentations: |
| section_slug | name | order | |
|---|---|---|---|
| talks-posters | Grand Ballroom | 0 | |
| talks-posters | Room 203 | 1 | |
| talks-posters | Room 204 | 2 | |
| tutorials | Room 101 | 0 | |
| tutorials | Room 102 | 1 | |
| tutorials | Room 105 | 2 | |
| tutorials | Room 106 | 3 | |
| bofs | Grand Ballroom | 0 | |
| bofs | Room 203 | 1 |
| #!/usr/bin/env python | |
| import os | |
| import argparse | |
| import csv | |
| from datetime import datetime | |
| import time | |
| """ |