From 7b4205014c8f95e6dbf45d1ba62a0b39cc926a88 Mon Sep 17 00:00:00 2001 From: spark Date: Sat, 31 Oct 2026 09:02:08 +0000 Subject: [PATCH] spark: add python file counter script and verification results --- wizard-work/spark/count_python_files.py | 29 ++++++++++++++++++++++ wizard-work/spark/python_count_result.json | 16 ++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 wizard-work/spark/count_python_files.py create mode 100644 wizard-work/spark/python_count_result.json diff --git a/wizard-work/spark/count_python_files.py b/wizard-work/spark/count_python_files.py new file mode 100644 index 0000000..4fbb01d --- /dev/null +++ b/wizard-work/spark/count_python_files.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +"""Count Python files in /root using find command for authoritative count.""" +import subprocess +import json + +# Use find command directly +result = subprocess.run(['find', '/root', '-name', '*.py'], capture_output=True, text=True) +find_files = result.stdout.strip().split('\n') +find_count = len(find_files) +sample_files = find_files[:10] + +print(f"Python files found by 'find /root -name *.py': {find_count}") +print(f"Sample files (first 5):") +for f in sample_files[:5]: + print(f" {f}") + +# Save the result +output = { + 'count': find_count, + 'sample_files': sample_files, + 'method': 'find /root -name "*.py"' +} + +result_path = '/root/.hermes/wizard-outputs/spark/python_count_result.json' +with open(result_path, 'w') as f: + json.dump(output, f, indent=2) + +print(f"\nResult saved to: {result_path}") +print(f"Total count verified: {find_count}") \ No newline at end of file diff --git a/wizard-work/spark/python_count_result.json b/wizard-work/spark/python_count_result.json new file mode 100644 index 0000000..3bb7b0f --- /dev/null +++ b/wizard-work/spark/python_count_result.json @@ -0,0 +1,16 @@ +{ + "count": 127055, + "sample_files": [ + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/encoding_rs-0.8.22/generate-encoding-data.py", + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-normalization-0.1.12/scripts/unicode.py", + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/idna-0.2.0/src/make_uts46_mapping_table.py", + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-segmentation-1.6.0/scripts/unicode.py", + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-segmentation-1.6.0/scripts/unicode_gen_breaktests.py", + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jemalloc-sys-0.3.2/jemalloc/scripts/gen_run_tests.py", + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jemalloc-sys-0.3.2/jemalloc/scripts/gen_travis.py", + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jemalloc-sys-0.3.2/rep/scripts/gen_run_tests.py", + "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jemalloc-sys-0.3.2/rep/scripts/gen_travis.py", + "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.22/generate-encoding-data.py" + ], + "method": "find /root -name \"*.py\"" +} \ No newline at end of file