Skip to content

Instantly share code, notes, and snippets.

import re
import shlex
from glob import glob
from subprocess import Popen, PIPE
{
int i; int j; float v; float x; float[100] a;
while( true ) {
do i = i+1; while( a[i] < v);
do j = j-1; while( a[j] > v);
if( i >= j ) break;
x = a[i]; a[i] = a[j]; a[j] = x;
}
}