Fix: Battle.net account sync not working properly
Fix: Desktop shortcut creation fails in some cases (by TheCakeIsNaOH)
Fix: Various crash fixes


Currently assumes you have an Islandora instance accessible at localhost:8000 that has JSON:API and CORS (see below) enabled with some existing Controlled Access Terms populated.
Initially my browser refused to load the dropdown boxes from Drupal due to Cross-Origin Resource Sharing (CORS). A bit of searching lead me to a forum post indicating that I needed to configure my site's services.yml to enable CORS. There may be a way to do it without this, but it is what I have right now.


copresident
treasurer and online team lead selections editor
public relations
print team lead selections editor
art and web director


Möbial
— Mobile analytics.
Logout
Möbial Charts
Möbial Analytics Dashboard
Möbial is an incredibly simple to use mobile analytics platform.
Maximize your app's ROI by tracking data such as clicks, gestures, application traversals, etc.


AP Top Sports News at 3:36 a.m. EST
NFL ICYMI: Jerry Jones' frustration; Haskins' photo finish
49ers start 3-game gauntlet with 37-8 win over Packers
Lutz's kick lifts Saints to dramatic 34-31 win over Panthers
Pats hold Cowboys' No. 1 offense without TD in 13-9 win
Rodgers struggles in Packers' 37-8 loss to 49ers
Doncic, Hardaway Jr. lead Mavs to 137-123 rout of Rockets
Harrell ties career high with 34 as Clippers rout Pelicans
Winnipeg Blue Bombers win first Grey Cup title since 1990
NFL and Kaepernick still at odds on failed workout
Kim hits 25-foot putt to capture LPGA finale, $1.5M prize
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.


Classes are used when we want to create a way to organize and produce methods and attributes. Think of it as the blueprint from which individual objects are created.
Lets say you wanted to list the product details or advertise some Board Games. Perhaps you wanted to categorize their name along with the minimum and maximum number of players. You want to create a general ad that will captivate kids into buying your product. We won’t be winning any sales awards anytime soon, so we’ll keep it simple.
We can start by designating a class in CamelCase. For example to start we would type ‘class BoardGames’. So now, our “BoardGames’ has the ability to create new Ruby objects of class “BoardGames”.
@ is an indicator that the object is an instance variable. Without it, they would be local variables and their scope would only be within the block of the method. By making it an instance variable, their scope reaches across multiple blocks of code, but only within the limits of the class.
Moving on, lets say we define another method that completes a desciption of the ad.
So we’ve set up an advertisement that will pull in the details from instance variables and apply them to our string.
Let’s pick something parents think is a good purchase for their children that they’ll later regret.
With this potential, we could expand this to simple product descriptions on multiple website pages. That’s tasting a Ruby.


Functions are a way of packaging functionality that you wish to reuse.
It's possible to define a body of code as a function that executes when
you call
the function name in your code. This is a good alternative to repeatedly
writing the same code. You have already seen some uses of functions
previously.
For example:
These functions, document.querySelector and alert, are built into the browser.
If you see something which looks like a variable name, but it's followed
by
parentheses— () —it is likely a function. Functions often take arguments:
bits
of data they need to do their job. Arguments go inside the parentheses,
separated by commas if there is more than one argument.
argument: ('h1', 'h2')
For example, the alert() function makes a pop-up box appear inside the
browser
window, but we need to give it a string as an argument to tell the
function what
message to display. You can also define your own functions.
In the next example, we create a simple function which takes two numbers
as arguments
and multiplies them:
A function is a reusable piece of code that performs some logic and gives
you a
result The return keyword allows the function to give the result of its
computation. return keyword can only be used inside a function. A
parameter is
a variable that a function receives. Most functions will use that variable
they
receive and will compute the result based on it. To call a function, you
have
to start with its name then opening parentheses (, then the value you want
to
give to the parameter and then a closing parentheses )


--- layout: post title: Speaking at Meet Magento - New York City tags: trip usa new-york magento conference meet-magento ---
Meet Magento Association promotes events throughout the world, gathering from merchants to developers, engaging partners, spreading knowledge and supporting the community. New York City was the host for the 2017 edition. The venue was very cool and it was located at Manhattan's heart.
I have a particular opinion that joining to these events are highly significant. Engineers, Project Managers, Consultans, CEO's, CTO's, Sales, Marketing and people from the most diverse parts of the ecosystem are present in a single spot. It's such great opportunity to make new connections, share valuable experiences, and mutual business strengthening.
Although the event was not "technical-only", there were relevant amount of technical people. I shared in the "Tech Track" exercises that Software Developers might use to write a more mantainable code. I present the same talk few weeks before, in Mage Titans in Austin, Texas: Clean Code, Object Calisthenics & Best Practices. You can checkout the presentation slides here.
The entire Mage Mojo team worked hard to make this event unique. They had an easy check-in process, clear communication with the speakers, and were extremely friendly from beggining to the end. They have done a very good job! Thanks for organizing, folks.
As mentioned, it was at Manhattan's Heart. New World Stages was located at 50th (between 9th and 8th). The venue was modern with big screens around the networking area, comfortable seats, and impressive stage lights.
Photo credit to Plumrocket
After a full day of talks, networking and business? Attendees, speakers and certainly the staff need a party!!!
Photo credit to Jamie Maria
I went to the 86th floor of Empire Building (right where King Kong climbed!). The view from there is gorgeous!. It's possible to see the entire Manhattan: Central Park, the famous Brooklyn and Manhattan bridges, several multinacional companies' headquarters, Liberty Statue & more. Personally, the most incredible side is Lower Manhattan, see the picture.
Empire Building: at the 86th floor! Lower Manhattan view
Times Square at night!
Sunset at Brooklyn Bridge


Check your connectivity, then reload page...
If the problem persists, please contact the webmaster
Go to HOME


This SRFI defines syntax to create SRFI 121/158 coroutine generators conveniently and in the flavor of Python generator functions.


Remember me
Forgot your password? Click here to reset it.
Current Time: {{ current_date }}
Time Zone: {{ timezone_name }}


