Skip to content

Instantly share code, notes, and snippets.

View iamliuzy's full-sized avatar
🏠
Working from home

Steve108 iamliuzy

🏠
Working from home
View GitHub Profile
@iamliuzy
iamliuzy / cleaner.ps1
Created December 21, 2024 15:14
A Powershell script to remove files with specific patterns in a target directory.
# Description:
# A script to remove files with specific patterns in a target directory.
#
# Usage:
# 1. Change line 10-11 properly according to the instruction beside them.
# 2. Run the script in PowerShell.
# Tips:
# - Change "$false" to "$true" in line 6 to show the files to be deleted.
# This won't actually delete them.
# - Use "*" in pattern strings to match any text.
@iamliuzy
iamliuzy / find_keywords.py
Last active January 22, 2024 13:52
Find keywords in a text file. The keywords are specificated by another text file.
"""
# Find Keywords
Find keywords in a text file.
The keywords are specificated by another text file.
## Arguments
positional arguments:
file File to be searched for keywords.
@iamliuzy
iamliuzy / jsonparse.py
Last active February 17, 2023 10:39
Json file access module for Python 3
"""
Json file access API.
"""
from os.path import abspath
from pathlib import PurePath
from json import loads, dumps
class JsonFile: