loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.0679271328534834","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJlcXVlc3RzCmltcG9ydCBqc29uCmltcG9ydCBkZW1qc29uCgp1cmwgPSAiaHR0cHM6Ly9zY2Fsci5hcGkuYXBwYmFzZS5pby9ob3VzaW5nLWRlbW8vbGlzdGluZy9fc2VhcmNoIgoKcGF5bG9hZCA9IGRlbWpzb24uZW5jb2RlKHsKICAicXVlcnkiOiB7CiAgICAiZ2VvX2Rpc3RhbmNlIjogewogICAgICAiZGlzdGFuY2UiOiAiNW1pIiwKICAgICAgImxvY2F0aW9uIjogewogICAgICAgICJsYXQiOiA0Ny41OSwKICAgICAgICAibG9uIjogLTEyMi4yOQogICAgICB9CiAgICB9CiAgfQp9KQoKaGVhZGVycyA9IHsKICAnQXV0aG9yaXphdGlvbic6ICJCYXNpYyBXVzVEWjFaM2IzcFdPbVU1WldNMVkySXdMVFU0WkRndE5HSmlNQzFpWVdSakxXRmpZV1kzTWpZMk5qRm1NUT09IiwKICAnQ29udGVudC1UeXBlJzogImFwcGxpY2F0aW9uL2pzb24iCn0KCnJlc3BvbnNlID0gcmVxdWVzdHMucmVxdWVzdCgiUE9TVCIsIHVybCwgZGF0YT1wYXlsb2FkLCBoZWFkZXJzPWhlYWRlcnMpCgpwYXJzZWQgPSBqc29uLmxvYWRzKHJlc3BvbnNlLnRleHQpCnByaW50IGpzb24uZHVtcHMocGFyc2VkLCBpbmRlbnQ9Miwgc29ydF9rZXlzPVRydWUp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import requests
import json
import demjson

url = "https://scalr.api.appbase.io/housing-demo/listing/_search"

payload = demjson.encode({
  "query": {
    "geo_distance": {
      "distance": "5mi",
      "location": {
        "lat": 47.59,
        "lon": -122.29
      }
    }
  }
})

headers = {
  'Authorization': "Basic WW5DZ1Z3b3pWOmU5ZWM1Y2IwLTU4ZDgtNGJiMC1iYWRjLWFjYWY3MjY2NjFmMQ==",
  'Content-Type': "application/json"
}

response = requests.request("POST", url, data=payload, headers=headers)

parsed = json.loads(response.text)
print json.dumps(parsed, indent=2, sort_keys=True)