Best Python code snippet using yandex-tank
filechooser_utils.py
Source: filechooser_utils.py
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)...
Check out the latest blogs from LambdaTest on this topic:
The key to successful test automation is to focus on tasks that maximize the return on investment (ROI), ensuring that you are automating the right tests and automating them in the right way. This is where test automation strategies come into play.
Greetings folks! With the new year finally upon us, we’re excited to announce a collection of brand-new product updates. At LambdaTest, we strive to provide you with a comprehensive test orchestration and execution platform to ensure the ultimate web and mobile experience.
Entering the world of testers, one question started to formulate in my mind: “what is the reason that bugs happen?”.
“Test frequently and early.” If you’ve been following my testing agenda, you’re probably sick of hearing me repeat that. However, it is making sense that if your tests detect an issue soon after it occurs, it will be easier to resolve. This is one of the guiding concepts that makes continuous integration such an effective method. I’ve encountered several teams who have a lot of automated tests but don’t use them as part of a continuous integration approach. There are frequently various reasons why the team believes these tests cannot be used with continuous integration. Perhaps the tests take too long to run, or they are not dependable enough to provide correct results on their own, necessitating human interpretation.
The fact is not alien to us anymore that cross browser testing is imperative to enhance your application’s user experience. Enhanced knowledge of popular and highly acclaimed testing frameworks goes a long way in developing a new app. It holds more significance if you are a full-stack developer or expert programmer.
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!