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
from distutils.core import setup, Extension | |
import numpy | |
import os | |
os.environ['CC'] = 'g++'; | |
setup(name='matt_simple_test', version='1.0', ext_modules =[Extension('_simple', | |
['simple.cc', 'simple.i'], include_dirs = [numpy.get_include(),'.'])]) |
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 <Python.h> | |
#include <opencv2/core/core.hpp> | |
#include <numpy/ndarrayobject.h> | |
#include <cstdio> | |
using namespace cv; | |
static PyObject* opencv_error = 0; | |
#define ERRWRAP2(expr) \ |
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
""" | |
From http://satels.blogspot.ru/2011/04/datetime-timestamp.html | |
Из datetime в timestamp и обратно | |
Для python версии 2: | |
Из datetime в timestamp | |
""" | |
import datetime | |
import time | |
dt = datetime.datetime.now() # datetime, из которой переводим в timestamp |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# For Colab don't run reload_ext autoreload & autoreload 2 | |
#%reload_ext autoreload | |
#%autoreload 2 | |
# Safe for Colab | |
%matplotlib inline | |
# Not sure are this libs are still count as missing on a clean Colab VM. | |
!apt-get -qq install -y libsm6 libxext6 |