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
# 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
inputs_real = tf.placeholder(tf.float32, (None, image_width , image_height , image_channels), name='input_real')
inputs_z = tf.placeholder(tf.float32, (None, z_dim), name='input_z')
lr = tf.placeholder(tf.float32, name='learning_rate') #never got to use this, tho!
return inputs_real, inputs_z, lr
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_inputs(model_inputs)
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 leaky_relu(x, alpha=0.1, name='leaky_relu'):
return tf.maximum(x, alpha * x, name=name)
def discriminator(images, reuse=False):
"""
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)
"""
# TODO: Implement Function
with tf.variable_scope('discriminator', reuse=reuse):
x1 = tf.layers.conv2d(images, 64, 5, strides=2, padding='same',kernel_initializer=tf.contrib.layers.xavier_initializer())
x1 = tf.layers.batch_normalization(x1, training=True)
x1 = leaky_relu(x1)
x1 = tf.layers.conv2d(x1, 128, 5, strides=2, padding='same',kernel_initializer=tf.contrib.layers.xavier_initializer())
x1 = tf.layers.batch_normalization(x1, training=True)
x1 = leaky_relu(x1)
x1 = tf.nn.dropout(x1,keep_prob=0.5)
x1 = tf.layers.conv2d(x1,256 , 5, strides=2, padding='same',kernel_initializer=tf.contrib.layers.xavier_initializer())
x1 = tf.layers.batch_normalization(x1, training=True)
x1 = leaky_relu(x1)
# Flatten it
flat = tf.reshape(x1, (-1, 2*2*128))
logits = tf.layers.dense(flat, 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):
"""
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
x1 = tf.layers.dense(z, 2*2*512)
# Reshape it to start the convolutional stack
x1 = tf.reshape(x1, (-1, 2, 2, 512))
x1 = tf.layers.batch_normalization(x1, training=is_train)
x1 = leaky_relu(x1)
#print(x1)
x1 = tf.layers.conv2d_transpose(x1,256, 5 , strides=2, padding='valid',kernel_initializer=tf.contrib.layers.xavier_initializer())
x1 = tf.layers.batch_normalization(x1, training=is_train)
x1 = leaky_relu(x1)
#print(x1)
x1 = tf.layers.conv2d_transpose(x1, 128, 5 , strides=2, padding='same',kernel_initializer=tf.contrib.layers.xavier_initializer())
x1 = tf.layers.batch_normalization(x1, training=is_train)
x1 = leaky_relu(x1)
#print(x1)
#x1 = tf.layers.conv2d_transpose(x1, 64, 5 , strides=1, padding='same',kernel_initializer=tf.contrib.layers.xavier_initializer())
#x1 = tf.layers.batch_normalization(x1, training=is_train)
#x1 = leaky_relu(x1)
#print(x1)
#x1 = tf.layers.conv2d_transpose(x1, 32, 5 , strides=1, padding='same',kernel_initializer=tf.contrib.layers.xavier_initializer())
#x1 = tf.layers.batch_normalization(x1, training=is_train)
#x1 = leaky_relu(x1)
#print(x1)
# Output layer
logits = tf.layers.conv2d_transpose(x1, out_channel_dim,5 , strides=2, padding='same' ,kernel_initializer=tf.contrib.layers.xavier_initializer()) #out_channel_dim
#print(logits)
out = tf.tanh(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)
"""
# TODO: Implement Function
g_model = generator(input_z, out_channel_dim, is_train=True)
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_model_fake)))
g_loss = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.ones_like(d_model_fake)))
d_loss = d_loss_real + d_loss_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)
"""
# TODO: Implement Function
# Get weights and bias to update
t_vars = tf.trainable_variables()
d_vars = [var for var in t_vars if var.name.startswith('discriminator')]
g_vars = [var for var in t_vars if var.name.startswith('generator')]
# Optimize
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)
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.
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")
"""
# TODO: Build Model
#tf.reset_default_graph() -- would keep this here but it causes error "Nesting violated for default stack of %s objects" IndexError: list index out of range
input_real, input_z, _ = model_inputs(data_shape[1], data_shape[2], data_shape[3], z_dim)
d_loss, g_loss = model_loss(input_real, input_z, data_shape[3])
d_opt, g_opt = model_opt(d_loss, g_loss, learning_rate, beta1)
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
for e in range(epoch_count):
steps = 0
batches = get_batches(batch_size)
for batch_images in get_batches(batch_size):
batch_images = batch_images * 2
steps += 1
# Sample random noise for G
batch_z = np.random.uniform(-1, 1, size=(batch_size, z_dim))
# Run optimizers
_ = sess.run(d_opt, feed_dict={input_real: batch_images, input_z: batch_z})
_ = sess.run(g_opt, feed_dict={input_real: batch_images, input_z: batch_z})
if steps % 10 == 0:
# At the end of each epoch, get the losses and print them out
train_loss_d = d_loss.eval({input_z: batch_z, input_real: batch_images})
train_loss_g = g_loss.eval({input_z: batch_z})
print("Epoch {}/{}...step {:d}".format(e+1, epochs, steps),
"Discriminator Loss: {:.4f}...".format(train_loss_d),
"Generator Loss: {:.4f}...".format(train_loss_g),
"% Diff in Losses: {:.4f}".format((train_loss_g - train_loss_d)*100.0/train_loss_g))
if steps % 100 == 0:
show_generator_output(sess, 25, input_z, data_shape[3], data_image_mode)
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.0002
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)
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.0002
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)
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.


Our lord and saviour
The one will give us an A+ on our project
Ladies and gentlemen give it up for DAVID BROWN!!!!!!
E<EMAIL_ADDRESS>T:<PHONE_NUMBER> x2711
F:<PHONE_NUMBER>
Office location: N2091


Wavez is the annual techno-cultural festival of the Department of Ocean Engineering at IIT Madras. It involves both Technical and Cultural events and is aimed at increasing the intra-department and inter-department interactions.
It is attended by roughly 500 students of IIT Madras and many more across chennai. It is considered as knowledge hub of Naval architecture and ocean engineering field.
The festival provides a solid platform for people to learn about our work and develop an interest, also a place for those in our department to pit their skills and knowledge against each other.
<EMAIL_ADDRESS>Wavez © 2017


{% extends "layout.html" %} {% block content %}
|
Attack graphs are the engine for the attack surface analysis. If this all looks very confusing and you're not sure where to start, watch this quick six minute tutorial video.
The Error pattern is explicitly not included as it inherently is not based on puposeful action. NAICS Sector 55 is not included for lack of data. For more information on the correct NAICS code for your organization, visit http://www.farsmarterbids.com/reference/naics-list.php
In the graph to the right, attacks start at the lower right at the "Start" node. They move through actions and attributes until they finally conclude at the "End" node in the upper left. Depending on what worry you select, the graph will change to represent that subset of the data. There are three options for analysis below:
To learn more about the app, read the associated blog post: A DBIR Attack Graph Web App! or the in-depth blog post about the associated analysis: The DBIR Attack Graph: Redux!. |
Please click the 'analyze' button to analyze the graph.
The bar chart below represents the length of the path for an attacker to get from a certain action to compromise a certain attribute. It may take more than 1 step for them do so, however the actual steps aren’t shown. As described above, the values are all relative with '1' representing the highest degree of difficulty for a single step. Mouse over bars to see the starting action and ending attribute.
You can also set a mitigation rate. For example, if your patch completion rate is 95%, for a mitigation that requires patching, you would enter "95" to simulate the 95% patch rate. This is a rudimentary implementation, but offers basic control. By default, the mitigation is assumed 100% effective ("100"). Mitigation Rate:
Note: because no path is completely removed, only lengthened, any mitigation rate of less than 100% may run to the maximum 50 iterations. It willt take some time to complete
Please click the 'analyze' button to analyze the graph.
Mitigation Set 1 |
Analysis
Please click the 'analyze' button to compare mitigations using the graph. |
Mitigation Set 2 |


Money Matters
问题描述 :
Our sad tale begins with a tight clique of friends. Together they went on a trip to the picturesque country of Molvania. During their stay, various events which are too horrible to mention occurred. The net result was that the last evening of the trip ended with a momentous exchange of "I never want to see you again!"s. A quick calculation tells you it may have been said almost 50 million times!
Back home in Scandinavia, our group of ex-friends realize that they haven’t split the costs incurred during the trip evenly. Some people may be out several thousand crowns. Settling the debts turns out to be a bit more problematic than it ought to be, as many in the group no longer wish to speak to one another, and even less to give each other money.
Naturally, you want to help out, so you ask each person to tell you how much money she owes or is owed, and whom she is still friends with. Given this information, you’re sure you can gure out if it’s possible for everyone to get even, and with money only being given between persons who are still friends.
输入:
The first line contains two integers, n (2 <= n <= 10000), and m (0 <= m <= 50000), the number of friends and the number of remaining friendships. Then n lines follow, each containing an integer o (-10000 <= o <= 10000) indicating how much each person owes (or is owed if o < 0). The sum of these values is zero. After this comes m lines giving the remaining friendships, each line containing two integers x, y (0 <= x < y <= n – 1) indicating that persons x and y are still friends.
输出:
The first line contains two integers, n (2 <= n <= 10000), and m (0 <= m <= 50000), the number of friends and the number of remaining friendships. Then n lines follow, each containing an integer o (-10000 <= o <= 10000) indicating how much each person owes (or is owed if o < 0). The sum of these values is zero. After this comes m lines giving the remaining friendships, each line containing two integers x, y (0 <= x < y <= n – 1) indicating that persons x and y are still friends.
样例输入:
5 3 100 -75 -25 -42 42 0 1 1 2 3 4 4 2 15 20 -10 -25 0 2 1 3
样例输出:
POSSIBLE IMPOSSIBLE
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> #include <string> #include <string.h> #include<queue> #include<set> using namespace std; int step[5] , n , m , maxsz; int A[351] , p[5]; unsigned short f[5][923531]; unsigned short sz[5]; int st[5][8000]; bool vis[5][923531]; void init() { memset(step,0,sizeof(step)); memset(vis,0,sizeof(vis)); memset(sz,0,sizeof(sz)); memset(f,0,sizeof(f)); } void getCard(int ss) { memset(step,0,sizeof(step)); int i = 4; int tmp = ss; while (ss) { if (p[i] && ss >= p[i]) { step[i] = ss / p[i]; ss -= p[i]*step[i]; } --i; } } int getState() { int ret = 0; for (int i = 4 ; i >= 1 ; --i) if (step[i]) ret += step[i]*p[i]; return ret; } void input() { for (int i = 1 ; i <= n ; ++i) scanf("%d",A+i); for (int i = 0 ; i < m ; ++i) { int a; scanf("%d",&a); ++step[a]; } maxsz = 1; p[1] = 1; for (int i = 2 ; i <= 4 ; ++i) { p[i] = p[i-1]; if (step[i-1]) p[i] *= (1+step[i-1]); } for (int i = 1 ; i <= 4 ; ++i) if (step[i]==0) p[i] = 0; for (int i = 1 ; i <= 4 ; ++i) if (step[i]) maxsz *= step[i]; int h = getState(); f[1][h] = A[1]; st[1][sz[1]++] = h; } void Dp(int to,int w) { int j = getState(); if (f[to][j] < w) f[to][j] = w; if (!vis[to][j]) { vis[to][j] = true; st[to][sz[to]++] = j; } } void solve() { for (int i = 1 ; i < n ; ++i) { for (int j = 0 ; j < sz[i%5] ; ++j) { int s = st[i%5][j]; getCard(s); for (int k = 1 ; k <= 4 ; ++k) if (step[k]) { --step[k]; Dp((i+k)%5, f[i%5][s]+A[i+k]); ++step[k]; } } sz[i%5] = 0; memset(f[i%5],0,sizeof(f[i%5])); memset(vis[i%5],false,sizeof(vis[i%5])); } printf("%d\n",f[n%5][0]); } int main() { while (scanf("%d%d",&n,&m)==2) { init(); input(); solve(); } }
参考：http://blog.csdn.net/wsx1754175/article/details/17512063
(adsbygoogle = window.adsbygoogle || []).push({});
穆斯林的问题在于他们认为非穆都是肮脏的，有青海的大学生在学校不但要有清真餐厅，甚至还要求吃饭时不能看到非穆同学，要求学校给他单独一间屋子吃饭。还有一个新闻，也是青海出来的大学生，19岁，带着15岁的老婆，要求学校给他一间单间宿舍，没得到就打骂女老师，万幸
第二块代码if(it != mp.end())应改为if(it != mp.end() && (i+1)!=(it->second +1))；因为第二种解法如果数组有重复元素 就不正确
说的就是无向图啊，有向图的算法也是类似的
大致看了下，算法的时间复杂度没有很本性的提升，算不上高效。
int L[m+1][n+1];这样定义出错，这个在gcc上可以编译通过 在VS上不行 应该改为new 或者vector
终于明白了递归和dp的关系，多谢分享！
不错
I go through some of your put up and I uncovered a good deal of expertise from it. Many thanks for posting this sort of exciting posts
这是什么鬼，怎么多头文件
方法4中使用hash表，只要用出现次数作为Value，就可以解决重复元素的问题了。
第二个是python代码啊。。
<EMAIL_ADDRESS>加了星号 (*) 表示跳过此数据不读入. 此时的数据量还是很小的，耗时却不短。这种方法确实可以，当然或许还有其他的优化方案，但是优化只能针对某些数据，不太可能在所有情况下都能在可接受的时间内求解出答案。
即为打印出的组合的个数C(n,r)，假设print函数复杂度为O(1)


| dDeta {mgcv} | R Documentation |
INTERNAL function. Distribution families provide derivatives of the deviance and link w.r.t. mu = inv_link(eta)
.
This routine converts these to the required derivatives of the deviance w.r.t. eta, the linear predictor.
dDeta(y, mu, wt, theta, fam, deriv = 0)
y |
vector of observations. |
mu |
if |
wt |
vector of weights. |
theta |
vector of family parameters that are not regression coefficients (e.g. scale parameters). |
fam |
the family object. |
deriv |
the order of derivative of the smoothing parameter score required. |
A list of derivatives.
Simon N. Wood <simon.wood@r-project.org>.


Equivalent to clicking the Select Plot Area command on the Chart menu in Microsoft Excel version 4.0. Selects the plot area of the active chart.
Syntax
SELECT.PLOT.AREA( )
Remarks
SELECT.PLOT.AREA is included only for compatibility with previous versions of Microsoft Excel for the Macintosh. SELECT.PLOT.AREA is the same as the SELECT("Plot") function.
Related Function
SELECT Selects a cell, graphic object, or chart
Return to index


--- layout: default-noadv title: Privacy Policy ---
This Application collects some Personal Data from its Users.
Alberto Velo<EMAIL_ADDRESS>Among the types of Personal Data that this Application collects, by itself or through third parties, there are: Cookie, Usage data.
Users are responsible for any Personal Data of third parties obtained, published or shared through this Application and confirm that they have the third party's consent to provide the Data to the Owner.
The Data concerning the User is collected to allow the Owner to provide its services, as well as for the following purposes: Analytics, Content commenting, Contacting the User.
The Personal Data used for each purpose is outlined in the specific sections of this document.
Personal Data is collected for the following purposes and using the following services:
The services contained in this section enable the Owner to monitor and analyze web traffic and can be used to keep track of User behavior.
Google Analytics is a web analysis service provided by Google Inc. (“Google”). Google utilizes the Data collected to track and examine the use of this Application, to prepare reports on its activities and share them with other Google
services.
Google may use the Data collected to contextualize and personalize the ads of its own advertising network.
Personal Data collected: Cookie and Usage data.
Place of processing : USA – Privacy Policy – Opt Out
By filling in the contact form with their Data, the User authorizes this Application to use these details to reply to requests for information, quotes or any other kind of request as indicated by the form’s header.
Personal Data collected: Email address.
Content commenting services allow Users to make and publish their comments on the contents of this Application.
Depending on the settings chosen by the Owner, Users may also leave anonymous comments. If there is an email address
among the Personal Data provided by the User, it may be used to send notifications of comments on the same content. Users are responsible for the content of their own comments.
If a content commenting service provided by third
parties is installed, it may still collect web traffic data for the pages where the comment service is installed, even when users do not use the content commenting service.
The User's Personal Data may be used for legal purposes by the Data Controller, in Court or in the stages leading to possible legal action arising from improper use of this Application or the related services.
The User declares to be aware
that the Data Controller may be required to reveal personal data upon request of public authorities.
In addition to the information contained in this privacy policy, this Application may provide the User with additional and contextual information concerning particular services or the collection and processing of Personal Data upon request.
For operation and maintenance purposes, this Application and any third party services may collect files that record interaction with this Application (System Logs) or use for this purpose other Personal Data (such as IP Address).
More details concerning the collection or processing of Personal Data may be requested from the Data Controller at any time. Please see the contact information at the beginning of this document.
Users have the right, at any time, to know whether their Personal Data has been stored and can consult the Data Controller to learn about their contents and origin, to verify their accuracy or to ask for them to be supplemented, cancelled, updated or corrected, or for their transformation into anonymous format or to block any data held in violation of the law, as well as to oppose their treatment for any and all legitimate reasons. Requests should be sent to the Data Controller at the contact information set out above.
This Application does not support “Do Not Track” requests.
To determine whether any of the third party services it uses honor the “Do Not Track” requests, please read their privacy policies.
The Data Controller reserves the right to make changes to this privacy policy at any time by giving notice to its Users on this page. It is strongly recommended to check this page often, referring to the date of the last modification listed at the bottom. If a User objects to any of the changes to the Policy, the User must cease using this Application and can request that the Data Controller removes the Personal Data. Unless stated otherwise, the then-current privacy policy applies to all Personal Data the Data Controller has about Users.
The Data Controller is responsible for this privacy policy.
Any information regarding a natural person, a legal person, an institution or an association, which is, or can be, identified, even indirectly, by reference to any other information, including a personal identification number.
Information collected automatically from this Application (or third party services employed in this Application), which can include: the IP addresses or domain names of the computers utilized by the Users who use this Application, the URI addresses (Uniform Resource Identifier), the time of the request, the method utilized to submit the request to the server, the size of the file received in response, the numerical code indicating the status of the server's answer (successful outcome, error, etc.), the country of origin, the features of the browser and the operating system utilized by the User, the various time details per visit (e.g., the time spent on each page within the Application) and the details about the path followed within the Application with special reference to the sequence of pages visited, and other parameters about the device operating system and/or the User's IT environment.
The individual using this Application, which must coincide with or be authorized by the Data Subject, to whom the Personal Data refer.
The legal or natural person to whom the Personal Data refers.
The natural person, legal person, public administration or any other body, association or organization authorized by the Data Controller to process the Personal Data in compliance with this privacy policy.
The natural person, legal person, public administration or any other body, association or organization with the right, also jointly with another Data Controller, to make decisions regarding the purposes, and the methods of processing of Personal Data and the means used, including the security measures concerning the operation and use of this Application. The Data Controller, unless otherwise specified, is the Owner of this Application.
The hardware or software tool by which the Personal Data of the User is collected.
Small piece of data stored in the User's device.
Notice to European Users: this privacy statement has been prepared in fulfillment of the obligations under Art. 10 of EC Directive n. 95/46/EC, and under the provisions of Directive 2002/58/EC, as revised by Directive 2009/136/EC, on the subject of Cookies.
This privacy policy relates solely to this Application.


BackBlaze, MDS Worker, and Spotlight
I recently began experiencing my system fans kicking in and running all the time. The fans began running so much that I almost didn’t notice them any more. When I pulled the Activity Monitor up, the md worker was using over 100% of my system resources consistently.
After looking up what md worker does, it appears to be a process spun off by spotlight to index your drive for quick searching. Even after a reboot, the fans would kick back in after a short idle time of maybe a minute. This process was seriously heating up the mac.
After doing some more research, I found this [excellent question and answer][superuserqa] from the [SuperUser][http://superuser.com/] site. I ran the following command in the terminal to log what Spotlight was trying on index at the time.
1
|
|
The terminal showed the last file to be indexed was in the /Library/BackBlaze/bzdata folder. This was not Library in ~/Users, but the one at the base of the volume. It was indexing this file over and over. My initial thought was that the system was hung on the file. A google search turned up this result on the BackBlaze support page. BackBlaze frequently writes log data to a file. All files in the BackBlaze folder should be added to the Privacy Exclusions so that Spotlight will not attempt to index them. According to the support article, this exclusion should be added when BackBlaze is installed. Since the Lion version for BackBlaze was very recently released, this may be a bug in the BackBlaze installer.
In my case, the folder had not been added.
After adding the BackBlaze folder to the Spotlight Privacy exclusions, the problem disappeared at once. Good job on BackBlaze for having an excellent support document.
UPDATE: I recently had to replace my hard drive and decided to do a fresh install rather than pulling over my Carbon Copy Cloner backup. I experienced the exact same problem, and had to follow the process outlined above to fix it. This issue hasn’t been resolved in the BackBlaze installer as of yet.


CAF U-23 Cup of Nations: Black Meteors captain Yaw Yeboah expects tough game against South Africa
Ghana's U-23 captain Yaw Yeboah believes the third and fourth place play off game against South Africa will be a tough one as the team fight for the final ticket to Tokyo 2020.
However, Yeboah insists the team has not come this far to let go qualification to next years Olympic games in Japan.
The Black Meteors failed to secure automatic qualification after defeat in the semifinals against Ivory Coast but the West Africans have a final chance to make a return to the big stage after 15 years.
"It will be a very complicated and tough match. With all what we’ve done, it will be difficult to leave without anything at all. We will give our best to get this Olympic qualification," he said ahead of the game on Friday afternoon.
Yaw Yeboah has scored two goals in the competition, including one against Ivory Coast on Tuesday.
But the Black Meteors will need more from their talismanic captain to clinch a ticket to Tokyo 2020 on Friday.


Let us save you some time by analyzing your document and making suggestions to increase your efficiency.


Plato on Github
Report Home
src/lib/storage.js
Maintainability
56.83
Lines of code
56
Difficulty
17.21
Estimated Errors
0.12
Function weight
By Complexity
By SLOC
/** * @module lib/storage * @memberof lux-lib */ /** * Abstraction over the browser's localStorage API adding the option to provide * an alternate solution. * * @param {string|ResetConfig} key - The Primary controller of functionality; * as a String will indicate which key to interact with in localStorage, as an * Object will allow additional functionality. * * @param {any} value - Any value localStorage will allow for storage. * * @param {string} config - An object including overrides for default values * for: `prefix`, and `store`. The `prefix` value is used to prepend all key- * names in the store to ensure against naming collisions withing the store. * The `store` is will enable switching between Session and Local storage * as well as other options; also handy for unit testing. * * @return {any} - The value in storage. * * @example * // set a value in the store * storage('name', 'Joshua'); * * // retrieve a value from the store * storage('name'); * * // remove the value from the store * storage({ reset: 'name' }); */ function storage(key, value, config = {}) { if (!key) { const errorMessage = 'No "key" provided to storage().'; throw new Error(errorMessage, 'luxui/lib/storage.js'); } const { prefix, store } = { prefix: 'luxui--', store: window.localStorage, ...config, }; const { reset } = key; if (reset) { store.removeItem(`${prefix}${reset}`); } else if (value) { store.setItem(`${prefix}${key}`, value); } return store.getItem(`${prefix}${key}`); } export default storage;


This example shows how to make sure the pre-built shared library is used. ViennaLS is a header only project. However, certain commonly used template specializations can be built with the library and used during developement to decrease compile times. In order to make sure these pre-compiled types are used, typedefs for those types are included with each header. These typedefs will also be available when building as header-only in order to avoid code changes. The available specialisations are listed in "lsPreCompileMacros.hpp"
#include <iostream>
#include <lsBooleanOperation.hpp>
#include <lsDomain.hpp>
#include <lsExpand.hpp>
#include <lsMakeGeometry.hpp>
#include <lsPrune.hpp>
#include <lsToSurfaceMesh.hpp>
#include <lsVTKWriter.hpp>
omp_set_num_threads(4);
float origin[3] = {5., 0., 0.};
float radius = 7.3;
{
lsMakeGeometry_float_3(sphere1, sphere).apply();
radius = 9.5;
lsMakeGeometry_float_3(sphere2, sphere).apply();
}
{
std::cout << "Extracting..." << std::endl;
lsToSurfaceMesh_float_3(sphere1, mesh1).apply();
lsToSurfaceMesh_float_3(sphere2, mesh2).apply();
}
lsBooleanOperation_float_3(sphere1, sphere2,
.apply();
std::cout << "Extracting..." << std::endl;
lsToSurfaceMesh_float_3(sphere1,
mesh).apply();
return 0;
}
int main()
Definition: SharedLib.cpp:22
std::shared_ptr wrapper for use with ViennaLS. lsSmartPointers should be created using the function :...
Definition: lsSmartPointer.hpp:9
static lsSmartPointer New(TArgs &&... targs)
Use this function to create new objects when using ViennaLS.
Definition: lsSmartPointer.hpp:21
Class handling the output of an lsMesh<> to VTK file types.
Definition: lsVTKWriter.hpp:27
void apply()
Definition: lsVTKWriter.hpp:86
float gridDelta
Definition: AirGapDeposition.py:19
mesh
Definition: AirGapDeposition.py:34
tuple origin
Definition: AirGapDeposition.py:28


Registration Form
Full Name
Phone Number
Gender
Height
Weight
Age
Email address
Password
Re Enter Password
Error:
Sign Up
Or go back to log in
here


Pandemic Simulator
Parameters
Population size
Infection Probability
Recovery Time (ms)
speed
Restart
Reset


Media stream
Snapshot of video stream
Record video and replay
Share stream via peerconnection
Data channel for exchange text message


Resource Attributes
This page lists the available attributes when creating resources with
the REST API
Actions
Required attributes:
| Attribute |
Type |
Description |
| action_type |
string |
Action Type |
| description |
string |
Description (unique) |
Optional attributes:
| Attribute |
Type |
Description |
| name |
string |
Name |
| options |
hash |
Options |
Alert Definitions
POST /api/alert_definitions
Required attributes:
| Attribute |
Type |
Description |
| description |
string |
Description |
| db |
string |
Database |
| expression |
hash |
Expression |
| options |
hash |
Options |
Optional attributes:
| Attribute |
Type |
Description |
| enabled |
boolean |
Enable the Alert Definition or not - Defaults to true |
Authentications
POST /api/authentications
Required attributes:
| Attribute |
Type |
Description |
| manager_resource |
hash |
href of the provider |
Optional attributes:
| Attribute |
Type |
Description |
| type |
string |
Authentication class |
For a complete list of authentication classes supported and the related
attributes for each type, send the *OPTIONS /api/authentications*
request.
Category Attributes
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name |
| description |
string |
Description |
Optional attributes:
| Attribute |
Type |
Description |
| example_text |
string |
Detailed description |
| show |
boolean |
Show Category flag |
| single_value |
boolean |
Single Value flag |
| syntax |
string |
Syntax of value, string, integer or boolean
|
Chargeback Rate Attributes
Required attributes:
| Attribute |
Type |
Description |
| chargeback_rate_id |
integer |
Reference to parent Chargeback. <chargeback_rate> can be used instead. |
| group |
string |
Group rate belongs to, i.e. cpu, memory, net_io, disk_io, etc. |
| source |
string |
The input value for calculation, i.e. allocated, used, etc. |
| chargeback_tiers |
Array of hashes |
Each tier is represented by hash `{“start”: 0.0, “finish”: ‘infinity’, “fixed_rate”: 2.0, “variable_rate”: 0.0}] |
Optional attributes:
| Attribute |
Type |
Description |
| description |
string |
Description of the chargeback rate |
| enabled |
boolean |
Rate enabled flag |
| friendly_rate |
string |
Friendly name of the rate |
| metric |
string |
Metrics, i.e. derived_memory_available, etc. |
| per_time |
string |
Measured per time, hourly, daily, weekly, monthly or yearly
|
| per_unit |
string |
Measured per unit, i.e. megabytes, gigabytes, etc. |
| chargeback_rate |
hash |
id or href from api/chargebacks collection. |
| detail_currency |
hash |
id or href from api/currencies collection. Details of related currency. |
| chargeable_field |
hash |
id or href from api/chargeable_fields collection. Record representing metric. Contains equivalent columns: metric, group, source
|
Conditions
Required attributes:
| Attribute |
Type |
Description |
| description |
string |
Condition Description |
| expression |
hash |
Expression |
| modifier |
string |
Modifier |
| towhat |
string |
Class name |
Optional attributes:
| Attribute |
Type |
Description |
| name |
string |
Condition name |
Configuration Script Sources
POST /api/configuration_script_sources
Required attributes:
| Attribute |
Type |
Description |
| manager_resource |
hash |
href or id of the provider |
Optional attributes:
| Attribute |
Type |
Description |
| description |
string |
Description |
| name |
string |
Project Name |
| related |
hash |
Related attributes and values |
Generic Objects
POST /api/generic_objects
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name of the generic object |
| generic_object_definition |
hash |
Generic object definition to create new generic object for, requires an href or id attribute in the hash |
POST /api/generic_object_definitions/:id/generic_objects
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name of the generic object |
Optional attributes:
| Attribute |
Type |
Description |
| uid |
string |
Uid string |
| property_attributes |
hash |
Attribute/Value pairs to define for the generic object |
| associations |
hash |
Hash containing association keys each being an array of resource references |
Generic Object Definitions
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name of the generic object definition |
Optional attributes:
| Attribute |
Type |
Description |
| description |
string |
Description for the generic object definition |
| properties |
hash |
Hash containing the attributes, associations and methods of the generic object definition |
| picture |
hash |
Picture to use, either an href or id of the picture resource, or the actual picture including the extension and Base64 encoded content
|
Group Attributes
Required attributes:
| Attribute |
Type |
Description |
| description |
string |
Description |
| role |
hash |
Role the group is assigned to, requires an href, id or name attribute in the hash |
| tenant |
hash |
Tenant the group belongs to, requires an href or id attribute in the hash |
Optional attributes:
| Attribute |
Type |
Description |
| filters |
hash |
Hash that contains the belongsto and managed arrays of filters to assign to the group |
| filter_expression |
hash |
Hash representing the expression used for filtering by Tag |
Filters hash:
The filters
hash can include the following keys:
Example:
"filters" : {
"managed" : [
["/managed/location/ny"],
["/managed/environment/prod"]
],
"belongsto" : [
"/belongsto/ExtManagementSystem|dev-vc60/EmsFolder|Datacenters/EmsFolder|dev-vc60-DC/EmsFolder|vm/EmsFolder|Alberto-Dev,
"/belongsto/ExtManagementSystem|dev-vc60/EmsFolder|Datacenters/EmsFolder|dev-vc60-DC/EmsFolder|host/EmsCluster|dev-vc60-cluster"
]
}
Alternatively, company tags can be represented with an expression via
the filter_expression instead of the managed tag array in the
filters element as follows:
Example with Tags based on expression:
"filters" : {
"managed" : null,
"belongsto" : [
"/belongsto/ExtManagementSystem|dev-vc60/EmsFolder|Datacenters/EmsFolder|dev-vc60-DC/EmsFolder|vm/EmsFolder|Alberto-Dev,
"/belongsto/ExtManagementSystem|dev-vc60/EmsFolder|Datacenters/EmsFolder|dev-vc60-DC/EmsFolder|host/EmsCluster|dev-vc60-cluster"
]
},
"filter_expression" : {
"exp": {
"and": [
{
"CONTAINS": {
"tag": "managed-location",
"value": "ny"
}
},
{
"CONTAINS": {
"tag": "managed-environment",
"value": "prod"
}
}
]
}
}
Orchestration Templates
POST /api/orchestration_templates
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name |
| content |
text |
Template content |
Optional attributes:
| Attribute |
Type |
Description |
| type |
string |
Type |
| description |
string |
Description |
| draft |
boolean |
true or false
|
| ems_id |
integer |
Id of the provider |
| orderable |
boolean |
true or false
|
Policies
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name |
| description |
string |
Description |
| mode |
string |
Mode (i.e. compliance) |
| towhat |
string |
Target Class |
| condition_ids |
array |
Ids of Conditions to assign to the Policy |
| policy_contents |
array |
Array of hashes including event_id and actions, an array of hashes comprising of an action_id and opts. |
Provider Attributes
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name of the provider |
| type |
string |
Provider class |
| hostname |
string |
Hostname of the Provider |
| credentials or connection_configurations |
hash or array |
Credentials information for the provider either via the credentials hash or connection_configurations array |
Optional attributes:
| Attribute |
Type |
Description |
| api_version |
string |
API Version for communicating with the Provider |
| uid_ems |
string |
Domain for OpenStack provider. Required when “api_version” is “v3” |
| certificate_authority |
string |
CA for the Provider |
| connection_configurations |
array |
Endpoints for the Provider |
| credentials |
hash |
Credentials to use for communicating with the Provider, see Provider Support for examples |
| host_default_vnc_port_start |
integer |
Starting VNC port |
| host_default_vnc_port_end |
integer |
Ending VNC port |
| ipaddress |
string |
IP Address of the Provider |
| port |
string |
Port of the Provider |
| realm |
string |
Realm of the Provider |
| security_protocol |
string |
Security Protocol |
| url |
string |
URL of the Provider |
| zone |
hash |
In which zone to add provider to, hash needs to include an href or id attribute. |
Credentials hash specification attributes are:
| Type |
Auth Types |
Auth Attributes |
| ManageIQ::Providers::Amazon::CloudManager |
default |
userid, password |
| ManageIQ::Providers::Atomic::ContainerManager |
default, password, bearer |
userid, password |
| ManageIQ::Providers::Azure::CloudManager |
default |
userid, password |
| ManageIQ::Providers::Kubernetes::ContainerManager |
default, password, bearer |
userid, password |
| ManageIQ::Providers::Microsoft::InfraManager |
default |
userid, password |
| ManageIQ::Providers::Openshift::ContainerManager |
default, password, bearer |
userid, password, auth_key |
| ManageIQ::Providers::Openstack::InfraManager |
default, amqp, ssh_keypair |
userid, password, auth_key |
| ManageIQ::Providers::Openstack::CloudManager |
default, amqp |
userid, password |
| ManageIQ::Providers::Redhat::InfraManager |
default, metrics |
userid, password |
| ManageIQ::Providers::Vmware::InfraManager |
default |
userid, password |
| ManageIQ::Providers::Foreman::Provider |
default |
userid, password |
| ManageIQ::Providers::Openstack::Provider |
default |
userid, password |
Role Attributes
Required Attributes:
| Attribute |
Type |
Description |
| name |
string |
Name of user role |
Optional Attributes:
| Attribute |
Type |
Description |
| features |
array |
Features to assign to the role. Array of { “identifier” OR “href” OR “id” : … } |
| settings |
hash |
Settings for the role, normally: { “restrictions” : { “vms” : “user” OR “user_or_group” } } |
Service Attributes
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name |
Optional attributes:
| Attribute |
Type |
Description |
| description |
string |
Description |
| orchestration_template |
hash |
href or id of the Orchestration Template |
| orchestration_manager |
hash |
href or id of the Orchestration Provider |
| parent_service |
hash |
Parent service href or id reference |
| type |
string |
Type of Service |
Service Catalog Attributes
POST /api/service_catalogs
| Attribute |
Type |
Description |
| name |
string |
Name of service catalog |
| description |
string |
Description of service catalog |
Optional attributes:
| Attribute |
Type |
Description |
| service_templates |
array |
Array of Service Template hashes to assign to the new Service Catalog. Hash entries to include the href of the service_templates to assign and must not currently be assigned to any Service Catalog. |
Service Dialogs
POST /api/service_dialogs
Required attributes:
| Attribute |
Type |
Description |
| label |
string |
Label |
| dialog_tabs |
array |
Dialog content - array of dialog tabs |
Optional attributes:
| Attribute |
Type |
Description |
| description |
string |
Description |
Tag Attributes
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name of tag |
| description |
string |
Description of tag |
| category |
hash |
Category identifier for which the tag is getting added to, requires an href, id or name attribute in the hash |
When adding with a **create** action on the tags subcollection of the
category via /api/categories/:id/tags, the category should not be
specified in the resource.
Tenant Attributes
Required attributes:
| Attribute |
Type |
Description |
| name |
string |
Name of Tenant |
| parent |
hash |
Parent tenant identifier for which the sub-tenant is getting added to, requires an href or id attribute in the hash |
Optional attributes:
| Attribute |
Type |
Description |
| description |
string |
Description of Tenant |
| domain |
string |
Domain |
| logo_file_name |
string |
Logo file name, must be available via /uploads/logo_file_name
|
| login_logo_file_name |
string |
Login Logo file name, must be available via /uploads/login_logo_file_name
|
| login_text |
string |
Login text |
| subdomain |
string |
Subdomain |
User Attributes
Required attributes:
| Attribute |
Type |
Description |
| userid |
string |
Username |
| password |
string |
Password |
| name |
string |
Full Name |
| group |
hash |
Group the user belongs to, requires a description, href or id attribute in the hash |
Optional attributes:
| Attribute |
Type |
Description |
| email |
string |
E-mail Address |


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
# 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
inputs_real = tf.placeholder(tf.float32, [None, image_width, image_height, image_channels], name='input_real')
inputs_z = tf.placeholder(tf.float32, [None, z_dim], name='input_z')
lr = tf.placeholder(tf.float32, name='learning_rate')
return inputs_real, inputs_z, lr
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_inputs(model_inputs)
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):
"""
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)
"""
# TODO: Implement Function
with tf.variable_scope('discriminator', reuse=reuse):
# Input layer is 28x28x3
conv1 = tf.layers.conv2d(images, 128, 5, strides=2, padding='same',
kernel_initializer=tf.truncated_normal_initializer(stddev=0.02))
#conv1 = tf.nn.relu(conv1)
conv1 = tf.maximum(0.2*conv1, conv1)
# 14x14x128
conv2 = tf.layers.conv2d(conv1, 256, 5, strides=2, padding='same',
kernel_initializer=tf.truncated_normal_initializer(stddev=0.02))
conv2 = tf.layers.batch_normalization(conv2, training=True)
#conv2 = tf.nn.relu(conv2)
conv2 = tf.maximum(0.2*conv2, conv2)
# 7x7x256
conv3 = tf.layers.conv2d(conv2, 512, 5, strides=2, padding='same',
kernel_initializer=tf.truncated_normal_initializer(stddev=0.02))
conv3 = tf.layers.batch_normalization(conv3, training=True)
#conv3 = tf.nn.relu(conv3)
conv3 = tf.maximum(0.2*conv3, conv3)
# 4x4x512
# Flatten it
flat = tf.reshape(conv3, (-1, 4*4*512))
logits = tf.layers.dense(flat, 1, kernel_initializer=tf.truncated_normal_initializer(stddev=0.02))
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):
"""
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
"""
# TODO: Implement Function
with tf.variable_scope('generator', reuse=(not is_train)):
fc = tf.layers.dense(z, 5 * 5 * 512,
kernel_initializer=tf.truncated_normal_initializer(stddev=0.02))
fc = tf.reshape(fc, [-1, 5, 5, 512])
fc = tf.layers.batch_normalization(fc, training=is_train)
#fc = tf.nn.relu(fc)
fc = tf.maximum(0.2*fc, fc)
# 5x5x512
convt1 = tf.layers.conv2d_transpose(fc, 256, 3, strides=1, padding='valid',
kernel_initializer=tf.truncated_normal_initializer(stddev=0.02))
convt1 = tf.layers.batch_normalization(convt1, training=is_train)
#convt1 = tf.nn.relu(convt1)
convt1 = tf.maximum(0.2*convt1, convt1)
# 7x7x256
convt2 = tf.layers.conv2d_transpose(convt1, 128, 5, strides=2, padding='same',
kernel_initializer=tf.truncated_normal_initializer(stddev=0.02))
convt2 = tf.layers.batch_normalization(convt2, training=is_train)
#convt2 = tf.nn.relu(convt2)
convt2 = tf.maximum(0.2*convt2, convt2)
# 14x14x128
# Output layer
logits = tf.layers.conv2d_transpose(convt2, out_channel_dim, 5, strides=2, padding='same',
kernel_initializer=tf.truncated_normal_initializer(stddev=0.02))
# 28x28x3
out = tf.tanh(logits)/2 #need scale -0.5~0.5?
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):
"""
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)
"""
# TODO: Implement Function
g_model = generator(input_z, out_channel_dim)
d_model_real, d_logits_real = discriminator(input_real)
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_model_real)))
d_loss_fake = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.zeros_like(d_model_fake)))
g_loss = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.ones_like(d_model_fake)))
d_loss = d_loss_real + d_loss_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)
"""
# TODO: Implement Function
t_vars = tf.trainable_variables()
d_vars = [var for var in t_vars if var.name.startswith('discriminator')]
g_vars = [var for var in t_vars if var.name.startswith('generator')]
# Optimize
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)
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.
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")
"""
# TODO: Build Model
out_channel_dim = 3 if data_image_mode == 'RGB' else 1
input_real, input_z, lr = model_inputs(data_shape[1], data_shape[2], data_shape[3], z_dim)
d_loss, g_loss = model_loss(input_real, input_z, out_channel_dim)
d_opt, g_opt = model_opt(d_loss, g_loss, lr, beta1)
with tf.Session() as sess:
steps = 0
sess.run(tf.global_variables_initializer())
for epoch_i in range(epoch_count):
for batch_images in get_batches(batch_size):
# TODO: Train Model
steps += 1
batch_z = np.random.uniform(-1, 1, size=(batch_size, z_dim))
_ = sess.run(d_opt, feed_dict={input_real: batch_images,
input_z: batch_z, lr: learning_rate})
_ = sess.run(g_opt, feed_dict={input_real: batch_images,
input_z: batch_z, lr: learning_rate})
if steps % 10 == 0:
train_loss_d = d_loss.eval({input_z: batch_z, input_real: batch_images})
train_loss_g = g_loss.eval({input_z: batch_z})
print("Epoch {}/{}...".format(epoch_i+1, epoch_count),
"Discriminator Loss: {:.4f}...".format(train_loss_d),
"Generator Loss: {:.4f}".format(train_loss_g))
if steps % 100 == 0:
show_generator_output(sess, 10, input_z, out_channel_dim, data_image_mode)
show_generator_output(sess, 10, input_z, out_channel_dim, data_image_mode)
saver = tf.train.Saver()
saver.save(sess, './checkpoints/generator.ckpt')
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.3
"""
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)
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 = 16
z_dim = 100
learning_rate = 0.002
beta1 = 0.5
"""
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)
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.


This example creates live randomly distributed
flashes in a 5 minute period. The example shows how to put individual
features in a meteoJS.synview.resource.Vector
object
and how to change "live" the style (switch between dots and lightning
symbols) of these vector resources. Additionally, with the
postrender
event the count of lightnings is painted
onto the layer.


Syllabus
CITY NEWS & NOVELTY, INC. v. CITY OF WAUKESHA
The City of Waukesha, Wisconsin (City), requires sellers of sexually explicit materials to obtain and annually renew adult business licenses. When petitioner City News and Novelty, Inc. (City News), applied for a renewal of its adult business license, then due to expire in two months, Waukeshas Common Council denied the application, finding that City News had violated the Citys ordinance in various ways. The denial was upheld in administrative proceedings and on judicial review in the state courts. Petitioning for certiorari, City News raised three questions, including whether the guarantee of a prompt judicial review that must accompany an adult business licensing scheme, see Freedman v. Maryland , 380 U. S. 51; FW/PBS, Inc. v. Dallas , 493 U. S. 215, means a prompt judicial determination on the merits of a permit denial, as some Federal Circuits have held, or simply prompt access to judicial review, as the Wisconsin Court of Appeals, below, and other courts have ruled. Because this Court granted the petition only on this question, City News cannot now contend that any of the substantive requirements governing adult business licenses in Waukesha conflict with the First Amendment. Nor does City News contend that the evidence failed to substantiate the charged violations.
Held: Because City News is not properly situated to raise the question on which this Court granted review, the petition is dismissed and the judgment of the Wisconsin court is left undisturbed. Pp. 37.
(a) This case has become moot. After petitioning for certiorari, City News withdrew its renewal application and ceased to operate as an adult business. City News no longer seeks to renew its license and currently expresses no intent to pursue a license. Accordingly, City News no longer has a legally cognizable interest in the outcome. E.g., County of Los Angeles v. Davis , 440 U. S. 625. Neither of City Newss arguments that the case remains fit for adjudication is persuasive. The Court rejects City Newss contention that, because it never promised not to reapply for a license, a live controversy remains under Erie v. Paps A. M. , 529 U. S. 277. Erie differs critically from this case. In Erie , as in the instant case, the Court confronted an adult business challenge to a city ordinance. There, the Court held that the controversy persisted, even after the adult business shut down, in part because the business could again decide to operate. Id. , at 287. That speculation standing alone, however, did not shield the case from a mootness determination. Another factor figured prominently. The nude dancing entrepreneur in Erie sought to have the case declared moot after the business had prevailed below, obtaining a state-court judgment that invalidated Eries ordinance. Id. , at 288. Acceptance of the mootness plea would have resulted in dismissal of the petition, leaving intact the judgment below. See ASARCO Inc. v. Kadish , 490 U. S. 605, n. 1. As a result, Erie would have been saddled with an ongoing injury, i.e. , the judgment striking its law, and the adult business arguably would have prevailed in an attempt to manipulate the Courts jurisdiction to insulate a favorable decision from review, 529 U. S., at 288. Here, in contrast, City News left the fray a loser, not a winner. Dismissal of the petition will not keep Waukesha under the weight of an adverse judgment, deprive the City of its state-court victory, or reward an arguable manipulation of the Courts jurisdiction. The Court also rejects City Newss contention that it experiences ongoing injury because it is conclusively barred by Waukeshas ordinance from reopening as an adult business until 2005. It is far from clear whether City News actually suffers that disability. And a live controversy is not maintained by speculation that City News might be temporarily disabled from reentering a business that it has left and currently asserts no plan to reenter. See Spencer v. Kemna , 523 U. S. 1. Pp. 36.
(b) City Newss contention that it remains a qualified complainant also fails on another ground. Full briefing and argument have revealed that the Freedman question City News tendered, and which the Court took up for review, is not now and never was accurately reflective of City Newss grievance. Unlike the initial license applicant whose expression cannot begin prepermission, City News was already licensed to conduct an adult business and sought to fend off a stop order. Swift judicial review is the remedy needed by those held back from speaking. The Court does not doubt that an ongoing adult enterprise facing loss of its license to do business may allege First Amendment injuries. Such an establishments typical concern, however, is not the speed of court proceedings, but the availability of a stay of adverse action during the pendency of judicial review, however long that review takes. Unlike the Freedman petitioner, who sought, through swift court review, an end to the status quo of silence, City News sought to maintain, pendente lite , the status quo of speech (or expressive conduct). This Court ventures no view on the merits of an argument urging preservation of speech (or expressive conduct) as the status quo pending administrative and judicial review proceedings. That question is not the one on which the courts have divided or on which certiorari was granted here. Pp. 67.
Certiorari dismissed. Reported below: 231 Wis. 2d 93, 604 N. W. 2d 870.
Ginsburg, J., delivered the opinion for a unanimous Court.


Rrichard
10
Easily the best strategy game available right now. Lacked a bit of depth at release, but the two DLCs have been great. Hundreds of hours of potential, and even more in multiplayer. Absolutely recommended if you like strategy games. Graphics are great too, though the 32-bit single core engine is a bit of a letdown.
KGBMinamot
9
If you like WW2, and you have enough time on your hands, this game is near perfect. This game fulfils everyone of your micro and macro desires, with gorgeous graphics and refined combat system. Only reason its not 10/10 is because it chugs in the late-game.
Super12
10
Best. Game. Ever. No Argument. Ok, fine, the AI is a bit bad, but the level of detail is amazing, and the Modding community is the best. Just ever, it can fix whatever problems you may have, also the production system is the best, and also the air combat is the best.
vvmax
8
The game was quite good but not as good as Crusader Kings 2. The game is about World War 2, which there are a hell lot of games about, making Hearts of Iron 4 very cliche, the game has a huge learning curve, which can make a lot of players quit. But other than that, Hearts Of Iron 4 is a brillian game.
Emperorfaris
9
it's a great grand strategy mixed with sandbox, alternate history (if you want to), accurate history (again optional) and actual balanced game play the only downside of it is the lag and stuttering that happens when there's a lot happening in the game and the game is calculating.


FLAWLESS A film review by Steve Rhodes Copyright 1999 Steve Rhodes RATING (0 TO ****): * 1/2
FLAWLESS certainly isn't.
More aptly titled DOA, were that name not already taken, FLAWLESS is an unappealing mess of a movie. Written and directed by Joel Schumacher, whose last film was the sleazy 8MM, the movie has tonal problems from its gangster beginning to its madcap mayhem ending.
No matter what it tries, it rarely succeeds. Best described as a comedic tragedy, the movie ladles on lots of attempted humor. It is the sort of movie that has one person -- in our audience it was the same one person -- laughing loudly and frequently, as the rest of the viewers watch stoically.
 Besides the tens of thousands of dollars for the sex change operation itself, he also requires $28,000 for "extensive psychological testing" before the operation.
"I'm lonely; I'm ugly; I'm a drag queen," Rusty concisely summarizes his view of his life. Although he tries to act tough ("I left sensitivity back in the sand pile"), he lets himself get pushed around. Walt begrudgingly comes to Rusty to get singing lessons as a form of speech therapy. De Niro, turning in one of his most uninteresting performances ever, accurately portrays the speech patterns of his character but forgets to give him any life. The entire movie features labored acting whose presentation has the dullness of an old knife.
Although Daniel Orlandi's costumes are colorful, Declan Quinn destroys their effect with his grim and ugly cinematography -- more of the film's tonal problems. Schumacher, who also gave us the abysmal BATMAN & ROBIN, can't seem to make up his mind whether he wants to make LA CAGE AUX FOLLES or SEVEN.
There are also subplots about the search for a mobster's missing money and about Walt's search for unpaid female companionship. None of this makes any difference because Schumacher's narrative, or lack thereof, can't sustain the viewer's interest. There is no genuine chemistry between the two leads, and the movie never comes close to jelling.
FLAWLESS runs 1:50. It is rated R for pervasive language and strong violence and would be acceptable for older teenagers.
Email<EMAIL_ADDRESS>Web: http://www.InternetReviews.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


volt_distr is a ROS package for recording and visualizing voltage distributions. The package consists of one node and two helper classes.
List of nodes:
This node receives dish states from a receiver node and then maintains a voltage histogram for each channel. It then will save this data as a CSV file and/or an image.
$ rosrun volt_distr volt_distr
Subscribes to:
Publishes to:
Reads the following parameters from the parameter server
Sets the following parameters on the parameter server


Friday, March 27st @ 8pm at Koerner Plaza (in front of Koerner Library)
bikerave (\bahykreyv\): boisterous conglomeration
def'n: badass swippersnappers gettin' their grunge hipster on to heavy bass, neon lights, and fast bikes.

Thought up in the dark corners of first year residence, the BikeRave is back this year with more bikes, louder jams, and brighter colours.
Fact: biking is radical.
Fact: raves are radical.
Fact: you are radical, and we don't want the radical you to be hurt.
Please wear a helmet, bring water to stay hydrated, and ride at a slow pace, paying mind to other bikers around you!
Please arrive by 8pm.
You will have ~30 minutes to decorate with free glowsticks and shinys at Koerner Plaza.
Look for t-shirts, glowsticks, prizes, and refreshments.
Then at 8:30pm, we will unleash the kraken and begin biking!
Apply to be a volunteer and you may get a sweet shirt!
Other inquiries (including partnerships<EMAIL_ADDRESS>or<PHONE_NUMBER>.


The Pig game is simple to learn as the rules are simple to explain.
First the game is for two players.  The result of each roll is added to his/her ROUND score.
If the player rolls a 1 he loses ROUND score and the turn passes to the next player
Additionally, if a player rolls a double six, he/she loses both his round and Global score.
The player can choose to 'Hold', which means that his ROUND score gets added to his "Global" score. After that, it's the next player's turn
The first player to reach 100 points in their "Global" score wins the game.


UNIVERSITY FEEDBACK SYSTEM
Student Feedback
menu
Back
Log Out
Back
Log Out
SELECT A SECTION
lab1
lab2


See: Description
| Interface | Description |
|---|---|
| DynamicPolicy |
Interface implemented by security policy providers that may support dynamic
granting of permissions at run-time.
|
| SecurityContextSource |
Interface that a security manager or policy provider can optionally
implement in order to support the saving and restoring of custom security
context state.
|
| Class | Description |
|---|---|
| DynamicPolicyProvider |
Security policy provider that supports dynamic granting of permissions at
run-time.
|
| PolicyFileProvider |
Security policy provider that wraps the J2SE(TM) default
"PolicyFile" security policy provider distributed as part of the
Java(TM) 2 Platform, Standard Edition.
|
| UmbrellaGrantPermission |
Permission that is specially intepreted by
PolicyFileProvider as
shorthand for a GrantPermission
covering all permissions authorized to a given protection domain. |
| Exception | Description |
|---|---|
| PolicyInitializationException |
Exception indicating failed initialization of a security policy provider.
|
The DynamicPolicy
interface is
implemented by security policy providers that may support dynamic granting of
permissions at run-time. One such provider is DynamicPolicyProvider
, which layers
dynamic grant functionality on top of a "static" security policy provider (that
is, one incapable of dynamic permission grants itself).
The default static security policy used by DynamicPolicyProvider
is PolicyFileProvider
: a policy implementation
that wraps the J2SE(TM) default
"PolicyFile" security policy provider distributed as part of the Java(TM) 2
Platform, Standard Edition. PolicyFileProvider
augments the
J2SE default policy provider with convenience constructors as well as support
for a special-cased permission,
UmbrellaGrantPermission
, which signifies a
GrantPermission
for all permissions authorized to a
given protection domain.
The SecurityContextSource
interface is
intended to be implemented by security managers and policy providers whose
security contexts include state in addition to that provided by
AccessControlContext
.
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.


This application shows an example on the use of WebRTC Data Channels with Kurento. The Media Pipeline is composed by a PlayerEndpoint which feeds media a KmsSendData. This Media Element is a test element aimed to show the capabilities of Kurento Media Server for Data Channels. Internally it is composed by a ZBarFilter, which is another Media Element that detects Bar/QR codes in a media stream. This information is sent as WebRTC Data Channel Metadata by KmsSendData to the last element of the pipeline, i.e. a WebRtcEndpoint. In the client side the WebRtcPeer is setup in receive-only mode, and the received data is shown in the GUI. To run this demo follow these steps:


Initialize.css is a complete collection of CSS best practices based on Normalize.css and HTML5 Boilerplate. It's customizable with predefined and optional properties. Configuring Initialize.css reduces the amount of CSS selectors you need for initializing your project.
Install
npm
npm install initialize-css
bower
bower install initialize-css
Usage
sass / scss (from node_modules or bower_components)
@import "module_folder_name/initialize-css/dist/initialize";
sass with browserify
@import "initialize";
or just copy the generated css files (with vendor prefixes)
<link rel="stylesheet" href="styles/initialize.min.css">
Configure
Overwrite default values for generic typography:
$initialize-box-sizing: border-box; $initialize-font-family: sans-serif; $initialize-font-size: 1em; $initialize-line-height: 1.4;
Microsoft dropped support for IE8, IE9 & IE10. If you still have to support these old dinosaur browsers, just set dinosaur mode to true.
$initialize-dinosaur-mode: true;
Optional values:
$initialize-color: #000; $initialize-block-margins: 0 0 0.75em; $initialize-heading-color: #000; $initialize-heading-font-family: sans-serif; $initialize-heading-margins: 1em 0 0.75em; $initialize-print-styles: true;


The goal in this session is to create a Groovy application from scratch using Gradle on your own. This will help you to gain confidence in creating a small app based on the exercises that we have done already. In addition, this session is going to introduce a few concepts that we are going to explain in more detail in sprint 2.
So do not expect step by step instructions on what to do, as the steps that are required have already been introduced in previous lab sessions. That is feel free to reuse parts of code used in previous sessions.
Let's get started...
Create a Gradle project from STS (Eclipse IDE) and configure a Groovy application Gradle_ex3
which runs with the following command:
gradle -q run
Copy the file uk-500.csv under the project root folder. This file contains free sample data for testing, taken from here: * Names are random, constructed from real first and last names. Company names are real, but are randomized along with street addresses and do not represent actual locations. * City, County, State/Province, and ZIP/Postal are correct for each record. * Phone and fax numbers are random, but the area code and exchange for each are correct for their location. * Email and Web addresses are fake but properly formatted for their country. * Records are in random order and cover the countries with a more or less even distribution.
Desk check that your application runs. The smoke test could print Hello World!
on the output console, for example.
Develop a small Groovy application that runs with the following command:
gradle -q run -Pargs="last_name first_name"
For example: gradle -q run -Pargs="Tomkiewicz Aleshia"
The app will read the CSV file using the class File
. See this
For the line containing the last_name
and the first_name
given as arguments, you should insert all of its field names and values as entries in a map called model
. Feel free to use the methods String.split() and String.replaceAll(). That is, for the arguments last_name=Tomkiewicz
and first_name=Aleshia
, your model map must be filled with the following entries:
first_name=Aleshia
last_name=Tomkiewicz
company_name=Alan D Rosenburg Cpa Pc
address=14 Taylor St
city=St. Stephens Ward
county=Kent
postal=CT2 7PP
phone1=01835-703597
phone2=01944-369967
<EMAIL_ADDRESS>web=http://www.alandrosenburgcpapc.co.uk
Render the information in the model map using an HTML table like this one:
| field | value |
|---|---|
| first_name | Aleshia |
| last_name | Tomkiewicz |
| company_name | Alan D Rosenburg Cpa Pc |
| address | 14 Taylor St |
| city | St. Stephens Ward |
| county | Kent |
| postal | CT2 7PP |
| phone1 | 01835-703597 |
| phone2 | 01944-369967 |
|<EMAIL_ADDRESS>| |
| web | http://www.alandrosenburgcpapc.co.uk |
Open the file table.html, which contains the HTML code for the example above, as text in order to see which columns should be edited by your script. See
def text = """
...some multi-line text here
"""
def f = new File("./table.html")
f << text
Run your application from command line and check that the generated file can be rendered in a browser correctly. You should be able to open it in a browser as an HTML page.
If the last_name
and first_name
do not match any user, a message User $first_name $last_name could not be found.
on the output console.
Run your application using ./gradlew -q run -Pargs="Spinello Charisse"
.
From now on we will use the Gradle Wrapper to execute apps and we will use Gradle to import projects.
Submit via Blackboard here (section Assessment and Feedback > Lab sessions submissions
).
The submission procedure is as follows:
readme.md
with the usernames of the members under the root folder of the project. For example:members:
ab123
zyx987
Regarding assessment: It does not matter if your solution is only partially correct, what matters is to participate and attempt the exercises. Feel free to finish them at home!
Your solutions will be checked at random to ensure that your attempt is a genuine one and different from the solution provided. If a submission is found to be highly similar to the model answer released at the end of the session, the corresponding student will get a plagiarism penalty, involving a zero mark in the effort component of the whole module, and a further reduction in the overall mark of the module (and depending on the offence, of the degree classification).
As soon as you manage to get your web page rendered with the correct answer, register your solution in this form.
Qualification criteria:
© Artur Boronat, 2018


Header 1
Hello there, awesome person!
Zerohedge
The Verge
NationalNewswatch
Zerohedge
The Verge
NationalNewswatch


{% load i18n %} {% load url from future %}
It is being built & used by the Open Contracting Data Standards project.
This site is in BETA. Expect things to be slightly strange and to change!
{{ package_count }} {% trans "datasets and counting!" %}
{% trans "Know of any datasets not listed here? Add them now! It's quick and easy." %}
{% trans "Or add a grid comparing the features of datasets." %}
{{ potw.description }}
{{ gotw.description }}
{% trans "Packages" %}: {{ gotw.gridpackage_set.count }}, {% trans "Features" %}: {{ gotw.feature_set.count }}


--- author: Colene Chow categories: app date: '2012-02-20 22:49:41' permalink: /2012/02/20/where-to-find-us-in-feb-march/ slug: where-to-find-us-in-feb-march status: publish title: Where to find us in Feb + March type: post format: html tags: - News - Event ---
In between working hard on Phonegap, we're hitting up some events and showing our support to the community too. Here's where you can find us:
Mobile World Congress (Barcelona) - Feb 26-Mar 1 Andre Charland, Dave Johnson, and Colene Chow will be at the Adobe booth representing PhoneGap. You can also catch Andre and Dave in the Developer theatre giving talks on PhoneGap.
*FITC (Amsterdam) * - Feb 27-28 Jesse MacFadyen will be speaking on "Mobile Development with PhoneGap". He'll cover how you can bring your web development skills to mobile application development, including a talk on PhoneGap Build.
SXSW (Austin) - March 9-13 PhoneGap will be part of Adobe's day-long Creative Camp on March 12. Read more about the sessions.
*Cloudstock *(SF) - March 15 PhoneGap is proud to sponsor Cloudstock, a 1-day cloud developer event running in parallel with Cloudforce. Brian LeRoux will be presenting on PhoneGap and you can also find us in the DevZone.
Facebook Mobile Hack Steve Gill will be talking about the PhoneGap Facebook plugin in various cities: Tel Aviv, Mar 12 Singapore, Mar 19 Hong Kong, Mar 22 Seoul, Mar 27 Tokyo, Mar 29 We'll post more details soon but if you're interested in meeting up with Steve, send him a message on Twitter: @stevesgill.
Check our events calendar to see more events and tweet us @phonegap if you want to meet up!


Responsive Web Design
From mobile browsers to netbooks and tablets, users are visiting your sites from an increasing array of devices and browsers. Are your designs ready? Learn how to think beyond the desktop and craft beautiful designs that anticipate and respond to your users’ needs.
Ethan Marcotte will explore CSS techniques and design principles, including fluid grids, flexible images, and media queries, demonstrating how you can deliver a quality experience to your users no matter how large (or small) their display.
Additional Information
- Author: Ethan Marcotte
- Pages: 143
- ISBN: 978-0-9844425-7-7


County board payout to Kegworth survivor who was refused match entry
by Connla YoungThe GAA in Co Antrim has agreed to pay compensation to a man disabled in the Kegworth air disaster after he was refused entry to last month’s senior football final.
Toome man Stephen McCoy uses a wheelchair after being seriously injured in the 1989 air accident, when aged 16.
The undisclosed figure will now be divided between a homeless charity, helping to pay for someone to travel to Lourdes and Cargin GAA club in Co Antrim.
A former boxing champion, Mr McCoy’s injuries were so bad he did not regain consciousness for 18 months and spent three years in hospital.
Subscribe to our most read headlines in the evening newsletter
There was controversy after it emerged that the 47-year-old was denied access to the Antrim senior football final between Cargin and Lamh Dhearg at Corrigan Park in west Belfast last month.
Mr McCoy had attended the Antrim showpiece with his brother when the pair were denied entry to the ground.
Antrim County Board chairman Ciarán McCavana later apologised and said that “new volunteers were manning the gate and were told to adhere to Belfast city council rule of no car access after 2pm”.
The Toome man was present at Corrigan Park when the two sides met in a drawn game the previous week.
Kicking Out: Disabled fans being let down by GAA
There was an outpouring of sympathy for Mr McCoy, whose family is well known and respected in Co Antrim, after details of the incident emerged.
His solicitor Joe Rice, of John J Rice and Co, wrote to Mr McCavana threatening legal action last week.
It has now emerged that Antrim County Board has agreed to pay compensation to Mr McCoy and last night reiterated its apology.
Mr McCavana said: “We take this opportunity to again apologise to Stephen and are pleased to make a compensatory gesture to charities of Stephen’s choice.
“We are pleased that this matter has resolved to Stephen’s satisfaction.”
Mr McCoy’s sister Yvonne, who cares for her brother, said her family is still upset by the incident.
“We are still very cross about the way Stephen was treated,” she said.
“No person, never mind a disabled person, should be treated like that again.
“That’s why we are doing this, that no disabled person will go through that again.”
Ms McCoy added that “it was never about the money” and said the cash will be given to good causes.
“It is going to be split between a homeless charity, Cargin club and Down and Conor Diocese to take someone who can’t afford to go to Lourdes,” she said.
“Cargin and Lourdes are the two loves of his life,” she added.
Mr Rice said: “I welcome the change of heart on behalf of Antrim County Board and the deal that follows from it.
“This was never about money from Stephen’s point of view and now the county board has realised that no disabled person should be put in that position again.”


See the full set of material design icons at the material icons library.Material design system icons are simple, modern, friendly, and sometimes quirky. Each icon is created using our design guidelines to depict in simple and minimal forms the universal concepts used commonly throughout a UI. Ensuring readability and clarity at both large and small sizes, these icons have been optimized for beautiful display on all common platforms and display resolutions.
Example:

home



security



comment


Sizes:




Colors:




See the full set of uikit iconsThis component is using the fantastic Font Awesome icon font, a project by Dave Gandy. Altogether Font Awesome provides more than 300 symbols and glyphs for web-related actions. Icon fonts are great, because they enable you to easily change color, size and more via CSS. They are scalable vector graphics, which means that they look great on high-resolution displays.
Example:

Sizes:

Spin modifier:


This page is intending to display how Events are written in this framework and the ways
of how to use them inside components and controllers.
In Cardinal framework usage of events is encouraged in order to pass data or trigger actions from view to
controllers and vice-versa.
All implementations should respect the bubbling
and capturing principles (external link) .
Cardinal events are wrapped native custom events. The wrapping was necessary for a better handling of events
with the same name and to avoid unwanted conflicts. Each event has a method called
getEventType() which is returning the event type. The event type is different from event name and
it should be carefully chosen in the development process.
In pure native custom events, data is passed through the detail property. As a convention,
cardinal events are storing the data on data property. The following code snippet is an example of
cardinal event.
import {EVENTS_TYPES} from "../utils/constants";
const EVENT_TYPE = EVENTS_TYPES.PSK_BUTTON_EVT;
export default class PskButtonEvent extends CustomEvent {
public data: any;
public getEventType = function() {
return EVENT_TYPE;
};
constructor(eventName: string, eventData: any, eventOptions: EventInit) {
super(eventName, eventOptions);
this.data = eventData;
}
}
For using an event, it should be instantiated with the following parameters:
eventName - requiredeventData - optionaleventOptions - optional
The default event options are:
bubbles:falsecomposed:falsecancelable:false
The event is dispatched using elem.dispatchEvent(event) to the specified target. In the following code snippet PskButtonEvent is used in psk-button to trigger an event.
let pskButtonEvent = new PskButtonEvent(this.eventName, this.eventData, {
bubbles: true,
composed: true,
cancelable: true
});
let eventDispatcherElement = this.htmlElement;
if (this.eventDispatcher) {
if (ACCEPTED_DEFAULT_DISPATCHERS.indexOf(window[this.eventDispatcher]) !== -1) {
eventDispatcherElement = window[this.eventDispatcher];
}
}
eventDispatcherElement.dispatchEvent(pskButtonEvent);
In controllers, usually, the event target is the HTMLElement parameter of the constructor.
In most of the cases it will be used to listen for bubbling events. If a capturing approach is needed,
the event target should just add {capture:true} or true as an option to
addEventListener() method.
element.addEventListener("needRoutes", this._provideConfig("routes"));
element.addEventListener("needMenuItems", this._provideConfig("menu"));
element.addEventListener("getUserInfo", this._provideConfig("profile"));
Event name | Responsible controller | Used In
needRoutes | DefaultApplicationController | psk-app-root
needMenuItems | DefaultApplicationController | app-menu
getUserInfo | DefaultApplicationController | psk-user-profile
validateUrl | DefaultApplicationController | webc-link
Check the Controllers documentation page for controller.on.
Check the Controllers documentation page for controller.off.
Check the Controllers documentation page for controller.send.
In the following diagram there are exposed 2 nested components: child-component and
host-component.
The controller of the child-component is handling only the events named event-name-1. In this case,
the event event-name-2 will be bubbled to the host-controller. Please note that,
the events are considered to have the composed flag in order to pass from the child-component shadow DOM to the host-component.
For our example we thought at a small app that has 2 buttons:
Add fruit - it adds a fruit in the view.
Change fruit provider - it is a toggle button that adds/removes the event listener for the event sent by Add fruit button
Those buttons are wrapped in a container that can handle their events. The container is wrapped in another container (parent container)
that can handle giveMeAFruit event.
Add Fruit
Toggle fruit provider
Add Fruit
Change fruit provider


Unit 5: Assignment
Step by Step Instructions to Create a New Webpage on the Production Server
-
Clone your repository
-
Go into your folder and create a new file (gedit 'filename.html'
-
Edit the file and save it
-
In Terminal, create a new file by using css (gedit 'filename'.css)
-
Edi the file and save it
-
Run the python on Terminal and open the website (localhost:8000)
-
Validate it (https://validator.w3.org/)
-
Go back and fix the errors, starting from the top rows
-
In Terminal, get into Mr.Keiffer's computer by running the sftp (stfp student1234@cmis-hsteacher)
-
Get into public html folder (cd public_html) and put the file into it. (put 'filename')
Useful Websites


| Proudmoore Admiralty | ??? | ??? |
| Tortollan Seekers | ??? | ??? |
| Golden Lotus | ??? | ??? |
| The August Celestials | ??? | ??? |
| Baradin's Wardens | ??? | ??? |
| Guardians of Hyjal | ??? | ??? |
| Ramkahen | ??? | ??? |
| The Earthen Ring | ??? | ??? |
| Wildhammer Clan | ??? | ??? |
| Argent Crusade | ??? | ??? |
| Kirin Tor | ??? | ??? |
| Knights of the Ebon Blade | ??? | ??? |
| The Kalu'ak | ??? | ??? |
| The Wyrmrest Accord | ??? | ??? |
| Explorers' League | ??? | ??? |
| The Silver Covenant | ??? | ??? |
| Valiance Expedition | ??? | ??? |
| Cenarion Expedition | ??? | ??? |
| Honor Hold | ??? | ??? |
| Keepers of Time | ??? | ??? |
| The Consortium | ??? | ??? |
| Lower City | ??? | ??? |
| Shattered Sun Offensive | ??? | ??? |
| The Aldor | ??? | ??? |
| The Scryers | ??? | ??? |
| The Sha'tar | ??? | ??? |
| Argent Dawn | ??? | ??? |
| Bloodsail Buccaneers | ??? | ??? |
| Cenarion Circle | ??? | ??? |
| Darkmoon Faire | Exalted | Darkmoon Island Quests |
| Hydraxian Waterlords | ??? | Burning Steppes, Silithus |
| Ravenholdt | ??? | Stromgarde Keep in Arathi Highlands |
| Thorium Brotherhood | ??? | ??? |
| Zandalar Tribe | ??? | ??? |
| Darnassus | Exalted |
|
| Exodar | Exalted | Dungeons with [Exodar Tabard] |
| Gilneas | Exalted | Dungeons with [Gilneas Tabard] |
| Gnomeregan | Exalted | Dungeons with [Gnomeregan Tabard] |
| Ironforge | Exalted |
|
| Stormwind | Exalted |
|
| Tushui Pandaren | Exalted | Dungeons with [Tushui Tabard] |
| Silverwing Sentinels | Exalted | Warsong Gulch Battleground |
| Stormpike Guard | Exalted | Alterac Valley Battleground |
| The League of Arathor | Exalted | Arathi Basin Battleground |
| Wrynn's Vanguard | Exalted | Ashran Battleground |
| Booty Bay | Exalted | Fray Island in Northern Barrens |
| Everlook | Exalted | Fray Island in Northern Barrens |
| Gadgetzan | Exalted | Fray Island in Northern Barrens |
| Ratchet | Exalted | Fray Island in Northern Barrens |
| Syndicate | ??? | ??? |
| Wintersaber Trainers | ??? | ??? |