I hereby claim:
- I am simonhayward on github.
- I am simonhayward (https://keybase.io/simonhayward) on keybase.
- I have a public key whose fingerprint is C78E AB4C 3CCB 8657 CC05 011F 8AC0 2148 9CC8 9FA0
To claim this, I am signing this object:
| import logging | |
| from django.db import DEFAULT_DB_ALIAS, connections | |
| from django.db.migrations.loader import MigrationLoader | |
| def migrations_have_applied(): | |
| """ | |
| Check if there are any migrations that haven't been applied yet | |
| """ |
I hereby claim:
To claim this, I am signing this object:
| """ | |
| https://florian.github.io/reservoir-sampling/ | |
| - Store the first k elements as the reservoir elements | |
| - For the i-th element, add it to the reservoir with a probability of k/i. | |
| This is done by replacing a randomly selected element in the reservoir | |
| """ | |
| import random | |
| import sys | |
| package main | |
| import ( | |
| "log" | |
| "net/http" | |
| ) | |
| func logRequest(handler http.Handler) http.Handler { | |
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
| log.Printf("%s %s %s\n", r.RemoteAddr, r.Method, r.URL) |