Skip to content

Instantly share code, notes, and snippets.

View ran-huang's full-sized avatar
🎯

Ran ran-huang

🎯
  • Tokyo
View GitHub Profile
@ran-huang
ran-huang / merge_json_files.py
Created January 12, 2023 10:07
Merge all JSON files exported by GA user explorer in a directory into a single JSON file. There might be duplicate dates.
"""
Merge all JSON files exported by GA user explorer in a directory into a single JSON file.
"""
import os
import json
# Path to the directory containing the JSON files
path = input("Enter the path: ")
# Read in the JSON files
@ran-huang
ran-huang / count_md_files_in_branches.py
Last active January 9, 2023 06:57
Count md files for various use cases: recursively in subfolders, across specified branches, ...
"""
Count the number of .md files in the specified branches.
Usage:
python count_md_files.py
Prompts:
Enter the branches (comma-separated): [Enter the branches as a comma-separated list]
"""
import os