gcc -shared -o libsimpleopencvtest.so -fPIC ./simple_opencv_test.cpp -lopencv_core -lopencv_highgui -lopencv_objdetect -lopencv_imgproc -lopencv_features2d -lopencv_ml -lopencv_calib3d -lopencv_video
python simple_opencv_test.py
| ffmpeg -pattern_type glob -i "*.jpg" -filter_complex "[0]reverse[r];[0][r]concat,loop=5:250,setpts=N/25/TB,scale=1920:1080" -vcodec mpeg4 -q:v 1 output_looped.mp4 |
| Returns: | |
| if output_type == 'csv_zip': | |
| Flask File -- sends file contents to client using Flask send_from_directory() | |
| elif output_type == 'json': | |
| Flask File -- sends file contents to client using Flask send_from_directory() |
| import os | |
| import time | |
| import pickle | |
| import logging | |
| import argparse | |
| import numpy as np | |
| import tensorflow as tf | |
| from tensorflow.python.keras.models import Model | |
| from tensorflow.python.keras import backend as K | |
| from tensorflow.python.keras.utils import plot_model |
| import time | |
| from lockfile import LockFile, LockTimeout | |
| filepath = '/home/alex/Downloads/blah.txt' | |
| lock = LockFile(filepath) | |
| if lock.is_locked(): | |
| print('Waiting to acquire the file lock...') | |
| lock.acquire(timeout=10) |
| #.*\n |
| #!/bin/sh | |
| # usage ./qsub_with_output.sh cnn_match.sh | |
| # where cnn_match.sh is a qsub script | |
| jobID=$(qsub $1) | |
| jobIDNumeric=${jobID//[!0-9]/} | |
| echo $jobIDNumeric | |
| qstat -s -u am893 |
| {"lastUpload":"2018-07-10T04:14:10.448Z","extensionVersion":"v2.9.2"} |
| import numpy as np | |
| def sample_pairs_siamese(train_X, train_y, batch_size): | |
| # Generate a random batch of batch_size samples | |
| rand_index = np.random.choice(len(train_X), size=batch_size) | |
| batch_xs, batch_ys = train_X[rand_index], train_y[rand_index] | |
| new_batch_xs, new_batch_ys = [], [] |