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 concurrent.futures | |
| from functools import wraps | |
| from progress.bar import Bar | |
| import time | |
| import random | |
| random.seed(42) | |
| def concurrent_processing(executor_type): |
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 openpyxl | |
| import csv | |
| def xlsx_to_csv(xlsx_file, csv_file): | |
| wb = openpyxl.load_workbook(xlsx_file) | |
| sheet = wb.active | |
| with open(csv_file, 'w', newline='', encoding='utf-8') as f: | |
| writer = csv.writer(f) | |
| for row in sheet.iter_rows(): | |
| writer.writerow([str(cell.value).strip() for cell in row if cell.value is not None]) |
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
| function hasVisibleText(text) { | |
| return /[\x21-\x7E]/.test(text); | |
| } | |
| function getElementInfo(node, path) { | |
| if (node.nodeType !== 1 && node.nodeType !== 3 || node.tagName && (node.tagName.toLowerCase() === 'script' || node.tagName.toLowerCase() === 'noscript')) { | |
| return null; | |
| } | |
| let info = {}; | |
| if (node.nodeType === 3) { |