This file contains hidden or 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 magic | |
| import glob | |
| from os.path import isfile | |
| ROOT_DIR = 'backup' | |
| WANTED_EXTENSION = 'sqlite' | |
| for filename in glob.iglob(ROOT_DIR + '/**', recursive=True): | |
| if isfile(filename): | |
| extension = magic.from_file(filename, mime = True) |
This file contains hidden or 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
| from pbxproj import XcodeProject | |
| import os | |
| from glob import glob | |
| import collections | |
| import sys | |
| TYPE_OF_FILE = 'swift' | |
| # Get all files in project folder | |
| project_folder_path = sys.argv[1] |
This file contains hidden or 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 pyshark | |
| import os | |
| import requests | |
| cap = pyshark.LiveCapture(interface='en0', display_filter="http") | |
| def saveImage(url): | |
| page = requests.get(url) | |
| f_ext = os.path.splitext(url)[-1] | |
| img_name = os.path.splitext(url)[-2].split('/')[-1] |