You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
339 B
9 lines
339 B
files = ["./tinygrad/viz/js/index.js", "./tinygrad/viz/js/worker.js"]
|
|
for fp in files:
|
|
with open(fp) as f: content = f.read()
|
|
cnt = 0
|
|
for i,line in enumerate(content.splitlines()):
|
|
if not (line:=line.strip()) or line.startswith("//"): continue
|
|
#print(f"{i} {line}")
|
|
cnt += 1
|
|
print(f"{fp.split('/')[-1]} - {cnt} lines")
|
|
|