Posts

Java - Mockito Tutorial (A comprehensive guide with examples)

Image
Repost from  https://javacodehouse.com/blog/mockito-tutorial/ Mockito is a mocking framework for Java which is extremely easy to use, so this post will discuss all the cool features you need to know about mockito with simple and easy examples. How to inject mocks How to mock methods with Mockito How to mock  void methods  with Mockito 2 Ways to test  void methods  with Mockito Spying with Mockito WHY MOCK? Most of the classes we come across have dependencies. and often times methods delegates some of the work to other methods in other classes, and we call these classes dependencies. When unit testing such methods, if we only used JUnit, our tests will also depend on those methods as well. We want the unit tests to be independent of all other dependencies. eg: we want to test the method  addCustomer  in  CustomerService  class, and within this  addCustomer  method, the save method of the  CustomerDao ...

ML - A Practical Guide to Object Detection using the Popular YOLO Framework – Part III (with Python codes)

Image
Repost from  https://www.analyticsvidhya.com/blog/2018/12/practical-guide-object-detection-yolo-framewor-python/ Introduction How easy would our life be if we simply took an already designed framework, executed it, and got the desired result? Minimum effort, maximum reward. Isn’t that what we strive for in any profession? I feel incredibly lucky to be part of our machine learning community where even the top tech behemoths embrace open source technology. Of course it’s important to understand and grasp concepts before implementing them, but it’s always helpful when the ground work has been laid for you by top industry data scientists and researchers. This is especially true for deep learning domains like computer vision. Not everyone has the computational resources to build a DL model from scratch. That’s where predefined frameworks and pretained models come in handy. And in this article, we will look at one such framework for object detection – YOLO. It’s a supremely fast...