The goal in this project is to train a convolutional neural network with Tensorflow for building a classifier for the German Traffic Sign dataset. Dataset consists of RGB images of size 32x32 for 43 different traffic signs. The aim is to get at least 93% accuracy on validation set.
Let's load the images first
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import pickle
import os
import pandas as pd
import zipfile
def get_data(path):
archive = zipfile.ZipFile('data/{}.zip'.format(path), 'r')
return pickle.load(archive.open('{}.p'.format(path)))
train = get_data('train')
valid = get_data('valid')
test = get_data('test')
X_train, y_train = train['features'], train['labels']
X_valid, y_valid = valid['features'], valid['labels']
X_test, y_test = test['features'], test['labels']
and a basic summary of the dataset
n_train = X_train.shape[0]
n_validation = X_valid.shape[0]
n_test = X_test.shape[0]
image_shape = X_train[0].shape
n_classes = np.unique(y_train).shape[0]
print("Number of training examples =", n_train)
print("Number of validation examples =", n_validation)
print("Number of testing examples =", n_test)
print("Image data shape =", image_shape)
print("Number of classes =", n_classes)
We can examine the distribution of the classes in training, validation and test sets
def get_class_percents(y, keys):
classes, counts = np.unique(y, return_counts=True)
cls2percent = {cls: percent for cls, percent in zip(classes, 100 * counts / sum(counts))}
return np.array([cls2percent[cls] for cls in keys])
sign_names = pd.read_csv('signnames.csv')
keys = sign_names.ClassId.values
sign_names = sign_names.assign(train_percents=get_class_percents(y_train, keys))
sign_names = sign_names.assign(valid_percents=get_class_percents(y_valid, keys))
sign_names = sign_names.assign(test_percents=get_class_percents(y_test, keys))
sign_names.sort_values(by=['train_percents', 'valid_percents', 'test_percents'], ascending=False)
As we can see, the dataset is imbalanced and percentages of each class in different datasets are more or less close to each other. Let's plot some instances from classes to examine them visually.
import matplotlib.pyplot as plt
plt.rcParams.update({'figure.max_open_warning': 0})
%matplotlib inline
seed = 43512
np.random.seed(seed)
def plot_sign_with_id(class_id):
class_name = sign_names[sign_names.ClassId==class_id].SignName.values[0]
class_indices = np.where(y_train==class_id)[0]
fig = plt.figure(figsize=(10, 1))
plt.title(class_name)
plt.xticks([])
plt.yticks([])
fig.subplots_adjust(left=0, right=1, bottom=0, top=1, hspace=0.05, wspace=0.05)
random_indices = np.random.choice(len(class_indices), size=10, replace=False)
for i in range(10):
axis = fig.add_subplot(1, 10, i + 1, xticks=[], yticks=[])
axis.imshow(X_train[class_indices[random_indices[i]]])
for class_id in sign_names.ClassId:
plot_sign_with_id(class_id)
Some of the images are darker than the rest, we can also plot and check them as well
def plot_selected(images, rows):
columns = len(images) / rows
fig = plt.figure(figsize=(columns, rows))
plt.xticks([])
plt.yticks([])
fig.subplots_adjust(left=0, right=1, bottom=0, top=1, hspace=0.05, wspace=0.05)
for i in range(len(images)):
axis = fig.add_subplot(rows, columns, i + 1, xticks=[], yticks=[])
axis.imshow(images[i], cmap='gray' if len(images[i].shape)==2 else None)
average_pixel_intensity = np.sum(X_train, axis=(1, 2, 3)) / 1024
indices_of_dark_images = np.where(average_pixel_intensity < 60)[0]
randomly_selected_indices = np.random.choice(indices_of_dark_images, size=40)
random_dark_images = X_train[randomly_selected_indices]
plot_selected(random_dark_images, rows=4)
As first preprocessing step I convert images to grayscale. Dark images above are easily distinguishable in grayscale
import cv2
def grayscale(image):
return cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
grayscaled = list(map(grayscale, random_dark_images))
plot_selected(grayscaled, rows=4)
As further preprocessing step I use two methods to increase contrast in images: local contrast normalization described by Sermanet and Lecun and adaptive histogram equalization.
from augmentations import contrast_normalization
plot_selected(list(map(contrast_normalization, grayscaled)), rows=4)
For local contrast normalization, first, (normalized) gaussian weighted sum of surrounding pixel intensities are subtracted from pixels. $$v_{ijk} = x_{ijk} - \sum_{ipq} w_{pq} x_{i, j+p, k+q}$$
At second step, these values are divided by square root of weighted sum of squares of all features over a spatial neighborhood. $$y_{ijk} = v_{ijk} / max(c, \sigma_{jk}) $$ where $$\sigma_{jk} = (\sum_{ipq} w_{pq}v_{i, j+p, k+q}^2)^{1/2}$$ and $$c=mean(\sigma_{jk})$$ As a result, dark and light regions change a little, but the edges of the images become clearer.
Another method to make contrast in images more visible is to use contrast limited adaptive histogram equalization, which spreads the intensities to a wider range, thus improving the contrast.
CLAHE = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(5, 5))
def equalize_histogram(image):
return CLAHE.apply(image)
plot_selected(list(map(equalize_histogram, grayscaled)), rows=4)
I artificially increase the size of dataset by adding distorted images to the original data, in order to make the classifier more robust to potential deformations. Augmentations include rotations by angle uniformly selected from interval of [-20, 20] degrees and uniform distortions by magnitude of [-0.1, 0.1] of the image applied to each corner.
from functools import partial
from augmentations import Rotator, Squeezer
equalized = np.array(list(map(equalize_histogram, grayscaled)))
equalized = equalized.reshape(*equalized.shape, 1)
rotator = Rotator(prob_distr=partial(np.random.uniform, low=-20, high=20))
rotated, *_ = rotator(equalized, np.zeros(shape=len(equalized)), len(equalized))
plot_selected(rotated.squeeze()[len(equalized):], rows=4)
squeezer = Squeezer(prob_distr=partial(np.random.uniform, low=-0.1, high=0.1))
squeezed, *_ = squeezer(rotated, np.zeros(shape=len(rotated)), len(rotated))
plot_selected(squeezed.squeeze()[len(rotated):len(rotated) + 40], rows=4)
As to the architecture, I use three convolutional layers (100 convolutions of size 7x7, 150 convolutions of size 4x4, 250 convolutions of size 2x2), each followed by dropout and maxpooling. The output of the last maxpooling layer is flattened and fed into fully connected layer, which is followed by the output layer. The architecture is relatively simple and one can go further and use more complicated ones as here.
from network_utils import conv2d, maxpool, dense, train, EarlyStopper, evaluate, do_epoch, _iterate_over_batches
def apply_feedforward_model(x, num_of_classes, dense_keep_prob, conv_keep_prob):
l1_depth = 100
l2_depth = 150
l3_depth = 250
dense1_out_size = 300
conv1 = conv2d(x, kernel_size=[7, 7], num_of_filters=l1_depth)
l1_maxout = tf.nn.dropout(conv1, conv_keep_prob)
l1_maxout = maxpool(l1_maxout, kernel_size=[2, 2], strides=[2, 2])
conv2 = conv2d(l1_maxout, kernel_size=[4, 4], num_of_filters=l2_depth)
l2_maxout = tf.nn.dropout(conv2, conv_keep_prob)
l2_maxout = maxpool(l2_maxout, kernel_size=[2, 2], strides=[2, 2])
conv3 = conv2d(l2_maxout, kernel_size=[2, 2], num_of_filters=l3_depth)
l3_maxout = tf.nn.dropout(conv3, conv_keep_prob)
l3_maxout = maxpool(l3_maxout, kernel_size=[2, 2], strides=[2, 2])
flattened = tf.contrib.layers.flatten(l3_maxout)
dense1_out = dense(flattened, dense1_out_size)
dense1_out = tf.nn.dropout(dense1_out, dense_keep_prob)
output = dense(dense1_out, num_of_classes, use_relu=False)
return output
For training the model I use Adam (adaptive momentum) optimizer with the batch size of 64 and train the model maximum for 50 epochs. Early stopping acts as a regularizer and lets us stop training before it starts overfitting to the training data. I use the value of the loss function on validation data to decide when to stop. Dropout probabilities that I run the training with are 0.3 after convolutional layers and 0.35 for the dense layer. Since I use simple architecture, I let the model run 5 times and then average the output probabilities to make the final prediction. I repeat the same procedure for both preprocessing methods (contrast normalization and histogram equalization), which results in 10 models.
def preprocess(data, preprocessor):
X, y = data['features'], data['labels']
X_grayscale = np.array(list(map(lambda img: cv2.cvtColor(img, cv2.COLOR_RGB2GRAY), X)))
X_reshaped = X_grayscale.reshape(*X_grayscale.shape, -1)
X = preprocessor(X_reshaped)
return X, y
import tensorflow as tf
from augmentations import Rotator, HistogramEqualizer, ContrastNormalization
EPOCHS = 50
RUNS = 5
EARLY_STOPPER_PATIENCE = 10
batch_size = 64
learning_rate = 0.0001
seed = 43512
np.random.seed(seed)
tf.set_random_seed(seed)
directory = 'data'
dense_dropout = 0.65
conv_dropout = 0.7
test_probabilities_over_runs = []
preprocessings = {'cn': ContrastNormalization, 'he': HistogramEqualizer}
overall_runs = RUNS * len(preprocessings)
from operator import itemgetter
from collections import defaultdict
model_paths = defaultdict(list)
for pr_name, preprocessing in preprocessings.items():
model_paths[pr_name] = []
for run in range(RUNS):
train_data = get_data('train')
valid = get_data('valid')
test = get_data('test')
preprocessor = preprocessing()
X_train, y_train = preprocess(train_data, preprocessor)
X_valid, y_valid = preprocess(valid, preprocessor)
X_test, y_test = preprocess(test, preprocessor)
num_classes = np.unique(y_train).shape[0]
instances, rows, columns, *_ = X_train.shape
rotator = Rotator(prob_distr=partial(np.random.uniform, low=-20, high=20))
X_train, y_train, _ = rotator(X_train, y_train, len(X_train))
squeezer = Squeezer(prob_distr=partial(np.random.uniform, low=-0.1, high=0.1))
X_train, y_train, _ = squeezer(X_train, y_train, len(X_train))
tf.reset_default_graph()
x = tf.placeholder(tf.float32, shape=[None, *X_train[0].shape])
y = tf.one_hot(tf.placeholder(tf.int32, (None)), num_classes)
w = tf.placeholder(tf.float32, shape=[None])
dense_keep_prob = tf.placeholder(tf.float32)
conv_keep_prob = tf.placeholder(tf.float32)
logits = apply_feedforward_model(x, num_of_classes=num_classes,
dense_keep_prob=dense_keep_prob,
conv_keep_prob=conv_keep_prob)
cross_entropy = tf.losses.softmax_cross_entropy(onehot_labels=y, logits=logits, weights=w)
mean_loss = tf.reduce_mean(cross_entropy)
optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate)
training = optimizer.minimize(mean_loss)
correct_prediction = tf.equal(tf.argmax(logits, axis=1), tf.argmax(y, axis=1))
accuracy_operation = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
session = tf.Session()
saver = tf.train.Saver()
early_stopper = EarlyStopper(saver, session, which=min, patience=EARLY_STOPPER_PATIENCE,
model_description='{}-{}'.format(pr_name, run + 1), best_only=True)
with session.as_default():
session.run(tf.global_variables_initializer())
path_to_model = train(session, x, y, w,
dense_keep_prob,
conv_keep_prob,
training, mean_loss,
X_train, y_train, X_valid, y_valid,
accuracy_operation,
train_class_weights=None, valid_class_weights=None,
dense_dropout=dense_dropout, conv_dropout=conv_dropout,
early_stopper=early_stopper, epochs=EPOCHS, batch_size=batch_size)
model_paths[pr_name].append(path_to_model)
tf.reset_default_graph()
with session.as_default():
saver.restore(session, path_to_model)
test_accuracy = evaluate(x, y, w,
accuracy_operation,
dense_keep_prob,
conv_keep_prob,
X_test, y_test,
batch_size=batch_size)
print('test accuracy = {}'.format(test_accuracy))
probs = tf.nn.softmax(logits)
with session.as_default():
probabilities_and_batch_sizes = list(
do_epoch(
session,
_iterate_over_batches(x, y, w,
dense_keep_prob, conv_keep_prob,
X_test, y_test,
batch_size=batch_size),
probs
))
probabilities = np.array(list(map(itemgetter(0), probabilities_and_batch_sizes)))
probabilities = np.concatenate(probabilities, axis=0)
test_probabilities_over_runs.append(probabilities)
Now that we have trained models, we can print out the accuracy on the test data.
end_probabilities = sum(test_probabilities_over_runs) / overall_runs
predictions = np.argmax(end_probabilities, axis=1)
print('averaging probabilities from models, test accuracy = ', np.mean(predictions == y_test))
To analyze the performance of classifiers, we can check the precision and recall of each class:
from sklearn import metrics
print(metrics.classification_report(y_test, predictions))
As we can see above, the data for approximately half of the classes are classified perfectly (recall and precision are 1.00). Overall classification accuracy is close to 99% percent, and recall for only one of the classes ("Pedestrians") is around the half of the images for that class.
To check the classification results on new images, I found 10 images (three of them I shot myself) that seemed interesting to me. Only three of the images (dirty and yellowish "No entry" signs and "Priority road") have the type in German Traffic Sign Dataset. Rest of the images have something in common in appearance with the signs in our dataset and the expectation, that the classes, which are predicted with high probability for those images, correspond to similarly looking signs, holds for almost in all cases. Let's see that in detail.
First, let's define two utility functions. resize_and_plot
function resizes the input image to the size of 32x32 plots the original (cropped) sign and resized image. predict_print_plot
function plots the image after each preprocessing method, makes predictions and plots the average grayscale sign from the training dataset for each of the top-5 classes with highest probability for making visual comparisons.
import matplotlib.image as mpimg
def resize_and_plot(img):
figure = plt.figure(figsize=(2, 2))
plt.xticks([])
plt.yticks([])
figure.subplots_adjust(left=0, right=4, bottom=0, top=1, hspace=0.2, wspace=0.2)
axis = figure.add_subplot(1, 2, 1, xticks=[], yticks=[])
axis.set_title('cropped from original', fontsize=16)
axis.imshow(img)
resized = cv2.resize(img, (32, 32))
axis = figure.add_subplot(1, 2, 2, xticks=[], yticks=[])
axis.set_title('resized to 32x32', fontsize=16)
axis.imshow(resized)
return resized
train_data = get_data('train')
X_train, y_train = train_data['features'], train_data['labels']
X_train = np.array(list(map(lambda img: cv2.cvtColor(img, cv2.COLOR_RGB2GRAY), X_train)))
X_train = X_train.reshape(*X_train.shape, -1)
def predict_print_plot(img):
def calc_probs_for_models(filenames, img):
probabilities = np.zeros(shape=(43))
for path in filenames:
tf.reset_default_graph()
with session.as_default():
saver.restore(session, path)
probabilities_and_batch_sizes = list(
do_epoch(
session,
_iterate_over_batches(x, y, w,
dense_keep_prob, conv_keep_prob,
[img], [-1],
batch_size=1),
probs
))
probabilities += probabilities_and_batch_sizes[0][0][0]
return probabilities
fig = plt.figure(figsize=(2, 2))
plt.xticks([])
plt.yticks([])
fig.subplots_adjust(left=0, right=4, bottom=0, top=1, hspace=0.2, wspace=0.2)
preprocessed = equalize_histogram(grayscale(img)).reshape(32, 32, 1)
axis = fig.add_subplot(1, 2, 1, xticks=[], yticks=[])
axis.imshow(preprocessed.reshape(32, 32), cmap='gray')
axis.set_title('histogram equalization')
all_probabilities = calc_probs_for_models(model_paths['he'], preprocessed)
preprocessed = contrast_normalization(grayscale(img)).reshape(32, 32, 1)
axis = fig.add_subplot(1, 2, 2, xticks=[], yticks=[])
axis.imshow(preprocessed.reshape(32, 32), cmap='gray')
axis.set_title('contrast normalization')
all_probabilities += calc_probs_for_models(model_paths['cn'], preprocessed)
all_probabilities /= 10
indices_for_decreasing_prob = np.argsort(all_probabilities)[::-1][:5]
data_idx_for_classes_with_high_prob = np.isin(y_train, indices_for_decreasing_prob)
selected_X = X_train[data_idx_for_classes_with_high_prob]
selected_y = y_train[data_idx_for_classes_with_high_prob]
fig = plt.figure(figsize=(5, 4))
plt.xticks([])
plt.yticks([])
fig.subplots_adjust(left=0, right=4, bottom=0, top=1, hspace=0.2, wspace=0.2)
for i in range(5):
idx = np.where(selected_y == indices_for_decreasing_prob[i])[0]
axis = fig.add_subplot(1, 5, i + 1, xticks=[], yticks=[])
class_data = sign_names.iloc[indices_for_decreasing_prob[i]]
title = class_data.SignName + '-' + '{:,.3f}'.format(all_probabilities[indices_for_decreasing_prob[i]])
axis.set_title(title, fontsize=16)
avg_entry = selected_X[idx].mean(axis=0)
axis.imshow(avg_entry.reshape(32, 32), cmap='gray')
return all_probabilities
The first sign that I shot, was a dirty "End of speed zone 30 km/h" sign. Since the sign is not among classes in dataset, we can expect the probabilities to be low. Moreover, the road sign is dirty (what was the reason why I took it) and this should also influence the predicted results.
img = mpimg.imread('additional/img1.jpg')
img = resize_and_plot(img[600:1700, 1000:2000])
It is difficult for a human eye (at least for me) to classify the resized image. Models will probably perform bad too. Predicted probabilities confirm the hypotheses above:
all_probs = predict_print_plot(img)
We can the whole distribution in the bar chart:
plt.bar(np.arange(len(all_probs)), all_probs)
Let's check the second image:
img = mpimg.imread('additional/img2.jpg')
img = resize_and_plot(img[380:1200, 840:1800])
This time the sign is dirty again, however, the "No entry" sign exist in our dataset and resized image resembles the ones in our dataset. We can expect one class being predicted with high probability.
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
Third image is also from our dataset ("No entry"), however, the color is completely different from the ones in dataset. There's only one sign with yellow color in the original data ("Priority road") and the models predict similar probability for these two classes ("No entry" and "Priority road"). Generally, the highest probability will be low.
img = mpimg.imread('additional/img3.jpg')
img = resize_and_plot(img[450:1000, 1000:1600])
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
Fourth image ("End of zone 30 km/h") does not exist in the dataset either, yet the resized image is clearer this time in comparison to the first one. The sign by itself looks similar to speed limit signs (30, 80, 20) and "End of zone 80 km/h" sign. Some of those should appear among the top 5.
img = mpimg.imread('additional/img4.jpg')
img = resize_and_plot(img[0:194, 40:230])
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
Next image is of sign "Speed limit 130 km/h", which again, does not exist in original dataset. Visually similar ones are speed limit signs for 100, 120, 30, 20 80 km/h and they will most probably appear in the top 5. Once more, probabilities should be low.
img = mpimg.imread('additional/img5.jpg')
img = resize_and_plot(img[10:100, 150:255])
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
Let's plot the next image:
img = mpimg.imread('additional/img6.jpg')
img = resize_and_plot(img[80:450, 120:520])
It is difficult to judge about this one, however, trunk of the body resembles "General caution" sign.
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
img = mpimg.imread('additional/img7.jpg')
img = resize_and_plot(img[50:160, 130:260])
Priority road sign exist in our dataset and one can expect this image to be classified correctly.
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
Now, some funny images that look like "No entry" sign. Some will be classified correctly and with more than 0.5 probability, but it won't get close to 0.9.
img = mpimg.imread('additional/img8.jpg')
img = resize_and_plot(img[150:650, 50:530])
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
img = mpimg.imread('additional/img9.jpg')
img = resize_and_plot(img[50:420, 240:600])
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
img = mpimg.imread('additional/img10.jpg')
img = resize_and_plot(img[50:700, 40:750])
all_probs = predict_print_plot(img)
plt.bar(np.arange(len(all_probs)), all_probs)
To examine the inner state of the network, let's redefine the architecture outside the function, to have an access to the activations.
from network_utils import _to_one_hot
tf.reset_default_graph()
x = tf.placeholder(tf.float32, shape=[None, 32, 32, 1])
y = tf.one_hot(tf.placeholder(tf.int32, (None)), num_classes)
w = tf.placeholder(tf.float32, shape=[None])
dense_keep = tf.placeholder(tf.float32)
conv_keep = tf.placeholder(tf.float32)
l1_depth = 100
l2_depth = 150
l3_depth = 250
dense1_out_size = 300
conv1 = conv2d(x, kernel_size=[7, 7], num_of_filters=l1_depth)
l1_maxout = tf.nn.dropout(conv1, conv_keep)
l1_maxout_drop = maxpool(l1_maxout, kernel_size=[2, 2], strides=[2, 2])
conv2 = conv2d(l1_maxout_drop, kernel_size=[4, 4], num_of_filters=l2_depth)
l2_maxout = tf.nn.dropout(conv2, conv_keep)
l2_maxout_drop = maxpool(l2_maxout, kernel_size=[2, 2], strides=[2, 2])
conv3 = conv2d(l2_maxout_drop, kernel_size=[2, 2], num_of_filters=l3_depth)
l3_maxout = tf.nn.dropout(conv3, conv_keep)
l3_maxout = maxpool(l3_maxout, kernel_size=[2, 2], strides=[2, 2])
flattened = tf.contrib.layers.flatten(l3_maxout)
dense1_out = dense(flattened, dense1_out_size)
dense1_out = tf.nn.dropout(dense1_out, dense_keep)
output = dense(dense1_out, num_classes, use_relu=False)
Let's see what some of the activations of the netwoork look like. First convolutional layer outputs after maxpooling:
img = mpimg.imread('additional/img2.jpg')
img = resize_and_plot(img[380:1200, 840:1800])
def get_activation(path, variable, image_input, session):
saver = tf.train.Saver()
saver.restore(session, path)
activation = variable.eval(session=session,
feed_dict={
x: image_input,
y: _to_one_hot([1], 43),
w: [1],
dense_keep: 1.,
conv_keep: 1.})
return activation
def plot_feature_maps(layer):
with tf.Session() as session:
image_input = contrast_normalization(grayscale(img)).reshape(1, 32, 32, 1)
activation = get_activation(model_paths['cn'][1], layer, image_input, session)
plt.figure(1, figsize=(15, 15))
for featuremap in range(100):
plt.subplot(10, 10, featuremap + 1)
plt.title('FeatureMap ' + str(featuremap))
plt.imshow(activation[0, :, :, featuremap], interpolation="nearest", vmax=2, cmap="gray")
plot_feature_maps(l1_maxout)
Second layer convolution outputs after maxpooling:
plot_feature_maps(l2_maxout)
And last convolutional layer outputs after maxpooling and dropout
plot_feature_maps(l3_maxout)


