I hereby claim:
- I am mc706 on github.
- I am mc706 (https://keybase.io/mc706) on keybase.
- I have a public key whose fingerprint is 8AFC 84AA E445 6147 69DF 6671 662C CDAB 706D 996F
To claim this, I am signing this object:
Congratulations! You just won millions of dollars in the lottery! That's great. | |
Now you're fucked. | |
No really. | |
You are. | |
You're fucked. |
from queue import Queue | |
from threading import Thread | |
from typing import Iterable, Callable, Optional | |
def parallel_process(work: Iterable, task_func: Callable, num_threads: int, callback: Optional[Callable] = None) -> None: | |
""" | |
Processes work in parallel using a queue-worker pattern. | |
Breaks up work into `num_threads` workers, which will call `task_func` for each item in work. |
function overlaps(...pairs) { | |
return pairs.sort().reduce((clusters, pair) => { | |
let i = clusters.findIndex(c => Math.max(c[0],pair[0]) <= Math.min(c[1],pair[1])); | |
if (i !== -1) { | |
clusters[i] = [Math.min(clusters[i][0], pair[0]), Math.max(clusters[i][1], pair[1])] | |
} else { | |
clusters.push(pair) | |
} | |
return clusters | |
},[]); |
def overlaps(pairs): | |
clusters = [] | |
for pair in sorted(pairs): | |
low, high = pair | |
found = False | |
for i, cluster in enumerate(clusters): | |
cluster_low, cluster_high = cluster | |
if max(low, cluster_low) <= min(high, cluster_high): | |
found = True | |
clusters[i] = [min(low, cluster_low), max(high, cluster_high)] |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
OIFS=$IFS; | |
IFS=$'\n'; | |
TAGS=$(git log --tags --simplify-by-decoration --pretty="format:%ci %d" | grep -o "\(tag:\s[v0-9\.]*\)" | sed "s/tag: //g") | |
CONTRIBUTORS=$(git shortlog -e -s | grep -o "<.*>"| sed 's/[<>]//g'); | |
OUTPUT=() | |
HEADER=("CONTRIBUTORS") | |
for name in $CONTRIBUTORS | |
do |
<html> | |
<style> | |
.row { | |
float: left; | |
clear: left; | |
} | |
.box{ | |
float:left; | |
height:20px; |