Skip to content

Instantly share code, notes, and snippets.

View ZXYFrank's full-sized avatar
😀

ZXYFrank ZXYFrank

😀
  • MCG, NJU
  • Nanjing
View GitHub Profile
@ZXYFrank
ZXYFrank / qs_pivoting.py
Created January 30, 2023 02:28
quick sort: arbitrary pivoting
import numpy as np
import random
from tqdm import trange
a = [3, 1, 2, 5, 6, 1, 7, 3, 4, 2, 6, 8, 1, 3, 2, 6, 1]
SHOW = False
def show_ptrs(a, l, r, *pos):
@ZXYFrank
ZXYFrank / mvimg_split.py
Created June 26, 2022 07:55
Python script to convert Android MVIMG to mp4 and jpg
import re
import os
def split_file(original_path, out_folder):
os.makedirs(out_folder, exist_ok=True)
name = os.path.split(original_path)[-1]
# https://stackoverflow.com/questions/3217334/searching-reading-binary-data-in-python
content = None
with open(original_path, 'rb') as f: