wip
This commit is contained in:
parent
630bcf3fc4
commit
c9d72c848b
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os
|
import os
|
||||||
|
import concurrent.futures
|
||||||
import datetime
|
import datetime
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
@ -91,9 +92,9 @@ def process_chunk(filename):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
for filename in os.listdir(INPUT_DIR):
|
with concurrent.futures.ProcessPoolExecutor() as executor:
|
||||||
if filename.endswith(".flac"):
|
files = [f for f in os.listdir(INPUT_DIR) if f.endswith(".flac")]
|
||||||
process_chunk(filename)
|
executor.map(process_chunk, files)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
Loading…
Reference in a new issue