Created from research done in r/pokemongodev and particularly this thread: https://www.reddit.com/r/pokemongodev/comments/4svl1o/guide_to_pokemon_go_server_responses/
Needs protobuf3: pip install 'protobuf>=3.0.0a3'
| import pydoc | |
| import warnings | |
| import subprocess | |
| #pip install pylyrics | |
| from PyLyrics import * | |
| #bs4 warns about the default parser used in pylyrics, mucks up the output | |
| warnings.filterwarnings("ignore", category=UserWarning, module='bs4') |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>locationchanger</string> | |
| <key>ProgramArguments</key> | |
| <array> |
| //wrote this for more efficient scanning of nearby pokemon, | |
| //gets centroids for 7 minimally overlapping circles in a hexagon | |
| //shape around an origin point | |
| //to get a bigger area, just recurse this and de-dupe returned centroids | |
| //for each pass | |
| //this was in java for android, but python code is nearly identical | |
| public static List<LatLng> pointsToScan(LatLng origin) { | |
| double origin_lat = origin.latitude; | |
| double origin_lng = origin.longitude; |
| import sys | |
| import math | |
| from s2sphere import CellId, LatLng, LatLngRect, Cell | |
| def getNeighbors(): | |
| origin = CellId.from_lat_lng(LatLng.from_degrees(FLOAT_LAT, FLOAT_LONG)).parent(15) | |
| walk = [origin.id()] | |
| #get the 8 neighboring cells |
Created from research done in r/pokemongodev and particularly this thread: https://www.reddit.com/r/pokemongodev/comments/4svl1o/guide_to_pokemon_go_server_responses/
Needs protobuf3: pip install 'protobuf>=3.0.0a3'