Skip to content

Instantly share code, notes, and snippets.

View sbucek's full-sized avatar
🏠
Working from home

Simon sbucek

🏠
Working from home
View GitHub Profile
#Rewritten code from /r2/r2/lib/db/_sorts.pyx
from math import sqrt
def _confidence(ups, downs):
n = ups + downs
if n == 0:
return 0
The following static_dir and static_files handlers are equivalent: handlers: - url: /images   static_dir: static/images - url: /images/(.*)   static_files: static/images/\1   upload: static/images/(.*)
handlers:- url: /images  static_dir: static/images  http_headers:    X-Foo-Header: foo    X-Bar-Header: bar value