1 ![Colore Logo][colorelogo]
3 [![Build status][devbuildbadge]][devbuild]
4 [![Coverage Status][devcoverbadge]][devcover]
5 [![Stories in Ready][wafflebadge]][waffle]
6 [![MIT License][licensebadge]][license]
7 [![Latest GitHub release][ghreleasebadge]][ghrelease]
8 [![NuGet version][ngverbadge]][ng]
10 A powerful and elegant C# library for Razer Chroma's SDK
15 [![Gitter][gitterbadge]][gitter]
17 *For discussing, you can join the Gitter chat using the badge above. If you want to join the Slack chat, contact [Brandon Scott][bs] ([brandon@brandonscott.co.uk](mailto:brandon@brandonscott.co.uk)) or [Adam Hellberg][sharp] ([sharparam@sharparam.com](mailto:sharparam@sharparam.com)).*
19 Contributors are very welcome! If you got code fixes, please [submit a pull request][newpull] here on GitHub.
21 If you want to join the development team, please contact [Sharparam][sharp] or [Brandon][bs] on GitHub.
23 All authors and contributors are listed in the **AUTHORS** file.
25 Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file before making a pull request.
30 Copyright © 2015-2016 by [Adam Hellberg][sharp] and [Brandon Scott][bs].
32 This project is licensed under the MIT license, please see the file **LICENSE** for more information.
34 Razer is a trademark and/or a registered trademark of Razer USA Ltd.
35 All other trademarks are property of their respective owners.
40 Colore depends on the Razer Chroma SDK (RzChromaSDK64.dll or RzChromaSDK.dll).
42 The Razer Chroma SDK is provided by Razer and [can be obtained from their website][rzdev].
47 It's important to note that the platform under which this project is built plays a huge role on the usability of the library.
49 When compiling with the x86 or x64 platform set in build configuration, Colore will **only work on the respective system platform**
50 (32-bit if compiled using x86, and 64-bit if compiled using x64).
52 The native methods are imported using `DllImport` when Colore is compiled in x86 or x64, which is why the setting matters for deployment,
53 as this cannot be changed at runtime.
55 However, if compiling with the "Any CPU" configuration, Colore will dynamically load functions relevant for the current executing platform,
56 making it run on both 32- and 64-bit systems without any work having to be done by the dev.
58 For non-performance critical applications, the "Any CPU" mode should be fine (this is also what the NuGet package is compiled against).
60 For applications that require peak performance, we recommend shipping separate 32- and 64-bit builds of your application, using the relevant build configurations in Colore.
62 The below example compiles Colore in Release mode for the x86 (32-bit) platform.
65 msbuild Colore.sln /p:Configuration=Release;Platform=x86
68 (Replace `x86` with `x64` if compiling for Win64, or `"Any CPU"` if compiling cross-platform)
70 Make sure that your projects using Colore are also compiled against a matching platform.
72 Razer's SDK installer **will only install the library relevant for your platform**.
74 This means that your apps will need to be compiled twice, once for x86 platforms, and once for x64, unless you are using "Any CPU".
75 They must both be provided when you distribute your application, depending on what platform the user has.
80 Current projects utilizing this or modified versions of this library:
84 (If you want your project listed, just contact [Sharparam][sharp] or [Brandon][bs])
86 [newpull]: ../../pull/new/develop
87 [sharp]: https://github.com/Sharparam
88 [contrib]: ../../wiki/Contributing
89 [bs]: https://github.com/brandonscott
90 [rzdev]: http://developer.razerzone.com/chroma
92 [waffle]: http://waffle.io/coralestudios/colore
93 [wafflebadge]: https://badge.waffle.io/coralestudios/colore.svg?label=ready&title=Ready
94 [license]: http://opensource.org/licenses/MIT
95 [licensebadge]: https://img.shields.io/badge/license-MIT-blue.svg
96 [ghrelease]: https://github.com/CoraleStudios/Colore/releases
97 [ghreleasebadge]: https://img.shields.io/github/release/CoraleStudios/Colore.svg
98 [ng]: https://www.nuget.org/packages/Colore
99 [ngverbadge]: https://img.shields.io/nuget/v/Colore.svg
101 [devbuild]: http://tc.coralestudios.com/viewType.html?buildTypeId=colore_mainbuild
102 [devbuildbadge]: https://img.shields.io/teamcity/http/tc.coralestudios.com/s/colore_mainbuild.svg?style=flat
103 [devcover]: https://coveralls.io/r/CoraleStudios/Colore?branch=develop
104 [devcoverbadge]: https://coveralls.io/repos/CoraleStudios/Colore/badge.svg?branch=develop
106 [gitter]: https://gitter.im/CoraleStudios/Colore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
107 [gitterbadge]: https://badges.gitter.im/Join%20Chat.svg
109 [colorelogo]: http://colore.coralestudios.com/img/colore.png


