Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈
Codin them thangs

Kylie Auld kylieCat

🏳️‍🌈
Codin them thangs
View GitHub Profile
@kylieCat
kylieCat / main.go
Created Jan 9, 2018 — forked from creack/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@kylieCat
kylieCat / main.go
Created Jan 9, 2018 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@kylieCat
kylieCat / fermat.py
Last active Sep 12, 2015 — forked from bnlucas/fermat.py
Fermat primality testing with Python.
View fermat.py
def fermat(n):
if n == 2:
return True
if not n & 1:
return False
return pow(2, n-1, n) == 1
# benchmark of 10000 iterations of fermat(100**10-1); Which is not prime.
# 10000 calls, 21141 per second.