def resolve_conflict(self, target_folder, basename):
        name, ext = os.path.splitext(basename)
        count = 0
        while True:
            count = count + 1
            newname = '%s_%d%s' % (name, count, ext)
            if not os.path.exists(os.path.join(target_folder, newname)):
                return newname
Get the median of an array
dataset/ETHPy150Open jeffwidman/flask-uploads/flask_uploads.py/UploadSet.resolve_conflict--crossover with--dataset/ETHPy150Open svanoort/pyresttest/pyresttest/benchmarks.py/median