Skip to content

Instantly share code, notes, and snippets.

View kylieCat's full-sized avatar
🏳️‍🌈
Codin them thangs

Kylie Rogers kylieCat

🏳️‍🌈
Codin them thangs
View GitHub Profile
@kylieCat
kylieCat / main.go
Created January 9, 2018 03:45 — forked from creack/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@kylieCat
kylieCat / main.go
Created January 9, 2018 03:37 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@kylieCat
kylieCat / fermat.py
Last active September 12, 2015 23:12 — forked from bnlucas/fermat.py
Fermat primality testing with Python.
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.