sudo apt-get install nginx gunicorn
$BASE=/home/ubuntu/project/CracksDetection
| def get_cnt_center(img, c): # image img and contour c | |
| M = cv2.moments(c) | |
| # cX, cY of center | |
| cX = int(M["m10"] / M["m00"]) | |
| cY = int(M["m01"] / M["m00"]) | |
| # draw the contour and center of the shape on the image | |
| cv2.drawContours(img, [c], -1, (0, 255, 0), 2) | |
| cv2.circle(img, (cX, cY), 7, (255, 255, 255), -1) | |
| cv2.putText(img, "center", (cX - 20, cY - 20), |
| Agnoster | |
| https://medium.com/@genealabs/agnoster-theme-on-os-x-391d60effaf6 | |
| https://gist.github.com/renshuki/3cf3de6e7f00fa7e744a |
| %Findout Gradient Magnitude of the images using Sobel mask | |
| function [gx,gy,mag,phi] = Gradients(gray) | |
| gray = double(gray); | |
| horzmask = fspecial('sobel'); | |
| % vertmask = horzmask'; | |
| gx = imfilter(gray,horzmask,'replicate'); | |
| gy = imfilter(gray,horzmask','replicate'); | |
| phi = (atan2((gy),(gx))); |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| <code_scheme name="my_project"> | |
| <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="500" /> | |
| <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="10" /> | |
| <GroovyCodeStyleSettings> | |
| <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="500" /> | |
| <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="10" /> | |
| </GroovyCodeStyleSettings> | |
| <JavaCodeStyleSettings> | |
| <option name="DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION" value="true" /> | |
| <option name="ALIGN_MULTILINE_ANNOTATION_PARAMETERS" value="true" /> |
| for i in $(ls ./) | |
| do | |
| new_name="${i/replace_this/with_this}" | |
| echo $new_name | |
| $(mv "./$i" "./$new_name") | |
| done |
| from __future__ import division, print_function, absolute_import | |
| import pickle | |
| import numpy as np | |
| from PIL import Image | |
| import tflearn | |
| from tflearn.layers.core import input_data, dropout, fully_connected | |
| from tflearn.layers.conv import conv_2d, max_pool_2d | |
| from tflearn.layers.normalization import local_response_normalization | |
| from tflearn.layers.estimator import regression |
This tutorial guides you through creating your first Vagrant project.
We start with a generic Ubuntu VM, and use the Chef provisioning tool to:
Afterwards, we'll see how easy it is to package our newly provisioned VM