This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.base.Strings; | |
import com.stumbleupon.async.Callback; | |
import com.stumbleupon.async.Deferred; | |
import net.opentsdb.core.*; | |
import net.opentsdb.utils.Config; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Iterator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import xml.etree.ElementTree as ET | |
from xml.dom import minidom | |
import os | |
from pypinyin import Style, pinyin | |
from functools import reduce | |
dir_path = os.path.dirname(os.path.realpath(__file__)) | |
print(ET.ElementTree) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'json' | |
url = "http://api.map.baidu.com/geocoder?address=address_you_find&output=json&key=you_secret_key&city=city_you_find" | |
uri = URI.escape(url) | |
json_str = Net::HTTP.get(URI(uri)) | |
value = JSON.parse(json_str) | |
puts value["result"]["location"] |