Download- Smile.zip -3.16 Mb- | 2027 |
out['image_stats'] = pd.DataFrame(img_info)
ROOT = Path('smile_unpacked') # change if needed out = {}
out['csv_summaries'] = csv_summaries
# Save everything for the paper with open('audit_report.json', 'w') as f: json.dump(out, f, indent=2)
# Quick printable tables print("=== File extensions ===") for ext, cnt in ext_counts.most_common(): print(f"ext or '[no ext]': cnt") Download- smile.zip -3.16 MB-
# 4. CSV inspection (first few rows) csv_summaries = {} for p in ROOT.rglob('*.csv'): try: df = pd.read_csv(p) csv_summaries[str(p.relative_to(ROOT))] = 'rows': len(df), 'cols': len(df.columns), 'col_names': list(df.columns), 'missing_perc': (df.isna().mean()*100).to_dict() except Exception as e: csv_summaries[str(p)] = 'error': str(e)
print("\n=== Duplicate files (SHA‑256) ===") for h, paths in duplicates.items(): print(f"h:") for p in paths: print(f" - p") out['image_stats'] = pd
# 2. SHA256 hashes (detect duplicates) hashes = {} for p in ROOT.rglob('*'): if p.is_file(): h = hashlib.sha256() with p.open('rb') as f: while chunk := f.read(8192): h.update(chunk) dig = h.hexdigest() hashes.setdefault(dig, []).append(p.relative_to(ROOT))
“An Exploratory Analysis of the smile.zip Dataset (3.16 MB): Structure, Content, and Potential Applications” 'w') as f: json.dump(out
