Skip to content

Instantly share code, notes, and snippets.

View maarten-betman's full-sized avatar
🚤

Maarten Betman maarten-betman

🚤
View GitHub Profile
@maarten-betman
maarten-betman / crawl_hdd_filetree.py
Created May 2, 2024 06:13
Create overview of files on a hard drive and storing file info in a Access database
from pathlib import Path
import pyodbc
from datetime import datetime
def get_file_details(startpath):
file_details = []
start_path = Path(startpath)
for file_path in start_path.rglob('*'):
if file_path.is_file():
try:
# https://gist.github.com/FranzDiebold/898396a6be785d9b5ca6f3706ef9b0bc
# https://gist.github.com/okld/0aba4869ba6fdc8d49132e6974e2e662
# https://github.com/komodovaran/stateful_streamlit_enterprise/tree/master/src
from streamlit.report_thread import get_report_ctx
from streamlit.server.server import Server
from streamlit.hashing import _CodeHasher
class _SessionState: