Skip to content

Instantly share code, notes, and snippets.

@peanutbother
peanutbother / sorts.py
Created May 30, 2016 14:00 — forked from amix/sorts.py
The confidence sort in pure Python (from Reddit's codebase)
# 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
z = 1.281551565545
#!/bin/bash
<< ////
The script creates 'licenses' under '$ANDROID_HOME' and creates a file which proves
that the SDK license was accepted by the user.
Please copy this to your own account/gist/server. Every time there's an updated license, update the file with the new
license hash.
Legally if you run this script (or your own version of it), it means YOU accepted the license - don't trust someone else.
The hashes below are supposed to be taken from $ANDROID_HOME/licenses/android-sdk-license on YOUR machine, after you