Skip to content

Instantly share code, notes, and snippets.

View WardsParadox's full-sized avatar

Zack McCauley WardsParadox

View GitHub Profile
@WardsParadox
WardsParadox / run_under_rosetta.py
Last active October 24, 2023 13:03 — forked from macsimom/main.m
openwithrosetta - a tool to check the box "Open with Rosetta" on Apple Silicon Big Sur Macs
import os
import subprocess
import sys
from Foundation import * # pylint: disable=E0611 #
import objc
from SystemConfiguration import SCDynamicStoreCopyConsoleUser
def is_arm64():
@WardsParadox
WardsParadox / encode.py
Last active December 19, 2016 19:48 — forked from signed0/gist:2031157
Google Polyline encoder & decoder
#!/usr/bin/python
'''Provides utility functions for encoding and decoding linestrings using the
Google encoded polyline algorithm.
Original Script at https://gist.github.com/signed0/2031157
'''
from sys import argv
from ast import literal_eval
def encode_coords(coords):
'''Encodes a polyline using Google's polyline algorithm