Skip to content

Instantly share code, notes, and snippets.

View thymargo13's full-sized avatar

Margo thymargo13

View GitHub Profile
@dzhou
dzhou / prime_math.py
Created May 8, 2012 03:37
fast prime/factorization mathematics in python
#!/usr/bin/env python
#
# Kefei Dan Zhou
#
import math
# return a dict or a list of primes up to N
# create full prime sieve for N=10^6 in 1 sec