How to use default_path method in yandex-tank

Best Python code snippet using yandex-tank

filechooser_utils.py

Source:filechooser_utils.py Github

copy

Full Screen

1from ipyfilechooser import FileChooser2def create_filechooser(default_path="~/", html_title="Select File", use_dir_icons=True):3 fc = FileChooser(default_path)4 fc.title = html_title5 fc.use_dir_icons = use_dir_icons6 return fc7def select_caffemodel_prototxt(default_path="~/", use_dir_icons=True):8 html_title = '<b>Select <code>.prototxt</code> file for the caffemodel:</b>'9 fc = create_filechooser(default_path=default_path,10 html_title=html_title,11 use_dir_icons=use_dir_icons)12 return fc13def select_caffemodel_weights(default_path="~/", use_dir_icons=True):14 html_title = '<b>Select caffemodel weights (file with extention <code>.caffemodel</code>):</b>'15 fc = create_filechooser(default_path=default_path,16 html_title=html_title,17 use_dir_icons=use_dir_icons)18 return fc19def select_caffemodel(default_path="~/", use_dir_icons=True):20 prototxt = select_caffemodel_prototxt(default_path=default_path, use_dir_icons=use_dir_icons)21 weights = select_caffemodel_weights(default_path=default_path, use_dir_icons=use_dir_icons)22 return prototxt, weights23def select_videofile(default_path="~/", use_dir_icons=True):24 html_title = '<b>Select video file:</b>'25 fc = create_filechooser(default_path=default_path,26 html_title=html_title,27 use_dir_icons=use_dir_icons)28 return fc29def select_yolo_weights(default_path="~/", use_dir_icons=True):30 html_title = '<b>Select YOLO weights (<code>.weights</code> file):</b>'31 fc = create_filechooser(default_path=default_path,32 html_title=html_title,33 use_dir_icons=use_dir_icons)34 return fc35def select_coco_labels(default_path="~/", use_dir_icons=True):36 html_title = '<b>Select coco labels file (<code>.name</code> file):</b>'37 fc = create_filechooser(default_path=default_path,38 html_title=html_title,39 use_dir_icons=use_dir_icons)40 return fc41def select_yolo_config(default_path="~/", use_dir_icons=True):42 html_title = '<b>Choose YOLO config file (<code>.cfg</code> file):</b>'43 fc = create_filechooser(default_path=default_path,44 html_title=html_title,45 use_dir_icons=use_dir_icons)46 return fc47def select_yolo_model(default_path="~/", use_dir_icons=True):48 yolo_weights = select_yolo_weights(default_path, use_dir_icons)49 yolo_config = select_yolo_config(default_path, use_dir_icons)50 coco_names = select_coco_labels(default_path, use_dir_icons)51 return yolo_weights, yolo_config, coco_names52def select_pbtxt(default_path="~/", use_dir_icons=True):53 html_title = '<b>Select <code>.pbtxt</code> file:</b>'54 fc = create_filechooser(default_path=default_path,55 html_title=html_title,56 use_dir_icons=use_dir_icons)57 return fc58def select_tfmobilenet_weights(default_path="~/", use_dir_icons=True):59 html_title = '<b>Select tf-frozen graph of mobilenet (<code>.pb</code> file):</b>'60 fc = create_filechooser(default_path=default_path,61 html_title=html_title,62 use_dir_icons=use_dir_icons)63 return fc64def select_tfmobilenet(default_path="~/", use_dir_icons=True):65 prototxt = select_pbtxt(default_path, use_dir_icons)66 tfweights = select_tfmobilenet_weights(default_path, use_dir_icons)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run yandex-tank automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful