在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:micahscopes/nbmultitask开源软件地址:https://github.com/micahscopes/nbmultitask开源编程语言:Jupyter Notebook 92.9%开源软件介绍:nbmultitaskmultithreading/multiprocessing with ipywidgets and jupyter notebooks example usageThe following will return a "control panel" with buttons for starting and monitoring the thread. from nbmultitask import ThreadWithLogAndControls
from time import sleep
# the target function will be passed a function called `thread_print`
def fn(thread_print):
i = 1
# be careful with loops... (in order for the stop button to work)
while i <= 5:
thread_print('%i...' % i)
sleep(1.5)
i+=1
task = ThreadWithLogAndControls(target=fn, name="do some stuff")
task.control_panel() Please see the |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论