Created
July 8, 2021 06:10
-
-
Save zh3389/bf0aadea22d6626d2126cb6bf584ed4e to your computer and use it in GitHub Desktop.
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 fnmatch, os | |
def find(pattern, path): | |
result = [] | |
for root, dirs, files in os.walk(path): | |
for name in files: | |
if fnmatch.fnmatch(name, pattern): | |
result.append(os.path.join(root, name)) | |
return result | |
root_path = "/Users/seven/_seven/Fingerprint_Website/datasets" | |
images_path = find("*.json", root_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment