In this project, you'll use generative adversarial networks to generate new images of faces.
You'll be using two datasets in this project:
Since the celebA dataset is complex and you're doing GANs in a project for the first time, we want you to test your neural network on MNIST before CelebA. Running the GANs on MNIST will allow you to see how well your model trains sooner.
If you're using FloydHub, set data_dir
to "/input" and use the FloydHub data ID "R5KrjnANiKVhLWAkpXhNBe".
data_dir = './data'
# FloydHub - Use with data ID "R5KrjnANiKVhLWAkpXhNBe"
#data_dir = '/input'
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import helper
helper.download_extract('mnist', data_dir)
helper.download_extract('celeba', data_dir)
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
%matplotlib inline
import os
from glob import glob
from matplotlib import pyplot
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'mnist/*.jpg'))[:show_n_images], 28, 28, 'L')
pyplot.imshow(helper.images_square_grid(mnist_images, 'L'), cmap='gray')
The CelebFaces Attributes Dataset (CelebA) dataset contains over 200,000 celebrity images with annotations. Since you're going to be generating faces, you won't need the annotations. You can view the first number of examples by changing show_n_images
.
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'img_align_celeba/*.jpg'))[:show_n_images], 28, 28, 'RGB')
pyplot.imshow(helper.images_square_grid(mnist_images, 'RGB'))
Since the project's main focus is on building the GANs, we'll preprocess the data for you. The values of the MNIST and CelebA dataset will be in the range of -0.5 to 0.5 of 28x28 dimensional images. The CelebA images will be cropped to remove parts of the image that don't include a face, then resized down to 28x28.

You'll build the components necessary to build a GANs by implementing the following functions below:
model_inputs
discriminator
generator
model_loss
model_opt
train
This will check to make sure you have the correct version of TensorFlow and access to a GPU
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
from distutils.version import LooseVersion
import warnings
import tensorflow as tf
from tensorflow.contrib.layers import xavier_initializer
import pickle as pkl
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You are using {}'.format(tf.__version__)
print('TensorFlow Version: {}'.format(tf.__version__))
# Check for a GPU
if not tf.test.gpu_device_name():
warnings.warn('No GPU found. Please use a GPU to train your neural network.')
else:
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
Implement the model_inputs
function to create TF Placeholders for the Neural Network. It should create the following placeholders:
image_width
, image_height
, and image_channels
.z_dim
.Return the placeholders in the following the tuple (tensor of real input images, tensor of z data)
import problem_unittests as tests
def model_inputs(image_width, image_height, image_channels, z_dim):
"""
Create the model inputs
:param image_width: The input image width
:param image_height: The input image height
:param image_channels: The number of image channels
:param z_dim: The dimension of Z
:return: Tuple of (tensor of real input images, tensor of z data, learning rate)
"""
# TODO: Implement Function
input_real = tf.placeholder(tf.float32,shape=[None,image_width,image_height,image_channels],name="input_real")
input_z = tf.placeholder(tf.float32,shape=[None,z_dim],name="input_z")
lr = tf.placeholder(tf.float32,name = "learning_rate")
return input_real,input_z,lr
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_inputs(model_inputs)
Implement a leaky relu function
def leaky_relu(x,alpha=0.1,name='leaky_relu'):
"""
Leaky Relu activation
:param x: Tensor of input
:param alpha: the alpha value when x < 0, default 0.1
:param name: tensor name
:return : tensor of output after leaky_relu
"""
return tf.maximum(alpha*x,x,name=name)
Implement discriminator
to create a discriminator neural network that discriminates on images
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "discriminator" to allow the variables to be reused. The function should return a tuple of (tensor output of the generator, tensor logits of the generator).
def discriminator(images, reuse=False,alpha = 0.1):
"""
Create the discriminator network
:param image: Tensor of input image(s)
:param reuse: Boolean if the weights should be reused
:return: Tuple of (tensor output of the discriminator, tensor logits of the discriminator)
"""
with tf.variable_scope('discriminator', reuse=reuse):
# Input layer is 28x28x channel
# now it is 14x14x64
conv1 = tf.layers.conv2d(images, 64, 5, strides=2, padding='same', kernel_initializer=xavier_initializer())
# apply leaky relu
conv1 = leaky_relu(conv1,alpha=alpha)
# now it is 14x14x128
conv2 = tf.layers.conv2d(conv1, 128, 5, strides=2, padding='same',use_bias=False,
kernel_initializer=xavier_initializer())
conv2 = tf.layers.batch_normalization(conv2, training=True)
# apply leaky relu
conv2 = leaky_relu(conv2,alpha=alpha)
# now it is 7*7*256
conv3 = tf.layers.conv2d(conv2, 256, 5, strides=2, padding='same',use_bias=False,
kernel_initializer=xavier_initializer())
conv3 = tf.layers.batch_normalization(conv3, training=True)
# apply leaky relu
conv3 = leaky_relu(conv3,alpha=alpha)
# add dropout
conv3 = tf.layers.dropout(conv3,rate=0.1)
# Flatten it
fc1 = tf.contrib.layers.flatten(conv3)
logits = tf.layers.dense(fc1, 1)
out = tf.sigmoid(logits)
return out, logits
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_discriminator(discriminator, tf)
Implement generator
to generate an image using z
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "generator" to allow the variables to be reused. The function should return the generated 28 x 28 x out_channel_dim
images.
def generator(z, out_channel_dim, is_train=True,alpha=0.1):
"""
Create the generator network
:param z: Input z
:param out_channel_dim: The number of channels in the output image
:param is_train: Boolean if generator is being used for training
:return: The tensor output of the generator
"""
with tf.variable_scope('generator', reuse= not is_train):
# First fully connected layer
fc1 = tf.layers.dense(z, 7*7*1024,use_bias=False)
# Reshape it to start the convolutional stack
# 7x7x1024 now
fc1 = tf.reshape(fc1, (-1, 7, 7, 1024))
fc1 = tf.layers.batch_normalization(fc1, training=is_train)
# apply leaky relu
fc1 = leaky_relu(fc1,alpha=alpha)
# 14x14x512 now
conv1 = tf.layers.conv2d_transpose(fc1, 512, 5, strides=2, padding='same',use_bias=False,
kernel_initializer=xavier_initializer())
conv1 = tf.layers.batch_normalization(conv1, training=is_train)
# apply leaky relu
conv1 = leaky_relu(conv1,alpha=alpha)
# 28x28x64 now
conv2 = tf.layers.conv2d_transpose(conv1, 64, 5, strides=1, padding='same',use_bias=False,
kernel_initializer=xavier_initializer())
conv2 = tf.layers.batch_normalization(conv2, training=is_train)
# apply leaky relu
conv2 = leaky_relu(conv2,alpha=alpha)
# Output layer 28x28xout_channel_dim
conv3_logits = tf.layers.conv2d_transpose(conv2, out_channel_dim, 3, strides=2, padding='same',
kernel_initializer=xavier_initializer())
out = tf.tanh(conv3_logits)
return out
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_generator(generator, tf)
Implement model_loss
to build the GANs for training and calculate the loss. The function should return a tuple of (discriminator loss, generator loss). Use the following functions you implemented:
discriminator(images, reuse=False)
generator(z, out_channel_dim, is_train=True)
def model_loss(input_real, input_z, out_channel_dim,smooth=0.1):
"""
Get the loss for the discriminator and generator
:param input_real: Images from the real dataset
:param input_z: Z input
:param out_channel_dim: The number of channels in the output image
:return: A tuple of (discriminator loss, generator loss)
"""
# Build the model
g_model = generator(input_z, out_channel_dim,is_train=True)
# g_model is the generator output
# get the
d_model_real, d_logits_real = discriminator(input_real,reuse=False)
d_model_fake, d_logits_fake = discriminator(g_model, reuse=True)
d_loss_real = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_real,
labels=tf.ones_like(d_logits_real) * (1 - smooth)))
d_loss_fake = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake,
labels=tf.zeros_like(d_logits_fake)))
d_loss = d_loss_real + d_loss_fake
g_loss = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake,
labels=tf.ones_like(d_logits_fake)))
return d_loss, g_loss
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_loss(model_loss)
Implement model_opt
to create the optimization operations for the GANs. Use tf.trainable_variables
to get all the trainable variables. Filter the variables with names that are in the discriminator and generator scope names. The function should return a tuple of (discriminator training operation, generator training operation).
def model_opt(d_loss, g_loss, learning_rate, beta1):
"""
Get optimization operations
:param d_loss: Discriminator loss Tensor
:param g_loss: Generator loss Tensor
:param learning_rate: Learning Rate Placeholder
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:return: A tuple of (discriminator training operation, generator training operation)
"""
# Get the trainable_variables, split into G and D parts
t_vars = tf.trainable_variables()
g_vars = [var for var in t_vars if var.name.startswith('generator')]
d_vars = [var for var in t_vars if var.name.startswith('discriminator')]
# Tell TensorFlow to update the population statistics while training
with tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)):
d_train_opt = tf.train.AdamOptimizer(learning_rate,beta1=beta1).minimize(d_loss, var_list=d_vars)
# Tell TensorFlow to update the population statistics while training
with tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)):
g_train_opt = tf.train.AdamOptimizer(learning_rate,beta1=beta1).minimize(g_loss, var_list=g_vars)
return d_train_opt, g_train_opt
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_opt(model_opt, tf)
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import numpy as np
def show_generator_output(sess, n_images, input_z, out_channel_dim, image_mode):
"""
Show example output for the generator
:param sess: TensorFlow session
:param n_images: Number of Images to display
:param input_z: Input Z Tensor
:param out_channel_dim: The number of channels in the output image
:param image_mode: The mode to use for images ("RGB" or "L")
"""
cmap = None if image_mode == 'RGB' else 'gray'
z_dim = input_z.get_shape().as_list()[-1]
example_z = np.random.uniform(-1, 1, size=[n_images, z_dim])
samples = sess.run(
generator(input_z, out_channel_dim, False),
feed_dict={input_z: example_z})
images_grid = helper.images_square_grid(samples, image_mode)
pyplot.imshow(images_grid, cmap=cmap)
pyplot.show()
Implement train
to build and train the GANs. Use the following functions you implemented:
model_inputs(image_width, image_height, image_channels, z_dim)
model_loss(input_real, input_z, out_channel_dim)
model_opt(d_loss, g_loss, learning_rate, beta1)
Use the show_generator_output
to show generator
output while you train. Running show_generator_output
for every batch will drastically increase training time and increase the size of the notebook. It's recommended to print the generator
output every 100 batches.
!mkdir checkpoints
def train(epoch_count, batch_size, z_dim, learning_rate, beta1, get_batches, data_shape, data_image_mode):
"""
Train the GAN
:param epoch_count: Number of epochs
:param batch_size: Batch Size
:param z_dim: Z dimension
:param learning_rate: Learning Rate
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:param get_batches: Function to get batches
:param data_shape: Shape of the data
:param data_image_mode: The image mode to use for images ("RGB" or "L")
"""
# Build Model
image_width = data_shape[1]
image_height = data_shape[2]
image_channels = data_shape[3]
input_real,input_z,lr = model_inputs(image_width,image_height,image_channels,z_dim)
d_loss,g_loss = model_loss(input_real,input_z,image_channels)
d_train_opt, g_train_opt = model_opt(d_loss,g_loss,lr,beta1)
# record train steps
steps = 0
eps = 0
saver = tf.train.Saver()
# record train losses
losses = []
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
for epoch_i in range(epoch_count):
for batch_images in get_batches(batch_size):
# stretch the input_real from -0.5,0.5 to -1,1 as generator output
batch_images *= 2
# Sample random noise for G
batch_z = np.random.uniform(-1, 1, size=(batch_size, z_dim))
# Run optimizers
_ = sess.run(d_train_opt, feed_dict={input_real: batch_images,
input_z: batch_z,
lr:learning_rate})
_ = sess.run(g_train_opt, feed_dict={input_real: batch_images,
input_z: batch_z,
lr:learning_rate})
steps +=1
if steps % 100 == 0:
train_loss_d = sess.run(d_loss, {input_z: batch_z, input_real: batch_images})
train_loss_g = g_loss.eval({input_z: batch_z})
# Save losses to view after training
losses.append((train_loss_d, train_loss_g))
print("Epoch {} / Batch {}...".format(eps,steps),
"Discriminator Loss: {:.4f}...".format(train_loss_d),
"Generator Loss: {:.4f}".format(train_loss_g))
show_generator_output(sess,25,input_z,image_channels,data_image_mode)
# At the end of each epoch, get the losses and print them out
train_loss_d = sess.run(d_loss, {input_z: batch_z, input_real: batch_images})
train_loss_g = g_loss.eval({input_z: batch_z})
print("Epoch {} / Batch {}...".format(eps,steps),
"Discriminator Loss: {:.4f}...".format(train_loss_d),
"Generator Loss: {:.4f}".format(train_loss_g))
show_generator_output(sess,4,input_z,image_channels,data_image_mode)
eps +=1
saver.save(sess, './checkpoints/gan.ckpt')
with open('losses.pkl', 'wb') as f:
pkl.dump(losses, f)
Test your GANs architecture on MNIST. After 2 epochs, the GANs should be able to generate images that look like handwritten digits. Make sure the loss of the generator is lower than the loss of the discriminator or close to 0.
batch_size = 64
z_dim = 100
learning_rate = 0.001
beta1 = 0.2
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 2
mnist_dataset = helper.Dataset('mnist', glob(os.path.join(data_dir, 'mnist/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, mnist_dataset.get_batches,
mnist_dataset.shape, mnist_dataset.image_mode)
with open('losses.pkl', 'rb') as f:
losses= pkl.load(f)
losses = np.array(losses)
fig, ax = pyplot.subplots()
pyplot.plot(losses.T[0], label='Discriminator', alpha=0.5)
pyplot.plot(losses.T[1], label='Generator', alpha=0.5)
pyplot.title("Training Losses")
pyplot.legend()
Run your GANs on CelebA. It will take around 20 minutes on the average GPU to run one epoch. You can run the whole epoch or stop when it starts to generate realistic faces.
batch_size = 64
z_dim = 100
learning_rate = 0.001
beta1 = 0.2
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 1
celeba_dataset = helper.Dataset('celeba', glob(os.path.join(data_dir, 'img_align_celeba/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, celeba_dataset.get_batches,
celeba_dataset.shape, celeba_dataset.image_mode)
with open('losses.pkl', 'rb') as f:
losses= pkl.load(f)
losses = np.array(losses)
fig, ax = pyplot.subplots()
pyplot.plot(losses.T[0], label='Discriminator', alpha=0.5)
pyplot.plot(losses.T[1], label='Generator', alpha=0.5)
pyplot.title("Training Losses")
pyplot.legend()
When submitting this project, make sure to run all the cells before saving the notebook. Save the notebook file as "dlnd_face_generation.ipynb" and save it as a HTML file under "File" -> "Download as". Include the "helper.py" and "problem_unittests.py" files in your submission.


--- layout: post title: crontab'ed linden mania with hpricot date: 2007-02-03 12:57:04.000000000 +01:00 type: post published: true status: publish categories: - coding - english - OpenSource - ruby tags: [] meta: _publicize_job_id: '14401149577' original_post_id: '98' _wp_old_slug: '98' author: login: joesixpack email<EMAIL_ADDRESS>display_name: dirk lüsebrink first_name: '' last_name: '' ---
a kind of buzzwordy post title, i know, but hey, at least i kept the unavoidable second life out of it. For reasons far from being thrilling enough to tell here i pulled the latest hpricot release and made my server pull the latest stats from linden labs frontpage every 6 hours. I'm kind of sad I could not get it up before the (ridiculous)3293499 residents mark, but once SL will hit the billion, it will still look like a pioneer. So here is the beef: I made a cronjob screenscraping secondlife's stats from their frontpage. A nice graph from the data i will put up soon hopefuly. And stay tuned for the raw data feed if you like. Lets see, a week i guess, before it becomes a nice exponential curve.
1. get value elements from the stats div
v = Hpricot(open("http://www.secondlife.com")).search("#SL_stats strong")
2. make it digestible
v.map { |e| e.innerText.gsub(/[$,]/, "").to_i }
3. dump the stuff
# is left as an exercise to the reade


You are in the "manage games" section where you build the pool of games
from which you will create your ranked list. There is an
You can import your boardgamegeek collection using the "fetch" command. You can also filter out games to remove them categorically, or you can individually trash or restore games for more fine-grained control.
While viewing your current game pool, trash games to remove from the set of games that you can rank.
While viewing your trashed and filtered games, restore games to put them
back into the set of games that you can rank. The
Loading...


Xiaomi Mi CC9 Pro teasers surface on Weibo with major details
by Rei PadlaXiaomi is preparing well for its next product offering. Aside from the Xiaomi Watch running MIUI, the Chinese OEM also has the Mi CC9 Pro. The new phone has been mentioned several times with the most notable as its having a 108MP camera. The Xiaomi Mi CC9 Pro may also be known as the Xiaomi Mi Note 10 so we can’t really wait for the official launch. It’s happening very soon as several teasers of the phone have just appeared on Weibo.
The Xiaomi CC9 Pro may also be available in Aqua Green color and Ice or Snow Aurora as per a pair of posters on Weibo. The phone is also said to come powered by a large 5260mAh battery which makes it a powerful and almost premium device.
Other specs of the phone include a 30W super-fast charging support that can fully charge the phone’s battery within 65 minutes and 58% in 30 minutes. When it comes to the imaging department, the Mi CC9 Pro will have a 1.5cm super microlens, 14bit super night mode, night mode, and enhanced zoom features as part of a Penta-camera system headlined by the 108MP shooter plus 8MP + 12MP + 20MP cameras. Special features also include Touch to focus, Auto Flash, Face Detection, 5x optical zoom, and 50x digital zoom.
Check out camera samples below:
Watch the zoom demo video:
The Android 9 Pie-powered Xiaomi Mi CC9 Pro runs on an octa-core Qualcomm Snapdragon 730G processor, 6GB of RAM, and 64GB onboard storage. It will feature an AMOLED screen with 1080 x 2340 pixel resolution, 19.5:9 aspect ratio, and the standard connectivity features–WiFi, GPS, and Bluetooth.
Xiaomi Mi CC9 Pro is expected to launch this coming November 5, 2019 in China first, then India. Aside from the Green and White color options, there may be Red and Black versions as well. Price could start at Rs 25,990 ($387) in India.


"LAZARUS "an abbreviation of Eleazar, whom God helps. (1.) The brother of Mary and Martha of Bethany. He was raised from the dead after he had lain four days in the tomb (John 11:1-44). This miracle so excited the wrath of the Jews that they sought to put both Jesus and Lazarus to death. (2.) A beggar named in the parable recorded Luke 16:19-31.
"LAZARUS "an abbreviation of Eleazar, whom God helps. (1.) The brother of Mary and Martha of Bethany. He was raised from the dead after he had lain four days in the tomb (John 11:1-44). This miracle so excited the wrath of the Jews that they sought to put both Jesus and Lazarus to death.
(2.) A beggar named in the parable recorded Luke 16:19-31.


I'm A Celebrity's Ant and Dec make dig at Prime Minister after clash on TV
Ant McPartlin and Declan Donnelly couldn’t help but make a dig towards Prime Minister Boris Johnson on tonight’s I’m A Celebrity…Get Me Out Of Here.
The reality show followed a live debate held between the Prime Minister and Labour leader Jeremy Corbyn on ITV.
However the two men, who are most likely to lead the country after the December 12 vote clashed on Brexit, the NHS, the royal family, and the union – but shook hands at one stage.
Ant and Dec couldn’t help but make light of the situation by throwing some jokes in there about it as they introduced I’m A Celeb.
‘Two camps are about to come one, but first there’s work to be done,’ Ant began.
‘Which means five of them are about to face their deepest fears,’ Dec continued.
Ant joked: ‘Welcome to Australia and another TV show where two men like the sound of their own voices.’
Advertisement Advertisement
‘Evening Prime Minister…for now,’ Dec laughed.
Ant then interrupted as he listened into his ear piece, he continued: ‘Hang on, hang on, I am just hearing that even this show must remain politically impartial.’
Dec responded: ‘You’re right, good evening Prime Minister for now, and good evening bloke who wants to be Prime Minister, although why anyone who would want that job is beyond me.’
The jokers continued as Ant said: ‘Caitlin proved there’s nothing worse than someone going on and on and on and not listening to a word you say.’
Dec interjected: ‘Again evening Prime Minister and bloke who wants to be Prime Minister.’
I’m A Celebrity… Get Me Out Of Here! airs weekdays at 9pm on ITV.
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


{% if not request.event.settings.waiting_list_enabled %}
{% trans "The waiting list is disabled, so if the event is sold out, people cannot add themselves to this list. If you want to enable it, go to the event settings." %}
{% endif %}
{% if request.eventperm.can_change_orders %}
{% endif %}
{% trans "Sales estimate" %}
{% blocktrans trimmed with amount=estimate|default:0|floatformat:2 currency=request.event.currency %}
If you can make enough room at your event to fit all the persons on the waiting list in, you
could sell tickets worth an additional {{ amount }} {{ currency }}.
{% endblocktrans %}
{% include "pretixcontrol/pagination.html" %}
{% endblock %}


Pizza Parlor
Like Pizza? So do we! Our new location now has the ability to order your pizza online for pickup!
Interested? Click here to start your order:
Pizza Order
Select your choices for your pizza:
Cost Calculation
Here is what you ordered :
Pizza size:
Toppings:
Pizza Sauce:
Total Cost:
Base Size Cost:
Price per Topping:
Topping Total:
Sauce Charge:
Thank you for ordering with us ! Your pizza should be ready to pick up at our store in 30 minutes.


We have identified several types of universes that cover most people's requirements and built helper classes to make their implementation easier. The following table describes the types of pre-built Universe Selection models:
| Universe Type | Description |
|---|---|
| Manual Universes | Universes that use a fixed, static set of assets |
| Fundamental Universes | Universes for US Equities that are based on coarse price or fundamental data |
| Scheduled Universes | Universes that trigger on regular, custom intervals |
| Futures Universes | Universes that subscribe to Future chains |
| Option Universes | Universes that subscribe to Option chains |


The Attack (Privilege Escalation / Persistence)
If an attacker gains the necessary access (DA or ability to add SPNs to admin accounts), they can configure a fake service principal name on an admin account.
Here’s how this works:
- The attacker has admin rights over the domain or SPN modify rights, on certain accounts or all domain accounts.
- They add fake SPNs to the admin accounts they want to retain access to. In this example, we add a SPN that’s associated with an admin server (each account should have a unique SPN, ex. “adm/adminsrv01.lab.adsecurity.org”).
- The owner of the account changes their password and the attacker loses the level of access they had.
- The attacker now simply needs to request RC4 Kerberos tickets for the fake SPNs created earlier.
- The attacker can then take the requested tickets, save them out of memory to files, move them to another system, and crack them offline with a tool like Kerberoast, hashcat, etc.
There’s a couple different angles to this attack/persistence method:
- Add SPNs to admin accounts for which the attacker wants to retain access.
- Add fake SPNs to admin accounts for which the attacker wants to get the passwords.
NOTE: An attacker could also grant rights to certain OUs containing admin accounts to provide a regular user account to modify the ServicePrincipalName attribute on the admin accounts in these OU. All that’s required is delegating the “Write ServicePrincipalName” access right (Full Control does not provide SPN modification rights). Though this isn’t straightforward to configure via AD Users & Computers since the access right is hidden in the GUI by default.


A LOGICAL BASIS FOR NOUNS, ADJECTIVES, AND VERBS by
Michael F. Stewart
A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy (Linguistics) in The University of Michigan
Doctoral Committee:
Assistant Professor Peter Fodale, Chairman Associate Professor Kenneth C. Hill Professor Harold V. King
Assistant Professor Michael H. O'Malley


@()(implicit session: Session) @main("About Us") {
Scrum is a framework that helps teams work together! Scrum is like a rugby team, this is where the name scrum comes from. Scrum encourages teams to learn through experiences, self-organize while working on problems and reflecting on the wins and losses.
While Scrum is used frequently by a lot of software development teams, its principles and lessons can be applied to all kinds of teamwork. This is one of the reasons Scrum is so popular around the industry. Scrum describes a set of meetings, tools and roles that work in conjunction with each other, allowing teams to structure and manage the work.
The team has used Scrum methodology to create the QA Cinema Application. The project started with reading the specification and breaking it down into tasks, which were then placed in the backlog on our Jira Board. After all of the items were in the backlog we used Plan-It Poker to plan out our sprint and assign tasks to each team member.
Following the Scrum Methodology and Agile, we had daily stand-ups, where we would speak about what we have done, what we were going to do and if we had any blockers, this allowed us to identify blockers earlier on, and ensured a cohesive teamwork throughout the project.
At the end of each Sprint, we had a review and retrospect, to look at things we have done, how well we have completed each item, and what we could have improved on.


🏛 Deep Breath: The Democrats Did Just Fine
My biggest question for Democratic leaders is whether they could have made the same deal a couple of days ago. If so, it would have been slightly better. But it probably doesn’t matter either way. A two-day shutdown isn’t going to affect the political scene months from now.


{{- $src := partial "utils/lib.html" (dict "$" . "type" "gitalk") -}} {{- $srcCSS := partial "utils/lib.html" (dict "$" . "type" "gitalk-css") -}}


Home
Post Ad
Your Ads
Recieved Order
Requested Order
Buy a Car
Logout
Home
Cars
Post
Post A Car
Car Manufacture
Car Model
Car Price $
Car Image
Description
Body Type
Car
Sport Car
Trunk
Van
State
New
Used


WHICH
Section: User Commands (1)Index Return to Main Contents
NAME
which - shows the full path of (shell) commands.SYNOPSIS
which [options] [--] programname [...]DESCRIPTION
Which takes one or more arguments. For each of its arguments it prints to stdout the full path of the executables that would have been executed when this argument had been entered at the shell prompt. It does this by searching for an executable or script in the directories listed in the environment variable PATH using the same algorithm as bash(1).This man page is generated from the file which.texinfo.
OPTIONS
- --all, -a
- Print all matching executables in PATH, not just the first.
- --read-alias, -i
-
Read aliases from stdin, reporting matching ones on
stdout. This is useful in combination with using an
alias for which itself. For example
alias which='alias | which -i'. - --skip-alias
- Ignore option `--read-alias', if any. This is useful to explicity search for normal binaries, while using the `--read-alias' option in an alias or function for which.
- --read-functions
-
Read shell function definitions from stdin, reporting matching
ones on stdout. This is useful in combination with using a shell
function for which itself. For example:
which() { declare -f | which --read-functions $@ }
export -f which - --skip-functions
- Ignore option `--read-functions', if any. This is useful to explicity search for normal binaries, while using the `--read-functions' option in an alias or function for which.
- --skip-dot
- Skip directories in PATH that start with a dot.
- --skip-tilde
- Skip directories in PATH that start with a tilde and executables which reside in the HOME directory.
- --show-dot
- If a directory in PATH starts with a dot and a matching executable was found for that path, then print "./programname" rather than the full path.
- --show-tilde
- Output a tilde when a directory matches the HOME directory. This option is ignored when which is invoked as root.
- --tty-only
- Stop processing options on the right if not on tty.
- --version,-v,-V
- Print version information on standard output then exit successfully.
- --help
- Print usage information on standard output then exit successfully.
RETURN VALUE
Which returns the number of failed arguments, or -1 when no `programname' was given.EXAMPLE
The recommended way to use this utility is by adding an alias (C shell) or shell function (Bourne shell) for which like the following:[ba]sh:
which () { (alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@ } export -f which
[t]csh:
alias which 'alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
This will print the readable ~/ and ./ when starting which from your prompt, while still printing the full path when used from a script:
> which q2 ~/bin/q2 > echo `which q2` /home/carlo/bin/q2
BUGS
The HOME directory is determined by looking for the HOME environment variable, which aborts when this variable doesn't exist. Which will consider two equivalent directories to be different when one of them contains a path with a symbolic link.AUTHOR
Carlo Wood<EMAIL_ADDRESS>SEE ALSO
bash(1)
Index
This document was created by man2html, using the manual pages.
Time: 05:29:12 GMT, December 24, 2015


Enough talk! Skip to the steps
If you want to run the latest version of the project without building, see here
Prerequisites
Before you get started, take a few moments to be sure you have the following pieces in place.
Docker
If you plan to build and run the models, Docker is required for these processes. Docker is a containerisation tool which can be used to produce an application image that can be executed consistently on any platform which supports the docker engine.
Two Docker terms you should be familiar with before you get started are "image" and "container". An image is the blueprint for a container. It represents the initial state of the filesystem when a container is created and carries metadata about the image and the execution of the containerised application. You can think of a container as an instance of an image. A container is created from an image when the user requests it to run. Many containers can be created from the same image simultaneously and are isolated from one another. Even after the process inside the container exits, the container still exists and its state can be interrogated until it is deleted by the user.
Follow the instructions here to install Docker Desktop.
BridgePoint
Install the latest BridgePoint release. If you already have BridgePoint installed, confirm that your version is more recent than 7.3.0 (2022-11-30) by checking the build ID.
Refer to this guide for help installing BridgePoint and checking the build ID.
Git
BridgePoint comes packaged with everything you need to interact with the source git repositories. That being said, some prefer to use a different GUI client application or use the command line version of the tool.
Refer to this guide for a quick start on using git to clone repositories and import projects.
PlantUML
PlantUML is a tool for visualizing UML diagrams written in a textual format. The PLUS domain specific language is based on PlantUML sequence diagrams. PlantUML can be downloaded here or installed through your package manager (recommended).
Source Projects
It is necessary to have the source code/models downloaded onto your machine. The source code can be browsed on GitHub. Follow the steps from the guide linked in the previous section to clone this repository from GitHub. Follow the steps from the guide linked in the BridgePoint section to import the following projects into a fresh workspace:
-
AEOrdering
-
AER_AEO_SVDC
-
AEReception
-
AESimulator
-
PlusProcessor
-
SequenceProcessor
-
SequenceVerificationDataCentric
-
StatementParser
-
utils
Terminology
Project
The term "project" typically refers to the model source and supporting build/configuration files for a single unit of functionality. In our context, this also maps one-to-one with an Eclipse/BridgePoint project.
Domain
A "domain" represents an encapsulated set of data objects and behaviours. The term comes from the original Shlaer-Mellor method, and in MASL a domain is the basic unit of compilation. Each domain exists in its own project.
Deployment
A "deployment" represents a configuration of one or more domains including the modelled connections between them. Deployments map to "project" in textual MASL form, but the term "deployment" is preferred to avoid confusion with the more general term "project".
Protocol Verifier
"Protocol Verifier" refers to the overall application as well as the BridgePoint project where all of the domains are integrated together using a deployment. In our context this is synonymous with the "AER_AEO_SVDC" project.
PLUS
"PLUS" is the name of the domain specific language for specifying valid job sequences for the protocol verifier. PLUS is defined as a subset of constructs from the PlantUML sequence diagram syntax. A full description and guide for PLUS can be found here.
PLUS Processor
"PLUS Processor" refers to the application which processes PLUS files (textual sequence diagrams) and produces JSON configuration files consumable by the protocol verifier.
Overview
Toolchain
The Munin project team has been using the Shlaer-Mellor Method to model the problem and our solution. The following sections describe the set of tools we are using to actualise our designs.
xtUML/BridgePoint
The source models are represented graphically in xtUML using the BridgePoint editor. Action semantics are encoded using MASL. The MASL specification also defines all necessary "structural" constructs (e.g. classes, relationships, state machines), but does not provide a specification for capturing graphical layout. In addition, there is no existing graphical tool which supports direct edit of MASL models. BridgePoint provides the graphical editing experience required for structural Shlaer-Mellor modelling.
MASL
At build time, BridgePoint is used to export the xtUML models to textual MASL format. As mentioned in the previous section, MASL is capable of representing the complete semantics of the S-M method including structural elements. In addition, MASL is required to be compatible with our selected backend code generator (see next section).
MASL C++ code generator and software architecture (via Docker)
The code generator and target architecture chosen for Munin Phase 1 is the MASL C software architecture published as Open Source Software in 2016. The code generator consists of a Java-based MASL parser/generator which produces C source code for an application model. The code generator is designed to be modular with a core translator and a set of peripheral translators that provide additional capabilities such as Sqlite persistence, build file generation, runtime model debugging, etc. The companion software architecture is a set of runtime libraries written in C++ which provide mechanisms to implement the rules of Shlaer-Mellor in a single threaded process. The code generator is designed to produce generated code compatible with the runtime architecture.
Click for more details
Since it was published in 2016, the MASL C++ project has been hosted on GitHub and managed by the xtUML community. However, in the period since being published, the project has seen little maintenance activity and has fallen behind the upstream version. As a result, build tool and third party library dependencies have locked this architecture in time. We have created a set of container images using Docker to encapsulate the code generator and runtime libraries. This allows us to build and execute models in two primary modes:
-
In the first mode, the project source MASL is passed into a container via a shared folder where the code generator and C compiler are free to execute in the context of all required dependencies. The generated C source code, compiled libraries, executables, and supporting files are passed back out to the development host machine using the same shared folder mechanism. Once compiled, the binary file can be executed using another container image which provides all necessary runtime shared libraries (MASL architecture and third party). This mode of execution can be thought of as analogous to executing Java byte code in an instance of the JVM.
-
In the second mode, an alternative Docker image is created by extending a base image that already contains all of the MASL dependencies. The code is generated and compiled during the image build phase and the resultant executable is set up as the entrypoint for the image. Once the image is produced, it can be executed on any platform that supports the docker engine.
The first mode is more flexible, better for iterative development, and results in much smaller generated artefacts. The second mode is less error prone and is more suited for deployment. We used the first mode primarily during the PoC and have since switched to the second mode in anticipation of deployment and scaling.
Testing and GitHub Actions (Continuous Integration)
We are using features of the MASL code generator along with custom domains to define and run tests for each domain and the whole system. A domain service is created for each test. Test services are specially marked to be excluded from the production application and are added to a test schedule. When the project is built in the testing configuration, the tests are generated and executed and results are logged to the console and output as a set of JSON files.
We are using GitHub Actions to automatically build and run tests for each domain and the system deployment any time new code is merged into the main development branch of the repository. The output from each test schedule is consolidated and formatted into an HTML report. The most recent report from the main branch can be viewed here. New failures or build issues are flagged before code is merged into the mainline.
Domain overview
Protocol Verifier domains
Reception
The role of the Audit Event Reception domain is to convert audit events received from the monitored system, in whatever form they arrive, into audit event objects that can be used by the other domains in the model. Any changes to the format of received audit events will be addressed by the Audit Event Reception domain. The format of delivery to the other domains will remain consistent. This isolates the impact of changes in received audit event format to a single domain. Unexpected input formats are rejected and errors are notified.
Ordering
The role of the Audit Event Ordering domain is two-fold. It validates the source of the received audit event in terms of Node and Application, and it constructs the audit event sequence into the correct order as determined by the previous event ID in each Audit Event. Once the audit events have been correctly ordered they are delivered to the Sequence Verification domain. Events from unexpected sources are rejected and errors are notified. Audit Event Ordering waits for out of sequence events to arrive for a defined period of time. Gaps in event sequences not resolved within the defined time period are denoted as a failure of the Job and the error condition is notified.
Another role of Audit Event Ordering is to read a configuration file at initialisation, to use that data to set up its own definition classes, and to forward that configuration information to Sequence Verification to set up its definition classes. This approach ensures that the definition classes of Audit Event Ordering and Sequence Verification are aligned.
Sequence Verification
The role of the Sequence Verification domain is to verify that the audit events received are in a correct, expected order taking account of support for repeated audit event types and forks, parallel branches and merges in the event sequences. A Job is only deemed complete when all sequences within the Job have completed. The Sequence Verification domain is built to detect and report a number of error conditions in the received Audit Event data. These error conditions include unexpected audit event types, unexpected sequences of audit event types, sequences starting with the wrong audit event types and repetition of audit event types in unexpected places.
PLUS Processor domains
Statement Parser
The Statement Parser domain is responsible for parsing the PLUS files, verifying that all syntax is correct and organizing them into a sequence of statements. These statements are fed to the Sequence Processor one at a time to build up the job definition.
Sequence Processor
The Sequence Processor domain reads statements from the Statement Parser one at a time and interprets them into a structured job definition. It then serializes this job definition to JSON.
Building and Running the Project
Build Overview
For a visual overview of the build process, refer to these slides.
As mentioned in the section discussing the toolchain, there are three major steps to building and running the projects:
-
Export MASL
-
Build with Docker
-
Launch with Docker
Before getting into the actual build, it is often an instructive process to
go through the project structure file by file and explore the purpose of each
file in the context of the build. We will use the AEReception
domain for this.
Each of the other domains follows a similar pattern. Not every file/directory
seen here will exist in each domain project.
|
Note
|
Some files are marked by git as "ignored" these tend to be generated byproducts of the build that should not be committed to the repository (e.g. build logs, test results). Not every one of these files will be covered in the section below, but it is good to be aware of them. |
▾ AEReception/ ▸ config/ ▾ gen/ ▸ AEJSON_OOA/ application.mark features.mark README.adoc ▸ masl/ ▸ models/ ▸ schedule/ ▸ test_results/ ▸ testing/ CMakeLists.txt docker-compose.test.yml docker-compose.yml Dockerfile
config
The config
directory contains plaintext files used by the application itself
to configure the domain. The application is passed a config file as a command
line argument, which it parses and uses to set up the initial instance
population.
gen/
The gen
directory contains files used during the process of code generation
and build. The AEJSON_OOA/
subdirectory contains a handwritten C++ utility
domain used by the main AEReception
domain to parse the JSON input files.
features.mark
and application.mark
contain model compiler "marks". These
metadata are associated with particular application model elements and act as directives
to the compiler. For example, domain services used exclusively for testing are
marked as test_only
, and the architecture will exclude them from generation
during a production build.
masl/
The masl
directory is the output location for exported MASL text. When the
project is clean, this directory is empty. The files in this directory are
generated and should not be hand edited.
models/
The models
directory is where BridgePoint stores xtUML source model files. The
files in this directory are managed by BridgePoint and should not be hand
edited.
schedule/
The schedule
directory contains plaintext files used by the architecture for
startup and testing. The MASL C++ platform provides a mechanism to run domain
services externally using a schedule file. This mechanism is particularly useful
for setting up execution of a particular set of tests, however it can also be
leveraged to determine which services will run at different stages of
initialisation.
test_results/
The test_results
directory is created during a test execution and contains
JSON files containing the results and details of executed tests. This directory
is created by the execution of the unit tests. The files should not be hand
edited and this directory may not exist before a run.
testing/
The testing
directory contains test files used in the unit tests.
CMakeLists.txt
The CMakeLists.txt
file is the top-level build file for the C++ build after
code generation is complete. It sets up link paths, include directories and
other global properties for the build. The behaviour of the build is different
depending on whether or not the build is launched in Debug
(test) mode.
docker-compose.yml
and docker-compose.test.yml
The two docker-compose*.yml
files are used to configure the build and
execution using Docker. The build target and parameters are configured, internet
ports and shared volumes are set up between host and container, and the command
line arguments are defined for the process. Any docker compose …
commands
will reference docker-compose.yml
by default, however the config file can be
altered by passing the name of the new file with -f
. You will notice in the
rest of this document that any time the test build is being run, the command
will start with docker compose -f docker-compose.test.yml …
.
Dockerfile
The Dockerfile
file defines the actual build. The file uses Docker’s
multi-stage build capability which allows the file to define two separate builds — one for testing and one for release. The testing version of the image
executes the code generator in test mode which will cause it to generate code
for the test_only
services as well as additional scaffolding for testing
interfaces.
|
Tip
|
I encourage you to take a moment before moving on to open each of these files in a text editor (you can double click them from the "Project Explorer" within BridgePoint) and briefly explore their contents. |
Export MASL
-
Open up BridgePoint. Assure that you have all six of the source projects imported into your workspace.
See the list of projects.
-
To export MASL, select each project and click the hammer icon found in the tool ribbon at the top of the screen.
-
Alternatively you can right click each project and select "Build Project" from the context menu.
-
If you wish to export MASL for all projects at once, you can click "Build All" from the "Project" menu in the application bar at the top of the application or use the
Ctrl-B
/Cmd-B
keyboard shortcut.
|
Note
|
The utils project simply contains common MASL interfaces and need not be
built. In fact, it will not even show up in the xtUML Modelling perspective.
|
Build each domain
This should be repeated for each of the three application domains and the
simulator domain. For the sake of demonstration, the following instructions will
reference the AEReception
domain. Additionally, the instructions will assume
that the code has been cloned in a standard location (~/git/munin
on Linux/Mac
and C:\git\munin
on Windows).
-
Open a shell and navigate to the
AEReception
project directory:cd ~/git/munin/models/AEReception # linux/mac cd C:\git\munin\models\AEReception # windows
-
Build the project with Docker by running the following command:
docker compose build --no-cache
NoteThe --no-cache
flag tells Docker to rebuild the image even if it has been built before and exists in cache. This is not strictly necessary, but it provides confidence that the latest code is being used for the build.NoteThe first invocation of docker compose build …
will cause Docker to download the base MASL image from Docker Hub. This image is > 600 MB and therefore will take some time to download. Subsequent builds will not require this download. -
Repeat this step for the other domains:
-
AEOrdering
-
AESimulator
-
SequenceProcessor
-
SequenceVerificationDataCentric
-
StatmentParser
-
Build PLUS processor
|
Important
|
Before this step, both of the application domains must be built as demonstrated in the previous step. |
-
In your shell, navigate to the protocol verifier directory:
cd ~/git/munin/models/PlusProcessor # linux/mac cd C:\git\munin\models\PlusProcessor # windows
-
Build the project with Docker by running the following command:
docker compose build --no-cache
Build protocol verifier
|
Important
|
Before this step, all three of the application domains must be built as demonstrated in the previous step. |
-
In your shell, navigate to the protocol verifier directory:
cd ~/git/munin/models/AER_AEO_SVDC # linux/mac cd C:\git\munin\models\AER_AEO_SVDC # windows
-
Build the project with Docker by running the following command:
docker compose build --no-cache
Running the protocol verifier
-
Open a shell in the protocol verifier directory, run the following command to launch the process:
docker compose up
You should see some logs begin to appear, in particular a periodic log from the
AEReception
domain that it is waiting on input files. -
Open a file explorer and navigate to the
deploy/processed/
directory within the repository. This can be done through your OS GUI or quickly through a simple command:open -a Finder ~/git/munin/deploy/processed/ # mac xdg-open ~/git/munin/deploy/processed/ # linux explorer C:\git\munin\deploy\processed\ # windows
-
Open another file explorer window and navigate to the
deploy/incoming/
directory within the repository:open -a Finder ~/git/munin/deploy/incoming/ # mac xdg-open ~/git/munin/deploy/incoming/ # linux explorer C:\git\munin\deploy\incoming\ # windows
-
Drag and drop
FileRequest_HappyPath.json
from theprocessed/
directory to theincoming/
directory. You will see a flurry of output from the application and the file will reappear in theprocessed/
directory. Inspect the logs and you will see that the audit events have been received, ordered, and verified by the application. -
Kill the process by pressing
Ctrl-C
. Clean up the process by running the following command:docker compose down
Troubleshooting Docker
Docker is a great tool for standardising builds and deployments, however it presents some pitfalls when being used as a local build/development tool.
Docker Compose requires the "down" command to be issued even after all the processes launched by the "up" command have terminated. This is because though the process inside each container has exited, the container itself still exists and can be restarted. As long as the container exists (whether running or stopped), it will hold onto resources such as shared volumes and internet ports. The "down" command tells Docker Compose to remove all the containers associated with the launch.
If you see the message "port is already allocated", it is likely that you forgot
to run the docker compose down
command somewhere along the way. When you run
this command, make sure it matches the "up" command (e.g. if you run docker
compose -f docker-compose.test.yml up
to start the application, you should run
docker compose -f docker-compose.test.yml down
in the same directory to tear
it down.)
If there is only one command to remember from this section, it is this:
docker system prune
This command causes Docker to remove all stopped containers, networks, dangling images and build cache. This usually works to give a "fresh" start if you get stuck.
If you are making changes but not observing different behavior check the following:
-
Assure you have re-exported MASL (build projects from within BridgePoint)
-
Run the build again with caching disabled:
docker compose build --no-cache
-
Run the "up" command with the
--force-recreate
flag:docker compose up --force-recreate
(this flag forces existing containers to be replaced with new ones created from the latest image).
Running the latest published version of the protocol verifier
As mentioned above, the application is built and published automatically each time new code is merged into the main repository branch. It is possible to use docker to run the latest version of the application without any build at all.
-
Authenticate with the GitHub Container Registry by executing the command:
docker login ghcr.io
Use your GitHub.com account name and password to log in. If you have two-factor authentication enabled on your account, you will have to create a new personal access token to use in place of your password. Follow the guide here to generate a new token with the "read:packages" scope.
-
Execute the application by running the following command:
docker run -it -v $PWD/test-files/:/root/test-files ghcr.io/xtuml/aer_aeo_svdc:latest -config aeoconfig/aeordering_spec.txt -receptionConfig aerconfig/aereception_spec.txt -preinit schedule/startup.sch
-
Drag and drop a test file e.g.
FileRequest_HappyPath.json
to the/incoming/
directory in your current directory. You will see a flurry of output from the application and the file will reappear in theprocessed/
directory. Inspect the logs and you will see that the audit events have been received, ordered, and verified by the application. -
Kill the process by pressing
Ctrl-C
.
Running the protocol verifier with the audit event simulator
In the last section, we built and ran the protocol verifier interactively with test files. The audit event simulator can also be used to generate test audit event files to be consumed by the main process. This section will also walk through using the process inspector to attach to the running process and browse the instance population.
-
Open a shell in the protocol verifier directory, run the following command to launch the process with the simulator:
docker compose -f docker-compose.test.yml up
You will see a lot of output at once. If you look closely, you can see several logs showing the simulator emitting audit events, followed by the main application handling those audit events.
-
In a new shell tab/window, run the following command to launch Inspector:
java -jar ~/git/munin/bin/inspector-1.0.0-jar-with-dependencies.jar # linux/mac java -jar C:\git\munin\bin\inspector-1.0.0-jar-with-dependencies.jar # windows
-
Select "AESequenceDC" from the "Domain" drop-down menu
-
Double-click the "Job" item in the object list. Note that each line represents an instance of "Job" and each column represents an attribute of the object.
-
Take some time to explore the rest of the instance population in Inspector
-
Exit inspector. Kill the application process by pressing
Ctrl-C
in the shell window where it was launched. Clean up the process by running the following command:docker compose -f docker-compose.test.yml down
Configuring the protocol verifier
The configuration for the protocol verifier is found in the config.json
file.
This is loaded at start up and checked on a regular basis for updates:
Click to see more details on the config file format
These configuration files contain some items that may be adjusted to manage the digital twin. The following is a list of the configuration items that can be adjusted and there description are as follows:
SpecUpdateRate - A time period that determines how often the application reloads the configuration files.
IncomingDirectory - The directory where the application expects to find JSON files containing events.
ProcessingDirectory - The directory where the application moves JSON files while the events are being processed.
ProcessedDirectory - The directory where the application moves JSON files after all the contained events are processed.
EventThrottleRate - The rate that events should be processed from one reception file specified as a duration. Once an event has been processed a timer shall be set to the throttle rate and the timer shall have to expire before another event is selected for processing.
ReceptionDeletionTime - When a file has been through reception the details of the reception processing shall be stored until this time expires.
ConcurrentReceptionLimit - A number that indicates the limit of concurrent reception jobs that can be executing, e.g. 1 = one active reception job
MaxOutOfSequenceEvents - This is the consecutive maximum out of sequence events that can be received for a job before an error is declared.
MaximumJobTime - This is the maximum time it should take for a job to be finished. When this time has been reached after the job was started it shall be archived if there are no blocked events or failed if there are blocked events.
JobCompletePeriod - When a Job has completed it shall be either archived or failed and once the job complete period has expired it shall be deleted from the domain with all associated events.
Example:
{ "SpecUpdateRate": "PT2M", "IncomingDirectory": "./incoming", "ProcessingDirectory": "./processing", "ProcessedDirectory": "./processed", "EventThrottleRate": "PT0S", "ReceptionDeletionTime": "PT10M", "ConcurrentReceptionLimit": 1, "MaxOutOfSequenceEvents": 10, "MaximumJobTime": "PT10M", "JobCompletePeriod": "PT24H", "Jobs": [ { "JobDefinitionName": "FileRequest", "JobDeprecated": false, "JobTypeExpiryDate": "2022-04-11T18:08:00Z", "StaleAuditEventDuration": "P99W", "BlockedAuditEventDuration": "PT5M" } ] }
Configuring the simulator
It is possible to configure the simulator to generate jobs that are to be
delivered to the digital twin. The configuration file it loads is defined in the
command specified in the docker-compose-test.yml
and passed on the
-test-config
argument as shown here:
command: "-test-config config/test-specification/sample-test-specification.json -postinit schedule/startup.sch -util Inspector -inspector-port 10 -util MetaData"
Click to see more details on the config file format
The JSON test specification configuration file allows the user to define the test to be executed. Below is a sample of a test from the configuration file:
{ "OneFilePerJob" : "true", "MaxEventsPerFile" : 100, "FileTimoutPeriod" : "PT10S", "JobSpecificationLocation" : "config/test-job-specification", "TestFileLocation" : "test-files/generated", "TestFileDestination" : "test-files/incoming", "Tests" : [{ "TestId" : 1, "TestName" : "EndToEndHappyPathJob", "TotalTests" : 10, "TestFrequency" : "PT1S", "TestJobSpec" : [{ "TestJobSpecName" : "EndToEndHappyPathJob", "EventDispatchOrder" : "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17" }, { "TestJobSpecName" : "EndToEndAlternatePathJob", "EventDispatchOrder" : "1,2,3,4,5,6,7,8,9,10,11,12,13" }] }, { "TestId" : 2, "TestName" : "MissingEventJob", "TotalTests" : 10, "TestFrequency" : "PT10S", "TestJobSpec" : [{ "TestJobSpecName" : "EndToEndHappyPathJob", "EventDispatchOrder" : "1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17" }] }] }
The following provides an explanation to each of the JSON elements in the configuration file:
OneFilePerJob - If set true then all events for a job are put into one event file for an execution of a job. Once all events have been added the event file is made available. If set to false events from any in progress Job will be put in the event file and the simulator will use the MaxEventsPerFile and FileTimeoutPeriod to determine when the event file should be made available.
MaxEventsPerFile - When the OneFilePerJob is set to false this is the maximum number of events that shall be added to an event file.
FileTimoutPeriod - When the OneFilePerJob is set to false this is the maximum amount of time that shall pass before the event flies made available.
JobSpecificationLocation - The details of the events that are to be generated for a job are captured in a Job Specification. This value identifies the location of these files.
TestFileLocation- This is the directory where the files should be created.
TestFileDestination - This directory the files should be moved to once created.
Tests - This is an array of tests that are to be executed by the simulator. The following provides and explanation of the JSON elements in a test.
TestId - This provides a unique id for the test specification.
TestName - The name that has been assigned to the test.
TotalTests - This defines the total number of times this test is to be executed.
TestFrequency - A duration that specifies the frequency that the test should be run e.g. PT1S is every second.
TestJobSpec - This is an array of the test job specifications that should be executed for this test. The following provides an explanation of the JSON elements in a test job specification.
TestJobSpecName - This the name of the JSON file for the test job specification e.g., EndToEndHappyPathJob.json that should be found in JobSpecificationLocation. A test job specification indicates the events that are to be produced when the job is executed for the test. Note that this is may not be a valid set of events for a given job that is to be validated by the Protocol Processor but is simulating a set of events in a scenario that needs to be tested
EventDispatchOrder - Each event specified in the job specification has a unique identifier. This element allows the tester to specify the order that the events are to be dispatched for this test.
The JSON job specification configuration file allows the user to define the events that are in a job run that is to be executed by the simulator. Below is a sample of a test from the configuration file:
{ "JobSpecName" : "EndToEndHappyPathJob", "EventDefinition": [{ "EventId": "1", "EventName": "NearInput", "NodeName": "Input", "ApplicationName": "InputControl", "DispatchDelay": "PT0S", "SequenceStart": "true" }, { "EventId": "2", "EventName": "NearPartWrite", "EventData" : [{ "DataName" : "PersistentInvariant", "DataValue" : "someDataValue" }, { "DataName" : "SomeOtherDataName", "DataValue" : "someOtherDataValue" }], "NodeName": "Input", "ApplicationName": "InputControl", "DispatchDelay": "PT0S", "SequenceStart": "false", "PreviousEventId" : "1" }, { "EventId": "3", "EventName": "NearJustificationWrite", "NodeName": "Input", "ApplicationName": "InputControl", "DispatchDelay": "PT0S", "SequenceStart": "false", "PreviousEventId" : "2" }, { "EventId": "4", "EventName": "AgentRequestWidgets", "NodeName": "Agent", "ApplicationName": "AgentControl", "DispatchDelay": "PT0S", "SequenceStart": "false", "PreviousEventId" : "3" }, { "EventId": "5", "EventName": "FarInput", "NodeName": "Far", "ApplicationName": "FarControl", "DispatchDelay": "PT0S", "SequenceStart": "true" }, { "EventId": "6", "EventName": "FarOutput", "NodeName": "Far", "ApplicationName": "FarControl", "DispatchDelay": "PT0S", "SequenceStart": "false", "PreviousEventId" : "5" }] }
The following provides an explanation to each of the JSON elements in the test job specification configuration file. It identifies som of the data that shall by the simulator for each event e.g., EventName, PreviousEventId, etc:
JobSpecName - The name of the test job specification that shall be executed in the test.
EventDefinition - An array of events that will be generated for this job. The following provides an explanation of the JSON elements in an event.
EventId - A unique identifier for this event specification in the test job specification.
EventName - The name of the event that is to be generated and presented to the protocol processor.
NodeName - The name of the node that is responsible for generating the event.
ApplicationName the name of the application that generated the event.
DispatchDelay - The amount of time that the simulator should wait before dispatching the event on a test run for this job specification.
SequenceStart - Indicates if this is the first event in a sequence of events. If so there will not be a previous event definition id.
PreviousEventId - This is the previous event definition id e.g. in this event definition with an id of 2 the previous event definition is 1.
EventData - An array of event data that should be generated by the simulator for the event. The following provides an explanation of the JSON elements in an event data.
DataName - The name of the event data e.g., PersistentInvariant.
DataValue - The value of the data that is to be supplied for the event data e.g. "PersistentInvariant" : "someDataValue".
Building a domain with test
Each domain contains a set of unit tests. We will use the AEReception
domain
to demonstrate building a domain in test mode.
-
Open a shell and navigate to the
AEReception
project directory:cd ~/git/munin/models/AEReception # linux/mac cd C:\git\munin\models\AEReception # windows
-
Build the project in test mode with Docker by running the following command:
docker compose -f docker-compose.test.yml build --no-cache
-
Run the test schedule with Docker using the following command:
docker compose -f docker-compose.test.yml up
You will see a lot of output including some logs from the test runner. All of the tests will be marked as "SUCCEEDED".
-
In BridgePoint, navigate to and open the
basicTest01
function atAEReception::AERDomain::AEReception::test_cases
.NoteThere will be red error markers in this activity. This is due to the fact that the BridgePoint editor does not expect the test scaffolding that the C++ code generator will produce. These error markers are expected. -
On line 28, change "HighOutput" to "LowOutput".
-
Export MASL by pressing the hammer icon or right-click > "Build Project".
-
In the shell window, rebuild and run the tests. The following command will cause docker to build and run all at once:
docker compose -f docker-compose.test.yml up --build --force-recreate
NoteThe --build
flag tells docker to build the image before creating the container. The--force-recreate
flag tells docker to provision a new container from the latest image rather than simply restarting the container that was already there from the previous run. Without both of these two flags, the changes will not take effect.Scroll up near the beginning of the output and you will see some output that looks like the following:
2022-06-13T15:15:47Z Debug : AEReception : basicTest01: FAILED 2022-06-13T15:15:47Z Debug : AEReception : Expected: 'LowInput' but got: 'HighInput' Stack: #4 Assertions::assertTrue:4 #3 Assertions::assertEquals:3 #2 AEReception::basicTest01:28 #1 Test::run_test:65
This tells us that the
basicTest01
test case failed and lets us know that an assertion failed. -
Clean up the docker run with the following command:
docker compose -f docker-compose.test.yml down


RecurrencePickerFragment()
Fragment used to create a custom recurrence with nearly all available options. Only some options of monthly recurrences are not available, like recurring on a day other than start date. This fragment can be shown directly or after RecurrenceListDialog was shown. Note: due to the MVP architecture, some interface methods are public but shouldn't be used.


The CodeHilite Extension adds code/syntax highlighting to standard Python-Markdown code blocks using Pygments.
This extension is included in the Markdown library.
You will also need to download and install the Pygments package on your
PYTHONPATH
. You will need to determine the appropriate CSS classes and create
appropriate rules for them, which are either defined in or linked from the
header of your HTML templates. See the excellent documentation for more
details. If no language is defined, Pygments will attempt to guess the
language. When that fails, the code block will display as un-highlighted code.
Note: The css and/or javascript is not included as part of this extension but shall always be provided by the end user.
The CodeHilite Extension follows the same syntax as regular Markdown code blocks, with one exception. The hiliter needs to know what language to use for the code block. There are three ways to tell the hiliter what language the code block contains and each one has a different result.
If the first line of the codeblock contains a shebang, the language is derived from that and line numbers are used.
#!/usr/bin/python
# Code goes here ...
Will result in:
#!/usr/bin/python
# Code goes here ...
If the first line contains a shebang, but the shebang line does not contain a
path (a single /
or even a space), then that line is removed from the code
block before processing. Line numbers are used.
#!python
# Code goes here ...
Will result in:
# Code goes here ...
If the first line begins with three or more colons, the text following the colons identifies the language. The first line is removed from the code block before processing and line numbers are not used.
:::python
# Code goes here ...
Will result in:
# Code goes here ...
CodeHilite is completely backward compatible so that if a code block is
encountered that does not define a language, the block is simple wrapped in

tags and output. Note: one exception would be that the Pygments
highlighting engine will try to guess the language. Upon failure, the same
behavior will happen as described here.
# Code goes here ...
Will result in:
# Code goes here ...
Lets see the source for that:

# Code goes here ...

From the Python interpreter:
>>> html = markdown.markdown(text, ['codehilite'])
If you want every code block to have line numbers, even when using colons
(:::
) for language identification, the setting force_linenos
is available
to do so.
>>> html = markdown.markdown(text,
... ['codehilite(force_linenos=True)']
... )
If you want to prevent Pygments from guessing the language, only highlighting
blocks when you explicitly request it, set the guess_lang
setting to 'False'.
>>> html = markdown.markdown(text,
... ['codehilite(guess_lang=False)']
... )


- Alice Wonderberg
- Agency Administrator
- Active
Personal
| First name | Alice |
| Surname | Wonderberg |
| mobile |<PHONE_NUMBER> |
|<EMAIL_ADDRESS>| |
| nationality | - |
| date of birth | 26 sep. 1982 |
| gender | female |
Log
| Action | Model | Ip address | About | Timestamp |
|---|---|---|---|---|
| Show | Enquiry | <IP_ADDRESS> | 11 days ago | 26-10-2017 11:38 AM |
| Show | Enquiry | <IP_ADDRESS> | 11 days ago | 26-10-2017 11:38 AM |
| Show | Enquiry | <IP_ADDRESS> | 11 days ago | 26-10-2017 11:38 AM |
Contact
Sveavagen 234b, 12900, Stockholm
User history
| Invitation sent at | 21-10-2017 14:53PM |
| Invitation accepted at | 21-10-2017 14:53PM |
| Modified at | 06-11-2017 |
| Modified by | Unknown |
| Last sign in at | 01-11-2017 10:53 AM |
| Last sign in ip | <IP_ADDRESS> |
| Sign in | Count |


ur3 module¶
-
class
ur3.
GUI_Positions
¶ Bases:
object
GUI Position class is a GUI to declare the position of the robot on the image. It will save the robot position at the top left, top right, bottom left and bottom right of the camera’s view.
-
property
get_pos
¶ Get the robot position.
- Returns
pos_value – A dictionnary that contains the positions. e.g ‘Top Left’: [‘116’, ‘-319’]
- Return type
dict
-
property
-
ur3.
get_object
(dic, img_width, img_height, center, z, angle)¶ Move the UR3 robot to get the object.
- Parameters
dic (dict) – Dictionnary of positions.
img_width (int) – Width size of the image. In pixel.
img_height (int) – Height size of the image. In pixel.
center (list) – Object’s center. In pixel.
z (float) – Object’s height.
angle (float) – Angle of rotation of the object.


06 Jul 2015
To date, our feature tests have been fun using Capybara, which using RackTest. While it is very fast, by default - it does not support javascript. Adding ":js => true" to your test, will switch to the Capybara.javascript driver (Selenium Webdriver) - which will actually launch a browser to run the feature test.
#features/visitor_makes_payment.rb
require 'spec_helper'
feature 'Visitor makes payment', js: true do
background do
visit new_payment_path
end
scenario "valid card number" do
pay_with_credit_card('424242424242424242')
expect(page).to have_content('Thank you for your business!')'
end
scenairo "invalid card number" do
pay_with_credit_card('400000000000000069')
expect(page).to have_content('Your card has expired!')
end
scendario "declined card" do
pay_with_credit_card('4000000000000000002')
expect(page).to have_content('Your card was declined!')
end
end
def pay_with_crdit_card(card_number)
fill_in "Credit Card Number", with: card_number
fill_in "Security Code", with: "123"
select "3 - March", from: "date_month"
select "2015", from: 'date_year'
click_button "Submit Payment"
end
Tips:
Your Selenium Webdiver must be compatiable with your latest version of Firefox.
Since Selenium Webdriver is really slow, we will go with Capybara Webkit which is faster. This will require you to install the Capybrara Webkit gem and also install Qt locally (using homebrew). Make it the default js runner by declaring so in your spec_helper:
Capybara.javascript_driver = :webkit
To run tests with Selenium Webdriver so you can see what is happening in the web browser, simply add "driver: selenium" to the spec:
scenario "valid card number", driver: selenium do
Must install PhantomJs locally but it has a very nice feature set and allows for extensive customization.
05 Jul 2015
Stub Methods
Typically, you want to use the stub method in three scenarios:
1. You want to use the stub method when actually calling a method is expensive in terms of time. So you stub the test double to be in state that you desire.
The action or interface that you're testing is already thoroughly tested elsewhere. For example, there is no need to fully test the Stripe API's ablility to charge credi card and return token, becasue this funcitionality is already in the StripeWrapper::Charge test - therefore stubbing would be perfectly fine.
You want to mimick some behavior you haven't fully developed yet.
Doubles create a fake object that stands in the place of a real object and stubs call a desried fictitious method on that double and gives it a desired value as a result of calling that fictitous method.
We are intersted in doubles and stubs in this case because we want to avoid actually submtting a an charge and hitting Stripe's server.
#spec/controllers/payments_controller.rb
require 'spec_helper'
describe PaymentsController do
describe "POST create" do
context "with a successful charge" do
before do
charge = double('charge')
charge.stub(:successful?).and_return(true)
StripeWrapper::Charge.stub(:create).and_return(charge)
post :create, token: '123'
end
it "sets the flash success message" do
expect(flash[:success]).to eq("Thank you!")
end
it "redirects to the new payment path" do
expect(response).to redirect_to new_payment_path
end
end
context "with an failed charge" do
before do
charge = double('charge')
charge.stub(:successful?).and_return(false)
charge.stub(:error_message).and_return('Your card was declined')
StripeWrapper::Charge.stub(:create).and_return(charge)
post :create, token : '123'
end
it "sets the flash error message" do
expect(flash[:error]).to eq('Your card was declined')
end
it "redirects to the new payment path" do
expect(response).to redirect_to new_payment_path
end
end
end
#app/controllers/payments_controller.rb
class PaymentsController < ApplicationController
def create
token = params[:stripeToken]
charge = StripeWrapper::Charge.create(amount: 3000, card: token)
if charge.successful?
flash[:succes] = "Thank you!"
redirect_to new_payment_path
else
flash[:error] = charge.error_message
redirect_to new_payment_path
end
end
end
Check out the Test Doubles docs for more info. For more info on Method Stubs, with an older version on Rspec, checkout these docs also.
04 Jul 2015
Isolated API Tests Stubbing Out the Internet
Hitting the Stripe server takes alot of time approximently 22 seconds sicnce we are hitting the server twice, once to grab the token. The answer to this is pre-script a response for a given request.
Webmock
Webmock allows us to do this by stubbing the HTTP client at the Library level and we can tell exactly what the response is. So we can stub the response using Webmock, always setting the response to a given value, but we would have to do this for every spec. It would be great to have something that gave us this fuctionality automatically and we also don't have to change our test code...
VCR
VCR integrates with Rspec and helps you to record your test suite's HTTP interactions and play them back automatically when you run future tests. Meaning, the first time the spec is run, the request will actually hit the TPA server, record the interaction and store it in a data file. The next time its run again... it will just play back the recorded file.
Getting Started
Step 1: Install both VCR & Webmock Gems
Step 2: Add Rspec Metadata (for VCR set up) to spec helper.rb
Metadata
require 'vcr'
VCR.configure do |c|
c.cassette_library_dir = 'spec/cassettes'
c.hook_into :webmock
c.configure_rspec_metadata!
end
RSpec.configure do |c|
# so we can use :vcr rather than :vcr => true;
# in RSpec 3 this will no longer be necessary.
config treat_symbols_as_metadata_keys_with_true_values = true (add to Rspec config block)
end
Step 3: Add :vcr to the transactions you want to record
it "charges the card successfully", :vcr do
response = StripeWapper::Charge.create(amount: 300, card: token)
expect(response).to be_successful
end
Step 4: Cassettes & Configs
As default, spec/cassettes holds all recordings and a creates data files for each spec ran. VCR allows for extensive customization. Including how many recordings per spec whether it be once or all.
Refactor
You can add Stripe.apikey = ENV['STRIPESECRET_KEY'] to your initializers (config/initializers/stripe.rb), rather than including in each test.
03 Jul 2015
The are generally two options when testing third party API wrappers. We could only go to the where the TPA is and call the API and create fake response data - so what we are testing is given the generated response, can your application interpret the response and generate the desired result. On the other hand, we can go all the way to the extent to hit the TPA server and hit their server, getting the real response and intergrate our wrapper code with that data to test it.
In this instance, we are writing fully intergrated API specs
require 'spec_helper'
describe StripeWrapper::Charge do
before do
StripeWrapper.setapikey
end
let(:token) do
Stripe::Token.create(
:card => {
:number => cardnumber,
:expmonth => 7,
:exp_year => 2016,
:cvc => 390
}
).id
end
context "with a valid card" do
let(:card_number) { '4242424242424242' }
it "charges the card successfully" do
response = StripeWapper::Charge.create(amount: 300, card: token)
expect(response).to be_successful
end
end
context "with invalid card" do
let(:card_number) { '4000000000000002' }
let(:response) {StripeWrapper::Charge.create(amount: 300, card: token) }
it "does not charge the card successfully" do
expect(response).notto besuccessful
end
it "contains an error message" do
expect(response).to eq('Your card was declined')
end
end
02 Jul 2015
Since we are going to be using Stripe alot, it may be smart to put the API in something called an API Wrapper, which becomed a centralized place for the API, rather than spread through-out your application.
Create a Wrapper called Stripe Wrapper
models/stripe_wrapper.rb
module StripeWrapper
class Charge
def self.create(options={})
Stripe::Charge.create(amount: options[:amount], currency: 'usd', card: options[:card])
end
end
end
Then we want to create a seperate method within the Charge class for the Stripe API Key because there may be other processes that need rely on the key. We want want to write a conditional that would show the write key according to right env we are in, production, dev, test. etc.
module StripeWrapper
class Charge
def self.create(options={})
StripeWrapper.api_key
Stripe::Charge.create(amount: options[:amount], currency: 'usd', card: options[:card])
end
def self.set_stripe_api_key
Stripe.api_key = Rails.env.production? ? ENV['STRIPE_PUBLISHABLE_KEY'] : "pk_test_Xxzh18R0rGLpYys1rVT4KHLH"
end
end
end
This handles the first part of the API request, but we also need to address the response:
Now we can update the PaymentsController to:
class PaymentsController < ApplicationController
def create
token = params[:stripeToken]
charge = StripeWrapper::Charge.create9:smount => 3000, :card => token)
if charge.successful?
flash[:success] = "Thank you for your generous support!"
redirect_to new_payments_path
else
flash[:error] = charge.error_message
redirect_to new_payment_path
end
end
end
Update the StripeWrapper
module StripeWrapper
class Charge
attr_reader :response, :status
def initialize(response, status)
@response = response
@status = status
end
def self.create(options={})
StripeWrapper.api_key
begin
response = Stripe::Charge.create(amount: options[:amount], currency: 'usd', card: options[:card])
new(response, :success)
resuce Stripe::CaredError => e
new(e, :error)
end
end
def successful?
status == :success
end
def error_message
response.error_message
end
def self.set_stripe_api_key
Stripe.api_key = Rails.env.production? ? ENV['STRIPE_PUBLISHABLE_KEY'] : "pk_test_Xxzh18R0rGLpYys1rVT4KHLH"
end
end
end


Use F4 to toggle panes:
with focus in Googledoc, F4 toggles Slack;
with focus on puzzle page, F4 toggles Googledoc (with Slack).
Resize panes using the handle on the bottom left of each pane;
set default pane sizes below.
Slack pane visible on Googledoc by default:
Show
Hide
Slack pane default size:
Googledoc pane on puzzle page by default:
Show
Hide
Googledoc pane default size:
Hunt pages regexp (1 per line):


Lectures
Monday, Wednesday and Fridays 9:00AM-9:50AM CB 349.Literature
Linear Algebra and its applications. David C. Lay. Fourth edition.Course Contents
The solution of simultaneous linear equations. Matrix algebra. Determinants. Vector spaces. Eigenvalues and Eigenvectors. Inner product spaces and least squares approximation. Most of chapters 1 to 6 from Lay's book.Examination and Grading
Tests (50%)
There will be 2 tests. These will be announced at least one week in advance.Final (30%)
There will be a comprehensive final to be worth 30% on Wednesday 12/17/2014 8:00-10:00 A.M..Homework and Quizzes (20%)
There will be both online homework and written homework to be handed in every week.The online homework will be assigned and completed in Webwork (http://courses1.webwork.maa.org/webwork2/uky-ma322/). Your username is your LinkBlue ID (use only capital letters), and your password is your student ID number (8 digits).
The written homework will be posted after every class in http://dleon.combinatoria.co/pages/courses/homeworkma322001-201402.html.
The homework posted during each week will be due at the beginning of the class of Friday of the following week. Your written homework should:
- Be clean and organized. Homework that cannot be understood to be graded will be awarded 0 points.
- Be your own work. A reasonable amount of collaboration is expected but the written solutions should be your own and use your own words.
- Show all your work. There will be no credit for correct answers if you do not show the steps you took to arrive to a solution. Partial credit will be awarded for your work even in the case you arrive to an incorrect answer.
There may also be some additional homework problems without any due date but that you should complete in order to train the concepts given in class. Some of these problems could appear in the quizzes, tests and the final. These problems will be assigned after some of the classes and also posted in the web page of the course.
There will be (unannounced) quizzes on some Wednesdays.
Homework and quizzes are equally weighted for the remaining 20% of the grade.
Grading Scale
| Percentage | Grade |
|---|---|
| >=90% | A |
| >=80% | B |
| >=70% | C |
| >=60% | D |
| <60% | E |
Syllabus
This is an approximate schedule of the course containing the syllabus:| Date | Topic |
|---|---|
| Wed 8/27 | Introduction. 1.1 Systems of Linear Equations |
| Fri 8/29 | 1.2 Row Reduction and Echelon Forms |
| Wed 9/3 | 1.3 Vector Equations |
| Fri 9/5 | 1.4 The Matrix Equation Ax = b |
| Mon 9/8 | 1.5 Solution Sets of Linear Systems |
| Wed 9/10 | 1.7 Linear Independence |
| Fri 9/12 | 1.8 Introduction to Linear Transformations |
| Mon 9/15 | 1.9 The Matrix of a Linear Transformation |
| Wed 9/17 | 2.1 Matrix Operations |
| Fri 9/19 | 2.2 The Inverse of a Matrix |
| Mon 9/22 | 2.3 Characterizations of Invertible Matrices |
| Wed 9/24 | 2.5 Matrix Factorizations |
| Fri 9/26 | 3.1 Introduction to Determinants |
| Mon 9/29 | Review Test 1 |
| Wed 10/1 | TEST 1 |
| Fri 10/3 | 3.2 Properties of Determinants |
| Mon 10/6 | 3.3 Cramer’s Rule, Volume, and Linear Transformations |
| Wed 10/8 | 4.1 Vector Spaces and Subspaces |
| Fri 10/10 | 4.1 Vector Spaces and Subspaces |
| Mon 10/13 | 4.2 Null Spaces, Column Spaces, and Linear Transformations |
| Wed 10/15 | 4.2 Null Spaces, Column Spaces, and Linear Transformations |
| Fri 10/17 | 4.3 Linearly Independent Sets; Bases |
| Mon 10/20 | 4.4 Coordinate Systems |
| Wed 10/22 | 4.5 The Dimension of a Vector Space |
| Fri 10/24 | 4.6 Rank |
| Mon 10/27 | 4.7 Change of Basis |
| Wed 10/29 | 4.9 Applications to Markov Chains |
| Fri 10/31 | 5.1 Eigenvectors and Eigenvalues |
| Mon 11/3 | 5.2 The Characteristic Equation |
| Wed 11/5 | 5.3 Diagonalization |
| Fri 11/7 | 5.4 Eigenvectors and Linear Transformations |
| Mon 11/10 | Review Test 2 |
| Wed 11/12 | TEST 2 |
| Fri 11/14 | 5.5 Complex Eigenvalues |
| Mon 11/17 | 10.2 The Steady-State Vector and Google's PageRank |
| Wed 11/19 | More applications of Eigenvalues and Eigenvectors |
| Fri 11/21 | 6.1 Inner Product, Length, and Orthogonality |
| Mon 11/24 | 6.1 Inner Product, Length, and Orthogonality |
| Mon 12/1 | 6.2 Orthogonal Sets |
| Wed 12/3 | 6.3 Orthogonal Projections |
| Fri 12/5 | 6.4 The Gram—Schmidt Process |
| Mon 12/8 | 6.5 Least-Squares Problems |
| Wed 12/10 | 6.8 Applications of Inner Product Spaces |
| Fri 12/12 | Review Final |
| Wed 12/17 | FINAL EXAM 8:00-10:00 A.M. |


Formerly a medical professional, I have always aspired to help those around me. I am always looking for opportunities that help solve problems in impactful and creative ways.
Currently, I am a solutions engineer for Price Fx, a SaaS pricing company. In addition to providing direct client support, I use Groovy to parse data and manipulate the UI. Outside of work, I enjoy building applications from the ground up - usually with Ruby on Rails and some javascript framework.
I am a former NCAA athlete and received my degree in Neuroscience. I grew up on the East Coast and now live in San Francisco, really enjoying all the outdoor activities the Bay Area and Northern California have to offer.
Thanks for visiting my page! Feel free to reach out.


First Gen Pokemon Chart
Image
Name
Type
Evoles Into
Bulbasaur
Grass/Poison
Ivysaur
Charmander
Fire
Charmeleon
Squirtle
Water
Wartortle


epochs : instance of Epochs
picks : int | array-like of int | None
The indices of the channels to consider. If None, the first
five good channels are plotted.
sigma : float
The standard deviation of the Gaussian smoothing to apply along
the epoch axis to apply in the image. If 0., no smoothing is applied.
vmin : float
The min value in the image. The unit is uV for EEG channels,
fT for magnetometers and fT/cm for gradiometers.
vmax : float
The max value in the image. The unit is uV for EEG channels,
fT for magnetometers and fT/cm for gradiometers.
colorbar : bool
Display or not a colorbar.
order : None | array of int | callable
If not None, order is used to reorder the epochs on the y-axis
of the image. If it’s an array of int it should be of length
the number of good epochs. If it’s a callable the arguments
passed are the times vector and the data as 2d array
(data.shape[1] == len(times).
show : bool
units : dict | None
The units of the channel types used for axes lables. If None,
defaults to units=dict(eeg=’uV’, grad=’fT/cm’, mag=’fT’).
scalings : dict | None
The scalings of the channel types to be applied for plotting.
If None, defaults to scalings=dict(eeg=1e6, grad=1e13, mag=1e15,
eog=1e6).
cmap : matplotlib colormap | (colormap, bool) | ‘interactive’
Colormap. If tuple, the first value indicates the colormap to use and
the second value is a boolean defining interactivity. In interactive
mode the colors are adjustable by clicking and dragging the colorbar
with left and right mouse button. Left mouse button moves the scale up
and down and right mouse button adjusts the range. Hitting space bar
resets the scale. Up and down arrows can be used to change the
colormap. If ‘interactive’, translates to (‘RdBu_r’, True). Defaults to
‘RdBu_r’.
fig : matplotlib figure | None
Figure instance to draw the image to. Figure must contain two axes for
drawing the single trials and evoked responses. If None a new figure is
created. Defaults to None.
axes : list of matplotlib axes | None
List of axes instances to draw the image, erp and colorbar to.
Must be of length three if colorbar is True (with the last list element
being the colorbar axes) or two if colorbar is False. If both fig and
axes are passed an error is raised. Defaults to None.
overlay_times : array-like, shape (n_epochs,) | None
If not None the parameter is interpreted as time instants in seconds
and is added to the image. It is typically useful to display reaction
times. Note that it is defined with respect to the order
of epochs such that overlay_times[0] corresponds to epochs[0].
|


About BlameStella
BlameStella.com is a web monitoring service built with Ruby, Redis, PostgreSQL, and PhantomJS. It checks your site every few minutes and notifies you when there's a problem. Since we render entire pages we can tell when there's problems with your javascript too.
We just launched a new version on January 1st, 2013. There's a lot more we want to do so signup today (for free) and you can enjoy the ride along with us!
About Delano
I built Stella to scratch an itch. That is, a web monitoring service that met my needs as a web developer. I've worked on sites large and small and I'm putting everything I learned into building great software for others.
I launched the service in 2010 and relaunched on January 1st, 2013. I've had a lot of fun and learned a lot along the way. I'm using this blog to write about my experiences running the company and the technology behind it.
--<EMAIL_ADDRESS>Tweet Follow @holman


Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.
Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
We would like to forge a strong relationship with your esteemed organization and request your sponsorship. We will ensure to provide our best of services to promote your brand at the event. Your support will go a long way in encouraging digital trends and establishing a lasting relationship as well. 5th Annual Digital Marketing Summit focuses on how to make businesses Succeed and Run in the Digital World. Important, Speed Networking Event for Businesses & Industry We have 100+ and 300+ Audience Capacity in Venue @ Phoenix Arena, Hyderabad. Based on audience size will customize venue arrangements. Most of Audience 40% are from Startups, 30% SME Business owners & 30% from Freelancers, Working Professionals.As per discussion, Will have Sponsor Packages below for 150 Audience


25+ Powerful Quotes by Oscar Wilde That Can Echo in Every Cell of Your Body
During his long career, the famous Irish writer from the 19th century named Oscar Wilde wrote poems, plays, novels, epigrams, essays, and short stories. But no matter what genre he chose, his wit and exquisite sense of humor would always shine through the lines he wrote. We’ll always remember Oscar Wilde for his sharp, wise statements about everything from love and life to art and fashion.
Here at Bright Side, we fell in love with Oscar Wilde’s witty, wise quotes that we can still relate to in the 21st century, and here are our favorites.
- The world is a stage and the play is badly cast.
- I don’t want to go to heaven. None of my friends are there.
- I never put off till tomorrow what I can possibly do the day after.
- Fashion is a form of ugliness so intolerable that we have to alter it every 6 months.
- Hear no evil, speak no evil, and you won’t be invited to cocktail parties.
- A good friend will always stab you in the front.
- To live is the rarest thing in the world. Most people exist, that is all.
- You can never be overdressed or overeducated.
- We live in an age when unnecessary things are our only necessities.
- There are many things that we would throw away if we were not afraid that others might pick them up.
- The nicest feeling in the world is to do a good deed anonymously and have somebody find out.
- Education is an admirable thing, but it is good to remember from time to time that nothing that is worth knowing can be taught.
- A cynic is a man who knows the price of everything, and the value of nothing.
- Crying is for plain women. Pretty women go shopping.
- A bore is someone who deprives you of solitude without providing you with company.
- I have the simplest tastes. I am always satisfied with the best.
- Anybody can sympathize with the sufferings of a friend, but it requires a very fine nature to sympathize with a friend’s success.
- Life is never fair, and perhaps it is a good thing for most of us that it is not.
- No good deed goes unpunished.
- Whenever people agree with me I always feel I must be wrong.
- There are only 2 kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.
- They’ve promised that dreams can come true but forgot to mention that nightmares are dreams too.
- The world was my oyster but I used the wrong fork.
- Quotation is a serviceable substitute for wit.
Which of these quotes inspired you the most? Have you ever read poems, novels, or plays by Oscar Wilde?
Preview photo credit Shutterstock


Profile - 1 View Profile! Profile - 2 View Profile! Profile - 3 View Profile! {% endblock %}


Toggle navigation
about
about us
contact
media
publications
books
book chapters
journal publications
conferences
patents
research
signal processing
swallowing difficulties
gait analysis
handwriting analysis
brain-machine interfaces
people
principal investigator
current members
former trainees
support
404
The page requested cannot be found.


-
backgroundColor
java.awt.Color backgroundColor
The default background color for the entire panel.
-
boardOffset
java.awt.Point boardOffset
The x,y coordinates of the top left corner of the shogi board.
-
dropTableOffset1
java.awt.Point dropTableOffset1
The x,y coordinates of the top left corner of the bottom drop table.
-
dropTableOffset2
java.awt.Point dropTableOffset2
The x,y coordinates of the top left corner of the top drop table.
-
pieceOffset
java.awt.Point pieceOffset
The offset for drawing a piece in x,y coordinates relative to the
top left corner of a tile. This is to ensure that the piece is always
drawn at the center of a shogi board tile.
-
dropTableSize
java.awt.Dimension dropTableSize
The width,height dimensions of a drop table.
-
pieceSize
java.awt.Dimension pieceSize
The width,height dimensions of a shogi piece.
-
tileSize
java.awt.Dimension tileSize
The width,height dimensions of a shogi board tile.
-
click
java.awt.Point[] click
The location of the cursor when the corresponding mouse button was pressed.
-
mouse
java.awt.Point mouse
The current location of the cursor.
-
mousePressed
boolean[] mousePressed
Whether the mouse button is currently being pressed or not.
-
proMode
boolean proMode
If true, pro_mode mode is active. If active,
all of the possible moves of a piece are not displayed
when the piece is selected, and a player receives an
instant loss if an invalid move is attempted.
-
showBoardLabels
boolean showBoardLabels
If true, this panel draws the board coordinate labels (e.g. 1a, 2a, 2b).
-
showLastMove
boolean showLastMove
If true, the previous move is indicated.
-
log
boolean log
If true, the console (if open) logs every single little action
-
takeTurns
boolean takeTurns
If true, the players take turns.
-
pieceIsSelected
boolean pieceIsSelected
If true, the cursor is currently holding a piece.
-
selectedPiece
Piece selectedPiece
The selected piece.
-
lastMoved
Tile lastMoved
The location of the last move.
-
turn
int turn
The current player.
-
winner
int winner
The winner of the game. 1 indicates the bottom player as winner.
-1 indicates top player as winner. 0 indicates no winner;
-
texturePath
java.lang.String texturePath
The name of the folder of the active texture pack.
All texture packs are accessed from the texturepacks/ folder.
-
snap
SoundEffect snap
The sound that plays whenever a piece is moved or promoted.
-
gui
GraphicUI gui
The parent GraphicUI object.
-
c
ShogiConsole c
The debug console.
-
s
StatsPanel s
The statistics panel.
-
state
GameState state
The GameState object representing the shogi board.


Home
Services
Support
Maintenance
Products
Kids
Adults
About
Contact
Østrungens venner
Kalender
Forrige
Neste


Angular Select
You selected: {{selectedCar.brand}}
Model: {{selectedCar.model}}
Color: {{selectedCar.color}}