Skip to content

Instantly share code, notes, and snippets.

@PM2Ring
PM2Ring / allfactors.py
Created October 19, 2016 14:04
Generate all factors of a number
#!/usr/bin/env python3
''' Generate all factors of m
Written by PM 2Ring 2016.10.20
'''
import sys
from itertools import product
from functools import reduce
@PM2Ring
PM2Ring / GeodesicTriangulate.py
Last active January 4, 2018 10:59
Geodesic distance triangulation: Find two locations that are at given distances from two fixed points, using the WGS84 reference ellipsoid
#! /usr/bin/env python
''' Geodesic distance triangulation
Find two locations that are at given distances
from two fixed points, using the WGS84 reference ellipsoid
First approximate using spherical trig, then refine
using Newton's method.