This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # multiprocessing_producer_consumer.py | |
| # https://pymotw.com/3/multiprocessing/communication.html | |
| import multiprocessing | |
| import time | |
| class Consumer(multiprocessing.Process): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <opencv/cv.h> | |
| #include <opencv/highgui.h> | |
| #include <iostream> | |
| using namespace std; | |
| using namespace cv; | |
| // quality-metric | |
| namespace qm | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SummedAreaTable(object): | |
| def __init__(self, size, data): | |
| """ | |
| Just because I dislike a 2d array / list. | |
| data should be a List of Integer. | |
| """ | |
| width, height = size | |
| assert width * height == len(data), "invalid data length and or data size" | |
| self.size = size | |
| self.data = data |