import glob
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
%matplotlib inline
#Load all images and turn them into grey
#return: grey images list
def load_gray_images():
images = []
img_filenames = glob.glob('./camera_cal/calibration*.jpg')
for filename in img_filenames:
gray_image = cv2.cvtColor(mpimg.imread(filename), cv2.COLOR_RGB2GRAY)
images.append(gray_image)
return images
#Get camera matrix and the distortion coefficients of the given gray images
#return:
# camera_matrix - Output 3x3 floating-point matrix
# dist_coeffs - Output vector of distortion coefficients (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])
def get_camera_matrix_and_dist_coeffs(gray_images):
chessboard_dim = (9,6) # pattern size
imgp = [] # 2d points in image plane.
# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0) (code from udacity example.py)
# matrix of the projections of calibration pattern points
objp = [] # 3d points in real world space (original chessboard image)
object_points = np.zeros((6*9,3), np.float32)
object_points[:,:2] = np.mgrid[0:9,0:6].T.reshape(-1,2)
for image in gray_images:
corners_found, corners = cv2.findChessboardCorners(image, chessboard_dim, None)
if corners_found == True:
objp.append(object_points)
imgp.append(corners)
_,camera_matrix,dist_coeffs,_,_ = cv2.calibrateCamera(objp, imgp, gray_images[0].shape[0:2], None, None)
return [camera_matrix,dist_coeffs]
#Get distortion correction to raw image
#return: undistortion image
def undistort_image(src_img, camera_matrix, dist_coeffs):
return cv2.undistort(src_img, camera_matrix, dist_coeffs, None, camera_matrix)
def show_picture(image, title, grid, position):
ax = plt.subplot2grid(grid, position)
ax.imshow(image)
ax.set_title(title)
return ax
def show_gray_picture(image, title, grid, position):
ax = plt.subplot2grid(grid, position)
ax.imshow(image, cmap='gray')
ax.set_title(title)
return ax
There are 20 images with distortion available. These images are converted to gray images. Each image is determined by the corners (9x6) and the cv2 calibrate camera function is used to determine the camera matrix and the distortion coefficients. The camera matrix and the distortion coefficients can be used to remove equalization per image. After the undistortion, the images must be converted back to the RGB images.
gray_images = load_gray_images()
camera_matrix,dist_coeffs = get_camera_matrix_and_dist_coeffs(gray_images)
test_image_src = mpimg.imread('./camera_cal/calibration1.jpg')
test_image_dest = undistort_image(test_image_src, camera_matrix, dist_coeffs)
plt.rc('figure', figsize=(15,15))
show_picture(test_image_src, "Original image with distortion", (1,2), (0,0))
show_picture(test_image_dest, "Same Image without distortion", (1,2), (0,1))
test2_src = mpimg.imread('./test_images/straight_lines1.jpg') # 2
test2_dst = undistort_image(test2_src, camera_matrix, dist_coeffs)
mpimg.imsave('./output_images/undistort_straight_lines1.jpg', test2_dst)
plt.rc('figure', figsize=(15,15))
show_picture(test2_src, "Original image with distortion", (1,2), (0,0))
show_picture(test2_dst, "Same Image without distortion", (1,2), (0,1))
def abs_sobel_thresh(gray_img, orient:('x','y')='x', sobel_thresh=(0, 255)): #-
# Apply x or y gradient with the OpenCV Sobel() function
# and take the absolute value
if orient == 'x':
sobel = cv2.Sobel(gray_img, cv2.CV_64F, 1, 0)
if orient == 'y':
sobel = cv2.Sobel(gray_img, cv2.CV_64F, 0, 1)
abs_sobel = np.absolute(sobel)
# Rescale back to 8 bit integer
scaled_sobel = np.uint8(255*abs_sobel/np.max(abs_sobel))
# Create a copy and apply the threshold
binary_output = np.zeros_like(scaled_sobel)
# Here I'm using inclusive (>=, <=) thresholds, but exclusive is ok too
binary_output[(scaled_sobel >= sobel_thresh[0]) & (scaled_sobel <= sobel_thresh[1])] = 1
return binary_output
def dir_threshold(gray_img, sobel_kernel=3, thresh=(0, np.pi/2)):
# Calculate the x and y gradients
sobelx = cv2.Sobel(gray_img, cv2.CV_64F, 1, 0, ksize=sobel_kernel)
sobely = cv2.Sobel(gray_img, cv2.CV_64F, 0, 1, ksize=sobel_kernel)
# Take the absolute value of the gradient direction
abs_sobely = np.absolute(sobely)
abs_sobelx = np.absolute(sobelx)
# apply a threshold, and create a binary image result
absgraddir = np.arctan2(abs_sobely, abs_sobelx)
binary_output = np.zeros_like(absgraddir)
binary_output[(absgraddir >= thresh[0]) & (absgraddir <= thresh[1])] = 1
return binary_output
def mag_thresh(img, sobel_kernel=3, mag_thresh=(0, 255)):
# Take both Sobel x and y gradients
sobelx = cv2.Sobel(img, cv2.CV_64F, 1, 0, ksize=sobel_kernel)
sobely = cv2.Sobel(img, cv2.CV_64F, 0, 1, ksize=sobel_kernel)
# Calculate the gradient magnitude
gradmag = np.sqrt(sobelx**2 + sobely**2)
# Rescale to 8 bit
scale_factor = np.max(gradmag)/255
gradmag = (gradmag/scale_factor).astype(np.uint8)
# Create a binary image of ones where threshold is met, zeros otherwise
binary_output = np.zeros_like(gradmag)
binary_output[(gradmag >= mag_thresh[0]) & (gradmag <= mag_thresh[1])] = 1
return binary_output
The road has yellow and white boundary lines, the whites are often interrupted. The pavement of the streets alternates between dark and bright. In many bright areas there are white portions. The trees cast shadows on the road and change the color of the boundary lines
I have examined the color spaces RGB, HLS, Lab and YUV. To do this, I used color thresholds as well as various Soeble filters to better represent the boundary line patterns in binary images and to remove the disturbing road surfaces.
First I successfully tested grey images with Absolute-Soeble-filters and Direction-Soeble-filters. Then I combined both filters. By both filters I can remove light/dark areas on the lines a bit.
The Absolute-Soeble-filter is OK in the x-direction. The Absolute-Soeble-filter in the y-direction recognized the lines but with more interference. That's why I didn't use it anymore.
from ipywidgets import widgets, fixed, interact, Dropdown, IntSlider, FloatSlider
from IPython.display import display
test2_src = mpimg.imread('./test_images/test6.jpg')
test2_dst = undistort_image(test2_src, camera_matrix, dist_coeffs)
@interact(min_thr=IntSlider(min=0,max=255,step=1,value=15), \
max_thr=IntSlider(min=0,max=255,step=1,value=150))
def test_abs_sobel_thresh_gray(min_thr, max_thr): #20
gray_img = cv2.cvtColor(test2_dst, cv2.COLOR_RGB2GRAY)
dest_img2 = abs_sobel_thresh(gray_img, 'x', sobel_thresh=(min_thr, max_thr))
plt.rc('figure', figsize=(15,15))
show_gray_picture(gray_img, "Original gray channel with undistortion", (1,2), (0,0))
show_gray_picture(dest_img2, "Same image with abs_sobel_thresh (x orientation)", (1,2), (0,1))
@interact(kernel=IntSlider(min=1,max=33,step=2,value=3), \
min_thr=FloatSlider(min=-3.0,max=3.0,step=0.1,value=0.5), \
max_thr=FloatSlider(min=-3.0,max=3.0,step=0.1,value=1.5))
def test_dir_threshold_gray(kernel, min_thr, max_thr):
gray_img = cv2.cvtColor(test2_dst, cv2.COLOR_RGB2GRAY)
dest_img = dir_threshold(gray_img, sobel_kernel=kernel, thresh=(min_thr, max_thr))
plt.rc('figure', figsize=(15,15))
show_gray_picture(gray_img, "Original gray image with undistortion", (1,2), (0,0))
show_gray_picture(dest_img, "Same image with dir_threshold", (1,2), (0,1))
The combination of the absolute-Soeble-Filter and direction-Soeble-filter with grayscale image. The same combination with other color space channels had same or worse results.
def combine_soebel_and_direction(gray_img):
abs_sobel_img = abs_sobel_thresh(gray_img, 'x', sobel_thresh=(15, 150))
direction_img = dir_threshold(gray_img, sobel_kernel=1, thresh=(0.5, 1.5))
# combine the absolute soebel gradient and direction thresholds
combined_condition = ((abs_sobel_img == 1) & (direction_img == 1))
return combined_condition
gray_img = cv2.cvtColor(test2_dst, cv2.COLOR_RGB2GRAY)
dest_img = combine_soebel_and_direction(gray_img)
combined_binary = np.zeros_like(gray_img)
combined_binary[gray_img] = 1
plt.rc('figure', figsize=(15,15))
show_gray_picture(gray_img, "Original gray image with undistortion", (1,2), (0,0))
show_gray_picture(dest_img, "Same image with combination of soebel and direction filters", (1,2), (0,1))
Color thresholds:
Red from RGB color Space can be used to determine yellow and white lines . Yellow or the combination of red and yellow does not improve the determination. Blue did not bring a good result.
If the pavement becomes very bright, red or yellow also represents it.
from ipywidgets import widgets, fixed, interact, Dropdown, IntSlider, FloatSlider
from IPython.display import display
test2_src = mpimg.imread('./test_images/test4.jpg')
rgb_img = undistort_image(test2_src, camera_matrix, dist_coeffs)
def color_R_thresh(rgb_img, color_thr):
r_img = rgb_img[:,:,0]
r_thr = (r_img > color_thr)
return r_thr
@interact(color_thr=IntSlider(min=0,max=255,step=1,value=160))
def test_color_thresh_R(color_thr):
r_thr = color_R_thresh(rgb_img, color_thr)
color_binary = np.zeros_like(gray_img)
color_binary[r_thr] = 1
plt.rc('figure', figsize=(15,15))
show_gray_picture(rgb_img, "Original imgae with undistortion", (1,2), (0,0))
show_gray_picture(color_binary, "Same image with r channel threshold", (1,2), (0,1))
The channels of the LAB and YUV color space have not made any improvements to the HLS colorspace. That's why I chose the HLS color space.
The H channel in the HLS color space converts the lines to black and the pavement of the road is displayed very brightly. Thus, broken lines can only be localized very poorly. In the L and S channel you can find lines. Through the L channel the dark spots can be eliminated. But the channel is similar to the red channel in the RGB color space and thus does not bring any improvements.
That's why I used the S channel in the HLS color space. With the S channel, white lines can be found of light substrates.
from ipywidgets import widgets, fixed, interact, Dropdown, IntSlider, FloatSlider
from IPython.display import display
test2_src = mpimg.imread('./test_images/test1.jpg')
rgb_img = undistort_image(test2_src, camera_matrix, dist_coeffs)
def color_S_thresh(rgb_img, min_thr, max_thr):
hls_img = cv2.cvtColor(rgb_img, cv2.COLOR_RGB2HLS)
s_img = hls_img[:,:,2]
s_thr = (s_img >= min_thr) & (s_img < max_thr)
return s_thr
@interact(min_thr=IntSlider(min=0,max=255,step=1,value=123), \
max_thr=IntSlider(min=0,max=255,step=1,value=200))
def test_color_thresh_S(min_thr, max_thr):
s_thr = color_S_thresh(rgb_img, min_thr, max_thr)
color_binary = np.zeros_like(gray_img)
color_binary[s_thr] = 1
plt.rc('figure', figsize=(15,15))
show_gray_picture(rgb_img, "Original imgae with undistortion", (1,2), (0,0))
show_gray_picture(color_binary, "Same image with s channel threshold", (1,2), (0,1))
You can use the magnitude of the gradient filter to fix problems with bright surfaces. Unfortunately, the filter widens the lines very much and disturbs the histogram for line search algorithm; That's why I don't use it here; But as an example listed here as well.
test2_src = mpimg.imread('./test_images/test1.jpg')
rgb_img = undistort_image(test2_src, camera_matrix, dist_coeffs)
def mag_thresh_S(rgb_img, kernel, min_thr, max_thr):
hls_img = cv2.cvtColor(rgb_img, cv2.COLOR_RGB2HLS)
s_img = hls_img[:,:,2]
mag_thr = mag_thresh(s_img, sobel_kernel=kernel, mag_thresh=(min_thr, max_thr))
return mag_thr
@interact(kernel=IntSlider(min=1,max=21,step=2,value=11), \
min_thr=IntSlider(min=0,max=255,step=1,value=25), \
max_thr=IntSlider(min=0,max=255,step=1,value=100))
def test_mag_thresh_S(kernel, min_thr, max_thr):
dest_img = mag_thresh_S(rgb_img, kernel, min_thr, max_thr)
plt.rc('figure', figsize=(15,15))
show_gray_picture(rgb_img, "Original image with undistortion", (1,2), (0,0))
show_gray_picture(dest_img, "Same image with s channel magnitude of the gradient filter", (1,2), (0,1))
Here is the final combination of the filters. This reduces the problems with bright areas and shadows on the lines.
import os
def combined_binary(rgb_img):
gray_img = cv2.cvtColor(rgb_img, cv2.COLOR_RGB2GRAY)
soebel_and_direction_thr = combine_soebel_and_direction(gray_img)
color_S_thr = color_S_thresh(rgb_img, 123, 200)
color_R_thr = color_R_thresh(rgb_img, 160)
color_binary = np.zeros_like(gray_img)
color_binary[ (color_R_thr) & (soebel_and_direction_thr | color_S_thr) ] = 1
return color_binary
image_paths = glob.glob('./test_images/*.jpg')
plt.rc('figure', figsize=(10,20))
for i in range(0, 8):
ax = plt.subplot2grid((8,2), (i,0))
test2_src = mpimg.imread(image_paths[i])
ax.imshow(test2_src) #, cmap=plt.get_cmap('gray'))
ax.set_title("original: " + os.path.basename(image_paths[i]))
ax.axis('off')
ax = plt.subplot2grid((8,2), (i,1))
test2_dst = undistort_image(test2_src, camera_matrix, dist_coeffs)
combined_binary_img = combined_binary(test2_dst)
ax.imshow(combined_binary_img, cmap='gray')
ax.set_title("binary: " + os.path.basename(image_paths[i]))
ax.axis('off')
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
def draw_into_image(img):
pts = np.array([(595,445), \
(685,445),\
(1115,720), \
(199,720)], np.int32) #310
pts = pts.reshape((-1,1,2))
cv2.polylines(img,[pts],True,(255,0,0),3)
return None
def transforming_image(image_src, revers:(True,False)=False):
src_top_left = [600,447]
src_top_right = [680,447]
src_bottom_left = [204,720]
src_bottom_right = [1110,720]
dst_top_left = [600,0] #259
dst_top_right = [680,0] #1045
dst_bottom_left = [600,720] #259
dst_bottom_right = [680,720]
dst_top_left = [440,0] #259
dst_top_right = [820,0] #1045
dst_bottom_left = [440,720] #259
dst_bottom_right = [820,720]
pts1 = np.float32([src_top_left,src_top_right,src_bottom_left,src_bottom_right])
pts2 = np.float32([dst_top_left,dst_top_right,dst_bottom_left,dst_bottom_right])
if (revers == True):
pts1, pts2 = pts2, pts1
trans_M = cv2.getPerspectiveTransform(pts1,pts2)
warped_img = cv2.warpPerspective(image_src,trans_M,(image_src.shape[1],image_src.shape[0]),flags=cv2.INTER_LINEAR)
return warped_img
The picture shows the transformation of a straight road. The marking strips in the bird's eye view are parallel and are straight. Red dots are inserted into the originale image so that you can see the transformation in the bird's eye view.
straight_lines1_src = mpimg.imread('./test_images/straight_lines1.jpg') #straight_lines1
straight_lines1_undistort = undistort_image(straight_lines1_src, camera_matrix, dist_coeffs)
draw_into_image(straight_lines1_undistort)
straight_lines1_transformed = transforming_image(straight_lines1_undistort)
plt.rc('figure', figsize=(15,15))
show_picture(straight_lines1_undistort, "straight_lines1 image with points of interest", (1,2), (0,0))
show_picture(straight_lines1_transformed, "straight_lines1 image bird eye view", (1,2), (0,1))
The picture in the bird's eye view shows the transformation of a curve. The marker strips in the bird's eye view are parallel but curved.
test2_src = mpimg.imread('./test_images/test6.jpg')
test2_undistort = undistort_image(test2_src, camera_matrix, dist_coeffs)
test2_transformed = transforming_image(test2_undistort)
plt.rc('figure', figsize=(15,15))
show_picture(test2_undistort, "test6 image", (1,2), (0,0))
show_picture(test2_transformed, "test6 image bird eye view", (1,2), (0,1)) #
Calling all test images through the pipeline: distortion-corrected image, thresholded binary image and perspective transform
def pipeline(img_src):
undistort_img = undistort_image(img_src, camera_matrix, dist_coeffs)
combined_binary_img = combined_binary(undistort_img)
img_dest = transforming_image(combined_binary_img)
return img_dest
image_paths = glob.glob('./test_images/*.jpg')
plt.rc('figure', figsize=(10,25))
for i in range(0, 8):
ax = plt.subplot2grid((8,2), (i,0))
test_src = mpimg.imread(image_paths[i])
ax.imshow(test_src) #, cmap=plt.get_cmap('gray'))
ax.set_title("original: " + os.path.basename(image_paths[i]))
ax.axis('off')
ax = plt.subplot2grid((8,2), (i,1))
transformed_image = pipeline(test_src)
transformed_image = cv2.rectangle(transformed_image, (0, 0), (250, 720), (0, 0, 0), -1)
transformed_image = cv2.rectangle(transformed_image, (1000, 0), (1280, 720), (0, 0, 0), -1)
ax.imshow(transformed_image, cmap='gray')
ax.set_title("binary: " + os.path.basename(image_paths[i]))
ax.axis('off')
I use the sliding window algorithm to determine the polynomials of the two boundary lines. The image is divided into four parts. In the lower left half of the image, the x-position of the maximum Histogrammwertes of the left lane is determined. In the lower right half of the image, the x-position of the maximum Histogrammwertes of the right lane is determined.
Here the histogram for the sample images is shown (separation of the left and right maximum histograms is done later).
import numpy as np
image_paths = glob.glob('./test_images/*.jpg')
plt.rc('figure', figsize=(10,30))
for i in range(0, 8):
ax = plt.subplot2grid((8,2), (i,0))
test_src = mpimg.imread(image_paths[i])
transformed_image = pipeline(test_src)
transformed_image = cv2.rectangle(transformed_image, (0, 0), (250, 720), (0, 0, 0), -1)
transformed_image = cv2.rectangle(transformed_image, (1000, 0), (1280, 720), (0, 0, 0), -1)
ax.imshow(transformed_image, cmap='gray')
ax.set_title("binary: " + os.path.basename(image_paths[i]))
ax.axis('off')
ax = plt.subplot2grid((8,2), (i,1))
transformed_image = pipeline(test_src)
transformed_image = cv2.rectangle(transformed_image, (0, 0), (250, 720), (0, 0, 0), -1)
transformed_image = cv2.rectangle(transformed_image, (1000, 0), (1280, 720), (0, 0, 0), -1)
histogram = np.sum(transformed_image[transformed_image.shape[0]//2:,:], axis=0)
ax.plot(histogram)
ax.set_title("Histgram: " + os.path.basename(image_paths[i]))
10 Search windows per lane are used. The coordinates are calculated for each search window. The pixels are determined per search window. If the number of pixels found is greater than 100 (min_good_pixels), then the search was successful and the coordinates are collected. From the coordinates found, the mean function determines the next middle Windows position (leftx_base and rightx_base). The left and right polynomials are justified from all the coordinates found. If no coordinates are found, the polynomial is taken from the last search.
#Calculation of polynomials for street lanes
from queuelib import FifoDiskQueue
def compute_poly(img, queue_left, queue_right):
transformed_image = pipeline(img) #pipeline2
transformed_image = cv2.rectangle(transformed_image, (0, 0), (250, 720), (0, 0, 0), -1)
transformed_image = cv2.rectangle(transformed_image, (1000, 0), (1280, 720), (0, 0, 0), -1)
histogram = np.sum(transformed_image[transformed_image.shape[0]//2:,:], axis=0)
# Find the peak of the left and right halves of the histogram
midpoint_hist = histogram.shape[0]//2
leftx_base = np.argmax(histogram[:midpoint_hist]) # starting point for the left line
rightx_base = np.argmax(histogram[midpoint_hist:]) + midpoint_hist # starting point for the right line
#print(midpoint_hist, leftx_base, rightx_base)
out_img = np.dstack((transformed_image, transformed_image, transformed_image))*255
non_zeros = transformed_image.nonzero()
non_zeros_y = non_zeros[0]
non_zeros_x = non_zeros[1]
num_windows = 10
num_rows = transformed_image.shape[0]
win_height = num_rows//num_windows
win_half_width = 80 #50
# Set minimum number of pixels found to recenter window
min_good_pixels = 40 #100
left_lane_coordinates = []
right_lane_coordinates = []
# Step through the windows one by one
for window in range(num_windows):
# Identify window boundaries in x and y (and right and left)
win_y_max = num_rows - window*win_height
win_y_min = num_rows - (window+1)* win_height
#Width of the search window
win_left_x_min = leftx_base - win_half_width
win_left_x_max = leftx_base + win_half_width
# Draw the left windows on the visualization image
cv2.rectangle(out_img, (win_left_x_min, win_y_min), (win_left_x_max, win_y_max), [0,0,255],2)
# Identify the nonzero pixels in x and y within the left window
good_left_window_coordinates = ((non_zeros_x >= win_left_x_min) & (non_zeros_x <= win_left_x_max) \
& (non_zeros_y >= win_y_min) & (non_zeros_y <= win_y_max)).nonzero()[0]
left_lane_coordinates.append(good_left_window_coordinates)
# If you found > min_good_pixels, recenter next window on their new leftx_base position
if len(good_left_window_coordinates) > min_good_pixels:
leftx_base = np.int(np.mean(non_zeros_x[good_left_window_coordinates]))
#Width of the search window
win_right_x_min = rightx_base - win_half_width
win_right_x_max = rightx_base + win_half_width
# Draw the right windows on the visualization image
cv2.rectangle(out_img, (win_right_x_min, win_y_min), (win_right_x_max, win_y_max), [0,0,255],2)
# Identify the nonzero pixels in x and y within the right window
good_right_window_coordinates = ((non_zeros_x >= win_right_x_min) & (non_zeros_x <= win_right_x_max) \
& (non_zeros_y >= win_y_min) & (non_zeros_y <= win_y_max)).nonzero()[0]
right_lane_coordinates.append(good_right_window_coordinates)
# If you found > min_good_pixels, recenter next window on their new rightx_base position
if len(good_right_window_coordinates) > min_good_pixels:
rightx_base = np.int(np.mean(non_zeros_x[good_right_window_coordinates]))
# Concatenate the arrays of left lane indices
left_lane_coordinates = np.concatenate(left_lane_coordinates)
# Draw the left lane pixcels inside seach windows
out_img[non_zeros_y[left_lane_coordinates], non_zeros_x[left_lane_coordinates]] = [255,0,0]
win_left_x = non_zeros_x[left_lane_coordinates]
win_left_y = non_zeros_y[left_lane_coordinates]
#If no win_left points are found, then the polyfit is used by the last search
if ((win_left_y.size != 0) and (win_left_x.size != 0)):
polyfit_left = np.polyfit(win_left_y, win_left_x, 2)
queue_left.append(polyfit_left)
if (len(queue_left) >= 10):
queue_left = queue_left[len(queue_left) - 10:]
polyfit_left = np.average(queue_left, axis=0)
win_y_points = np.linspace(0, num_rows-1, num_rows)
#caculate the left polyfit
left_polyfit_x = polyfit_left[0]*win_y_points**2 + polyfit_left[1]*win_y_points + polyfit_left[2]
# Concatenate the arrays of indices
right_lane_coordinates = np.concatenate(right_lane_coordinates)
# Draw the right lane pixcels inside seach windows
out_img[non_zeros_y[right_lane_coordinates], non_zeros_x[right_lane_coordinates]] = [0,0,255]
win_right_x = non_zeros_x[right_lane_coordinates]
win_right_y = non_zeros_y[right_lane_coordinates]
#If no win_right points are found, then the polyfit is used by the last search
if ((win_right_y.size != 0) and (win_right_x.size != 0)):
polyfit_right = np.polyfit(win_right_y, win_right_x, 2)
queue_right.append(polyfit_right)
if (len(polyfit_right) >= 10):
queue_right = queue_right[len(queue_right) - 10:]
queue_right = np.average(queue_right, axis=0)
#caculate the right polyfit
right_polyfit_x = polyfit_right[0]*win_y_points**2 + polyfit_right[1]*win_y_points + polyfit_right[2]
return left_polyfit_x, right_polyfit_x, out_img, transformed_image, win_y_points
queue_left = []
queue_right = []
img_src = mpimg.imread('./test_images/test2.jpg') #6
left_polyfit_x, right_polyfit_x, out_img, transformed_image, win_y_points = compute_poly(img_src, queue_left, queue_right)
plt.imshow(out_img)
plt.plot(left_polyfit_x, win_y_points, color='yellow')
plt.plot(right_polyfit_x, win_y_points, color='yellow')
plt.xlim(0, transformed_image.shape[1])
plt.ylim(transformed_image.shape[0],0)
def compute_the_radius_of_curvature (polyfit_x, num_rows):
#Define conversions in x and y from pixels space to meters. The calculation comes from Udacity
#More information can be found under U.S. government specifications for highway curvature:
#http://onlinemanuals.txdot.gov/txdotmanuals/rdw/horizontal_alignment.htm#BGBHGEGC
ym_per_pix = 30/720 # meters per pixel in y dimension
xm_per_pix = 3.7/700 # meters per pixel in x dimension #
# If no pixels were found return None
win_y_points = np.linspace(0, num_rows-1, num_rows)
y_eval = np.max(win_y_points)
# Fit new polynomials to x,y in world space
fit_cr = np.polyfit(win_y_points*ym_per_pix, polyfit_x*xm_per_pix, 2)
curve_rad = ((1 + (2*fit_cr[0]*y_eval*ym_per_pix + fit_cr[1])**2)**1.5) / np.absolute(2*fit_cr[0])
return curve_rad
def compute_average_curve_and_center_offset(left_polyfit_x, right_polyfit_x, num_rows):
xm_per_pix = 3.7/700 # meters per pixel in x dimension
#compute_average_curve
left_curve_rad = compute_the_radius_of_curvature(left_polyfit_x, num_rows)
right_curve_rad = compute_the_radius_of_curvature(right_polyfit_x, num_rows)
average_curve_rad = (left_curve_rad + right_curve_rad)/2
# compute the center offset
car_pos = 1280/2 #image.shape[1]/2
lane_center = (right_polyfit_x[num_rows-1] + left_polyfit_x[num_rows-1])/2
center_offset_pixels = abs(car_pos - lane_center)
center_offset_in_mtrs = center_offset_pixels * xm_per_pix
return "The average radius of curvature: {:.2f} m".format(average_curve_rad), \
"Center offset: {:.2f} m".format(center_offset_in_mtrs)
num_rows = transformed_image.shape[0]
average_curve_rad, center_offset_in_mtrs = compute_average_curve_and_center_offset(left_polyfit_x, right_polyfit_x, num_rows)
print(average_curve_rad)
print(center_offset_in_mtrs)
def compute_img_with_polygon(left_polyfit_x, right_polyfit_x, img_src, transformed_image, num_rows):
out_img = np.dstack((transformed_image, transformed_image, transformed_image))*255
win_y_points = np.linspace(0, num_rows-1, num_rows)
left_line_points = np.array(np.transpose(np.vstack([left_polyfit_x, win_y_points])))
right_line_points = np.array(np.flipud(np.transpose(np.vstack([right_polyfit_x, win_y_points]))))
line_points = np.vstack((left_line_points, right_line_points))
#compute the green polygon
cv2.fillPoly(out_img, np.int_([line_points]), [0,255, 0])
unwarped = transforming_image(out_img, revers=True)
undistort_img = undistort_image(img_src, camera_matrix, dist_coeffs)
final_img = cv2.addWeighted(undistort_img, 1, unwarped, 0.4, 0) #img_src
average_curve_rad, center_offset_in_mtrs = compute_average_curve_and_center_offset(left_polyfit_x, right_polyfit_x, num_rows)
font = cv2.FONT_HERSHEY_SIMPLEX
fontScale = 1
cv2.putText(final_img, average_curve_rad, (90, 90), font, fontScale, (200,255,155), 2, cv2.LINE_AA)
cv2.putText(final_img, center_offset_in_mtrs, (90, 140), font, fontScale, (200,255,155), 2, cv2.LINE_AA)
return final_img
img_src = mpimg.imread('./test_images/test2.jpg')
num_rows = transformed_image.shape[0]
result_img = compute_img_with_polygon(left_polyfit_x, right_polyfit_x, img_src, transformed_image, num_rows)
plt.imshow(result_img)
def final_pipeline(rgb_img):
left_polyfit_x, right_polyfit_x, out_img, transformed_image, win_y_points = compute_poly(rgb_img, queue_left, queue_right)
num_rows = transformed_image.shape[0]
return compute_img_with_polygon(left_polyfit_x, right_polyfit_x, rgb_img, transformed_image, num_rows)
from moviepy.editor import VideoFileClip
queue_left = []
queue_right = []
video_clip = VideoFileClip("project_video.mp4")
new_clip = video_clip.fl_image(final_pipeline)
new_clip.write_videofile(filename="project_video_with_lines8.mp4", fps=new_clip.fps, \
verbose=False, progress_bar=False, audio=False)
print("finished")
%%HTML
<video width="640" height="480" controls>
<source src="./project_video_with_lines8.mp4" type="video/mp4">
</video>
It was very expensive to combine the different color spaces and filters until you got a useful result. For example, you can use the magnitude of the gradient filter to fix problems with bright surfaces. Unfortunately, the filter greatly magnifies the lines and disturbs the histogram for the line-search algorithm; That's why I don't use it here.
NEW: Shadows of trees make the pipeline still have some problems. I have inserted two queues for the left and right lane, each of which stores up to 10 Polyfit. About the stored Polyfit, I create the mean value. The mean value Polyfit is then used per image. Thus, there are no more distortions on the lines.
My pipeline doesn't work on the "Harder_challenge" track. The glass reflections and the right missing markers will mess up the calculation. Here, a polynomial mean value calculation could help.
Improved pipeline calculation:
You can divide the area between the lines in different areas. Depending on whether you find a lighter or dark surface, you would use a different filter combination for this area. So you would get less interference.
You could use neural nets and color the lines differently on the original images; e.g. from dark to light yellow, from dark to white, etc. Thus, the images would be more suitable for disturbances (tunnels, rain, etc.).


Home
DataVisualization
RouteVisualization
NetworkAnalysis
EconomyAnalysis
HeatAnalysis
Immigrationpolicy
»
Emigrants to Different Continents
Emigrants by World Bank Income Groups
«
Ranking of Immigrants by Country in 1990


×
Close
Save project
Filename
Save Layout
Save Code
Save
Cancel
×
Close
Settings
Edge Length
Automata max node count
Operation failure count
Operation pass count
Fair Abstraction
Pruning
Autosave
Live Compiling
Dark Mode
Close
Toggle navigation
SWEN224 Modelling Tool
Editor
Process Models
Process Generator
Console Output: (Server status:
Disconnected
)
Process:
No processes found
Hide Interrupts:
Add process
Add all processes
Clear
Export as Image
Process:
No processes found
Add Process
Import Process
Process Name:
Automata
Petrinet
Generate
Clear


Decorators#
Python decorators for use in Sage.
AUTHORS:
Tim Dumol (5 Dec 2009) – initial version.
Johan S. R. Nielsen (2010) – collect decorators from various modules.
Johan S. R. Nielsen (8 apr 2011) – improve introspection on decorators.
Simon King (2011-05-26) – improve introspection of sage_wraps. Put this file into the reference manual.
Julian Rueth (2014-03-19): added
decorator_keywords
decorator
- sage.misc.decorators.decorator_defaults(func)#
This function allows a decorator to have default arguments.
Normally, a decorator can be called with or without arguments. However, the two cases call for different types of return values. If a decorator is called with no parentheses, it should be run directly on the function. However, if a decorator is called with parentheses (i.e., arguments), then it should return a function that is then in turn called with the defined function as an argument.
This decorator allows us to have these default arguments without worrying about the return type.
EXAMPLES:
sage: from sage.misc.decorators import decorator_defaults sage: @decorator_defaults ....: def my_decorator(f,*args,**kwds): ....: print(kwds) ....: print(args) ....: print(f.__name__) sage: @my_decorator ....: def my_fun(a,b): ....: return a,b {} () my_fun sage: @my_decorator(3,4,c=1,d=2) ....: def my_fun(a,b): ....: return a,b {'c': 1, 'd': 2} (3, 4) my_fun
- sage.misc.decorators.decorator_keywords(func)#
A decorator for decorators with optional keyword arguments.
EXAMPLES:
sage: from sage.misc.decorators import decorator_keywords sage: @decorator_keywords ....: def preprocess(f=None, processor=None): ....: def wrapper(*args, **kwargs): ....: if processor is not None: ....: args, kwargs = processor(*args, **kwargs) ....: return f(*args, **kwargs) ....: return wrapper
This decorator can be called with and without arguments:
sage: @preprocess ....: def foo(x): return x sage: foo(None) sage: foo(1) 1 sage: def normalize(x): return ((0,),{}) if x is None else ((x,),{}) sage: @preprocess(processor=normalize) ....: def foo(x): return x sage: foo(None) 0 sage: foo(1) 1
- class sage.misc.decorators.infix_operator(precedence)#
Bases:
object
A decorator for functions which allows for a hack that makes the function behave like an infix operator.
This decorator exists as a convenience for interactive use.
EXAMPLES:
An infix dot product operator:
sage: @infix_operator('multiply') ....: def dot(a, b): ....: '''Dot product.''' ....: return a.dot_product(b) sage: u = vector([1, 2, 3]) sage: v = vector([5, 4, 3]) sage: u *dot* v 22
An infix element-wise addition operator:
sage: @infix_operator('add') ....: def eadd(a, b): ....: return a.parent([i + j for i, j in zip(a, b)]) sage: u = vector([1, 2, 3]) sage: v = vector([5, 4, 3]) sage: u +eadd+ v (6, 6, 6) sage: 2*u +eadd+ v (7, 8, 9)
A hack to simulate a postfix operator:
sage: @infix_operator('or') ....: def thendo(a, b): ....: return b(a) sage: x |thendo| cos |thendo| (lambda x: x^2) cos(x)^2
- operators = {'add': {'left': '__add__', 'right': '__radd__'}, 'multiply': {'left': '__mul__', 'right': '__rmul__'}, 'or': {'left': '__or__', 'right': '__ror__'}}#
- class sage.misc.decorators.options(**options)#
Bases:
object
A decorator for functions which allows for default options to be set and reset by the end user. Additionally, if one needs to, one can get at the original keyword arguments passed into the decorator.
- class sage.misc.decorators.rename_keyword(deprecated=None, deprecation=None, **renames)#
Bases:
object
A decorator which renames keyword arguments and optionally deprecates the new keyword.
INPUT:
deprecation
– integer. The github issue number where the deprecation was introduced.the rest of the arguments is a list of keyword arguments in the form
renamed_option='existing_option'
. This will have the effect of renamingrenamed_option
so that the function only seesexisting_option
. If bothrenamed_option
andexisting_option
are passed to the function,existing_option
will override therenamed_option
value.
EXAMPLES:
sage: from sage.misc.decorators import rename_keyword sage: r = rename_keyword(color='rgbcolor') sage: r.renames {'color': 'rgbcolor'} sage: loads(dumps(r)).renames {'color': 'rgbcolor'}
To deprecate an old keyword:
sage: r = rename_keyword(deprecation=13109, color='rgbcolor')
- sage.misc.decorators.sage_wraps(wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',))#
Decorator factory which should be used in decorators for making sure that meta-information on the decorated callables are retained through the decorator, such that the introspection functions of
sage.misc.sageinspect
retrieves them correctly. This includes documentation string, source, and argument specification. This is an extension of the Python standard library decorator functools.wraps.That the argument specification is retained from the decorated functions implies, that if one uses
sage_wraps
in a decorator which intentionally changes the argument specification, one should add this information to the special attribute_sage_argspec_
of the wrapping function (for an example, see e.g.@options
decorator in this module).EXAMPLES:
Demonstrate that documentation string and source are retained from the decorated function:
sage: def square(f): ....: @sage_wraps(f) ....: def new_f(x): ....: return f(x)*f(x) ....: return new_f sage: @square ....: def g(x): ....: "My little function" ....: return x sage: g(2) 4 sage: g(x) x^2 sage: g.__doc__ 'My little function' sage: from sage.misc.sageinspect import sage_getsource, sage_getsourcelines, sage_getfile sage: sage_getsource(g<EMAIL_ADDRESS>g(x)...'
Demonstrate that the argument description are retained from the decorated function through the special method (when left unchanged) (see github issue #9976):
sage: def diff_arg_dec(f): ....: @sage_wraps(f) ....: def new_f(y, some_def_arg=2): ....: return f(y+some_def_arg) ....: return new_f sage: @diff_arg_dec ....: def g(x): ....: return x sage: g(1) 3 sage: g(1, some_def_arg=4) 5 sage: from sage.misc.sageinspect import sage_getargspec sage: sage_getargspec(g) FullArgSpec(args=['x'], varargs=None, varkw=None, defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={})
Demonstrate that it correctly gets the source lines and the source file, which is essential for interactive code edition; note that we do not test the line numbers, as they may easily change:
sage: P.<x,y> = QQ[] sage: I = P*[x,y] sage: sage_getfile(I.interreduced_basis) # known bug '.../sage/rings/polynomial/multi_polynomial_ideal.py' sage: sage_getsourcelines(I.interreduced_basis) ([' @handle_AA_and_QQbar\n', ' @singular_gb_standard_options\n', ' @libsingular_gb_standard_options\n', ' def interreduced_basis(self):\n', ... ' return self.basis.reduced()\n'], ...)
The
f
attribute of the decorated function refers to the original function:sage: foo = object() sage: @sage_wraps(foo) ....: def func(): ....: pass sage: wrapped = sage_wraps(foo)(func) sage: wrapped.f is foo True
Demonstrate that sage_wraps works for non-function callables (github issue #9919):
sage: def square_for_met(f): ....: @sage_wraps(f) ....: def new_f(self, x): ....: return f(self,x)*f(self,x) ....: return new_f sage: class T: ....: @square_for_met ....: def g(self, x): ....: "My little method" ....: return x sage: t = T() sage: t.g(2) 4 sage: t.g.__doc__ 'My little method'
The bug described in github issue #11734 is fixed:
sage: def square(f): ....: @sage_wraps(f) ....: def new_f(x): ....: return f(x)*f(x) ....: return new_f sage: f = lambda x:x^2 sage: g = square(f) sage: g(3) # this line used to fail for some people if these command were manually entered on the sage prompt 81
- class sage.misc.decorators.specialize(*args, **kwargs)#
Bases:
object
A decorator generator that returns a decorator that in turn returns a specialized function for function
f
. In other words, it returns a function that acts likef
with arguments*args
and**kwargs
supplied.INPUT:
*args
,**kwargs
– arguments to specialize the function for.
OUTPUT:
a decorator that accepts a function
f
and specializes it with*args
and**kwargs
EXAMPLES:
sage: f = specialize(5)(lambda x, y: x+y) sage: f(10) 15 sage: f(5) 10 sage: @specialize("Bon Voyage") ....: def greet(greeting, name): ....: print("{0}, {1}!".format(greeting, name)) sage: greet("Monsieur Jean Valjean") Bon Voyage, Monsieur Jean Valjean! sage: greet(name = 'Javert') Bon Voyage, Javert!
- class sage.misc.decorators.suboptions(name, **options)#
Bases:
object
A decorator for functions which collects all keywords starting with
name+'_'
and collects them into a dictionary which will be passed on to the wrapped function as a dictionary calledname_options
.The keyword arguments passed into the constructor are taken to be default for the
name_options
dictionary.EXAMPLES:
sage: from sage.misc.decorators import suboptions sage: s = suboptions('arrow', size=2) sage: s.name 'arrow_' sage: s.options {'size': 2}


Your Personalized Virtual Waiter.
Vaiter is a powerful mobile application built to tackle social distancing during Covid-19.
Waiting in long queues to buy food while social distancing is a tough task for students and thats where Vaiter comes in.
Simply order your food at your favourite university restaurant and pick it up on your own busy schedule.
With Covid-19 showing no signs of regression, it is of paramount importance that we practise social distancing as a society. Shops and restaurants being crowded is an inevitability, but it does not necessarily need to be a risk. Many times, the root of a crowd at university shops is the long queues of students waiting to buy their lunch or simply a snack. This app offers a way to eliminate that factor completely, by students having placed an order beforehand with ease.
Vaiter thrives for ease of use for the user and provides a clean user experience.
Our app is coded in a way which reduces order processing delays so your orders are never late.
The app provides a simple yet eye catching UI for the user so that navigation is seamless and worry free.
Learn more about our innovation by reading our Whitepaper
CEO & Co-Founder
CTO & Co-Founder
CIO
CMO


| 1 | /* | |
| 2 | * Copyright (C) 2017 ahuotala | |
| 3 | * | |
| 4 | * This program is free software; you can redistribute it and/or | |
| 5 | * modify it under the terms of the GNU General Public License | |
| 6 | * as published by the Free Software Foundation; either version 2 | |
| 7 | * of the License, or (at your option) any later version. | |
| 8 | * | |
| 9 | * This program is distributed in the hope that it will be useful, | |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 | * GNU General Public License for more details. | |
| 13 | * | |
| 14 | * You should have received a copy of the GNU General Public License | |
| 15 | * along with this program; if not, write to the Free Software | |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
| 17 | */ | |
| 18 | package com.ahuotala.platformgame.entity; | |
| 19 | ||
| 20 | import java.awt.Graphics; | |
| 21 | ||
| 22 | /** | |
| 23 | * | |
| 24 | * @author ahuotala | |
| 25 | */ | |
| 26 | public abstract class Entity { | |
| 27 | ||
| 28 | protected int x; | |
| 29 | protected int y; | |
| 30 | | |
| 31 | protected int dx = 0; | |
| 32 | protected int dy = 0; | |
| 33 | | |
| 34 | protected int width; | |
| 35 | protected int height; | |
| 36 | ||
| 37 | public Entity() { | |
| 38 | } | |
| 39 | ||
| 40 | public Entity(int x, int y) { | |
| 41 | this.x = x; | |
| 42 | this.y = y; | |
| 43 | } | |
| 44 | ||
| 45 | public int getX() { | |
| 46 |
1
1. getX : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return x; |
| 47 | } | |
| 48 | ||
| 49 | public void setX(int x) { | |
| 50 | this.x = x; | |
| 51 | } | |
| 52 | ||
| 53 | public int getY() { | |
| 54 |
1
1. getY : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return y; |
| 55 | } | |
| 56 | ||
| 57 | public void setY(int y) { | |
| 58 | this.y = y; | |
| 59 | } | |
| 60 | ||
| 61 | public int getWidth() { | |
| 62 |
1
1. getWidth : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return width; |
| 63 | } | |
| 64 | ||
| 65 | public void setWidth(int width) { | |
| 66 | this.width = width; | |
| 67 | } | |
| 68 | ||
| 69 | public int getHeight() { | |
| 70 |
1
1. getHeight : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return height; |
| 71 | } | |
| 72 | ||
| 73 | public void setHeight(int height) { | |
| 74 | this.height = height; | |
| 75 | } | |
| 76 | ||
| 77 | public void move() { | |
| 78 |
1
1. move : Replaced integer addition with subtraction → NO_COVERAGE |
x += dx; |
| 79 |
1
1. move : Replaced integer addition with subtraction → NO_COVERAGE |
y += dy; |
| 80 | } | |
| 81 | ||
| 82 | /** | |
| 83 | * Entiteetin piirto | |
| 84 | * | |
| 85 | * @param g | |
| 86 | */ | |
| 87 | public abstract void render(Graphics g); | |
| 88 | ||
| 89 | } | |
Mutations | ||
| 46 |
1.1 |
|
| 54 |
1.1 |
|
| 62 |
1.1 |
|
| 70 |
1.1 |
|
| 78 |
1.1 |
|
| 79 |
1.1 |


Great & innovative sites built for Charities and Good causes; designed to support and enhance existing campaigns.
On the 17th December, teams of students from NCI will spend just 24 hours designing, developing and deploying sites. Each team will be assigned an industry expert as a mentor for the day.
These marketing boxes are a great place to put some information. These can contain summaries of what the company does, promotional information, or anything else that is relevant to the company. These will usually be below-the-fold.
The images are set to be circular and responsive. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.


{% extends "groups_manager/bootstrap3/group_type.html" %} {% block breadcrumbs %} {{ block.super }}
This group type is not related to any group.


Bachelor degree in business administration, management, public relations, or engineering.
+2 years of experince in management field.
Critical thinking and problem solving
Ability to build consensus and relationships among managers, partners, and employees.
Excellent communication skills.
Solid understanding of financial management.
High leading skill
Tasks and Responsibilities:
Provide inspired leadership for the organization.
Lead the sales and marketing teams.
Direct the hiring, training, and performance evaluations of marketing and sales staff and oversee their daily activities according to marketing manager strategies.
Develop, implement and review operational policies and procedures.
Oversee budgeting, reporting, planning, and auditing.
Work with the board of directors to determine values and mission, and plan for short and long-term goals.
Identify and address problems and opportunities for the company.
Build alliances and partnerships with other organizations.
Support worker communication with the management team.
Hiring date:
Immediately.
Location: Cairo.
Working Hours: Full time.
To Apply:
Please send an updated rusme to:
<EMAIL_ADDRESS>Marketing Manager
Qualifications Required:
Bachelor degree in Marketing, business administration, or management.
+4 years of experince in marketing field.
Strong communication, sales, presentation, management, and leadership skills.
Goal-oriented, flexible, and creative under pressure.
Knowledge of current marketing trends and multimedia platforms.
Strong budgeting, Internet, and computer skills.
Tasks and Responsibilities:
Develop pricing strategies, balancing firm objectives and customer satisfaction.
Identify, develop, and evaluate marketing strategy, based on knowledge of establishment objectives, market characteristics, and cost and markup factors.
Evaluate the financial aspects of product development, such as budgets, expenditures, research and development appropriations, and return-on-investment and profit-loss projections.
Formulate, direct and coordinate marketing activities and policies to promote products and services, working with operations managers.
Compile lists describing product or service offerings.
Use sales forecasting and strategic planning to ensure the sale and profitability of products, lines, or services, analyzing business developments and monitoring market trends.
Consult with sales team to gain advice regarding the types of products or services expected to be in demand
Hiring date:
Immediately.
Location: Cairo.
Working Hours: Full time.
To Apply:
Please send an updated rusme, two references, and letter of intent to:
<EMAIL_ADDRESS>Sales Representative
Job brief
We’re looking for a results-driven sales representative to actively seek out and engage customer prospects.
Qualifications Required:
Customer Service Skills: You will need to be able speak in a friendly way to customers and potential customers, listening to their needs and helping communicate options for them.
Communication Skills: You will need to speak to customers about a product's different features, and answer any questions they might have.
Persistence: Not every customer is going to be a sale. Being able to bounce back if you lose a sale will be key for this job.
Flexibility: You might have to work long hours, nights or weekends.
Tasks and Responsibilities:
Selling products and services using solid arguments to prospective customers.
Performing cost-benefit analyses of existing and potential customers.
Maintaining positive business relationships to ensure future sales.


I have a small problem and it is getting very irritating.
I have 2 CT sensors that measure pv generation and voltage usage. I have connected it to the grid (type 1 setup, see http://openenergymonitor.org/emon/applications/solarpv) Now the problem that accures is that it is about correct untill 100W, when it goes above 100W the measurements that are shown on the emonlcd are 50% off...that means the emonlcd shows 50% less on Watt generation then it should.
For example the emonlcd gives a reading of 250W, but on the solar pv inverters it says around 500W.
I have checked the code but i cannot find ANY faulty things. I need fresh eyes on the code...can anyone help me..
many thanks.
Re: emonlcd shows around 50% of actual pv generation
I have not looked at your code yet, but I doubt there is a non-linearity in the code. It is more likely to be a hardware and construction issue. What values do you see on the serial output from your emonTx? If they are the same as the GLCD, you need to look there. Are you using the 100 A c.t? (I see you didn't calibrate your emonTx). What values do you see for loads into the 3 - 5 kW region?
The easy way to check the GLCD is write a new sketch for your emonTx that completely ignores the inputs and simply writes a series of values to the output struct.
Comment out getting the currents and battery voltage, then add in loop( ) just above "if (settled)" something like:
emontx.power1 += 10;
emontx.power2 += 10;
emontx.battery += 10;
Then you should see the GLCD powers increase in steps of 10 W, and the battery voltage in steps of 10 mV, every 5 seconds. If they do that, the problem isn't with the nanode or the GLCD.
If that is OK, check the voltages at the c.t. burden resistors (18 Ohms). The voltage each end should be 1.65 V d.c. If not, check that you have pairs of 470 k resistors and the decoupling capacitors (10 uF) are the correct way round.
Re: emonlcd shows around 50% of actual pv generation
I have not looked at your code yet, but I doubt there is a non-linearity in the code.I have now looked at your code, and I cannot see any a non-linearity in the code, it all looks absolutely standard. So I think it is a hardware / assembly problem in the emonTx.
Re: emonlcd shows around 50% of actual pv generation
thanks for your comment.....i will look at this.. and let you know.
many thanks
Re: emonlcd shows around 50% of actual pv generation
Check the current clamps - you need to make sure that there is no air gap between the surfaces of the jaws. That air gap can cause havoc.


Jade templates provide a terse syntax for generating dynamic markup. It uses familiar css selector conventions to denote structure more efficiently.
For all the details check out jade-lang.com.
A Noun:
An Animal: Rhino Chicken Gator Beetle Gecko Pony Python Slug
A Verb:
An Adjective:
An Interjection:
Render Template
Sorry, this page requires a javascript-enabled browser.


Rafael A. Irizarry's
Music and Statistics Demo
Spectrograms of Harmonic Instruments
Non-Harmonic Instruments
Low.............................................High
How to play the sounds: This page contains sound examples mentioned
in some
of my papers related to music and statistics, mainly
this
JASA article . Most sounds, represented by this;
symbol,
are in aiff format which is CD quality. Your audio player should be able
to play these files, all you have to do is click. Four of the files are
songs so they have been compressed to MP3 files, represented by this symbol .
For macs and PCs the RealPlayer
(get the FREE version) can play these, for unix you can download . If you
want to analyze the music files as data, you should get a program like
sox
that can convert aiff files to ascii.
Here is a more detailed explanation on how to convert sound signals into ASCII file
Statistical Applications
Statistics has been applied in various ways to music. For
example, various stochastic techniques have been applied
in composition. The melody and rhythm in this song
(716 KB mp3 file) are the outcome of a random process. The intervals between
each note was produces by a Markov chain. The rhythm was chosen at random
from various rhythmic patterns that fit the riffs being played by the bass
and the guiro.
Physicist have studied the
spectral properties of different musical signals and speculated on the
possibility of it being so called 1/f noise (learn more about 1/f noise
and music from a paper
I wrote with David Brillinger).The
following 3 mp3 files are melodies produced with outcomes of an IID process
(white noise), a random walk (brown noise) and a process with 1/f
noise (pink noise):
White music (236 KB mp3 file).
Brown music (214 KB mp3 file).
Pink music (295 KB mp3 file).
Sound Synthesis and Analysis
The application that most interests me is sound synthesis and analysis.
Sound can be represented as a real-valued function of time. This function
can be sampled at a small enough rate so that the resulting discrete version
is a good approximation of the continuous one. This permits one to study
musical sounds as a discrete time series, an entity for which many
statistical techniques are available. Physical modeling suggests that many
musical instruments' sounds may be characterized by a
deterministic locally periodic and stochastic signal model. In general
harmonic instruments are better described by this model than non harmonic
ones.
The violin
,trumpet
and guitar
are all harmonic instruments. The graphs at the beginning of the demo are
spectrograms of the sound signals. Notice the yellow lines at multiples
of the fundamental frequency we hear. The marimba, timpani
and gong
are non-harmonic.
It is believed that the strength of at the
different multiple frequencies (the harmonics) somehow determine pitch.
The trumpet
has many strong harmonics which is associated with a bright sound. A clarinet
has
few strong harmonics. Notice the difference in sound and in their
periodograms.
The high values in the spectrogram that are not at harmonic frequencies
is what we model as a stochastic signal. Notice that the non-harmonic instruments
have a lot of "noise".
Separation of signal and noise
We are interested in separating the approximately periodic from the stochastic
signal and finding parametric representations with musical meaning. To
do so a local harmonic model that tracks changes in pitch and
in the amplitudes of the harmonics is fit. We are assuming a model
y(t) = s(t) + e(t), with s(t) an approximately periodic function and e(t)
noise. The deterministic signal s(t) will have period inversely proportional
to the fundamental frequency being played. We estimate s(t) using local
harmonic estimation and use the residuals of this fit as the estimate
of e(t).
Here are some examples of the separation of the two parts:
(all files have been amplified to same volume)
|
Instrument
|
Original
|
Fitted
|
Residuals
|
|
violin
|
|
|
|
|
clarinet
|
|
|
|
|
guitar
|
|
|
|
|
didjiridoo
|
|
|
|
Notice that the residuals sound very
much like what we would expect: a screechy metallic sound for the violin,
surplus blown air for the clarinet, and a pluck with no tone for the guitar.
Notice how the separation doesn't work very well for the non-harmonic didjiridoo.
Window Size Selection
Deterministic changes in the signal, such
as pitch change, suggest that different temporal
window sizes should be considered in the local estimation. Ways to choose
appropriate window sizes are developed in this
paper [PDF]. We carry out the an estimation for a shakuhachi
flute sound characterized by 3 segment: Rapid change of pitch (0 -
0.5 secs), fix pitch (0.5 - 3.0 secs), tremolo (3.0 - 4.0 secs), and fixed
pitch to end the sound. This flute is also characterized by a noisy (windy)
sound. We fit our procedure with a fixed small window size, a fixed large
window size, and then using an adaptive window size.
|
Window Size
|
Fitted
|
Residual
|
|
Fixed Large
|
|
|
|
Fixed Small
|
|
|
|
Dynamic choice
|
|
|
If we listen to the sound or look at
residual
plots we notice that the fixed windows over fit and under fit respectively.
In the residuals sound for the large window fit we hear signal during the
tremolo and for the small window size fit the fitted signal sounds too
noisy, too similar to the original. In
this
plot we see how the dynamic window chooses smaller size in parts that
are less stable.
Applications
Amongst other things our analysis provides estimates of the harmonic signal
and of the noise signal. Different musical composition applications may
be based on the estimates. The procedure separates harmonic component and
noise component of signal, provides pitch estimates, and the harmonic signal
is reconstructed into individual harmonics.This
plot is an example of the resulting estimates from an oboe
sound :
Uses in composition
The function s(t) is defined by parameters that represent local pitch,
and local amplitude and phase of the harmonics. We may tweak the estimates
of these parameters to modify s(t) and construct a new sound based on the
original. We can change pitch, duration, and timbre independently of each
other. As an example we run the analysis on an oboe
sound. Musicians say that if one listens to the sound of an oboe closely
the sound of a soprano is heard at an octave above the pitch of the oboe
sound. By wiggling the estimated amplitudes of the even harmonics we can
make the hidden
soprano come out. We can amply the residuals obtained when analyzing
the violin to create the sound of a violin
played by a beginner.
Removing Reverberation
When an instrument is played in a room with echo, signals from previous
notes may be heard after the instrument has stopped producing the notes.
Notice in the sound of a pipe
organ playing two notes how we can hear the first note during the playing
of the second. This can clearly be seen in the spectrogram.
During the playing of the second note, the yellow line related to the first
note is still there. We also see the presence of an approximately
periodic component around the 50 Hz. frequency, this is probably due to
the sound of the wind going through the organ pipes, an important sounds
that helps our ears know it's an organ. If we assume the deterministic
signal s(t) is locally periodic with period equal to the fundamental frequency
being played and use local harmonic estimation to estimate s(t) and e(t),
then the spectrogram
of the residuals shows a yellow line representing the reverb note and
. Not a good fit. We can also perform residual analysis by ear
by listening to the sound
of the residuals. If we listen to the estimate
of s(t), it sounds similar to the original, they are different because
we don't hear the reverb during the second note, and also the 50 Hz frequency
is not heard. It doesn't really sound like an organ anymore. Now if we
instead fit a model with s(t) composed of three periodic components s1(t),
s2(t), and s3(t), we obtain a better fit and a separation
of each component. We can look at plots
showing the results and also listen to them:
Original
soundfitted
s1(t) fitted
s2(t)fitted
s3(t)residuals
Note: If you have small speakers with no
bass, you probably won't hear some of these sounds.
I couldn't have made this page without the help of David
Wessel, Adrian
Freed, Matt Wright
and the people at CNMAT.
And also Ofer Licht, Phil
Spector and David
Brillinger from the stat department
at Berkeley.
Get the details from this
paper.


Ximena Vila Ferral
A designer who codes
Quick Twitter Bio: Design. Code. Web. Front-End. Curious. Tampiqueña. Texas. Hufflepuff. Dance. Music. Learn New Things.
President: @aiga_sa | Designer: @bensondesign
A designer who codes
Quick Twitter Bio: Design. Code. Web. Front-End. Curious. Tampiqueña. Texas. Hufflepuff. Dance. Music. Learn New Things.
President: @aiga_sa | Designer: @bensondesign


Can you reach the trophy?
Welcome to MineHound! Are you ready to experience the most exciting new puzzle/memory game on the web?! Look no further because MineHound offers an interactive experience for all users. Simply enter your name and use your arrow keys on your keyboard to navigate the red block to the trophy(gold block). Look out though, there might be some MINES in your way. If you win checkout out your score on our leaderboard.


| Short description: | Native Ruby PDF Document Writer | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Category: | Library/Document | ||||||||||
| Status: | Stable | ||||||||||
| Created: | 2003-09-17 03:59:34 GMT | ||||||||||
| Last update: | 2005-09-10 02:12:20 GMT | ||||||||||
| Owner: | Austin Ziegler (Projects of this owner) | ||||||||||
| Homepage: | http://ruby-pdf.rubyforge.org/pdf-writer/ | ||||||||||
| Download: | http://rubyforge.org/frs/?group_id=81 | ||||||||||
| License: | BSD-type | ||||||||||
| Dependency: |
|
||||||||||
| Description: | PDF::Writer for RubyThis library provides the ability to create PDF documents using only native Ruby libraries. There are several demo programs available in the demo/ directory. The canonical documentation for PDF::Writer is "manual.pdf", which can be generated using bin/techbook (just "techbook" for RubyGem users) and the manual file "manual.pwd".
This software is based on Adobe’s PDF Reference, Fifth Edition, version 1.6. This and earlier editions are available from Adobe’s PDF developer website. LICENCE NOTESPlease read the file LICENCE for licensing restrictions on this library, as well as important patent considerations. RequirementsPDF::Writer requires Ruby 1.8.2 or better, color-tools 1.3.0 or better, and Transaction::Simple 1.3.0 or better. |
||||||||||
| Versions: | [1.1.3 (2005-09-10)] [1.1.2 (2005-08-25)] [1.1.1 (2005-07-01)] [1.1.0 (2005-06-30)] [1.0.1 (2005-06-13)] [1.0.0 (2005-06-13)] [Technology Preview (2004-06-14)] |


OSGi JMX Package Version 1.0.
Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. For example:
Import-Package: org.osgi.jmx; version="[1.0,2.0)"


User can add different catigories of incomes and outcomes
All the transactions are displayed in the balance and report
Before
Then The page title should be "Budgeting App - Educational React App"
After
Before
When I click on tab "Budget"
Then "Budget" tab is active
After
Before
When I click on tab "Budget"
Then I should see Budget table
After
Before
When I add a record with "12345"
And I check number of records is 9
And I refresh the page
Then I check number of records is 9
After
Before
When I click on tab "Budget"
Then "Budget" table should have column Category
After
Before
When I click on tab "Budget"
Then "Budget" table should have column Description
After
Before
When I click on tab "Budget"
Then "Budget" table should have column Amount
After
Before
When I click on tab "Budget"
Then "Budget" table should have record Groceries
After
Before
When I click on tab "Budget"
Then "Budget" table should have record Travel
After
Before
When I click on tab "Budget"
Then "Budget" table should have record Income
After
Before
When I click on tab "Budget"
Then "Budget" table should have record Entertainment
After
Before
When I click on tab "Budget"
Then "Budget" table should have record Misc
After
Before
When I click on tab "Budget"
Then "Budget" table should have record Income
After
Before
When I click on tab "Budget"
And I click on "Catrgory" dropdown
Then I should see the list of categories
After
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before
Before


{% extends '_layouts/layout_2-3.html' %} {% block page_title %} {% if practiceName %} Register with {{ practiceName }} {% else %} {{serviceName}} {% endif %} {% endblock %} {% block content %}
It usually takes about 10 minutes.
It helps your GP find any previous medical records if you know the following:
An NHS number is a 10 digit number, for example:<PHONE_NUMBER>
You can find your NHS number:
You can still register without this information.


Mollit elit reprehenderit consectetur cupidatat anim qui deserunt duis. Veniam laboris id veniam in eu.
<EMAIL_ADDRESS>1234567890988
Quis sunt mollit nostrud aliqua consectetur voluptate eiusmod proident aute laboris non reprehenderit magna qui. Esse occaecat laboris laborum dolore excepteur enim laboris.
Item of the invoice
Date: 2018-02-14
Item of the invoice
Date: 2018-02-14
Item of the invoice
Date: 2018-02-14
Item of the invoice
Date: 2018-02-14
Item of the invoice
Date: 2018-02-14
Item of the invoice
Date: 2018-02-14
Item of the invoice
Date: 2018-02-14
Item of the invoice
Date: 2018-02-14
If you have any question about this invoice, please contact Jhon Doe to email<EMAIL_ADDRESS>or to the mobile phone (057)<PHONE_NUMBER>.
Page 1 of 1


34+ Dodhers Logo Images. Dodgers transparent logo png you can download 24 free dodgers transparent logo png images. In 1909, the superbas made the blue a bit lighter and switched the b to a font that is similar to bruce double pica.
Los angeles dodgers, los angeles, california. Los angeles dodgers logo png. This was the superbas' first logo.
It does not meet the threshold of originality needed for copyright protection, and is therefore in the public domain.
Los angeles dodgers logo by unknown author license: From '02 to '08, brooklyn made the b blue. Los angeles dodgers logo png los angeles dodgers is the name of one of the most rewarded baseball teams in the united states. It is an old english b in red.


@Include(library.stencil as stencils)
@Import(com.goodworkalan.application.Index)
@Context(Controller Index.Get)
@Render(stencils.document)
@Part(header)
@Get(Document title)
@Part(sidebar)
@Each(link)
- @Get(title)
@If(href)
@Elsif(people)
@Each(people)
@Get(firstName) @Get(lastName)
@Else
@If@(script)
This is a very particular bit that will not be dedented.
@If
@Stencil(document)
@Nested(header)
@Comment
Not sure what to make of the backwhack. I forgot what it was about. I'm
assuming that it has something to do with the stencil starting at the
first bit of whitespace.
@Stencil\(hello)
@Nested(greeting)Hello@Nested, @Nested(addressee)World@Nested!
@ vim: set et:


- calculateFitness() - Method in class domain.model.player.computer.GeneticComputer
-
- changeLanguage(String, String) - Method in class domain.controller.UserController
-
Change language of a certain user in the dataSet
- changePassword(String, String) - Method in class domain.controller.UserController
-
Change password of a certain user in the dataSet
- changeUserPassword(String) - Method in class presentation.TerminalMastermind
-
- clearScreen() - Method in class presentation.utils.TerminalUtils
-
Clear the screen.
- ColorInput - Class in presentation.view.components
-
The Color Input
- ColorInput(String, int, int) - Constructor for class presentation.view.components.ColorInput
-
Creates a colorInput with th given parameters.
- colorPalette - Static variable in class presentation.utils.ColorUtils
-
- ColorPeg(int) - Constructor for class domain.model.row.ColorRow.ColorPeg
-
Instantiates a new Color peg
- ColorPeg - Class in presentation.view.components
-
The Color Peg
- ColorPeg() - Constructor for class presentation.view.components.ColorPeg
-
- ColorPeg(int) - Constructor for class presentation.view.components.ColorPeg
-
- ColorPeg(int, String) - Constructor for class presentation.view.components.ColorPeg
-
- ColorRow - Class in domain.model.row
-
The type Color row.
- ColorRow() - Constructor for class domain.model.row.ColorRow
-
Instantiates a new Color row.
- ColorRow(int...) - Constructor for class domain.model.row.ColorRow
-
Instantiates a new Color row with its values
- ColorRow(ColorRow) - Constructor for class domain.model.row.ColorRow
-
Instantiates a new Color row with another ColorRow values
- colorRow - Variable in class presentation.view.components.ColorInput
-
- ColorRow - Class in presentation.view.components
-
The Color Row
- ColorRow(int) - Constructor for class presentation.view.components.ColorRow
-
Creates a empty color row.
- ColorRow(String) - Constructor for class presentation.view.components.ColorRow
-
Creates a color row.
- ColorRow(ColorPeg...) - Constructor for class presentation.view.components.ColorRow
-
Creates a color row.
- ColorRow.ColorPeg - Class in domain.model.row
-
The type Color peg.
- colors - Variable in class presentation.view.LoadView
-
- COLORS - Static variable in class resources.strings.TerminalConstants
-
The constant COLORS.
- ColorUtils - Class in presentation.utils
-
The Color Utils
- ColorUtils() - Constructor for class presentation.utils.ColorUtils
-
- Column1MapKey - Static variable in class presentation.view.StatsView
-
- Column2MapKey - Static variable in class presentation.view.StatsView
-
- CommandInterruptException - Exception in domain.model.exceptions
-
Treats Command Interruption
Happens when the system is expecting some input from the user and receives an in-game command instead.
- CommandInterruptException() - Constructor for exception domain.model.exceptions.CommandInterruptException
-
Instantiates a new Command interrupt exception.
- compareGuess(ColorRow, ColorRow) - Static method in class domain.model.player.ComputerPlayer
-
Compare guess control row in order to generate the number of blacks and whites of the attempt
- ComponentUtils - Class in presentation.utils
-
The Component Utils
- ComponentUtils() - Constructor for class presentation.utils.ComponentUtils
-
- COMPUTER_DUMMY - Static variable in class resources.strings.TerminalConstants
-
The constant COMPUTER_DUMMY.
- COMPUTER_FIVEGUESS - Static variable in class resources.strings.TerminalConstants
-
The constant COMPUTER_FIVEGUESS.
- COMPUTER_GENETIC - Static variable in class resources.strings.TerminalConstants
-
The constant COMPUTER_GENETIC.
- ComputerPlayer - Class in domain.model.player
-
The type Computer player.
- ComputerPlayer(Player.Role) - Constructor for class domain.model.player.ComputerPlayer
-
Instantiates a new Computer player
- continueGame(String) - Method in class domain.controller.GameController
-
Continues a saved game
- continueGame(String) - Method in class presentation.TerminalMastermind
-
- ControlInput - Class in presentation.view.components
-
The Control Input
- ControlInput(String) - Constructor for class presentation.view.components.ControlInput
-
Creates a controlInput with th given parameters.
- controlPane - Variable in class presentation.view.GameView
-
- ControlPeg - Class in presentation.view.components
-
The Control Peg
- ControlPeg(ControlPeg.Type) - Constructor for class presentation.view.components.ControlPeg
-
Creates a ControlPeg
- ControlPeg.Type - Enum in presentation.view.components
-
- ControlRow - Class in domain.model.row
-
The type Control row.
- ControlRow(int, int) - Constructor for class domain.model.row.ControlRow
-
Instantiates a new Control row
- ControlRow - Class in presentation.view.components
-
The Control Row
- ControlRow(int, int) - Constructor for class presentation.view.components.ControlRow
-
Creates a control row.
- correctGuess - Variable in class domain.model.Game
-
It is the combination decided by the Maker
- correctGuess - Variable in class presentation.view.GameView
-
- createBorderPane(String, VBox, RaisedButton) - Method in class presentation.view.LoadView
-
- createBorderPane(String, String, String, TableView) - Method in class presentation.view.StatsView
-
- createColumnConstraint(int) - Static method in class presentation.utils.ComponentUtils
-
Creates a ColumnConstraints with the given width percentage.
- createDrawerButton(String) - Method in class presentation.controller.view.NebulaViewController
-
- createFile(String) - Static method in class persistence.utils.FileUtils
-
Create file
- createLabel(String) - Method in class presentation.view.LoadView
-
- createLabel(String, int) - Method in class presentation.view.UserView
-
- createNewLabel(String) - Method in class presentation.view.GameView
-
- createPasswordField(String) - Method in class presentation.view.UserView
-
- createRadioButton(String) - Method in class presentation.view.LoadView
-
- createRowBox() - Method in class presentation.view.components.ColorRow
-
- createRowConstraint(int) - Static method in class presentation.utils.ComponentUtils
-
Creates a RowConstraints with the given height percentage.
- createUser(String, String, String) - Method in class domain.controller.UserController
-
Create an user if it doesn't exist
- crossover1Point(ArrayList<ColorRow>, int, int, int) - Method in class domain.model.player.computer.GeneticComputer
-
- crossover2Points(ArrayList<ColorRow>, int, int, int) - Method in class domain.model.player.computer.GeneticComputer
-
- currentBoard - Variable in class presentation.controller.TerminalController
-
- currentControl - Variable in class domain.model.player.computer.FiveGuessComputer
-
The ControlRow obtained because of the last guess
- currentGame - Variable in class domain.controller.GameController
-
- currentGameView - Variable in class presentation.controller.view.NebulaViewController
-


Welcome to Sumit Bhandari's Personal Website.
Please contact Mr. Sumit Bhandari for further information.


--- layout: post authors: ["Greg Wilson"] title: "2015 Post-workshop Instructor Debriefing, Round 3" date: 2015-02-11 time: "11:00:00" tags: ["Debriefing"] ---
We had our third post-workshop debriefing of the year yesterday, in which we discussed several recent workshops. The most important point was probably that workshops are running more smoothly today than they did a year ago, even for first-time instructors.
Our Tulane workshop was taught in R; about 50 people registered, and about 40 showed up. The crowd was mostly biomedical, and the instructors use the Gapminder dataset throughout. R was taught in 2 half day sessions, an introduction to R and advanced R.
The biggest innovation was echoing all commands via Dropbox: the R scripts being edited were all saved to the Dropbox folder, so learners could follow along in real time. More importantly, the helpers could follow along as well, and catch people up when they fell behind. The workshop also got as far as showing people ggplot2 and knitr in the second session, though this was more a case of "look at the cool things you'll be able to do" than a lesson.
The workshop in Illinois was slightly smaller—about 30 people. Most were aerospace, chemical, and materials engineers, with a few biologists and geologists along to liven things up. As one of the instructors described in an earlier post, they collected feedback at every break, and took 5-10 minutes at the start of each session to address issues raised before pressing on. All instructors took part in sorting the feedback (which was handed in on sticky notes) so that instructors who were going too fast or into too much detail could see that for themselves.
The workshop at Sick Kids Hospital in Toronto used R again. The lead instructor felt it didn't hit everybody's expectations, mainly because there were so many different expectations: some people had a lot of prior programming experience, and were there to learn the statistical packages in R, while others needed help with basic ideas like loops. One thing that went really well was the introduction to R factors and different ways of addressing data in a data set: by the end of the workshop, some learners were using very complex techniques for manipulating their data.
Thomas Guignard taught at both SUNY Albany and the University of Toronto He commented that he's not comfortable ad libbing in front of learners, so he could defer difficult questions, figure out the answer during the break, and then come back to them when students were back in their seats. He also commented that several of the attendees at the Toronto workshop had installed Python 3.4 instead of Python 2.7, which led to more than a little confusion. (We have since added notes to the installation instructions to clarify which version people should get.)
A couple of points were made about teaching with the IPython Notebook. First, it doesn't show as much history on screen at one time as (for example) the Bash shell, so it's harder for learners to follow what's going on. Second, Neal Davis said that he found it much better to start with an empty notebook and grow it cell by cell rather than opening up one that already had code in it and replaying it.
Finally, we had a brief discussion (again) of whether we ought to follow Data Carpentry's lead and have a single data set or example run through all of the lessons. I've resisted doing this in the past, since it makes it harder for instructors to mix and match material, but I now believe the benefits outweigh the drawbacks. We will discuss this at an upcoming lab meeting, along with ways of getting notes like these into the instructor's guides for the lessons.


Provides classes for robust usage of RMI, primarily for streaming data. One common usage is streaming files to/from a remote EJB or some other RMI server.
This facility provides a basis for robust communication using RMI. Any type of remote communication has the possibility of intermittent errors. Naive programs using RMI often ignore this possibility, thus creating very fragile implementations. This class makes it easy to add appropriate retry abilility to RMI method calls. Note that calls which are retryable must be idempotent (see {@link com.healthmarketscience.rmiio.RemoteRetry} for more details). Also included is a base class {@link com.healthmarketscience.rmiio.RemoteWrapper} which simplifies wrapping remote interfaces for use with the RemoteRetry facility. This allows code to use a remote interface without having to implement the retry code directly (see {@link com.healthmarketscience.rmiio.RemoteInputStreamWrapper} for example usage).
The bulk of this package is code to support streaming data over RMI. There are many ways to do this the wrong way. Let us explore some possibilities. (Note, all of these "solutions" were found online when searching for an existing solution to this problem).
The {@link com.healthmarketscience.rmiio.RemoteInputStream} and {@link com.healthmarketscience.rmiio.RemoteOutputStream} interfaces provide the basis of the functionality for streaming data over RMI. However, most users of this package should never have to use or implement these interfaces directly. There are wrappers for both the client and server implementations which wrap these interfaces as regular java InputStreams or OutputStreams (including usage of the RemoteRetry utility to automatically retry certain remote exceptions), making them very easy to work with.
The examples below assume that the reader has knowledge of how RMI works.
////// // The "server" is reading a file from the "client" // // "server" implementation public void sendFile(RemoteInputStream inFile) { // wrap RemoteInputStream as InputStream (all compression issues are dealt // with in the wrapper code) InputStream istream = RemoteInputStreamClient.wrap(inFile); // ... read file here using normal InputStream code ... } // "client" implementation // create a RemoteStreamServer which uses compression over the wire (note // the finally block to release RMI resources no matter what happens) RemoteInputStreamServer istream = null; try { istream = new GZIPRemoteInputStream(new BufferedInputStream( new FileInputStream("myFile.txt"))); // call server (note export() call to get actual remote interface) server.sendFile(istream.export()); } finally { // since the server should have consumed the stream in the sendFile() // call, we always want to close the stream if(istream != null) istream.close(); } ////// // The "client" is reading a file from the "server" // // "server" implementation public RemoteInputStream getFile(String fileName) { // create a RemoteStreamServer (note the finally block which only releases // the RMI resources if the method fails before returning.) RemoteInputStreamServer istream = null; try { istream = new GZIPRemoteInputStream(new BufferedInputStream( new FileInputStream(fileName))); // export the final stream for returning to the client RemoteInputStream result = istream.export(); // after all the hard work, discard the local reference (we are passing // responsibility to the client) istream = null; return result; } finally { // we will only close the stream here if the server fails before // returning an exported stream if(istream != null) istream.close(); } } // "client" implementation // same as "server" part of previous example ////// // The "server" is writing a file to the "client" // // "server" implementation public void getFile(RemoteOutputStream outFile) { // wrap RemoteOutputStream as OutputStream (all compression issues are // dealt with in the wrapper code) OutputStream istream = RemoteOutputStreamClient.wrap(inFile); // ... write file here using normal OutputStream code ... } // "client" implementation // create a RemoteStreamServer which uses no compression over the wire (note // the finally block to release RMI resources no matter what happens) RemoteOutputStreamServer ostream = null; try { ostream = new SimpleRemoteOutputStream(new BufferedOutputStream( new FileOutputStream("myResults.txt"))); // call server (note export() call to get actual remote interface) server.getFile(ostream.export()); } finally { // since the server should have done all the work in the getFile() // call, we always want to close the stream if(ostream != null) ostream.close(); } ////// // A more complicated example: The "server" returns data streamed directly // out of a database. The interesting situation here is that the database // connection lives longer than the initial method call, and will need to be // closed when the stream is closed. To implement this, we use a // RemoteStreamMonitor which will be notified when the stream is closed // (among other things). // // "server" implementation (using jdbc) public RemoteInputStream getFile(String fileName) { Connection conn = null; try { conn = getConnection(); Blob fileBlob = null; // ... do db work to get handle to a Blob ... // create RemoteInputStreamMonitor to close db connection when stream is // done final Connection streamConn = conn; RemoteInputStreamMonitor monitor = new RemoteInputStreamMonitor() { public void closed(RemoteInputStreamServer stream, boolean clean) { streamConn.close(); } }; // create server to stream blob bytes back using compression RemoteInputStream istream = new GZIPRemoteInputStream( fileBlob.getBinaryStream(), monitor).export(); // the monitor has taken control of the db connection (note, we don't // set the conn to null until after the RemoteInputStream has been // exported, in case any exceptions occur in that process) conn = null; // return already exported RemoteInputStream return istream; } finally { if(conn != null) conn.close(); } } // "client" implementation InputStream istream = null; try { istream = RemoteInputStreamClient.wrap(server.getFile("importFile.txt")); // ... read file here using normal InputStream code ... } finally { // do all we can to close the stream when finished if(istream != null) istream.close(); }
The {@link com.healthmarketscience.rmiio.RemoteIterator} facility is built on top of the remote streams to enable streaming a large collection of objects over RMI as easily as streaming a file. Possible applications of this facility might be reading a large collection of objects out of a remote database, where the entire collection may not fit in memory at once. While the implementor of the RemoteIterator is free to use whatever method available to convert the objects to a stream, the common usage would be to use Serializable objects with the {@link com.healthmarketscience.rmiio.SerialRemoteIteratorServer} and {@link com.healthmarketscience.rmiio.SerialRemoteIteratorClient}. Note that the RemoteIterator interface is not actually a Remote interface. Instead, the RemoteIterator implementation is a Serializable object which gets copied across the wire. Internally, it contains a reference to a RemoteInputStream, from which it reads the objects being transferred.
The examples below assume that the reader has knowledge of how RMI works (as well as how the remote streams above work).
// // The "server" returns a RemoteIterator of Strings from a database to the // "client". We will use a similar trick used in the previous example to // close the db resources when the iterator is closed. // // "server" implementation (using jdbc) public RemoteIterator<String> getResults(String searchParam) { Connection conn = null; Statement stmt = null; ResultSet rs = null; try { // ... create ResultSet with relevant results ... // note, this is an *example* ResultSet iterator implementation, not the // cleanest in the world (doesn't handle all close scenarios, left as an // exercise to the reader)... final Connection iterConn = conn; final Statement iterStmt = stmt; final ResultSet iterRs = rs; IOIterator<String> dbIter = new IOIterator<String>() { private boolean _hasNext = iterRs.next(); private String _next = (_hasNext ? iterRs.getString(1) : null); private boolean _isClosed = false; public boolean hasNext() throws IOException { if(!_hasNext && !_isClosed) { _isClosed = true; try { try { iterRs.close(); } finally { try { iterStmt.close(); } finally { iterConn.close(); } } } catch(SQLException e) { throw new IOException(e); } } return _hasNext; } public String next() throws IOException { String cur = _next; try { if(_hasNext = iterRs.next()) { _next = iterRs.getString(1); } } catch(SQLExcepion e) { throw new IOException(e); } return cur; } }; // create RemoteIterator client/server objects. Note that the // RemoteInputStream export() call is handled internally to these // objects. SerialRemoteIteratorServer<String> stringServer = new SerialRemoteIteratorServer<String>(dbIter); SerialRemoteIteratorClient<String> stringClient = new SerialRemoteIteratorClient<String>(stringServer); // the RemoteIterator now owns the db resources rs = null; stmt = null; conn = null; return stringClient; } finally { try { if(rs != null) rs.close(); } finally { try { if(stmt != null) stmt.close(); } finally { if(conn != null) conn.close(); } } } } // "client" implementation RemoteIterator<String> resultIter = null; try { resultIter = server.getResults("SELECT THE_STRING"); while(resultIter.hasNext()) { System.out.println("Got string: " + resultIter.next() + " from the server"); } } finally { // do all we can to close the iterator when finished if(resultIter != null) resultIter.close(); }
While the streaming classes were originally designed for RMI, they can be utilized on any similar RPC framework. The {@link com.healthmarketscience.rmiio.exporter.RemoteStreamExporter} class provides the necessary hooks to control how the stream server implementation objects are actually exposed remotely on the desired framework. By {@linkplain com.healthmarketscience.rmiio.exporter.DefaultRemoteStreamExporter default}, of course, the server implementations will export themselves using vanilla RMI, but custom RemoteStreamExporter implementations can be used to export the server implementations on other RPC frameworks (i.e. CORBA).
Writing distributed applications is not easy, and adding streaming to the mix further complicates things. These utilities should make life easier, if used correctly. Included below are some recommendations learned through the shedding of much blood, sweat, and many tears.


62-year-old jailed nine years for peddling 2.66kg cocaine
by Agency ReportA Federal High Court in Lagos State has sentenced a 62-year-old man, Aremu, to nine years in jail for trafficking in cocaine.
Aremu was charged by the National Drug Law Enforcement Agency on three counts bordering on conspiracy and drug trafficking.
The News Agency of Nigeria reports that Aremu was first arraigned on March 7, and he pleaded not guilty.
However, on November 14, he opted to change his plea and was subsequently re-arraigned.
On his re-arraignment, he admitted guilt.
Following his guilty plea, the court adjourned the case for review of the facts.
On November 15, the Prosecution counsel, Mrs Juliana Iroabuchi, tendered nine exhibits which were all admitted.
Iroabuchi urged the court to sentence Aremu based on evidence adduced by the prosecution.
Justice Onyetenu found Aremu guilty of the offences and sentenced him to four years imprisonment on count one, three years’ imprisonment on count two and two years jail term on count three.
The judge ordered that the terms shall run concurrently.
Earlier, the prosecution counsel said that Aremu committed the offences on December 27, 2018.
She said that he was arrested at the Gate C, Departure Hall of the Murtala Mohammed International Airport, Ikeja, during an outward clearance of passengers on board an Ethiopian Airline flight to India.
Iroabuchi said that Aremu concealed 2.66kg of cocaine in a brown travelling bag.
According to her, the convict conspired with two of his friends at large to commit the offences, in contravention of Sections 11 (b), 11(d) and 14(b) of the NDLEA Act, 2004.
(NAN)


ESP32 Main configuration
Home
Applications
Mesh
Modbus
MQTT
Network
Local WiFi
User Login
About us
Mesh Configuration
Mesh ID
Valid characters: 0-9 and a-z Lowercase and Uppercase
Mesh Password
Show password
Device's password for mesh Network.
At least 8 maximun 15 characters.
Maximum Layers
Layers range: 1 to 25
Maximun STA
STA range: 1 to 6
Socket Port
Port range: 0 to 65535
Submit


# Verifiable Software - VSW Repo Server
This project consists of the code for running a verifiable software vsw repo.
## Table of contents
1. [ About the project ](#About)
2. [ Getting started ](#Getting)
3. [ Run vsw repo locally ](#locally)
4. [ Run vsw repo inside docker](#runindocker)
5. [ Run docker in AWS ](#aws)
6. [ Verifiable Software ](#VSW)
## About the project
VSW Repo is server part of the project. Client part can be be found in a separate git repo. For details about the verifiable software ecosystem, see [vsw](https://github.com/verifiablesoftware/vsw) which contains the `vsw` command line tool for client useage. This VSW Repo is intended to to be used as VSW server. Internal structure of the Node.js based repo server can been seen in the image below.
![architecture](vsw-repo-arch.png)
## Getting started
Clone this vsw repo to youur local machine with
```
git clone https://github.com/verifiablesoftware/vsw-repo
```
There are a set of shell scripts provided with the code repository. Some explanation of the scripts can be found below.
## Run vsw repo locally
provision the aca-py agent and create wallet. The wallet has to be created first any case by using provision parameters for Aca-py.
```
./repo-provision-local.sh
```
when running this, user will be prompted
```
Created new wallet
Wallet type: indy
Wallet name: Repo.Local
Created new public DID: G5ZDvU1Y7hTKnQR6xXXXX
Verkey: 9DfRgQevqRE2HAC9n4T7whfLBet8yTa6jUWzXZXXXXXX
----
Please select an option:
1. Accept the transaction author agreement and store the acceptance in the wallet
2. Acceptance of the transaction author agreement is on file in my organization
X. Skip the transaction author agreement
```
and before accepting, register DID and Verkey to [sovrin buildernet](https://selfserve.sovrin.org/)
After provisioning, start the aca-py agent
```
./repo-start-local.sh
```
this script starts node server with [nodemon](https://nodemon.io/)
or for Visual Studio Code debugging [VS Code](https://code.visualstudio.com/)
, there is ```Run vsw-repo locally start``` launch.json that launches local vsw-repo debugging.
## Run inside the docker
build docker image(s) (requires wallet to start the vsw-repo)
for vsw-repo
```
./repo-local-build.sh
```
or
```
docker build -f Dockerfile.dev -t vsw-repo .
```
## run vsw-repo container with docker
and for example use the ports 8040-8042 for repo, repo api and repo controller
```
docker run -d --name vsw-repo -p 8060:8040 -p 8061:8041 -p 8062:8042 vsw-repo
```
## AWS
details about AWS can be found [AWS](/AWS_README.md)
when vsw-repo is running in the AWS cloud EC2 URL is something like this:
http://ec2-3-XXX-XXX-46.us-east-2.compute.amazonaws.com:8060
this has to be given to docker image when starting the vsw-repo docker image
## publish to AWS
a separate AWS_README.md is available for how this image can be build, pushed to private registry and
run in AWS EC2.
## Verifiable Software
For informal discussions, we use slack : vswhq.slack.com
Anyone is welcome to join the slack channel using this invitation link:
https://join.slack.com/t/vswhq/shared_invite/zt-kxvaycqc-v5dSDLfpUVevtrZsHsOr9Q
Slack invitation link is timed. The above link is going to expired on Feb 12, 2021. We will try to watch and update the link timely. In case we missed it, or it isn't working for you, please file a github issue to alert us. Welcome to the vsw project.


Survery Questions
About yourself
Link to Photo Image
Question 1
You consider yourself constantly day dreaming.
Question 2
In your day-to-day you are always on the go from one thing to another.
Question 3
You enjoy trying out new adventures.
Question 4
You enjoy learning new things and sharing with others.
Question 5
You are generally known as an introvert.
Question 6
You enjoy doing things out of your comfort zone.
Question 7
In your circle of friends, you are known to be the one to genearlly give advice.
Question 8
You have a carefree nature about you.
Question 9
You are typically known to plan things out in detail before executing.
Question 10
You can identify yourself as an emotional person.
Meet Your New BFF


Ara Damansara Medical Centre Sdn Bhd (876408T)
= T : +(603) 5639 1212 te y F : +(603) 7846 0925 RAMSAY E<EMAIL_ADDRESS>SAN SLPS W : www. ramsaysimedarby.asia fe ath Lot 2, Jalan Lapangan Terbang Subang People caring for people Seksyen U2
40150 SHAH ALAM SELANGOR, MALAYSIA
PATIENT BILL
Full Amount
Format : Detail
BILL NO : AD-OP 20355465 BILL DATE TAN HENG KIAT PATIENT NAME : TAN HENG KIAT NO. 78 JLN SS 19/1 IC / PASSPORT NO :<PHONE_NUMBER>29 SUBANG JAYA MEDICAL RECORD NO : 100366111 VISIT ID : AD-OP<PHONE_NUMBER>0 SUBANG JAYA VISIT TYPE : OUTPATIENT MALAYSIA BED NO/ WARD : OPD Nurse Counter 4 ADMITTING DOCTOR : DRLIEW CHEE KHOON ADMISSION DATE & TIME : 31/01/2019 EMPLOYEE NAME RELATION EMPLOYEE NO GL REFERENCE NO CREDIT TERM : FINANCIAL TYPE : SELF-PAY: CIMB Credit Card Holders Diaconis oe & Pe) Service petite eee i see aead cb teciee tie tA OCated: on o Deser ition ¢ Tee cae mr eemcun HOSPITAL CHARGES 7 : Laboratory 70936 Male Tumour Marker 4 226.00 0.00 226.00 1 226.00 0.00 226.00 PACKAGES 800132 ADMC BASIC STROKE SCREENING 1 746.75 0.00 746.75 >! 746.75 0.00 746.75 Total HOSPITAL MEDICAL SERVICES 2 972.75 0.00 972.75 Total HOSPITAL CHARGES 2 972.75 0.00 972.75 CONSULTANT(S) FEES ® DR LIEW CHEE KHOON ( Cardiology ) CONSULTATION FEES 5058 Health Screeing Consultation by Specialist 31/01/2019 1 111.65 0.00 111.65 111.65 0.00 111.65 REPORTING FEES 5346 Cardio Stress ECG Health Screening (Reporting 31/01/2019 1 87.60 0.00 87.60 5345 ECG Health Screening (Reporting Fee) 31/01/2019 1 15.50 0.00 15.50 5347 Echo 2D+M-Mode+Doppler Health Screening 31/01/2019 1 103.00 0.00 103,00 3 206.10 0.00 206.10 @ DRLOHPEIKEE (Neurology ) REPORTING FEES 4317 Neuro TCD (Adult) Ant & Post Circ (Reporting 31/01/2019 1 100.00 0.00 ; 100.00 1 100.00 0.00 100.00 e DR SURAINI BT MOHAMAD SAINI ( Radiology Specialist AD ) REPORTING FEES 5022 Abdomen & Pelvis US (Radiologist Fee) 31/01/2019 1 75.00 0.00 75.00 1153 Chest X-ray (Radiologist Fee) 31/01/2019 1 11.40 0.00 11.40
2 86.40 0.00 86.40
MURNI NUR FATHIHAH ABDUL GHANI Print Date: 31/01/2019 12:17PM Page 1 of 2


{% extends 'admin/master.html' %}
{% block head %}
{% endblock head%}
{% block body %}
TOPIC: Exploring Tourist Profiles across Different Preferences and Regions
Description: Fuse data from travel platforms and social media to draw interesting conclusions and build informative visualizations regarding touristic experiences in Greece and abroad.
Collect tourist reviews and tourist profiles from travel platforms. Also, collect tourists’ social media posts for related tourist experiences.
Build machine learning models to predict user characteristics, which may be useful for assigning users into clusters, utilizing user profile building methods to identify user traits.
Explore and visualize potential user clusters to identify different typesof tourists across different locations, utilizing user segments and community detection methods to identify user clusters.
Detect and visualize user emotion to explore the differences insatisfaction between different tourism types and locations, utilizing emotion detection and sentiment analysis methods.
Explore and visualize emerging topics on social media and tourists’reviews related to tourism in the aforementioned locations, utilizing topic detection methods to identify emerging topics.


Notifications
Enable Notifications
0">
About this study
0 || this.study.properties.support_url.length > 0">
Support
0" (click)="openSupportEmail(this.study.properties.support_email, this.study.properties.study_name)" detail>
Contact us by email
0" (click)="openSupportURL(this.study.properties.support_url)" detail>
Support website
0 || this.study.properties.pls.length > 0">
Ethics Information
0">
0" (click)="openSupportURL(this.study.properties.pls)" detail>
Plain Language Statement
Withdraw
Withdraw from study