Skip to content

Instantly share code, notes, and snippets.

@max-l-weaver
max-l-weaver / mypy_setup_logs.txt
Created February 20, 2018 11:43
mypy setup logs
Collecting pytest (from -r dev-requirements.txt (line 1))
Using cached pytest-3.4.0-py2.py3-none-any.whl
Collecting pytest-cov (from -r dev-requirements.txt (line 2))
Using cached pytest_cov-2.5.1-py2.py3-none-any.whl
Collecting mypy (from -r dev-requirements.txt (line 3))
Using cached mypy-0.560-py3-none-any.whl
Collecting pylint (from -r dev-requirements.txt (line 4))
Using cached pylint-1.8.2-py2.py3-none-any.whl
Collecting pytest_mock (from -r dev-requirements.txt (line 5))
Using cached pytest_mock-1.7.0-py2.py3-none-any.whl
from elasticsearch import ElasticSearch
from elasticsearch_dsl import Search, Q
es = ElasticSearch()
client = Search(using=es, index="foo")
# elasticsearch DSL with aggs
body = {
'"size": 0,
"query": {
import os
from googleapiclient import discovery
from oauth2client.service_account import ServiceAccountCredentials
def generate_session(service='compute'):
if not os.getenv('GOOGLE_APPLICATION_CREDENTIALS'):
return None
* dyn_record.corp__xmpp_server__tcp_132 (import id: SRV/corp.com/_xmpp-server._tcp.corp.com/77811283): import dyn_record.corp__xmpp_server__tcp_132 (id: SRV/corp.com/_xmpp-server._tcp.corp.com/77818683): Error unmarshalling response:%!(EXTRA *json.UnmarshalTypeError=json: cannot unmarshal number into Go struct field DataBlock.port of type string)
@max-l-weaver
max-l-weaver / gist:8d89221df00d83069bbcb3f542e3fd71
Last active November 15, 2017 11:34
terraform-dyn: import error output
(venv) max@mwork:~/terraform-dyn/roles$ terraform import dyn_record.test A/test.com/subdomain.test.com/
dyn_record.test: Importing from ID "A/test.com/subdomain.test.com/"...
Error importing: 1 error(s) occurred:
* dyn_record.test (import id: A/test.com/subdomain.test.com/): import dyn_record.test.com (id: A/test.com/subdomain.test.com/):
Failed to find Dyn record id: server responded with 404 Not Found: {"status": "failure", "data": {}, "job_id": 4233809541, "msgs": [{"INFO": "node: Node is not in the zone", "SOURCE": "BLL", "ERR_CD": "NOT_FOUND", "LVL": "ERROR"}, {"INFO": "get_tree: Node name not found within the zone", "SOURCE": "BLL", "ERR_CD": null, "LVL": "INFO"}]}
(venv) max@mwork:~/terraform-dyn/roles$ terraform import dyn_record.test A/test.com/subdomain.test.com/123456789
dyn_record.test: Importing from ID "A/test.com/subdomain.test.com/123456789"...
dyn_record.test: Import complete!