This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int median(Vector a, int lo, int hi) { | |
if (lo == hi) { | |
return a.get(lo); | |
} | |
int n = a.size() / 2; | |
for (;;) { | |
int pivotIndex = randomPivot(lo, hi); | |
pivotIndex = partition(a, lo, hi, pivotIndex); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FileStats(file) { | |
nb_js = 0 | |
nb_img = 0 | |
nb_css = 0 | |
nb_others = 0 # also html/text | |
nb_lines = 0 | |
cmd = sprintf("%s %s", "jq '(.log.entries[]|[ .request.url])|@csv'", file) | |
while (cmd|getline) { | |
if (/\.png|\.jpg|\.gif/) { | |
nb_img++ |
OlderNewer