Qwiklabs Assessment: Performance Tuning in Python Scripts

preview_player
Показать описание
#trending #coursera #python

Subscribe free!!!
click here to subscribe for more videos-

Follow me on Twitter-

Background music from-
Creative Commons — Attribution 3.0 Unported— CC BY 3.0
Music released by Argofox

• A Himitsu - Adven...
Music promoted by Audio Library

• Adventures – A Hi...
Рекомендации по теме
Комментарии
Автор

from multiprocessing import Pool, cpu_count
import subprocess
import os

home_path = os.path.expanduser('~')
src = os.path.join(home_path, "data/prod/")
dest = os.path.join(home_path, "data/prod_backup/")

def run_rsync(arg):
subprocess.call(["rsync", "-arq", arg, dest])

if __name__ == "__main__":
pool = Pool(cpu_count())
pool.map(run_rsync, [os.path.join(src, f) for f in os.listdir(src)])

fernandag.
Автор

dude, thx - but next time also provide the code in comments ;)

Did_you_know_questionmark
Автор

no se ve nada, pasas todo muy rapido, mala imagen

bethzyramirezurbaneja
welcome to shbcf.ru