Name: {{ name }}
Start: {{ start }}
Start latitude: {{ start_lat }}
Start longitude: {{ start_lon }}
Finish: {{ finish }}
Elapsed time: {{ elapsed }}
Minimum interval: {{ min_interval }}
Total distance: {{ total_dist_km }} / {{ total_dist_mi }}
Elevation gain: {{ elev_change }}
Is loop? (tolerance 100m): {{ loop_bool }}


(Nov 26th 2020)
- Some fixes and improvements
- Fixed an issue with sidebar in
prefers-reduced-motion
mode - Fixed an issue with
.sidebar-right
and fixed footer - A few other fixes
- Fixed an issue with sidebar in
- Updated packages
(Oct 17th 2020)
- Inbox page. It can also be used for helpdesk (ticketing)
- Search results page
- Added
ace-slim.css
which is a stripped down version of ace.css removing 3rd party plugin styling and some extra functionality - Added
modal-off-{sm|md|lg|xl}
classes to disable modal functionality in different screen sizes - Added
pos-fixed
andpos-sticky
classes which can be used in combination with positioning classes such as position-tr position-bl etc
- Reverted back to classic Ace layout:
- The default dashboard and layout of Ace
v3.0
is now in Dashboard 2- You can still use the
v3.0
layout
- You can still use the
- The default dashboard and layout of Ace
- New folder structure:
- Removed
application
folder - JS source files are now inside
js
- SCSS files are now inside
scss
- Handlebars view files are inside
views
- The main file of each page or layout is renamed to
#index.hbs
and is inside its own specific (partials) folder
- The main file of each page or layout is renamed to
- Sample data files for demo are inside
views/data
demo.js
files and other files used to run demo and generate static HTML files are insideapp
folder
- Removed
- You should add
.bgc-white
to.main-container
for a white content area background - You should now add
.align-items-end
to.aside-bottom
- Renamed _features.scss to ace-features.scss
- Removed ace-font.scss. It was only used during local development of Ace for faster loading of fonts
- Javascript source files are now more modular
- A few fixes and improvements
- Updated packages
(Aug 18th 2020)
- Fixed a
.navbar-fixed
issue in boxed layout - Updated packages
(Aug 11th 2020)
- New dashboard and default layout
- New starter (empty) page
- W3C validation
- added
.navbar-links
. An example is "Overview", "Orders", etc links in Dashboard 1 navbar - added blurred background option for modals
- added progressbar option for toast elements
- added
imageClass
option for toast elements - added
instant
option for toaster remove/hide functions - added grey scrollbars
- added
autohide: false
option to always show scrollbars - added
.dropdown-lg
,.dropdown-md
,.dropdown-xxs
,.dropdown-center
- added button options
.btn-text-pale
,.btn-a-b2
,.btn-a-bb2
,.btn-a-bt2
,.btn-tp
- added
.btn-group-faded
- added
.dd-appear-center
for mobile dropdowns - added
nav-tabs-detached
.nav-tabs-faded
.nav-tabs-static
and.nav-tabs-shadow
- added tabs options
.f-n-hover
,.f-hover
options for dynamic styling - added
.angle-down
.angle-up
.angle-double
options for custom select boxes - added
.let-expanded
option for sidebar - added
.aside-fs
(fullscreen) ,.aside-above-nav
and.aside-shown-above-nav
options for asides - added
.breadcrumb-nosep
- added 5px and 6px border sizing classes such as
.border-l-6
- added *-475 margin and padding classes such as
.pt-475
- added removeFormat toolbar option to Bootstrap Wysiwyg
- added
.bcard
.acard
classes for content boxes - added
.sidebar-white4
and.sidebar-dark2
themes - added
.text-green
and.bgc-orange
colors and its variations - added
.btn-orange
- added new color options/examples for Landing Page 1
- added more pricing examples
- Improved color contrasts for better accessibility and general design (See migration)
- ace.css is now compiled to include
.sidebar-dark
and.navbar-white
themes by default (as in default Dashboard page) - renamed
.sidebar-default
in Dashboard 3 to.sidebar-light
- renamed
.navbar-default
to.navbar-blue
- renamed
.navbar-steelblue
to.navbar-darkblue
- renamed
.navbar-blue
tonavbar-skyblue
- renamed
.navbar-burlywood
to.navbar-brown
- renamed
.navbar-mediumseagreen
to.navbar-green
- renamed
.navbar-darkseagreen
to.navbar-darkgreen
- removed
.sidebar-teal
.sidebar-gradient5
.navbar-lightyellow
.navbar-khaki
.navbar-lightslategrey
themes - removed
.content-bg1
content background color class - removed body background color classes such as
.body-
- removed
.navbar-content-section
.navbar-input
class should be added to search input elements in navbar- renamed
.double-caret
to.caret-double
for.ace-select
elements .btn-warning
has dark text color now. For a similar button with white text, you can use.btn-orange
- removed
.btn-wide
.btn-md
.btn-smd
.btn-xlg
and.btn-vlg
. Use padding and font size classes to change button size - removed
.pagination-compact
- removed
.nav-tabs-color-blue
.tabs-below
.page-nav-tabs
and.tabs-lg
- no need for
.tabs-above
class. Tabs are above by default - removed
.b-underline-*
.b-hovered
etc - removed
.text-blue2
color - darker text colors are now from -d1 to -d4. For example text-secondary-d4
- darker background/border colors are now from -d1 to -d3. For example bgc-green-d3
- removed
.c-pointer
. Userole="button"
instead - removed
.icon-glossy
- removed
.caret-shown
.caret-hidden
for sidebar caret. Used-collapsed
/.d-n-collapsed
and.d-style
instead - checkbox can have
.text-95
.text-90
.text-85
.text-80
etc classes for smaller check marks - renamed layout-2.hbs etc view files to dashboard-2.hbs etc (inside application/views/default/layouts)
- removed Two menus 2 page
- moved scss files for third party plugins into a separate plugins folder
- Fixed known bugs and made improvements
- Fullcalendar has been updated from v4.x to v5.x and therefore there are some breaking changes
- Smartwizard has a new version (v5.x) but we are currently using v4.x as it's stable and works without problems
- Added search feature for documentation
(May 13th 2020)
- Fixed a selector typo that raised error and led to unwanted issues in some older browsers
- Added a print media query to fix an issue in Firefox
(Apr 12th 2020)
- Updated package.json to make sure jQuery v3.4.1 is installed instead of the newly released v3.5.0 until a fix becomes available. It seems like the new jQuery update has some breaking changes
(Apr 6th 2020)
- Wave ripple effect plugin (see Buttons page)
- Some fixes
(Feb 19th 2020)
- Datetimepicker plugin and example (in Form Elements page)
- Small changes to dashboard's look and feel and some themes
(Feb 3rd 2020)
- Landing Page: Two landing pages and coming soon examples added
- Horizontal Menu
- Submenu on Hover
- Two menu examples
.sidebar-right
to move sidebar to right.navbar-fixed-sm
,.navbar-fixed-md
,.navbar-fixed-lg
to have fixed navbar only on smaller devices
.container-plus
: In v2 containers were somewhat wide by default in larger screens.
But now in v2.1 you should add.container-plus
to.container
for that.- Basic
node_modules
files to view the demo is included. You still need to runnpm install
to be able to customize Ace's JS and CSS
- A few bugs fixed
(Dec 24th 2019)
- Moved from BS3 to BS4
- Major changes needed to upgrade from Ace v1.x to Ace v2.x ... Please see documentation


Barney's Dad was really bad so Barney hatched a plan,
When his dad said "Eat your peas,"
Barney shouted, "No!" and ran.
Barney tricked his mean old dad and locked him in the cellar,
Barney's Mom never found out where he'd gone,
Cause Barney didn't tell her.
There his dad spent his life eating mice and gruel,
With every bite for fifty years,
He was sorry he'd been cruel.
Calvin: Everybody seeks happiness! Not me, though! That's the difference between me and the rest of the world. Happiness isn't good enough for me! I demand euphoria!
Calvin: They say the world is a stage. But obviously the play is unrehearsed and everybody is ad-libbing his lines.
Hobbes: Maybe that's why it's hard to tell if we're living in a tragedy or a farce.
Calvin: We need more special effects and dance numbers.


