Google Street View coordinate data python - python

I need to know which are the real coordinates for google street view for a GIVEN pair of coordinates using python.
In the google maps Python API there is not how to access to this information. (There is how to in the Javascript API)
I found a non-documented API that returns what I need, but since it seems to be illegal to use undocumented API's to get this information, is there another possibility without changing my programming language? Maybe connecting the Javascript with Python but I don't have idea how to make this.
Thank you!

The best solution is to use the command below to get the closest road:
google.maps.StreetViewService().getPanoramaByLocation()
And then use it to retrieve the image. Unfortunately, I don't know how to do that in Python...

Related

Google Cloud Vision - Is there a way to automatically decide between using DOCUMENT_TEXT_DETECTION and TEXT_DETECTION?

I am looking for a way to call Google as few times as possible so I am wondering if there is a way for Google to automatically decide weather to use TEXT_DETECTION or DOCUMENT_TEXT_DETECTION through Python Cloud Vision client?
There's no way for this, since the client uses different methods for each type.
You can fill a feature request regarding this scenario on the following link if you consider this would be helpful to you.
The Cloud Vision API has no way to determine which is the "best" detection method to use -- this is for you to decide.

Betfair Python API

My answer is quite specific to the Betfair API however I would like to know how to use more APIs in general. I'm quite new to this sort of thing so don't really know how it works. I've just downloaded this package: https://github.com/jmcarp/betfair.py
My question is, how am I supposed to know the functions that come associated with it? How am I supposed to be able to know how to pull the data that I want from any given website without having any resource describing the functionality of the API?
These library is only a binding (with several errors) to Betfair APIs.
You can find documentation about this API, and therefore about this library, in Developer's web.
If you're interested in how to use Betfair APIs in Python you can take a look at Betfair's code samples.

How to get default component through jira-python

I have been trying to programatically retrieve the default component set for a JIRA project with little success.
Currently, I have tried
jira.createmeta('PROJ_NAME')
and
jira.project('PROJ_NAME')
Trying to understand the API output is troubling. I believe it might not be possible but I atleast want to confirm this before making this final assumption.
Is there an easy way to retrieve what component was set as the default in the jira-python api?
For reference:
https://jira-python.readthedocs.org/en/latest/
As far as I know - and I am pretty sure about that, it is not possible to define a default component for a project.
Maybe there are workarounds with post transition functions but this is not an out-of-the-box feature.
Hence it`s not possible to get this information through any API!

Python image search wrapper

I'm trying to figure out a straightforward way to do some image searching in Python with larger numbers of return results than Google's API allows, i.e. 64. I spent some time trying to use the Python Boss Mashup Framework, and I followed the install instructions carefully, but attempting to do any searches always returns authorization errors.
I basically just want to search on a term and grab the first, say, 100 image urls that come up. The particular search engine doesn't matter. Any advice on a simple way to do this would be appreciated!
Not sure if this is simple enough, but you could use Mechanize to directly access Google Image search, click the next link for more results, etc. It's very easy to use, almost trivial.

SAS or Python Extracting Map for Directions as Picture

I would like to use SAS or Python to achieve this.
I have multiple points that I would like to map out using mapquest/maps.google/maps.bing, and then download a screenshot of the map on to my C: drive.
This would not be a one time thing. I would need it to download multiple maps (Have a map for route within Chicago, then another for a route within Pittsburgh).
I was hoping there may be a module within Python that enables this.
Also, on a side note, is there a way to call Python scripts from within a SAS program? Could I possibly embed it in to a VBA script which is then called from SAS?
You should be able to do the lot from SAS if the APIs for Google/MapQuest/Bing all support URI requests...
In SAS you can make the API request and retrieve and process the data. An example is shown here.
I'm not sure what the API request is going to return or how you would then use/interpret that. If it's standard XML use the SAS XML mapper. If it's anything else (ie. Image/MIME data) then things may get trickier.
The family of Google Maps APIs lets you call down various services from any language that will let you send a URL request. The Static API might be of special interest to you, though I'm not sure if you can overlay directions, or how.
To do this in Python, you could use urllib for interacting with the API; there's also pymaps.

Categories