Skip to content

Instantly share code, notes, and snippets.

Avatar

Bryan Gillespie RPGillespie6

View GitHub Profile
View batch_rename.py
import os
import sys
alpha_enum = "abcdefghijklmnopqrstuvwxyz"
sorted_files = sorted(sys.argv[1:])
def printFiles(files, header="Files:"):
print(header)
for i, f in enumerate(files):
print(f"{i+1}) {os.path.basename(f)}")
@RPGillespie6
RPGillespie6 / quicksort.py
Last active Jan 23, 2017
Simple quicksort implementation in python
View quicksort.py
# A = Array
# s = start index
# e = end index
# p = pivot index
# g = greater than pivot boundary index
def swap(A,i1,i2):
A[i1], A[i2] = A[i2], A[i1]
def partition(A,g,p):
You can’t perform that action at this time.