This file contains 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
#!/usr/bin/env python3 | |
# Convert a JSONC (JSON with Comments) file to vanilla JSON from CLI | |
# | |
# Sample usage: | |
# cat sample.jsonc | ./scripts/jsonc_to_json.py | jq | |
# python3 jsonc_to_json.py sample.jsonc | |
import re | |
import sys | |
This file contains 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
#!/usr/bin/env python3 | |
""" | |
Author: Bryan Gillespie | |
License: MIT | |
Super Simple Static Site Generator (SSSSG) | |
A tiny Markdown -> HTML converter | |
""" | |
import os | |
import re |
This file contains 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
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)}") |
This file contains 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
# 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): |