steal('can/util/can.js', function (can) {
var core_hasOwn = Object.prototype.hasOwnProperty,
isWindow = function (obj) {
steal('can/util/can.js', function (can) {
var core_hasOwn = Object.prototype.hasOwnProperty,
isWindow = function (obj) {
In IE8 window.window !== window.window, so we allow == here.
/*jshint eqeqeq:false*/
return obj !== null && obj == obj.window;
}, isPlainObject = function (obj) {
Must be an Object. Because of IE, we also have to check the presence of the constructor property. Make sure that DOM nodes and window objects don’t pass through, as well
if (!obj || typeof obj !== 'object' || obj.nodeType || isWindow(obj)) {
return false;
}
try {
Not own constructor property must be Object
if (obj.constructor && !core_hasOwn.call(obj, 'constructor') && !core_hasOwn.call(obj.constructor.prototype, 'isPrototypeOf')) {
return false;
}
} catch (e) {
IE8,9 Will throw exceptions on certain host objects #9897
return false;
}
Own properties are enumerated firstly, so to speed up, if last one is own, then all properties are own.
var key;
for (key in obj) {}
return key === undefined || core_hasOwn.call(obj, key);
};
can.isPlainObject = isPlainObject;
return can;
});


It is a website created during of hackathaon period and it tries to achieve it objective as closely as possible.
Website and UI creator
Data presented on tbhis site is throughly checked and verified.
Data Manager
The website is hard work of my fellow teammates you had tried to achieve as much possible in the given time frame .
Leader


We're proud to offer our fully-automated ops platform to our alpha testing community.
Supergiant is a supported auto-scaling cloud service that just works. We’ve made Kubernetes auto-healing infrastructure and cloud portability accessible to developers who want to ship a scalable service or app.
Enjoy Kubernetes' self-healing infrastructure that just works at any scale, designed by engineers at Google to run billions of containers a week.
Automatically scale VMs and hardware to stay at > 80% utilization on AWS, Packet.net, DigitalOcean, OpenStack, and GCE, with more providers on the way.
Push a button to launch cloud services like PostgreSQL, Nginx, Redis, and Jenkins, or add your own Helm chart repos to be included in your own personalized marketplace.
Build with tools that support your workflow as you expand and grow. Let Supergiant support your developers who just want to ship apps from development to production.
Supergiant is open-source under an Apache 2.0 license. We would love your feedback to help make Supergiant even better.
Supergiant is built and supported by the team behind Qbox.io -- the same team trusted by hundreds of organizations to deliver timely production support all over the world. We’ve got your back.


Throughout the year the AECC works hard to bring the best conferences to our students, our university, and the general public. We encourage you to either sponsor or participate in one of these talks. Our conferences focus on helping our members get ahead by preparing you for what is ahead during your academic and professional career by covering topics and technologies that aren't covered in class and are useful to any future computer scientist.
We believe that providing our members with a hands-on experience is the best way to help them get prepared for their future as a professional in the many fields a degree in Computer Science offers to them. It is for this reason that we invite you to save the date early on and never miss one of our Workshops. Our Workshops cover a broad range of topics in the field so there's something for everyone.
It is very important for us to network and interact in as many different ways as possible. You know, outside of the classroom where we can share new, different and interesting ideas, and just get to know new people. Also, if you have a project you're working on and would like to present it to others to get some feedback and maybe get others to join, just let us know. We want to foster a strong sense of community in our members because we believe it is a vital trait inside and outside the classroom.
Want to join? Become a member of the AECC.
You may also become a member of the ACM, which grants you an AECC membership. We recommend you learn more from the ACM's site or from our FAQ.
If you have any questions about us or our memberships check our our FAQ,


Press to load tracks
Lead Guitar
Loading...
Play
Bass Guitar
Loading...
Play
Drums
Loading...
Play
Horns
Loading...
Play
Clavi
Loading...
Play
All tracks sourced from
jplayer.org


Hey! I’m Elissa DeBruyn, a social butterfly who likes to make jokes and explore new forms of media.
I’m fun-loving, ambitious and empathetic. You can often find me reading, traveling, writing song parodies or finding the perfect gif. I love trying new things (read:food) so my dream is to star in those BuzzFeed taste test videos.
In typical six-year-old-me fashion, I wore socks that matched my outfit instead of each other to my cousin's wedding. He went on to found Little Miss Mismatched. Although I haven't created any nationally known companies myself, I still draw on that creativity today.
I’ve worked on everything from digital ad campaigns and brand identities to event posters and social media posts. Along the way, I’ve learned how to create cohesive campaigns with compelling images and dynamic layouts. I approach each new creative problem like a riddle that’s tough to crack.


Feedster Wars
Here. Now that Feedster's so fast, it's time for some wars:
People:
"dave winer": 2875
"sam ruby": 1547
"robert scoble": 1359
"chris pirillo": 936
".net guy": 501
"don box": 451
"chris sells": 421
OSes:
windows: 34,754
linux: 25,832
Platforms:
.NET: 20,157 (capped to narrow down search)
java: 16,536
Languages:
java: 16,536
vb: 1551
c#: 1380
c++: 0 (I assume it's a bug : )
Parts of .NET:
winforms: 345
asp.net: 46
ado.net: 0
Heads of State:
"bill gates": 1348
"larry ellison": 220
"scott mcnealy": 134
Companies:
microsoft: 29,215
sun: 22,349 (matching *lots* more than just Sun Microsystems)
ibm: 8802
aol: 4524
oracle: 4273


How to use "What's in the box?"
Creating the QR Label
- Create your QR code by filling out all of the form's fields.
- Press the "Generate QR Code" button to generate a QR label that will contain a link to view your box contents
- Clicking on the "Print" button will generate a pdf label for your box in a new tab.
-
**Note: The box name is limited to 16 characters.
My Boxes Page
- The My Boxes page will store all of the boxes you have created
- Click on the box you need to find out what's in the box.
- Click on the "Reprint QR Code" button to reprint the QR code pdf label.
-
**Note: The list of of boxes will only be available on the
device you made the QR code.
Scanning the QR Code
- After scanning a generated QR code on a mobile device, click on the link displayed to see the contents of the box.
- If you have items you need to donate, press the "Find a local charity near you!" button.
-
-Search for charities by zip code or press the "Use my location"
button to find a local charity within 10 miles of you.


--- layout: default title: Home category: hidden ---
The Taarifa Platform is an open source web API, designed to close citizen feedback loops. We are currently working on an Innovation Project in Tanzania, with various partners.
Get started with the APITaarifa will be live in Tanzania soon!.


Success! You should receive a message shortly.
{% endif %}***RogersPass-SMS is powered by information from Parks Canada's Rogers Pass data. There is no affiliation between this service and Parks Canada. Because this is a third party app, there is no guarantee on the accuracy of the data. Always check the official Parks Canada resource before venturing into a Winter Restricted Area. The source code for this project can be found here. Feel free to contribute.


{% extends './base.html' %} {% load static %} {%block error_code%}403{%endblock%} {%block content%}
Sorry, You do not have permission to access the requested resource. {%endblock%}


Looks like we just found the next biomedical engineer!!
You have all the right skills and interests to create life saving solutions
Here are some famous Biomedical Engineers
Ready to start learning about the human body? Check out this video to get an idea of what biomedical engineering is all about!
You can check out more about Engineering here:
Introduction to Engineering
Explore more about Engineering
Good luck on your STEM Quest!


Library CSEnotes_inductive
Back to Discrete Assignments
Date: 2020-01-02. Tested with Coq version 8.8.1.
The following examples are based on the Class Notes; Pages 84-106 (Chapter 4). CSE 191 "Discrete Structures".
Inductively Defined Data Types
The following examples are based on the Class Notes; Pages 84-106 (Chapter 4). CSE 191 "Discrete Structures".
Inductive type with 3 enum values
Print bool.
Inductive pdetype : Set :=
elliptic : pdetype
| parabolic : pdetype
| hyperbolic : pdetype.
Check pdetype_ind.
Check pdetype_rect.
Check pdetype_rec.
This shows a proof by verifying all the subcases (gadījumu pārlase).
Commands "right;left.", "left", "right; right" are meant
to pick the middle term, the leftmost term and the rightmost
term of the disjunction respectively.
Theorem pde_equal : forall p : pdetype, p = parabolic \/ p = elliptic \/ p = hyperbolic.
Proof.
induction p.
right; left.
reflexivity.
left.
reflexivity.
right; right.
reflexivity.
Qed.
Theorem pde_equal_same : forall p : pdetype, p = parabolic \/ p = elliptic \/ p = hyperbolic.
Proof.
intro p.
pattern p.
apply pdetype_ind.
right; left.
reflexivity.
left.
reflexivity.
right; right.
reflexivity.
Qed.
Proof.
induction p.
right; left.
reflexivity.
left.
reflexivity.
right; right.
reflexivity.
Qed.
Theorem pde_equal_same : forall p : pdetype, p = parabolic \/ p = elliptic \/ p = hyperbolic.
Proof.
intro p.
pattern p.
apply pdetype_ind.
right; left.
reflexivity.
left.
reflexivity.
right; right.
reflexivity.
Qed.
Proving more trivial statements about a
function computed from an inductive type.
Definition mg_works (p : pdetype) :=
match p with
| hyperbolic => False
| other => True
end.
Eval compute in (mg_works hyperbolic).
match p with
| hyperbolic => False
| other => True
end.
Eval compute in (mg_works hyperbolic).
Trivial theorem: One value of the predicate
"mg_works" is False.
Theorem no_hyp_mg : mg_works hyperbolic = False.
Proof.
simpl.
reflexivity.
Qed.
Proof.
simpl.
reflexivity.
Qed.
One more trivial theorem: Two constants not equal.
Lemma simple : ~ elliptic = hyperbolic.
Proof.
unfold not.
intro H.
discriminate. Qed.
Proof.
unfold not.
intro H.
discriminate. Qed.
One more trivial theorem: Two constants not equal,
but this time not using "discriminate".
Lemma simple_same : ~ elliptic = hyperbolic.
Proof.
unfold not.
intro H.
change ((fun p:pdetype => match p with | elliptic => True | _ => False end) hyperbolic).
rewrite <- H.
trivial.
Qed.
Proof.
unfold not.
intro H.
change ((fun p:pdetype => match p with | elliptic => True | _ => False end) hyperbolic).
rewrite <- H.
trivial.
Qed.
Print nat.
Print nat_ind.
Print nat_rect.
Inductive proof that addition is associative
Theorem plus_assoc : forall x y z:nat, (x+y)+z = x+(y+z).
Proof.
intros x y z.
elim x.
simpl.
reflexivity.
intros n IHn.
rewrite plus_Sn_m.
rewrite plus_Sn_m.
rewrite plus_Sn_m.
rewrite IHn.
reflexivity.
Qed.
Proof.
intros x y z.
elim x.
simpl.
reflexivity.
intros n IHn.
rewrite plus_Sn_m.
rewrite plus_Sn_m.
rewrite plus_Sn_m.
rewrite IHn.
reflexivity.
Qed.
Define function "sum_1" - it adds
the same number "1" for indices 0 to n.
Fixpoint sum_1 (n : nat) := match n with
0 => 1
| S p => S (sum_1 p)
end.
Eval compute in (sum_1 10).
Theorem sum_1_analytic : forall n : nat, sum_1 n = S n.
Proof.
induction n.
simpl.
reflexivity.
simpl.
rewrite IHn.
reflexivity.
Qed.
0 => 1
| S p => S (sum_1 p)
end.
Eval compute in (sum_1 10).
Theorem sum_1_analytic : forall n : nat, sum_1 n = S n.
Proof.
induction n.
simpl.
reflexivity.
simpl.
rewrite IHn.
reflexivity.
Qed.
"sum_n n" is a function adding together
0+1+...+(n-1).
Fixpoint sum_n n :=
match n with
0 => 0
| S p => p + sum_n p
end.
Eval compute in (sum_n 1).
Eval compute in (sum_n 2).
Eval compute in (sum_n 10).
This import is necessary to include "ring" - a tactic
to do algebraic simplifications.
Require Import Arith.
sum_n n is equal to n(n-1)/2
Lemma sum_n_p : forall n, 2 * sum_n n + n = n * n.
Proof.
induction n.
simpl.
reflexivity.
assert (SnSn : S n * S n = n * n + 2 * n + 1).
ring.
rewrite SnSn.
rewrite <- IHn.
simpl.
ring.
Qed.
Proof.
induction n.
simpl.
reflexivity.
assert (SnSn : S n * S n = n * n + 2 * n + 1).
ring.
rewrite SnSn.
rewrite <- IHn.
simpl.
ring.
Qed.
A result that may be useful to prove inequalities.
For all n,m,p,q: If n <= m
and p + m <= q + n then p <= q
Print Nat.le_le_add_le.
Simple inequality (not very useful):
0+1+...+(n-1) is more or equal to n-1
Theorem bigger : forall n : nat, n <= sum_n n + 1.
Proof.
induction n.
simpl.
apply le_S.
apply le_n.
destruct n.
simpl.
apply le_n.
rewrite <- Nat.add_1_r.
apply Nat.le_le_add_le with (n := S n) (m := sum_n (S n) + 1).
assumption.
rewrite Nat.add_1_r at 2.
simpl.
rewrite <- Nat.add_1_r.
rewrite <- Nat.add_1_r with (n:=n).
rewrite <- Nat.add_1_r with (n:=n + (n + sum_n n) + 1 + (n + 1)).
apply plus_le_compat_r.
rewrite <- plus_assoc with (n:=n) (m:=n + sum_n n) (p:=1).
rewrite <- plus_assoc with (n:=n) (m:=n + sum_n n + 1) (p:=n+1).
rewrite plus_comm with (n:=n + sum_n n + 1) (m:=n+1).
rewrite plus_assoc with (n:=n) (m:=n+1).
apply plus_le_compat_r.
rewrite <- plus_O_n at 1.
apply plus_le_compat_r.
apply Peano.le_0_n.
Qed.
Require Import Rfunctions.
Open Scope R_scope.
Require Import Reals.
Fixpoint sum_geom (n:nat) (x:R) : R :=
match n with
0 => 1
| S p => x^n + sum_geom p x
end.
Eval compute in (sum_geom 0 17).
Eval compute in (sum_geom 1 17).
Eval compute in (sum_geom 2 17).
Lemma sum_geom_p : forall n:nat, forall x:R, sum_geom n x * x + 1 = x^(n + 1) + sum_geom n x.
Proof.
induction n.
intros x.
simpl.
rewrite Rmult_1_l. rewrite Rmult_1_r. reflexivity.
intros x.
simpl.
rewrite Rmult_plus_distr_r.
rewrite tech_pow_Rmult.
rewrite tech_pow_Rmult.
rewrite Rmult_comm with (r1:=x ^ S n) (r2:=x).
rewrite tech_pow_Rmult.
rewrite Rplus_assoc.
rewrite IHn.
rewrite Nat.add_1_r.
reflexivity.
Qed.
Inductive par: Set := open | close.
Proof.
induction n.
simpl.
apply le_S.
apply le_n.
destruct n.
simpl.
apply le_n.
rewrite <- Nat.add_1_r.
apply Nat.le_le_add_le with (n := S n) (m := sum_n (S n) + 1).
assumption.
rewrite Nat.add_1_r at 2.
simpl.
rewrite <- Nat.add_1_r.
rewrite <- Nat.add_1_r with (n:=n).
rewrite <- Nat.add_1_r with (n:=n + (n + sum_n n) + 1 + (n + 1)).
apply plus_le_compat_r.
rewrite <- plus_assoc with (n:=n) (m:=n + sum_n n) (p:=1).
rewrite <- plus_assoc with (n:=n) (m:=n + sum_n n + 1) (p:=n+1).
rewrite plus_comm with (n:=n + sum_n n + 1) (m:=n+1).
rewrite plus_assoc with (n:=n) (m:=n+1).
apply plus_le_compat_r.
rewrite <- plus_O_n at 1.
apply plus_le_compat_r.
apply Peano.le_0_n.
Qed.
Require Import Rfunctions.
Open Scope R_scope.
Require Import Reals.
Fixpoint sum_geom (n:nat) (x:R) : R :=
match n with
0 => 1
| S p => x^n + sum_geom p x
end.
Eval compute in (sum_geom 0 17).
Eval compute in (sum_geom 1 17).
Eval compute in (sum_geom 2 17).
Lemma sum_geom_p : forall n:nat, forall x:R, sum_geom n x * x + 1 = x^(n + 1) + sum_geom n x.
Proof.
induction n.
intros x.
simpl.
rewrite Rmult_1_l. rewrite Rmult_1_r. reflexivity.
intros x.
simpl.
rewrite Rmult_plus_distr_r.
rewrite tech_pow_Rmult.
rewrite tech_pow_Rmult.
rewrite Rmult_comm with (r1:=x ^ S n) (r2:=x).
rewrite tech_pow_Rmult.
rewrite Rplus_assoc.
rewrite IHn.
rewrite Nat.add_1_r.
reflexivity.
Qed.
Inductive par: Set := open | close.
Require Import List.
Inductive wp : list par -> Prop :=
wp_empty : wp nil
| wp_paren : forall l : list par, wp l -> wp (open :: l ++ close :: nil)
| wp_concat : forall l m : list par, wp l -> wp m -> wp (l ++ m).
Lemma wp_o_head_c : forall l1 l2 : list par, wp l1 ->
wp l2 -> wp ((open :: l1 ++ (close :: nil)) ++ l2).
Proof.
intros l1 l2 H1 H2.
apply wp_concat.
apply wp_paren.
assumption.
assumption.
Qed.
Lemma wp_o_tail_c : forall l1 l2 : list par, wp l1 ->
wp l2 -> wp (l1 ++ (open :: l2 ++ (close :: nil))).
Proof.
intros l1 l2 H1 H2.
apply wp_concat.
assumption.
apply wp_paren.
assumption.
Qed.
Inductive bin : Set :=
L : bin
| N : bin -> bin -> bin.
Fixpoint bin_to_string (t:bin) : list par :=
match t with
| L => nil
| N u v => cons open
(app (app (bin_to_string u) (cons close nil)) (bin_to_string v))
end.


1 OS_Mon Release Notes
This document describes the changes made to the OS_Mon application.
1.1 Os_Mon 2.4.2
Improvements and New Features
-
Support s390x in os_mon.
Own Id: OTP-14161 Aux Id: PR-1309
1.2 Os_Mon 2.4.1
Fixed Bugs and Malfunctions
-
Fix type specification for cpu_sup:util/1
Own Id: OTP-13526 Aux Id: PR-1029
-
Fix strict compilation on SUN/SPARC
Own Id: OTP-13548 Aux Id: PR-1046
-
Implement cpu_sup:util/0,1 on Mac OSX
Own Id: OTP-13597 Aux Id: PR-1049
-
Fix memsup:get_os_wordsize() on 64-bit FreeBSD and 64-bit Linux PPC
Own Id: OTP-13601 Aux Id: PR-1039
1.3 Os_Mon 2.4
Improvements and New Features
-
cpu_sup should use native sysctl/libkvm calls on BSD
This avoids forking off with os:cmd every time we just want to collect the load averages. riak does this every second, which results in a lot of unnecessary load.
Own Id: OTP-12730
-
Implement native cpu_sup:util/0,1 for FreeBSD
Own Id: OTP-12796
1.4 Os_Mon 2.3.1
Fixed Bugs and Malfunctions
-
Do not crash with badmatch when integer part of loadavg has more than 2 digits.
Own Id: OTP-12581
Improvements and New Features
-
Fix compilation of memsup on OpenBSD.
Own Id: OTP-12404
1.5 Os_Mon 2.3
Improvements and New Features
-
Adds a new application parameter 'disksup_posix_only', to make diskup use only options defined in the POSIX standard.
Own Id: OTP-12053
1.6 Os_Mon 2.2.15
Fixed Bugs and Malfunctions
-
Application upgrade (appup) files are corrected for the following applications:
asn1, common_test, compiler, crypto, debugger, dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe, inets, observer, odbc, os_mon, otp_mibs, parsetools, percept, public_key, reltool, runtime_tools, ssh, syntax_tools, test_server, tools, typer, webtool, wx, xmerl
A new test utility for testing appup files is added to test_server. This is now used by most applications in OTP.
(Thanks to Tobias Schlager)
Own Id: OTP-11744
Improvements and New Features
-
Calls to erlang:open_port/2 with 'spawn' are updated to handle space in the command path.
Own Id: OTP-10842
1.7 Os_Mon 2.2.14
Fixed Bugs and Malfunctions
-
Fix incorrect reporting of memory on OS X via memsup. Thanks to Christopher Meiklejohn.
Own Id: OTP-11454
1.8 Os_Mon 2.2.13
Fixed Bugs and Malfunctions
-
Use 'df -k -l' to query FreeBSD and OpenBSD about diskspace on local disks. Previously 'df' -k -t ufs' was used but this will not handle zfs or other disks. Just use '-l' instead of listing potential filesystems.
Own Id: OTP-11207
Improvements and New Features
-
Fix compilation on Solaris. Thanks to Maciej Malecki.
Own Id: OTP-11213
-
Fix broken cpu_sup:nprocs and others on Solaris 64-bit. Thanks to Simon Cornish.
Own Id: OTP-11298
1.9 Os_Mon 2.2.12
Fixed Bugs and Malfunctions
-
Compilation fixes for NetBSD. Thanks to YAMAMOTO Takashi.
Own Id: OTP-10941
Improvements and New Features
-
Fixed disksup:get_disk_data for SUSv3, specifically OS X ML. Thanks to Sriram Melkote.
Own Id: OTP-10945
1.10 Os_Mon 2.2.11
Fixed Bugs and Malfunctions
-
Removed deprecated function calls to snmp
Own Id: OTP-10448
1.11 Os_Mon 2.2.10
Fixed Bugs and Malfunctions
-
Infinity timeout added to internal calls in disksup to allow it to work properly under very heavy load.
Own Id: OTP-10100
-
Clarify error messages from os_mon port programs
Own Id: OTP-10161
1.12 Os_Mon 2.2.9
Fixed Bugs and Malfunctions
-
Fix segmentation fault in memsup
when /proc/meminfo does not include information about buffers/cache (for instance inside OpenVZ container) (Thanks to Anton Vorobev)
Own Id: OTP-9913
1.13 Os_Mon 2.2.8
Improvements and New Features
-
Erlang/OTP can now be built using parallel make if you limit the number of jobs, for instance using 'make -j6' or 'make -j10'. 'make -j' does not work at the moment because of some missing dependencies.
Own Id: OTP-9451
-
Tuple funs (a two-element tuple with a module name and a function) are now officially deprecated and will be removed in R16. Use 'fun M:F/A' instead. To make you aware that your system uses tuple funs, the very first time a tuple fun is applied, a warning will be sent to the error logger.
Own Id: OTP-9649
1.14 Os_Mon 2.2.7
Fixed Bugs and Malfunctions
-
Remove misc. compiler warnings
Own Id: OTP-9542
1.15 Os_Mon 2.2.6
Fixed Bugs and Malfunctions
-
Add NetBSD support to memsup and disksup (Thanks to Andrew Thompson)
Own Id: OTP-9216
-
Add support for DragonFlyBSD to memsup
DragonFly was partially supported by os_mon already but when trying to start the os_mon application it'd crash with an error about an unknown operating system in memsup. This patch changes memsup to use the FreeBSD sysctl method to get memory information when on DragonFly. (Thanks to Andrew Thompson )
Own Id: OTP-9217
1.16 Os_Mon 2.2.5
Improvements and New Features
-
Cleanups suggested by tidier and modernization of types and specs.
Own Id: OTP-8455
1.17 Os_Mon 2.2.4
Fixed Bugs and Malfunctions
-
Memsup did not read memory correctly on MaxOSX Snowleopard. This has now been corrected. (Thanks to Joel Reymont)
Own Id: OTP-8211
-
Removed unused code in cpu_sup.erl.
Own Id: OTP-8226
Improvements and New Features
-
The documentation is now built with open source tools (xsltproc and fop) that exists on most platforms. One visible change is that the frames are removed.
Own Id: OTP-8201
1.18 Os_Mon 2.2.3
Fixed Bugs and Malfunctions
-
A missing define in memsup.c caused a build error on IRIX machines. This has now been fixed.
Own Id: OTP-8094
1.19 Os_Mon 2.2.2
Fixed Bugs and Malfunctions
-
disksup:get_disk_data/0 returned disk volume in bytes instead of kbytes as stated in the documentation. The problem occurred on Windows only and is now corrected.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7741
1.20 Os_Mon 2.2.1
Fixed Bugs and Malfunctions
-
An error in memsup could cause os_mon to report erroneous memory values on windows for ranges of memory between 2GB and 4GB. This have now been fixed.
Own Id: OTP-7944
Improvements and New Features
-
Added support for dragonfly OS.
Own Id: OTP-7938
1.21 Os_Mon 2.2
Improvements and New Features
-
The copyright notices have been updated.
Own Id: OTP-7851
1.22 Os_Mon 2.1.8
Fixed Bugs and Malfunctions
-
A problem with OTP-OS-MON-MIB.mib for 64-bit environments has now been fixed. The mib has been extended with 64-bit memory retrieval counterparts.
In addition, a new function get_os_wordsize/0 has been added in the memsup module
Own Id: OTP-7441
-
An error in memsup.c caused the compilation to crash on bsd environments. This has now been fixed.
Own Id: OTP-7558
1.23 Os_Mon 2.1.7
Fixed Bugs and Malfunctions
-
Fixed a build error that occurred on NetBSD (Thanks to Per Hedeland and Raphael Langerhorst)
Own Id: OTP-7505
Improvements and New Features
-
Memory information in memsup:get_system_memory_data/0 now has additional entries in its property list for linux.
Own Id: OTP-7409 Aux Id: seq10984
1.24 Os_Mon 2.1.6
Fixed Bugs and Malfunctions
-
System information retrieval on darwin platforms with environments locales not conforming to the C locale caused an error in cpu_sup resulting in process termination.
Own Id: OTP-7320
1.25 Os_Mon 2.1.5
Improvements and New Features
-
CPU utilization, on linux, is now measured via a port program instead of os:cmd in erlang. This should enhance performance.
Own Id: OTP-7108 Aux Id: OTP-6935
1.26 Os_Mon 2.1.3
Improvements and New Features
-
Extended memsup memory probing on linux to use a port program to probe memory usage. This is faster then the previous implementation.
Own Id: OTP-6860 Aux Id: seq10616
1.27 Os_Mon <IP_ADDRESS>
Improvements and New Features
-
Minor Makefile changes.
Own Id: OTP-6689
1.28 OS_Mon 2.1.2
Fixed Bugs and Malfunctions
-
When the memsup_system_only flag was set to true, a badmatch exception occurred in the function os_mon_mib:get_load/1.
Own Id: OTP-6351 Aux Id: seq10517
1.29 OS_Mon 2.1.1
Fixed Bugs and Malfunctions
-
Did not build on Mac OS X.
Added support for IRIX. (Thanks to Michel Urvoy and Daniel Solaz.)
Own Id: OTP-6136
Improvements and New Features
-
disksup: Now using round(T*100) instead of trunc(T*100) when setting the threshold value given a float T.
Own Id: OTP-6153
1.30 Os_Mon 2.1
Fixed Bugs and Malfunctions
-
In 2.0, a call to alarm_handler:get_alarms/0 was introduced in memsup and disksup. This will lead to problems if the default alarm_handler event handler is not used, however, and the call has now been removed. (Thanks to Serge Aleynikov for pointing this out.)
Own Id: OTP-6029
-
A bug that in rare cases caused cpu_sup to crash has been corrected.
Own Id: OTP-6102 Aux Id: seq10312
1.31 OS_Mon 2.0
A note on backwards compatibility: The behaviour of OS_Mon 2.0 is backwards compatible under normal operation, but has changed somewhat in error situations: The services do not terminate and the API functions do not raise exceptions in all cases where they did before. Also, in the case where a service does terminate, the exit reason may be different. See below for details.
Fixed Bugs and Malfunctions
-
A call to a OS_Mon service (cpu_sup, disksup, ...) when OS_Mon is not running, or when the service is not available for the OS, or when the service is not started, will no longer result in an exception. Instead a warning is issued via error_logger and a dummy value is returned, which one is specified in the man pages for the respective service.
The reason is that it should not be necessary for a service to be started on each and every node of a distributed Erlang system for the OS-MON-MIB and other OS_Mon users to work properly.
Own Id: OTP-4332 Aux Id: seq7358
-
References to the obsolete EVA application in OTP-OS-MON-MIB has been removed.
Own Id: OTP-5699
-
Setting the option memsup_system_only to true did not work, but would crash the memsup process.
Own Id: OTP-5890 Aux Id: seq10185
-
cpu_sup:nprocs/0 returned 0 on FreeBsd.
Own Id: OTP-5901
-
If the OS_Mon service disksup or memsup was restarted, the same alarm could be set twice. Also, set alarms were not cleared when the application was stopped.
Own Id: OTP-5910
Improvements and New Features
-
Thresholds and time intervals in disksup and memsup are now configurable in run-time.
Own Id: OTP-4246 Aux Id: Seq7230
-
memsup can now handle systems with more than 4GB of RAM.
Own Id: OTP-5800 Aux Id: seq10130
-
The entire OS_Mon application (code and documentation) has been reviewed and consequently updated with the goal to make the application more robust, homogeneous and easier to configure.
The behaviour under normal operation is backwards compatible. However, recoverable errors now no longer terminate the affected service (and thus possible the entire application), instead error_logger is used to warn the user if/when such errors occurs. Also, in the case of unrecoverable errors, the services have been made more homogeneous with respect to behavior and exit reasons. See below for more information and refer to the man pages for details.
Port handling has been unified, meaning that if a port program sends garbage or unexpectedly dies, this is now handled the same way by all OS_Mon services, namely immediate process termination with the exit reason {port_error,Garbage} or {port_died,Reason}, respectively.
Application configuration parameter handling has been unified. Bad parameter values are no longer silently ignored (disksup) or cause application termination (memsup, os_sup). Instead a warning is issued and the default value for the parameter is used. Also, some cases where a bad parameter value accidentally could be accepted have been corrected.
Message handling has been unified. Unknown (gen_server-) calls cause process termination, whereas unknown casts and messages are now ignored by all OS_Mon services.
Own Id: OTP-5897
-
The following changes have been made to the os_sup service:
It is now available on Windows, using nteventlog as backend.
On Solaris, enabling the service (that is, installing a new configuration file for syslogd etc.) can now be done outside the os_sup process. The reason for this is that the Erlang emulator should normally not be run with root privileges, as is otherwise required. The new application configuration parameter os_sup_config must be set to false.
Also, os_sup can now be configured using a new configuration parameter os_sup_mfa to call an arbitrary Erlang function when a message is received from the OS.
Own Id: OTP-5925
-
The memsup service has been rewritten, replacing the supervised memsup_helper with a linked help process. This gives the memsup process more control and prevents a situation where it gets out of synch with the received memory data and thus possibly returns erroneous results.
Own Id: OTP-5927
1.32 OS_Mon 1.8.1
Fixed Bugs and Malfunctions
-
cpu_sup:util/0 failed with error reason negative_diff when called the first time on a machine (hw) that had been up for a very long time.
Own Id: OTP-5869 Aux Id: seq10166
1.33 OS_Mon 1.8
Improvements and New Features
-
The memsup part of the OS_Mon application has been made more stable. If there are (possibly temporary) problems collecting memory data, the interface functions (get_memory_data/0, get_system_memory_data/0) now do not fail, but return the previously collected value, if any, or a dummy value otherwise. Also, a warning message is printed.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-5798
1.34 OS_Mon 1.7.4
Fixed Bugs and Malfunctions
-
Corrected several problems in the error handling/error recovery (especially when OS_Mon is starting up).
Own Id: OTP-5559
1.35 OS_Mon 1.7.3
Improvements and New Features
-
memsup.c will now compile on OpenBSD. (Thanks to Geoff White and Jay Nelson.)
The disksup and cpu_sup modules now work on Mac OS X (tested on Mac OS 10.3.8).
The memsup module should now work on Linux 2.6.* as well as on older Linuxes. (/proc/meminfo has slightly different formats in different releases of Linux.)
Own Id: OTP-5421
Aux Id: OTP-5194, OTP-5228, OTP-5291
1.36 OS_Mon 1.7.2
This version is identical with 1.7.


Home
Skills
About
Contact
Currently working on: my lovely collection of
quotes
Email me at bassguitarbill at gmail dot com
Twitter me at
@bassguitarbill
(If you are offended by foul language or general weirdness, maybe just email me)


Xalan Samples
For information about the samples (what they illustrate and how to run them), see
Samples
.


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 4
It sounds a little out there - but it's not much different to gammon and pineapple. Add chilli sauce to spice things up!
For the sausages and salsa, preheat the oven to 180C/375F/Gas 5.
Place the pork sausages in a baking tray and roast for 25-30 minutes, or until cooked through.
Meanwhile, place a frying pan onto a medium heat and add the sugar. As soon as the sugar starts to melt and is nearly caramelised, add the diced pineapple.
Cook the pineapple, stirring every minute for 4-5 minutes, or until lightly caramelised.
Tip the pineapple into a medium bowl and add the chilli, sambal oelek, lime juice and coriander. Mix together and add salt, to taste.
To serve, whisk together the lemon and olive oil in a small bowl and tip the rocket into a salad bowl. Dress the salad with the lemon and olive oil and serve it with the sausages and the salsa.


| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| 01 7:00 PM MTG: Commander | 02 | 03 | 04 | 05 | 06 | 07 |
| 08 7:00 PM MTG: Commander | 09 | 10 | 11 | 12 | 13 | 14 |
| 15 7:00 PM MTG: Commander | 16 | 17 | 18 | 19 7:30 PM RPG: DND Encounters Tyranny of the Dragon | 20 7:30 PM BG: Board Game Social | 21 7:00 PM MTG: Legacy Event |
| 22 | 23 | 24 7:30 PM RPG: DND Encounters Tyranny of the Dragon | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |


1 Chronicles 26:6
Also unto Shemaiah his son were sons born, that ruled throughout the house of their father: for they were mighty men of valor.


Scott McKenna set for Scotland fast track as Steve Clarke ponders Liam Kelly return
Clarke will name the stopper as part of his squad for this month's double header.
by Keith Jackson, https://www.dailyrecord.co.uk/authors/keith-jackson/Scott McKenna will return to Steve Clarke’s Scotland squad as the manager attempts to stiffen up his defence ahead of the Euro 2020 playoffs.
The Aberdeen centre-back will be named as part of Clarke’s latest travelling party for this month’s final dead rubber of a double header in Cyprus and at home to Kazakhstan.
Clarke axed veteran Charlie Mulgrew last time out for a win over San Marino after blaming the Blackburn man for the 4-0 rout Scotland suffered against Russia in Moscow.
Kilmarnock’s Stuart Findlay, who is currently injured, and McKenna’s Aberdeen team-mate Mikey Devlin were paired up in the centre of Clarke’s defence for that 6-0 thrashing against the Group I whipping boys at Hampden.
But with McKenna now getting back to fitness and form at Pittodrie the 22-year-old looks set to be fast-tracked straight back into Clarke’s starting line-up.
Keeper Liam Kelly is in contention for a recall after cementing his place at QPR.
The former Livingston and Rangers keeper has played in the last six Championship matches for Mark Warburton’s side.


registerLogInLogOut()
Controller for that handles user registration (new user), user login, and user logout. Makes use of databaseAndAuth and runListeners factories.
- Source:
Methods
(static) '$scope.logIn'()
Handles user login. Logs in an existing user (using Firebase native method 'signInWithEmailAndPassword'). Uses promises to register successful login or to catch erors. Upon login, removes any text from the input fields. Upon erorr, shows the error message to the user
(static) '$scope.logOut'()
Handles user logout. Logs out an existing user (using Firebase native methods 'remove()' and 'signOut()'). Uses promises. When user clicks the logout button, removes their coordinates from the database. After that it broadcasts (on $rootScope) that the user has logged out, and then it signs them out to remove any session data. Note: Database stores their chat messages and location, while authentication holds their session. That's why both need to be removed using .remove() and .signOut()
(static) '$scope.register'()
Handles uer registration. Creates a new user (uding Firebase native method 'createUserWithEmailAndPassword'). Extracts username from user's email (username is anything that comes before @ symbol e.g<EMAIL_ADDRESS>will have username of john06). Uses promises to add user to the database after they are created. Each user is listed under their unique Id provided by Firebase authentication system (user.uid)
- Source:


Cloud Vision V1 API - Class Google::Cloud::Vision::V1::ImageAnnotationContext (v0.6.4)
Reference documentation and code samples for the Cloud Vision V1 API class Google::Cloud::Vision::V1::ImageAnnotationContext.
If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#page_number
def page_number() -> ::Integer
Returns
- (::Integer) — If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.
#page_number=
def page_number=(value) -> ::Integer
Parameter
- value (::Integer) — If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.
Returns
- (::Integer) — If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.
#uri
def uri() -> ::String
Returns
- (::String) — The URI of the file used to produce the image.
#uri=
def uri=(value) -> ::String
Parameter
- value (::String) — The URI of the file used to produce the image.
Returns
- (::String) — The URI of the file used to produce the image.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReceivePort
A receiveport accepts and maintains connections from one or more sendports.
When creating a receiveport, it is possible to pass a
ReceivePortConnectUpcall
object. Ibis will call the
ReceivePortConnectUpcall.gotConnection(ReceivePort,
SendPortIdentifier)
upcall
of this object when a sendport tries to initiate a new
connection to the receiveport. When a connection is lost
for some reason (normal close or link error), the
ReceivePortConnectUpcall.lostConnection(ReceivePort,
SendPortIdentifier, Throwable)
upcall is performed. Both upcalls are completely
asynchronous, but Ibis ensures that at most one is active at any given
time.
If no ReceivePortConnectUpcall
is registered, the user is NOT
informed of connections that are created or lost.
If the port supports connection downcalls, the user can
use the lostConnections()
* method to poll for connections that
are lost, and the newConnections()
method to find out about new
connections.
Only one upcall is alive at any one time, this includes BOTH
message upcalls AND ConnectUpcalls.
Only one message is alive at any time for a given
receiveport. This is done to prevent flow control problems.
A receiveport can be configured to generate upcalls or to
support blocking receive, but NOT both! The message object
is always destroyed when it is finished.
The following Managable
items are recognized:
"Messages" the number of messages received;
"MessageBytes" the number of bytes received in messages;
"Bytes" the total number of bytes received;
"Connections" the total number of connections received with this port;
"LostConnections" the number of lost connections;
"ClosedConnections" the number of closed connections.
Other items may be recognized, depending on the Ibis implementation.
| Method Summary | |
|---|---|
void |
close()
Frees the resources held by the receiveport. |
void |
close(long timeoutMillis)
Frees the resources held by the receiveport, with timeout. |
SendPortIdentifier[] |
connectedTo()
Returns the set of sendports this receiveport is connected to. |
void |
disableConnections()
Disables the accepting of new connections. |
void |
disableMessageUpcalls()
Prohibits message upcalls. |
void |
enableConnections()
Enables the accepting of new connections. |
void |
enableMessageUpcalls()
Allows message upcalls to occur. |
PortType |
getPortType()
Returns the type that was used to create this port. |
ReceivePortIdentifier |
identifier()
Returns the ReceivePortIdentifier of this receiveport. |
SendPortIdentifier[] |
lostConnections()
Returns the connections that were lost. |
String |
name()
Returns the name of the receiveport. |
SendPortIdentifier[] |
newConnections()
Returns the new connections accepted by this receiveport. |
ReadMessage |
poll()
Asynchronous explicit receive. |
ReadMessage |
receive()
Explicit blocking receive. |
ReadMessage |
receive(long timeoutMillis)
Explicit blocking receive with timeout. |
| Methods inherited from interface ibis.ipl.Managable |
|---|
getManagementProperty, managementProperties, setManagementProperties, setManagementProperty |
| Method Detail |
|---|
PortType getPortType()
ReadMessage receive() throws IOException
IbisConfigurationException
is thrown.
IbisConfigurationException
- is thrown when the receiveport is configured to use upcalls.
IOException
- is thrown in case of other trouble.ReadMessage receive(long timeoutMillis) throws IOException
timeoutMillis
- timeout in milliseconds.
ReceiveTimedOutException
- is thrown when the timeout expires and no message arrives.
IbisConfigurationException
- is thrown when the receiveport is configured to use upcalls.
IOException
- is thrown in case of other trouble.ReadMessage poll() throws IOException
null
.
IbisConfigurationException
- is thrown when the receiveport is not configured to support
polls.
IOException
- is thrown on IO errors.ReceivePortIdentifier identifier()
ReceivePortIdentifier
of this receiveport.
String name()
void enableConnections()
void disableConnections()
enableConnections()
again
after invoking this method.
After this method returns, no more connection upcalls will be given.
void enableMessageUpcalls()
void disableMessageUpcalls()
enableMessageUpcalls()
is called.
The disableMessageUpcalls
/enableMessageUpcalls
mechanism allows the user to selectively allow or disallow message
upcalls during runtime.
Note: the
disableMessageUpcalls
/enableMessageUpcalls
mechanism is not necessary to enforce serialization of Upcalls for
this port.
Ibis already guarantees that only one message
per port is active at any time.
void close() throws IOException
IOException
- in case of trouble.void close(long timeoutMillis) throws IOException
close()
, but blocks at most timeout milliseconds.
When the close does not succeed within the timeout, this operation
does a forced close.
Important: this call does not block until all sendports that are
connected to it have been freed. Therefore, messages may be lost!
Use this with extreme caution!
When this call is used, and this port is configured to maintain
connection administration, it updates the administration and thus
may generate lostConnection upcalls.
timeoutMillis
- timeout in milliseconds. When zero, the call is equivalent to
a close()
; when less than zero, the port is closed
immediately.
IOException
- in case of trouble.SendPortIdentifier[] connectedTo()
SendPortIdentifier[] lostConnections()
IbisConfigurationException
- is thrown when the port was not configured to support
connection downcalls.SendPortIdentifier[] newConnections()
IbisConfigurationException
- is thrown when the port was not configured to support
connection downcalls.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Till March 2018 I've been a self-taught developer. I'd been contracting for three years but found myself struggling with JavaScript and basic computer science principles. I'm now attending Epicodus to improve my skillset and get a better understanding of programming.
Once I finish Epicodus, I plan to have a full-time development job and continue learning through discovery and on-site experience.