This file contains 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
def flat_map(iterable: list, map_function=None): | |
"""Applies a `map_function` to every element of the `iterable` input list | |
and then flattens all the results into a new list | |
Args: | |
iterable (list): An input list | |
map_function (callable, optional): A function that is applied to every element of the input list. Defaults to None. | |
Returns: | |
list: A new list |
This file contains 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 <iostream> | |
#include "mpi.h" | |
#include "opencv2/opencv.hpp" | |
int main(int argc, char** argv) | |
{ | |
// the input image | |
cv::Mat image; |
This file contains 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
import numpy as np | |
import cv2 | |
from enum import Enum | |
class Align(Enum): | |
LEFT = 0 | |
CENTER = 1 | |
RIGHT = 2 | |
class Valign(Enum): |
This file contains 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
/* | |
This requires adding the "include" directory of your Python installation to the include diretories | |
of your project, e.g., in Visual Studio you'd add `C:\Program Files\Python36\include`. | |
You also need to add the 'include' directory of your NumPy package, e.g. | |
`C:\Program Files\PythonXX\Lib\site-packages\numpy\core\include`. | |
Additionally, you need to link your "python3#.lib" library, e.g. `C:\Program Files\Python3X\libs\python3X.lib`. | |
*/ | |
// python bindings |