Created
March 20, 2019 09:50
-
-
Save chimerast/0f9aa96350c58a28c58a1b1ede31124f to your computer and use it in GitHub Desktop.
回答: 難問解けたらjustInCaseのBBQに無料ご招待! https://www.wantedly.com/projects/289455
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
from urllib.request import * | |
from urllib.parse import * | |
import json | |
import base64 | |
from sympy import * | |
q = 'W1t4LCAxXV1AW1sxLCAtODcuNjcwNV0sWy04Ny42NzA1LCA0OTc1LjQwNDQxXV1AW1t4XSwgWzFdXQ%3D%3D' | |
formula = base64.b64decode(unquote(q)).decode('utf-8') | |
x = Symbol('x') | |
r = solve(eval('@'.join('Matrix({})'.format(m) for m in formula.split('@')))) | |
GOOGLE_MAPS_API_KEY = '******************************************' | |
req = Request('https://maps.googleapis.com/maps/api/geocode/json?latlng={},{}&key={}'.format(r[0][x], r[1][x], GOOGLE_MAPS_API_KEY)) | |
with urlopen(req) as res: | |
print(json.load(res)['results'][0]['address_components'][0]['short_name']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
出力: JR 大井町駅