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".
!ls -al /input
data_dir = '/input'
# 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)
"""
real_inputs = tf.placeholder(
tf.float32,
(None, image_height, image_width, image_channels),
name='real_inputs'
)
z_inputs = tf.placeholder(tf.float32, (None, z_dim), name='z_inputs')
lrate = tf.placeholder(tf.float32, name='lrate')
return real_inputs, z_inputs, lrate
"""
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 variables 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 discriminator, tensor logits of the discriminator).
def discriminator(images, reuse=False, alpha=0.1, kernel=5, filters=64):
"""
Create the discriminator network
:param images: 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)
"""
# Input layer is 28x28x3
with tf.variable_scope('discriminator', reuse=reuse):
x1 = tf.layers.conv2d(
images, filters, kernel, strides=2, padding='same',
kernel_initializer=tf.contrib.layers.xavier_initializer())
relu1 = tf.maximum(alpha * x1, x1)
# 14x14x64
x2 = tf.layers.conv2d(
x1, filters*2, kernel, strides=2, padding='same',
kernel_initializer=tf.contrib.layers.xavier_initializer())
bn2 = tf.layers.batch_normalization(x2, training=True)
relu2 = tf.maximum(alpha * bn2, bn2)
# 7x7x128
x3 = tf.layers.conv2d(
x2, filters*4, kernel, strides=1, padding='same',
kernel_initializer=tf.contrib.layers.xavier_initializer())
bn3 = tf.layers.batch_normalization(x3, training=True)
relu3 = tf.maximum(alpha * bn3, bn3)
flat = tf.reshape(relu3, (-1, 7*7*filters*4))
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 variables in the neural network. Use tf.variable_scope
with a scope name of "generator" to allow the variables to be reused. The function should return the generated 28 x 28 x out_channel_dim
images.
def generator(z, out_channel_dim, is_train=True, alpha=0.1, kernel=5):
"""
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):
x1 = tf.layers.dense(z, 7*7*512)
x1 = tf.reshape(x1, (-1, 7, 7, 512))
x1 = tf.layers.batch_normalization(x1, training=is_train)
x1 = tf.maximum(alpha * x1, x1)
# 7x7x512
x2 = tf.layers.conv2d_transpose(
x1, 256, kernel, strides=2, padding='same',
kernel_initializer=tf.contrib.layers.xavier_initializer())
x2 = tf.layers.batch_normalization(x2, training=is_train)
x2 = tf.maximum(alpha * x2, x2)
# 14x14x256
x3 = tf.layers.conv2d_transpose(
x2, 128, kernel, strides=2, padding='same',
kernel_initializer=tf.contrib.layers.xavier_initializer())
x3 = tf.layers.batch_normalization(x3, training=is_train)
x3 = tf.maximum(alpha * x3, x3)
# 14x14x128
logits = tf.layers.conv2d_transpose(
x3, out_channel_dim, kernel, strides=1, padding='same',
kernel_initializer=tf.contrib.layers.xavier_initializer())
# 28x28x3
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):
"""
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)
"""
gen_model = generator(input_z, out_channel_dim)
d_model_real, d_logits_real = discriminator(input_real)
d_model_fake, d_logits_fake = discriminator(gen_model, reuse=True)
ones_like_real = tf.ones_like(d_model_real)
one_sided_smooth_labels = tf.multiply(
ones_like_real,
tf.random_uniform((1,), minval=0.8, maxval=1.)
)
d_loss_real = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(
logits=d_logits_real, labels=one_sided_smooth_labels
)
)
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)
"""
# 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")
"""
steps=0
# TODO: Build Model
image_channels = 3 if data_image_mode == 'RGB' else 1
image_height, image_width = data_shape[1], data_shape[2]
real_inputs, z_inputs, lrate = model_inputs(
image_width, image_height, image_channels, z_dim)
d_loss, g_loss = model_loss(real_inputs, z_inputs, image_channels)
d_opt, g_opt = model_opt(d_loss, g_loss, lrate, beta1)
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
for epoch_i in range(epoch_count):
for batch_images in get_batches(batch_size):
steps += 1
batch_images = 2 * batch_images
batch_z = np.random.uniform(-1 ,1, size=(batch_size, z_dim))
_ = sess.run(d_opt, feed_dict={
real_inputs: batch_images,
z_inputs: batch_z,
lrate: learning_rate
})
# Double the number of trains to generator
_ = sess.run(g_opt, feed_dict={
z_inputs: batch_z,
real_inputs: batch_images,
lrate: learning_rate
})
if steps % 10 == 0:
# At the end of every 10 epochs, get the losses and print them out
train_loss_d = d_loss.eval({z_inputs: batch_z, real_inputs: batch_images})
train_loss_g = g_loss.eval({z_inputs: batch_z})
print("Epoch {}/{}...".format(epoch_i+1, epochs),
"Discriminator Loss: {:.4f}...".format(train_loss_d),
"Generator Loss: {:.4f}".format(train_loss_g),
"Sum Loss: {:.4f}".format(train_loss_g+train_loss_d))
if steps % 100 == 0:
show_generator_output(
sess,
25,
z_inputs,
image_channels,
data_image_mode
)
show_generator_output(sess, 25, z_inputs, image_channels, 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.5
tf.reset_default_graph()
"""
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.5
tf.reset_default_graph()
"""
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.


1 What is Sustainable Mobility Accords (SuMA)
Please find these details here
2 What are the objectives of SuMA?
Please find these details here
3 Who will be the primary applicant?
Any community, represented by community organizations/resident welfare associations (RWAs) which are a society/trust/foundation registered under the relevant acts and rules like KARNATAKA SOCIETIES REGISTRATION ACT, 1960 etc. or a Section 8 company under the COMPANIES ACT, 2013 and in existence for at least last three years, is eligible to enter into SuMA.
However, the above-mentioned organizations can also apply as a consortium with other organizations within or outside the community.
The Applicant should not have any religious or political affiliation and must represent the interest of the neighbourhood and the community residing within the neighbourhood.
4 Our RWA consists of less than 1000 households. Is it possible to still apply?
You can collaborate with the neighbouring RWA and get them on board to cover some part of their jurisdiction as well to cover 1000 households. The 1000 households is an indicative number to ensure that the area chosen is not too small. Anywhere between 750-1000 households could be taken into consideration as long as the other elements mentioned are included in this area (commercial/retail street, places of interest such as the parks, lakes etc).
5 During COVID how do we get signatures from residents for testimonials?
We urge everyone to take utmost precautions while collecting testimonials if doing a door to door collection of signatures for testimonials. Wear a mask at all times and sanitize yourself properly. However, we understand that it might be difficult to do a door to door collection of signatures and hence we would be okay with testimonials collected by email or SMS/Whatsapp from residents of the area chosen for this project
6 Can we submit the application in another format by emailing it instead of filling the forms?
We would like all applicants to apply through the online portal as much as possible. If the applicants are unable to do so, they could also submit their applications by email. However, please ensure that you send the information in the prescribed format.
7 How do we get other government bodies on board for implementation?
The SuMA task force will consist of other government department officials such as BBMP, BTP, BMRCL, BMTC and other departments depending on the kind of projects that the 10 applicants come up with. DULT will act as the nodal agency to ensure all the permissions for the projects that come out through this project can be properly coordinated and implemented.
The entity which signs the accord, however, is expected to do the groundwork and not just suggest ideas. This project is not to allocate work to the government, but it is for communities to stay involved through the implementation period to ensure that the results are in line with the vision drawn by the neighbourhood. We would urge the communities to have a good base of volunteers and staff the team with people who have the patience to see it through.
8 What are the criteria that the SuMA task force will be looking at to shortlist 10 applications?
DULT will be providing 50 green shoots for the following criteria:
Mobility related
9 Do we have to mention what projects we will be doing in the application?
At the application stage the criteria mentioned in point 8 above will be considered for eligibility into being shortlisted amongst the final 10 applicants. Projects will be identified by the communities based on their vision for their neighbourhood and this will be only after the shortlisting of the communities is completed.


This tool is provided as an example and is available on an As-Is basis. You must assume all the risks and costs associated with the use of the sample tool, including, without limitation, any damage to any equipment, software, information or data. In addition, we are not obligated to provide any maintenance, technical or other support for the sample tool. In order to improve our products, we may at any time, and without warning, change the design, presentation, or functionality of the software.
Click on a vehicle on the map and select Display HOS data from the menu. This will give you a summary of data related to HOS and DVIR.


Documentation:
Will list all members of the course, pulled from DB using Course ID and student ID
Submissions
View Students
Messages
12
Expressions


Team CSI Mihir MavalankarPresident Mit VachhaniVice President Naisargi JoshiManaging Director Milind BachaniGeneral Secretary Soham PatelTreasurer And Organising Head Drashti DobariyaJoint Secretary Nishi MehtaJoint Treasurer Pratik DhumalTechnical Head Gaurang VyasTechnical Head Khushbu MaliwalTechnical Executive Nikita ManwaniDesigning and Creative Head Rohan GargSenior Head Anushka TakMarketing Head and PRO


Local Weather App
See your local weather displayed beautifully using Bootstrap!
Current Location
Current Temperature
Fahrenheit


Answer: https://github.com/
Answer: https://github.com/saltastro/saao_git_tutorial
Answer: Git is distributed, supplies a full copy of the repository, is faster


#include <dr_events.h>
Data Fields | |
| int | sig |
| void * | drcontext |
| dr_mcontext_t * | mcontext |
| dr_mcontext_t * | raw_mcontext |
| bool | raw_mcontext_valid |
| byte * | access_address |
| bool | blocked |
| dr_fault_fragment_info_t | fault_fragment_info |
Data structure passed with a signal event. Contains the machine context at the signal interruption point and other signal information.
For SIGBUS and SIGSEGV, the address whose access caused the signal to be raised (as calculated by DR).
Indicates this signal is blocked. DR_SIGNAL_BYPASS is not allowed, and a second event will be sent if the signal is later delivered to the application. Events are only sent for blocked non-delayable signals, not for delayable signals.
| void* _dr_siginfo_t::drcontext |
The context of the thread receiving the signal.
Information about the code fragment inside the code cache at the signal interruption point.
The application machine state at the signal interruption point. The client should not change mcontext.flags:
it should remain DR_MC_ALL.
The raw pre-translated machine state at the signal interruption point inside the code cache. NULL for delayable signals. Clients are cautioned when examining code cache instructions to not rely on any details of code inserted other than their own. The client should not change mcontext.flags:
it should remain DR_MC_ALL.
Whether raw_mcontext is valid.
The signal number.


See: Description
| Interface | Description |
|---|---|
| Env.Binder |
Interface for performing custom binding of values to the environment
|
| MultiPatternMatcher.NodePatternTrigger<T> |
A function which returns a collections of patterns that may match when
given a single node from a larger sequence.
|
| MultiPatternMatcher.SequencePatternTrigger<T> |
A function which returns a collections of patterns that may match when
a sequence of nodes.
|
| NodePatternTransformer<T1,T2> |
Interface to transform a node pattern from a
NodePattern<T1> into a
NodePattern <T2> . |
| PhraseTable.WordList | |
| SequenceMatchAction<T> |
Performs action on a sequence
|
| SequenceMatcher.MatchReplacement<T> |
Interface that specifies what to replace a matched pattern with
|
| SequenceMatchResult<T> |
The result of a match against a sequence.
|
| SequenceMatchRules.ExtractRule<I,O> |
Interface for a rule that extracts a list of matched items from a input
|
| SequenceMatchRules.Rule |
A sequence match rule
|
| SequencePattern.NodesMatchChecker<T> | |
| SequencePattern.Parser<T> |
| Class | Description |
|---|---|
| BasicSequenceMatchResult<T> |
Basic results for a Sequence Match
|
| BasicSequenceMatchResult.MatchedGroup | |
| ComplexNodePattern<M,K> |
Pattern for matching a complex data structure
|
| ComplexNodePattern.AbstractStringAnnotationPattern | |
| ComplexNodePattern.AttributesEqualMatchChecker<K> | |
| ComplexNodePattern.IntegerAnnotationPattern | |
| ComplexNodePattern.NilAnnotationPattern | |
| ComplexNodePattern.NotNilAnnotationPattern | |
| ComplexNodePattern.NumericAnnotationPattern | |
| ComplexNodePattern.SequenceRegexPattern<T> | |
| ComplexNodePattern.StringAnnotationPattern | |
| ComplexNodePattern.StringAnnotationRegexPattern | |
| ComplexNodePattern.StringInSetAnnotationPattern | |
| CoreMapExpressionExtractor<T extends MatchedExpression> |
Represents a list of assignment and extraction rules over sequence patterns.
|
| CoreMapExpressionExtractor.Stage<T> |
Describes one stage of extraction.
|
| CoreMapExpressionNodePattern |
Pattern for matching a CoreMap using a generic expression
|
| CoreMapNodePattern |
Pattern for matching a CoreMap
|
| CoreMapNodePattern.AttributesEqualMatchChecker<K> | |
| CoreMapNodePatternTrigger |
Trigger for CoreMap Node Patterns.
|
| CoreMapSequenceMatchAction<T extends CoreMap> |
Performs a action on a matched sequence
|
| CoreMapSequenceMatchAction.AnnotateAction<T extends CoreMap> | |
| CoreMapSequenceMatchAction.MergeAction | |
| CoreMapSequenceMatcher<T extends CoreMap> |
CoreMap Sequence Matcher for regular expressions for sequences over coremaps
|
| CoreMapSequenceMatcher.BasicCoreMapSequenceMatcher | |
| Env |
Holds environment variables to be used for compiling string into a pattern.
|
| EnvLookup |
Provides lookup functions using an Env
|
| MatchedExpression |
Matched Expression represents a chunk of text that was matched from an original segment of text).
|
| MatchedExpression.SingleAnnotationExtractor |
Function that takes a CoreMap, applies a extraction function to it, to get a value
Also contains information on how to construct a final annotation.
|
| MultiCoreMapNodePattern |
Pattern for matching across multiple core maps.
|
| MultiCoreMapNodePattern.StringSequenceAnnotationPattern | |
| MultiNodePattern<T> |
Matches potentially multiple node (i.e does match across multiple tokens)
|
| MultiNodePattern.IntersectMultiNodePattern<T> | |
| MultiNodePattern.UnionMultiNodePattern<T> | |
| MultiPatternMatcher<T> |
Matcher that takes in multiple patterns
|
| MultiPatternMatcher.BasicSequencePatternTrigger<T> |
Simple SequencePatternTrigger that looks at each node, and identifies which
patterns may potentially match each node, and then aggregates (union)
all these patterns together.
|
| MultiWordStringMatcher |
Finds multi word strings in a piece of text
|
| MultiWordStringMatcher.LongestStringComparator | |
| NodePattern<T> |
Matches a Node (i.e a Token).
|
| NodePattern.AnyNodePattern<T> |
Matches any node
|
| NodePattern.ConjNodePattern<T> |
Given a list of patterns p1,...,pn, matches if all patterns p1,...,pn matches
|
| NodePattern.DisjNodePattern<T> |
Given a list of patterns p1,...,pn, matches if one of the patterns p1,...,pn matches
|
| NodePattern.EqualsNodePattern<T> |
Matches a constant value of type T using equals()
|
| NodePattern.NegateNodePattern<T> |
Given a node pattern p, a node x matches if p does not match x
|
| PhraseTable |
Table used to lookup multi-word phrases.
|
| PhraseTable.Phrase |
A phrase is a multiword expression
|
| PhraseTable.PhraseMatch |
Represents a matched phrase
|
| PhraseTable.PhraseStringCollection | |
| PhraseTable.StringList | |
| PhraseTable.TokenList | |
| SequenceMatchAction.BoundAction<T> | |
| SequenceMatchAction.BranchAction<T> | |
| SequenceMatchAction.NextMatchAction<T> | |
| SequenceMatchAction.SeriesAction<T> | |
| SequenceMatchAction.StartMatchAction<T> | |
| SequenceMatcher<T> |
A generic sequence matcher.
|
| SequenceMatcher.BasicMatchReplacement<T> |
Replacement item is a sequence of items
|
| SequenceMatcher.GroupMatchReplacement<T> |
Replacement item is a matched group specified with a group id
|
| SequenceMatcher.NamedGroupMatchReplacement<T> |
Replacement item is a matched group specified with a group name
|
| SequenceMatchResult.GroupToIntervalFunc<MR extends java.util.regex.MatchResult> | |
| SequenceMatchResult.MatchedGroupInfo<T> |
Information about a matched group
|
| SequenceMatchRules |
Rules for matching sequences using regular expressions
|
| SequenceMatchRules.AnnotationExtractRule<S,T extends MatchedExpression> |
Rule that specifies how to extract sequence of MatchedExpression from an annotation (CoreMap).
|
| SequenceMatchRules.AnnotationExtractRuleCreator | |
| SequenceMatchRules.AnnotationMatchedFilter | |
| SequenceMatchRules.AssignmentRule |
Rule that specifies what value to assign to a variable
|
| SequenceMatchRules.BasicSequenceExtractRule |
Extraction rule
Input is of type CoreMap, output is MatchedExpression
|
| SequenceMatchRules.CompositeExtractRuleCreator | |
| SequenceMatchRules.CoreMapExtractRule<T,O> |
Extraction rule to apply a extraction rule on a particular CoreMap field
Input is of type CoreMap, output is templated type O.
|
| SequenceMatchRules.CoreMapFunctionApplier<T,O> | |
| SequenceMatchRules.CoreMapToListExtractRule<O> |
Extraction rule that treats a single CoreMap as a list/sequence of CoreMaps
(convenience class, for use with BasicSequenceExtractRule)
Input is of type CoreMap, output is templated type O.
|
| SequenceMatchRules.CoreMapToListFunctionApplier<O> | |
| SequenceMatchRules.FilterExtractRule<I,O> |
Extraction rule that filters the input before passing it on to the next extractor
|
| SequenceMatchRules.ListExtractRule<I,O> |
Extraction rule that applies a list of rules in sequence and aggregates
all matches found
|
| SequenceMatchRules.MultiSequencePatternExtractRule<T,O> | |
| SequenceMatchRules.MultiTokenPatternExtractRuleCreator | |
| SequenceMatchRules.SequenceMatchedExpressionExtractor | |
| SequenceMatchRules.SequenceMatchResultExtractor<T> | |
| SequenceMatchRules.SequencePatternExtractRule<T,O> | |
| SequenceMatchRules.StringMatchedExpressionExtractor | |
| SequenceMatchRules.StringMatchResultExtractor | |
| SequenceMatchRules.StringPatternExtractRule<O> | |
| SequenceMatchRules.TextPatternExtractRuleCreator | |
| SequenceMatchRules.TokenPatternExtractRuleCreator | |
| SequencePattern<T> |
Generic Sequence Pattern for regular expressions.
|
| SequencePattern.AndPatternExpr | |
| SequencePattern.BackRefPatternExpr | |
| SequencePattern.GroupPatternExpr |
Expression that represents a group.
|
| SequencePattern.MultiNodePatternExpr |
Represents a pattern that can match multiple nodes.
|
| SequencePattern.NodePatternExpr |
Represents one element to be matched.
|
| SequencePattern.OrPatternExpr |
Expression that represents a disjunction.
|
| SequencePattern.PatternExpr |
Represents a sequence pattern expressions (before translating into NFA).
|
| SequencePattern.RepeatPatternExpr |
Expression that represents a pattern that repeats for a number of times.
|
| SequencePattern.SequenceEndPatternExpr | |
| SequencePattern.SequencePatternExpr | |
| SequencePattern.SequenceStartPatternExpr | |
| SequencePattern.SpecialNodePatternExpr |
Represents one element to be matched.
|
| SequencePattern.ValuePatternExpr | |
| TokenSequenceMatcher |
Token Sequence Matcher for regular expressions for sequences over tokens
|
| TokenSequencePattern |
Token Sequence Pattern for regular expressions over sequences of tokens (each represented as a
CoreMap ). |
| Enum | Description |
|---|---|
| MultiWordStringMatcher.MatchType |
if
matchType is EXCT : match exact string
if matchType is EXCTWS : match exact string, except whitespace can match multiple whitespaces
if matchType is LWS : match case insensitive string, except whitespace can match multiple whitespaces
if matchType is LNRM : disregards punctuation, does case insensitive match
if matchType is REGEX : interprets string as regex already |
| SequenceMatcher.FindType |
Type of search to perform
FIND_NONOVERLAPPING - Find nonoverlapping matches (default)
FIND_ALL - Find all potential matches
Greedy/reluctant quantifiers are not enforced
(perhaps should add syntax where some of them are enforced...)
|
edu.stanford.nlp.pipeline.TokensRegexAnnotator
and edu.stanford.nlp.pipeline.TokensRegexNERAnnotator
.
CoreMapExpressionExtractor
and SequenceMatchRules
describes
the language and how the extraction rules are created
At the core of TokensRegex are the
TokenSequenceMatcher
and
TokenSequencePattern
classes which
can be used to match patterns over a sequences of tokens.
The usage is designed to follow the paradigm of the Java regular expression library
java.util.regex
. The usage is similar except that matches are done
over List<CoreMap>
instead of over String
.
List<CoreLabel< tokens = ...;
TokenSequencePattern pattern = TokenSequencePattern.compile(...);
TokenSequenceMatcher matcher = pattern.getMatcher(tokens);
The classes SequenceMatcher
and SequencePattern
can be used to build
classes for recognizing regular expressions over sequences of arbitrary types
MultiPatternMatcher
provides utility functions for finding expressions with multiple patterns.
For instance, using MultiPatternMatcher.findNonOverlapping(java.util.List<? extends T>)
you can find all nonoverlapping subsequences for a given set of patterns.
To find character offsets of multiple word expressions in a String
,
can also use MultiWordStringMatcher.findTargetStringOffsets(java.lang.String, java.lang.String)
.


The Code Dictator
Get Coding!
Command Documentation
Chat Display
Transcript:
Perform spell check
Submit
Element Generation
Email Your Code
Send
Element Tree
Click to
view
validation issues
Click the
VALIDATE CODE
button below!
VALIDATE CODE


{% extends "cctbx/header.html" %} {% load static %} {% block content %}
Learn how to use the cctbx map manager. It lets you do some basic operations on maps. This tutorial shows how to read and save maps, change a map, convert a real-space map to a Fourier representation and back and manipulate maps that represent only a part of a full map. The tutorial also explains how to find and represent map reconstruction symmetry.
The cctbx map_manager lets you read and write MRC/CCP4 format map files, manipulate maps, and create new maps. In this section we will see how to create an example map, how to save the map as a file, how to read maps, change a map, and write a map out. The advanced section covers how to convert a real-space map to a Fourier representation and back and how this can be used to smooth a map. We will also see how to manipulate maps that represent only a part of a full map. We will also see how to find and represent map reconstruction symmetry.
First let’s start up python from cctbx so that python knows all about cctbx. Type the following command in a terminal:
libtbx.python
And let’s load in the DataManager:
from iotbx.data_manager import DataManager # load in DataManager
dm = DataManager() # Get an initialized version as dm
Let’s tell the DataManager we want to overwrite files that have the same name. This is optional of course:
dm.set_overwrite(True) # tell the DataManager to overwrite files with the same name
Let’s work with a library model and calculate a map for it. We can obtain the example model with the map_model_manager (revisit this page if you need a refresher on high level objects):
from iotbx.map_model_manager import map_model_manager # load in the map_model_manager
mmm=map_model_manager() # get an initialized instance of the map_model_manager
mmm.generate_map() # get a model from a small library model and calculate a map for it
mmm.write_map("map.mrc") # write out a map in ccp4/mrc format
mmm.write_model("model.pdb") # write out a model in PDB format
You can read in an MRC/CCP4 format map file called "map.mrc" with the DataManager:
map_filename="map.mrc" # Name of map file
mm = dm.get_real_map(map_filename) # Deliver map_manager object with map info
mm.shift_origin() # Make sure that the origin is shifted to (0,0,0)
Notice that we have made sure that the origin is at (0,0,0) after reading in the map. We will see why this is important later. For now, keep in mind that if you read in a map directly, you nearly always will want to shift the origin to (0,0,0) with the shift_origin()
command before using the map.
The show_summary()
method allows you to see a summary of the map that we have just read in:
mm.show_summary()
which yields:
header_min: -0.089924633503
header_max: 0.496164411306
header_mean: -4.31608481594e-12
header_rms: 0.0558838397264
Information about FULL UNIT CELL:
unit cell grid: (30, 40, 32)
unit cell parameters: (22.410999298095703, 28.92300033569336, 23.597999572753906, 90.0, 90.0, 90.0)
space group number: 1
Information about the PART OF MAP THAT IS PRESENT:
map cell grid: (30, 40, 32)
map cell parameters: (22.410999298095703, 28.92300033569336, 23.597999572753906, 90.0, 90.0, 90.0)
map origin: (0, 0, 0)
pixel size: (0.7470, 0.7231, 0.7374)
Shift (grid units) to place origin at original position: (0, 0, 0)
The output shows the min, max, mean and rms values according to the file header. Then there is information obout the full unit cell and about the part of the map present in the file. In this example, it is the same for the full unit cell and the part. If we cut out a part of a map, the information will be different (we will do this later in this tutorial).
The mm object contains the map itself as an array and we can get that array to work with using this command:
map_data = mm.map_data() # get the data.
This yields map_data which is a 3-dimensional array. The mm object also contains information about the box that contains the map (such as box dimensions and angles):
crystal_symmetry=mm.crystal_symmetry() # get crystal_symmetry
Here “crystal_symmetry” is a crystallographic term. For cryo-EM maps the “symmetry” is always space-group P1 which has just one symmetry operator (unity). The crystal_symmetry object is still convenient because it keeps track of the dimensions of the box. You can see the crystal_symmetry just by typing the name of the object:
crystal_symmetry # crystal_symmetry summary
This produces something like this:
crystal.symmetry(
unit_cell=(22.4109993, 28.92300034, 23.59799957, 90, 90, 90),
space_group_symbol="P 1"
)
The unit_cell are the dimensions (a,b,c) and cell angles (alpha,beta,gamma). The map_manager also has other informational methods, such as mm.show_summary()
(see above) and mm.statistics().show_summary()
.
We have been working with the map_manager object mm and we have seen that there are many commands available in mm like mm.show_summary()
. We can find all available methods with the help
command. You use it like this:
# help(mm)
The help command writes out something like this, summarizing the class and giving information on each member of the class.
NOTE: Depending on your system this may open in an editor window and you might need to hit the space bar to scroll through the text and type the letter “q” to get out of that window. Here is output from the help command:
Help on instance of map_manager in module iotbx.map_manager:
class map_manager(iotbx.mrcfile.map_reader, iotbx.mrcfile.write_ccp4_map)
| map_manager, includes map_reader and write_ccp4_map
|
| Normally use map_manager to read, write, and carry information about
| maps. Map_manager keeps track of the origin shifts and also the
| original full unit cell and cell dimensions. It writes out the map
| in the same place as it was read in.
… (more text)
| Methods defined here:
…
| fourier_coefficients_as_map_manager(self, map_coeffs=None, d_min=None, log=<open file '<stdout>', mode 'w'>)
| Convert Fourier coefficients into to a real-space map with gridding
| matching this existing map_manager. Optional resolution cutoff of
| d_min.
…
| map_as_fourier_coefficients(self, d_min =None, resolution_factor=0.333, box=False, log=<open file '<stdout>', mode 'w'>)
| Convert a map to Fourier coefficients to a resolution of dmin.
The help function can be used to see what parameter you might want to use for a particular method. In the help message above, for example, the method map_as_fourier_coefficients()
has a parameter listed as “d_min=None”. That means that there is a parameter called d_min and its default value is “None”, or not defined. We’ll be setting that parameter later. This method also has a parameter called “resolution_factor” and it has a value of 0.333 (we won’t be setting that parameter here).
You can get information on just one specific method with the help function too:
# help(mm.map_as_fourier_coefficients)
You can make changes to a map_data object and write it out with your map_manager. For example, let’s multiply the map by 2 and write it out.
First let’s get the map data to work with. We call the map_data() method in our map_manager object to do that:
map_data=mm.map_data() # get map_data. Note this is just a pointer to the map_data
Now the parameter map_data contains our data from the map_manager mm.
Note that map_data is not a copy of mm. It is the same data that is in mm. If you change map_data you change at the same time the information in mm. In the example here we are going to make new arrays, not changing map_data, but you can also change map_data itself if you want.
Let’s multiply map_data by two and put the result in a new array:
new_map_data = 2.* map_data # multiply map_data times 2 and create new array new_map_data with new values
Now new_map_data is a new array with different values than map_data. We can see this by listing the values of each of these arrays at a particular grid point (3,4,5):
map_data[3,4,5], new_map_data[3,4,5]
which produces:
(-0.0119654475468823, -0.0239308950937646)
and we can see that the two numbers are different. Let’s create a new map_manager with the data from new_map_data in it, but all the background information from our original map_manager mm. We do this by creating a customized_copy of mm with new_map_data:
new_mm=mm.customized_copy(map_data=new_map_data) # new map_manager with data from new_map_data
We can write out a map with our new values with the DataManager write_real_map_file()
method. In case we want to overwrite an existing file with the same name, we can include the keyword “overwrite=True”:
dm.write_real_map_file(new_mm,filename="doubled_map.mrc", overwrite=True) # write map
We have just created a new map that is the same as the original, just doubled in values.
You can add maps, multiply maps, and divide them. All these operations produce a new map with the same dimensions as the original one. Here are some examples:
a=map_data # get map data
b=new_map_data # get other map data
c=a*b # multiply the maps
d=a+b # add the maps
e=a/b # divide the maps (without additionael checks, this will crash if any element is zero)
You can write any one of these new maps out with your map_manager like this:
mm_c=mm.customized_copy(map_data=c) # new map_manager with data from map c
dm.write_real_map_file(mm_c,filename="a_times_b.mrc", overwrite=True) # write map
As we saw above, you can get information about the values in a map at particular grid points and also overall. Here is how to get the value of our map_data at the point (4,5,6):
value = map_data[4,5,6] # notice the brackets for specifying indices in a map
Usually, to get overall values you will convert your map from a 3D array to a 1D array and use the tools available for 1D arrays (see the section on flex arrays for more things to do with 1 D arrays). The key thing to note is that if you convert arrays between 3D and 1D you are only converting a little object that says how to interpret the data. The data themselves are not changed by the conversion and the 1D array is a pointer to the same data that is in the 3D array. You can think of these as two views of the same data. That means if you change the data in one view you also change it in the other. We won’t do that here but it is an important thing to keep in mind for later.
Here is how to get some summary information about our 3D map. First let’s get a view of map_data as a 1D array:
map_data_1d = map_data.as_1d() # 1D view, note that these contain the same data
Now we can get the size of either the 1D or 3D arrays, and the sizes will be the same (the size is the number of elements in the entire array in each case):
map_data_1d.size() # get how many points there are
map_data.size() # how many points in the original array (the same)
We can do many other things as well. Remember you can use help(map_data) to show everything that you can do with map_data, but the help for this C++ class is not so easy to read.
Let’s count how many points in map_data have a value equal to zero (there are none, so it prints “0”):
map_data.count(0) # how many points have a value of zero
And let’s see what the standard deviation of the values in map_data is, using the 1d view:
map_data_1d.standard_deviation_of_the_sample() # standard deviation of data in map_data
which produces:
0.05588384013188865
You can select subsets of grid points in a map and do something to them to modify the values in that map. Often you do this by selecting all grid points with a certain value, or greater or less than a certain value. Here is what it looks like if we want to select all the grid points less than zero and set their values to zero. This is basically going to truncate our map at a lower bound of zero. First we define which grid points we want to work with:
sel = ( map_data < 0 ) # select all grid points with values less than zero and call the selection sel
In this command the part that says “map_data < 0“ is identifying which elements of the array map_data we are selecting. This is normally surrounded by parentheses to make it clear what is selected, but they are not required. The new selection array sel is an array with the same dimensions as the array map_data, and each element of the new selection array sel is either True or False. It is True if the corresponding element of the array map_data is less than zero and False otherwise.
Now we can line up the map_data and sel arrays and go through all the elements of each. For each element in sel that is True, we are going to set the corresponding element of map_data to zero. Here is how to do that:
map_data.set_selected(sel, 0) # set all the points specified by selection sel to zero
This says, set all the elements of map_data that are True in the corresponding selection array sel to zero. Notice that we have modified the array map_data directly. It is now changed and we have lost the original. Now we can count how many values are zero in the map_data array, and there will be a lot:
map_data.count(0) # how many points now have a value of zero
Real-space 3D maps like map_data can be represented by Fourier coefficients. The real-space and Fourier-space representations are related by Fourier transformation and it is easy to go back and forth. The reason that Fourier space representations are often useful is that many signal-processing applications are easiest in Fourier space. For example, smoothing of a real-space function is easy in Fourier space because it amounts to removing high-frequency terms. We are going to smooth our map map.mrc in the next few steps.
The 3D map from map.mrc can be converted into its Fourier space equivalent with the method map_as_fourier_coefficients()
. If we didn’t already, let’s use the DataManager to read in the map as a map_manager object:
map_file="map.mrc" # Name of map file
mm = dm.get_real_map(map_file) # Deliver map_manager object with map info
Let’s recall how we can get the map data:
map_data = mm.map_data() # the map as a 3D real-space map
Now let’s convert the real-space map to its Fourier equivalent:
map_coeffs = mm.map_as_fourier_coefficients( # map represented by Fourier coefficients
d_min = 3)
The key parameter is the high_resolution limit of 3 Angstroms. This tells the map_as_fourier_coefficients
method to include high-frequency components up to 3 Angstroms.
The Fourier representation map_coeffs
is an array object containing indices (grid points in Fourier space) and complex numbers representing values at each index. It also contains information about the real-space map (crystal_symmetry) and has many methods that can be used to operate on the Fourier coefficients. It is an instance of the miller.array class. We can see how many Fourier coefficients are present, what the resolution limits are, and what the real-space map characteristics are:
map_coeffs.size() # number of Fourier coefficients in map_coeffs
map_coeffs.d_min() # high_resolution limit of map_coeffs
map_coeffs.crystal_symmetry() # symmetry and cell dimensions of real-space map
We can also list the value of any term in the Fourier representation of the map. Let’s look at the first term:
indices = map_coeffs.indices() # indices of each term in the map_coeffs array
data = map_coeffs.data() # data (complex numbers) for each index
indices[1], data[1] # indices and data for first term
This looks like:
((-7, -2, 1), (-0.861069670136619+4.389665996500507j))
The (-7, -2, 1) represents the index and (-0.861069670136619+4.389665996500507j) is the complex number which is the value for that index.
We can make changes in this Fourier representation, for example by truncating high-resolution terms. Let’s cut the resolution to a lower resolution of 4 Angstroms (lower resolution means a bigger number for the resolution):
map_coeffs_low_res = map_coeffs.resolution_filter(d_min=4) # cut resolution to 4 A
Now there are fewer data in the array (only 501), which you can see with:
map_coeffs_low_res.size() # number of data in the low_res Fourier representation
We can save these map coefficients as an MTZ file just as we did in the tutorial on reading and writing files:
mtz_dataset = map_coeffs_low_res.as_mtz_dataset(column_root_label='F') # mtz dataset
mtz_object=mtz_dataset.mtz_object() # extract an object that knows mtz format
dm.write_miller_array_file(mtz_object, filename="map_coeffs_low_res.mtz") #write map coeffs
A Fourier representation of a map (Fourier coefficients such as map_coeffs_low_res) can be converted back into a real-space map. The map_manager mm has a tool that we can use for this calculation:
mm_low_res = mm.fourier_coefficients_as_map_manager( # convert to real space
map_coeffs=map_coeffs_low_res)
We have just created a new map mm_low_res that is a low-resolution version of our original map_manager. In effect, we have smoothed our map by Fourier inversion, truncation of high-frequency terms, and conversion back to a map. We can write out our low-resolution map:
dm.write_real_map_file(mm_low_res,filename="map_low_res.mrc", overwrite=True) # write map
If you have software such as Coot or ChimeraX on your computer you can look at the maps in map.mrc and map_low_res.mrc and compare them and you will see that map.mrc shows much more fine detail than map_low_res.mrc.
MRC maps often are supplied as just a portion of the full map. Instead of the supplied map starting at (0,0,0) and going to (511,511,511) as in the full map, perhaps the supplied map goes only from (100,100,100) to (400,400,400). This is referred to as having an origin of (0,0,0) in the full map and (100,100,100) in the supplied map.
In cctbx, normally all the real work with a map is done after shifting the origin of the map (and any associated models and NCS objects) to (0,0,0).
Then when anything is written out, the origin is shifted back to where it was originally. This is done automatically with your map_manager once you shift the origin to (0,0,0). Also if you use the map_model_manager (we will see this in a separate section), origin shifting is taken care of for you automatically.
Let’s create some map data where the origin is not at (0,0,0) and write it to a file. We can do this to some map_data we read in from map.mrc like this:
map_file="map.mrc" # Name of map file
mm = dm.get_real_map(map_file) # Deliver map_manager object with map info
This reads map.mrc and sets up the map_manager mm
. Now let’s modify mm to specify that the origin of the part of the map that is present is at grid point (100,100,100) and that the full map goes from (0,0,0) to (200,200,200). (Note that you would not normally do this, we are doing it just to have a small map that represents part of a big one.)
mm.set_original_origin_and_gridding(
original_origin =(100,100,100), # Set the origin of the part of map we have
gridding=(200,200,200) ) # set the gridding of the full map
We can summarize the map and write it out. Writing it out preserves the information on the origin and gridding of the full map:
mm.show_summary() # summarize. Full map is (0,0,0) to (200,200,200)
# available map is just part of full map
mm.write_map("non_zero_origin_map.ccp4") # write the map
Now let’s work with an origin-shifted map. We can read non_zero_origin_map.ccp4 into a new map_manager object and summarize it:
map_file="non_zero_origin_map.ccp4" # Name of map file
new_mm = dm.get_real_map(map_file) # Deliver map_manager object with map info
Now let's look at the map information:
new_mm.show_summary() # summarize
which will give us:
header_min: -0.089924633503
header_max: 0.496164411306
header_mean: -4.31608481594e-12
header_rms: 0.0558838397264
Information about FULL UNIT CELL:
unit cell grid: (200, 200, 200)
unit cell parameters:<PHONE_NUMBER>873047,<PHONE_NUMBER>9316406,<PHONE_NUMBER>517578, 90.0, 90.0, 90.0)
space group number: 1
Information about the PART OF MAP THAT IS PRESENT:
map cell grid: (30, 40, 32)
map cell parameters: (22.410999298095703, 28.923001098632813, 23.59800048828125, 90.0, 90.0, 90.0)
map origin: (100, 100, 100)
pixel size: (0.7470, 0.7231, 0.7374)
Shift (grid units) to place origin at original position: (0, 0, 0)
Notice that the full unit cell is (200,200,200) and the part that is present is (30,40,32) with an origin of (100,100,100). We have defined a big “unit cell” and made a map that covers only part of it.
In this case the “crystal_symmetry” of the map describes the size of the map that is present. The unit cell grid describes the size of the full unit cell. Similarly, the map cell grid is the gridding of the part of the map that is present and the unit_cell_grid is the gridding of the full unit cell.
If you have a map like this one where the origin is not (0,0,0), you can shift it to put it at (0,0,0). Here is how you can shift the origin of your map to (0,0,0) with your map_manager object (mm) containing your map data:
new_mm.shift_origin() # shift the origin to (0,0,0)
Notice that this changes new_mm
itself. This is actually a very small change, just a record that the origin is (0,0,0) now and saving the original value. Now you can get the map data with an origin at (0,0,0):
shifted_map_data=new_mm.map_data() # get data to work with, origin at (0,0,0)
This is the map data that you normally will work with in cctbx. You can call it anything you like, often it is called map_data even though it is different (by an origin shift) from the original map data.
You can write out your shifted map with the map_manager and it will automatically be shifted back to its original location.
dm.write_real_map_file(new_mm,filename="map_after_shifting.mrc") # write map
This will produce a map that is the same as we read in from non_zero_origin_map.ccp4. The different suffixes (mrc, ccp4) have no significance here.
The map_manager object knows how to find and keep track of the symmetry that was used in the reconstruction of a map. This is different from the “crystal_symmetry” that describes the overall dimensions and P1 symmetry of the box of density used in the reconstruction. The reconstruction symmetry is any symmetry that was assumed (imposed) during the reconstruction process. For example, it might be helical symmetry, or a point-group symmetry such as O, C7, D7, T etc. Map symmetry is recorded with an ncs_object object that can be used to find the unique part of the map or apply symmetry to a model. You can find the symmetry in your map with:
mm.find_map_symmetry() # Find symmetry in the map
If you already knew that the symmetry was octahedral (O), then you could add the keyword, symmetry= "O". Now in this case, our map does not have any symmetry...this results in a None (not defined) for the ncs_object:
print ( mm.ncs_object())
Yields:
None
Let’s make a map that does have symmetry and find it. We are going to use a model that is packaged with cctbx that has symmetry, and then we are going to generate a map using the map_model_manager as we did earlier. The model is a text string in a regression file. We can import it and then use it as our source of information:
from iotbx.regression.ncs.tst_ncs import pdb_str_9 as dimer_text
Now let’s create a model from this text:
dm = DataManager(['model'])
model_file = 'model_with_ncs.pdb'
dm.process_model_str(model_file, dimer_text)
m = dm.get_model(model_file)
dm.write_model_file(m, model_file, overwrite=True)
And let’s create a map that has symmetry based on this model:
ncs_mmm=map_model_manager()
ncs_mmm.generate_map(box_cushion=0, file_name=model_file)
ncs_map_manager = ncs_mmm.map_manager()
Let’s find the symmetry in this map and print it:
ncs_map_manager.find_map_symmetry() # Find symmetry in the map
print ( ncs_map_manager.ncs_object())
This results in:
NCS object with 1 groups: NCS group with 2 ops
You can see the details of the symmetry with:
text = ncs_map_manager.ncs_object().display_all()
Note that the map symmetry is contained in the map_manager, which itself is contained in the map_model_manager. This means that the map_model manager knows about the map, the model, and the map reconstruction symmetry.


{% include "console/components/placeholders/table_placeholder.html" with
height='200px'
image='console/images/icons/multi-tone/certificate-flask.svg'
message='No transfers were found for your active license.'
title='No Transfers Found'
url='/traceability/transfers/transfer?new=true'
only
%}


Contact Info
LinkedIn Profile
GitHub Profile
This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.
This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.


This is the first paragraph that is the least bit interesting.
This is the second paragraph that is less interesting than the first one.


APOLLO 13 A film review by Lewis Butler Copyright 1995 Lewis Butler
In short: Another nomination for Tom Hanks? Almost certainly. Another win? Well ... it could happen. Go see it. (+3.0 of -4 to +4 [0 = avg])
I can't help thinking of THE RIGHT STUFF when I start talking about APOLLO 13, obviously the movies cover the same basic topic; America's space program. While THE RIGHT STUFF focused on the romance and action and adventure and heroism, APOLLO 13 takes a different tack. THE RIGHT STUFF was an epic movie about a period of recent history, APOLLO 13 is a smaller film in that sense, dealing only with the events surrounding the near-fatal accident that was APOLLO 13.
I haven't read LOST MOON, the book the film is based on, and I'm just young enough that I don't remember the coverage first hand; so this was all pretty much news to me. The story, however, is gripping. Fantastic. Awe-inspiring. All those adjectives that are overused so often finally have something worthy of their use.
Ron Howard directs a finely crafted film, carefully staging at each step of the way so that the audience is instantly involved in the action. The inclusion of news footage from the time (Walter Cronkite in horrid neon-esque colors!) serves to make the film almost a documentary.
The performers are all first rate, and I do mean all. From Hanks himself to the Will Wheaton look-a-like playing his son (sorry, I missed the name, would not be at all surprised if he was WW's younger brother, the resemblance to Wesley Crusher from "Next Generation"'s first season is uncanny). Gary Sinise and Kevin Bacon stand out in my mind especially, and Ed Harris, of course, is in his element.
What most surprised me is that even though I knew exactly how the crisis turned out, there was a constant edge of suspense. A remarkable achievement, I think. I could hear the audience breath a collective sigh of relief, right along with the crew at Mission Control.
This movie has to be the early favorite for Best Picture, Best Director, and certainly Best visual effects. No, they're not as spectacular as RETURN OF THE JEDI, but ILM had to recreate a *real* environment, a rather more difficult task. As far as a three-peat from Mr. Hanks? Well, if he doesn't get it it won't be from any failing in this performance. I wonder what Mr. Lovell thought?
--<EMAIL_ADDRESS>PGP Fingerprint \ 1D 5E F7 C8 7E C2 F9 87 0F 86 C9 B0 D2 63 9C B2 303/722-2009
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


In order to evaluate and demonstrate the performance of the developed bin-picking process, several tests were taken and a demonstration was held to present the versatility of the system.
Small cylindrical pieces
The objects used in the first test were small cylindrical pieces, with a diameter of 37mm. By using these small objects, it is possible to check the precision and accuracy of the process. Some of the pieces were placed in the workspace table with a inclination to force the manipulator to position itself with different Euler angles.
In the 20 tested pieces 6 of them were not successfully grabbed, which represents a percentage of success of 70%. This low percentage is caused by several easily visible problems:
- Surface's Normal
- Centroid
- Laser Sensor Readings
One cause of error is in the determination of the surface’s normal, which sometimes is not properly computed. By positioning the end effector with the Euler angles computed with the wrong surface’s normal, the suction cup will not be parallel to the object’s surface, thus not allowing the object to be gripped, as in figure 1a.
Since the Kinect has a low precision, the centroid’s coordinates can vary up to 3mm from the correct centroid. In this specific test, this error was not one of the reasons for not catching those 6 pieces, however the piece in figure 1b was almost not grabbed because of this, which means that objects smaller than the ones used in this test could have failed more often because of this flaw.
The main cause of error in the picking of objects derives from the oscillation in the laser sensor readings. This, then, can cause two opposite situations, the tool tip could be too far from the object when grabbing it, as in figure 1c, but also too close, as in figure 1d. The piece in the last case was obviously grabbed but if it had been a more fragile object it could have broken it.
1a
1b
1c
1d
Ping Pong Balls
In the second test, the objects used were ping pong balls. With this test it is possible to demonstrate the versatility of this process by having the capability of grabbing objects with curved surfaces. The process held in the first test was replicated four times with the ping pong balls since there were only 5 balls to pick, thus having also a sampling of 20 objects for the experiment.
Coincidentally, in the second trial, 6 ping pong balls were also not grabbed. However, in this case, the main cause of error resulted from the incorrect determination of the surface’s normal. This is explained by the fact that normal vectors in curved surfaces vary along the object’s surface, unlike flat surfaces in which the normal vectors have all almost the same orientation. From the 6 pieces not grabbed, 3 of them occurred because of this specific issue, like the one in figure 2a . Nevertheless, in other times the surface’s normal was poorly determined but since the tool tip got close enough to the surface, the gripper was able to grab the object, as in the case presented in figure 2b. The other two issues observed in the first trial were, as expected, also reported in this second experiment. One object was not grabbed because of the incorrect determination of the object’s centroid, presented in figure 2c, and the other 2 were due to the incorrect measurement of the distance with the laser sensor, as in figure 2d.
2a
2b
2c
2d
In order to solve the errors in the laser sensor’s readings, firstly, the Arduino, the circuit and all the connections, used to receive and interpret the sensor’s output, were placed in a box, thus protecting all the connections.
Afterwards the laser sensor was re-calibrated with another process to ensure that the calibration curve, that links the sensor’s distance displayed in its monitor and the reading received by the Arduino, was as precise as possible. Since the laser sensor was now attached to the manipulator, contrarily to the first time calibrating, it was possible to use the robot’s accuracy to preform a better calibration. This time the calibration was held not only with the sensor’s distance displayed in its monitor but also with the exact position of the robot’s end effector. So, two linear regressions were then computed to evaluate the relation between both these informations with the readings received by the Arduino. Both curves are presented in the following figure. Through the Z coordinate of the robot’s end effector it is possible to ensure that the collected data is always equally spaced, thus obtaining a more precise slope for the calibration curve. Therefore, the equation that converts the reading to a distance was altered to include the scope of the linear regression that uses the end effector’s coordinates (blue curve in the figure) and the intercept of the curve that uses the distance displayed in the sensor’s monitor (red curve in the figure). Consequently the Arduino’s code was changed and uploaded.
Eggs
After the alteration in the laser sensor’s calibration curve a third test was conducted. In this third trial the objects used were eggs, thus demonstrating that this process is sufficiently precise to grab fragile objects without deforming or breaking them. The eggs used were previously emptied in order to prevent the egg’s content to enter the pipes with compressed air, used for the suction, in case of breaking. Consequently, by using empty eggs these will be even more fragile and harder to grab without breaking. In third trial the procedure used in the second trial was replicated since there were only 5 eggs as well.
Now, from the 20 eggs used in this test 18 were successfully grabbed, and figures 3a, 3b and 3c present some of those successes. From the two unsuccessfully grabbed eggs, one was due to the incorrect determination of the surface’s normal, presented in figure 3d, and the other was caused by something not yet witnessed in these trials. Since the eggs become lighter when emptied, at the moment the end effector moves closer to more distant objects, the suction cup, sometimes, can push those objects when approaching them. This will cause situations has the one visualized in figure 3e. To solve this problem the suction can be activated when the manipulator is approaching the object and not after.
3a
3b
3c
3d
3e
Variety of Distinctive Shaped Objects
The last and fourth test was performed now with a variety of distinctive shaped objects. In the last test cobbles, eggs, ping pong balls, duct tapes and small cylindrical objects were scattered in front of the manipulator, within the limits marked on the table. Those limits represent the intersection between the area observed by the Kinect and the space in which the robot can safely move. Once more, the process applied in the other tests was used, and the objects were picked from the largest object to the smallest, i.e., objects represented by point clouds with more points were the first to be picked.
The two objects with flat surfaces were the first successfully grabbed at the first attempt.
4a
4b
The following largest object in the bin-picking process was the Lego piece. Since the surface of the piece captured by the Kinect was too inclined the determination of the correct surface’s normal kept failing, as can be seen in figure 4c in which the object was not grabbed because of this problem. However, after moving the Lego to a less inclined position, presented in figure 4d, the object was then grabbed at the first attempt, figure 4e.
4c
4d
4e
The next object to be picked was the duct tape, which despite being represented by a big point cloud it is a thin object and the grasping area must be properly centered for the suction cup to correctly grab it. Therefore, the first attempt, presented in figure 4f, was unsuccessful. However, it took only one other try to successfully pick up the duct tape, which was recorded in figure 4g.
4f
4g
Afterwards the eggs were all correctly grabbed on the first attempt except for one. The moments of the grasping of the 3 eggs were captured.
4h
4i
4j
The other egg was grabbed after two attempts, however, this one was positioned differently from the others, as can be seen in figure 4k. In this position the observed surface of the egg will be its top which has a more accentuated curvature, making the determination of the correct surface’s normal even harder, which was the cause of error in the first unsuccessful attempt, presented in figure 4k. The second attempt, shown in figure 4l, was unsuccessful due to the fact that the suction cup is required to be closer to the object in this conditions even though the laser reading had been correct.
4k
4l
4m
The test proceeded to the grasping of the smaller objects, starting with the ping pong balls. The first ball was grabbed only at the second attempt, moment recorded in figure 4o, once more due to a incorrect determination of the surface’s normal. Figure 4n shows the first attempt to pick the first ball. The second ball could not be picked at the current position since it was too close to the manipulator and the MoveIt! planner was never able to generate a 100% successful plan to grab the object in those conditions. For this reason a second marking was used to better visualize the manipulators limits, which can be seen in figure 4p near the ping pong ball. However, the MoveIt! planner was able to generate the movement to the centroid of the cylindrical piece, present in the same figure. This happened because, in oder to grab this flat object which is parallel to the table, the end effector would have to be perpendicular instead of reclined, which would be the necessary position to grab the ball.
Finally, the last small cylindrical pieces were all successfully grabbed on the first attempt.
4n
4o
4p
In conclusion, from the 13 objects used in this fourth test, 8 were grabbed on the first attempt and the remaining after one or two other attempts. It should also be noted that through all the tests with fragile objects, as the eggs, none of those were ever deformed or broken in the grasping process, at most they were not collected.


possible useful links
Khan academy on tension
Khan academy on inclined planes
Exam Like problems week 2018_01_28


Launch the given job on a cluster.
Choose the cluster to use for the job execution.
Choose the Input Data Source.
Choose the Output Data Source.


When an optgroup element became 'enabled' or not-'enabled', distribution should happen.
Since an optgroup element does not create a renderer, we cannot check this using reftest.


Methods summary
public
|
#
initialize( object & $controller )
Initializes AuthComponent for use in the controller
Initializes AuthComponent for use in the controller
Parameters
- $controller
object $controller A reference to the instantiating controller object
|
public
|
#
startup( object & $controller )
Main execution method. Handles redirecting of invalid users, and processing
of login form data.
Main execution method. Handles redirecting of invalid users, and processing
of login form data.
Parameters
- $controller
object $controller A reference to the instantiating controller object
|
public
|
#
__setDefaults( )
Attempts to introspect the correct values for object properties including
$userModel and $sessionKey.
Attempts to introspect the correct values for object properties including
$userModel and $sessionKey.
|
public
boolean
|
#
isAuthorized( string $type = null, mixed $object = null, mixed $user = null )
Determines whether the given user is authorized to perform an action. The
type of authorization used is based on the value of AuthComponent::$authorize or
the passed $type param.
Determines whether the given user is authorized to perform an action. The
type of authorization used is based on the value of AuthComponent::$authorize or
the passed $type param.
Types: 'controller' will validate against Controller::isAuthorized() if
controller instance is passed in $object 'actions' will validate
Controller::action against an AclComponent::check() 'crud' will validate
mapActions against an AclComponent::check() array('model'=> 'name'); will
validate mapActions against model $name::isAuthorize(user, controller,
mapAction) 'object' will validate Controller::action against
object::isAuthorized(user, controller, action)
Parameters
- $type
string $type Type of authorization
- $object
mixed $object object, model object, or model name
- $user
mixed $user The user to check the authorization of
Returns
boolean True if $user is authorized, otherwise false
|
public
array
|
#
__authType( string $auth = null )
Get authorization type
Parameters
- $auth
string $auth Type of authorization
Returns
array Associative array with: type, object
|
public
|
#
allow( )
Takes a list of actions in the current controller for which authentication is
not required, or no parameters to allow all actions.
Takes a list of actions in the current controller for which authentication is
not required, or no parameters to allow all actions.
|
public
|
#
deny( )
Removes items from the list of allowed actions.
Removes items from the list of allowed actions.
See
|
public
|
#
mapActions( array $map = array() )
Maps action names to CRUD operations. Used for controller-based
authentication.
Maps action names to CRUD operations. Used for controller-based
authentication.
Parameters
- $map
array $map Actions to map
|
public
boolean
|
#
login( mixed $data = null )
Manually log-in a user with the given parameter data. The $data provided can
be any data structure used to identify a user in AuthComponent::identify(). If
$data is empty or not specified, POST data from Controller::$data will be used
automatically.
Manually log-in a user with the given parameter data. The $data provided can
be any data structure used to identify a user in AuthComponent::identify(). If
$data is empty or not specified, POST data from Controller::$data will be used
automatically.
After (if) login is successful, the user record is written to the session key
specified in AuthComponent::$sessionKey.
Parameters
- $data
mixed $data User object
Returns
boolean True on login success, false on failure
|
public
string
|
#
logout( )
Logs a user out, and returns the login action to redirect to.
Logs a user out, and returns the login action to redirect to.
Returns
string AuthComponent::$loginAction
See
|
public
array
|
#
user( mixed $key = null )
Get the current user from the session.
Get the current user from the session.
Returns
array User record, or null if no user is logged in.
|
public
string
|
#
redirect( mixed $url = null )
If no parameter is passed, gets the authentication redirect URL.
If no parameter is passed, gets the authentication redirect URL.
Parameters
- $url
mixed $url Optional URL to write as the login redirect URL.
Returns
string Redirect URL
|
public
boolean
|
#
validate( mixed $object, mixed $user = null, string $action = null )
Validates a user against an abstract object.
Validates a user against an abstract object.
Parameters
- $object
mixed $object The object to validate the user against.
- $user
mixed $user Optional. The identity of the user to be validated. Uses the current user
session if none specified. For valid forms of identifying users, see
AuthComponent::identify().
- $action
string $action Optional. The action to validate against.
Returns
boolean True if the user validates, false otherwise.
See
|
public
boolean
|
#
action( string $action = ':controller/:action' )
Returns the path to the ACO node bound to a controller/action.
Returns the path to the ACO node bound to a controller/action.
Parameters
- $action
string $action Optional. The controller/action path to validate the user against. The
current request action is used if none is specified.
Returns
boolean ACO node path
|
public
object
&
|
#
getModel( string $name = null )
Returns a reference to the model object specified, and attempts to load it if
it is not found.
Returns a reference to the model object specified, and attempts to load it if
it is not found.
Parameters
- $name
string $name Model name (defaults to AuthComponent::$userModel)
Returns
object A reference to a model object
|
public
array
|
#
identify( mixed $user = null, array $conditions = null )
Identifies a user based on specific criteria.
Identifies a user based on specific criteria.
Parameters
- $user
mixed $user Optional. The identity of the user to be validated. Uses the current user
session if none specified.
- $conditions
array $conditions Optional. Additional conditions to a find.
Returns
array User record data, or null, if the user could not be identified.
|
public
array
|
#
hashPasswords( array $data )
Hash any passwords found in $data using $userModel and
$fields['password']
Hash any passwords found in $data using $userModel and
$fields['password']
Parameters
- $data
array $data Set of data to look for passwords
Returns
array Data with passwords hashed
|
public
string
|
#
password( string $password )
Hash a password with the application's salt value (as defined with
Configure::write('Security.salt');
Hash a password with the application's salt value (as defined with
Configure::write('Security.salt');
Parameters
- $password
string $password Password to hash
Returns
string Hashed password
|
public
|
#
shutdown( object & $controller )
Component shutdown. If user is logged in, wipe out redirect.
Component shutdown. If user is logged in, wipe out redirect.
Parameters
- $controller
object $controller Instantiating controller
|
Properties summary
public
boolean
|
$_loggedIn
|
false |
#
Maintains current user login state.
Maintains current user login state.
|
public
array
|
$components
|
array('Session', 'RequestHandler') |
#
Other components utilized by AuthComponent
Other components utilized by AuthComponent
|
public
object
|
$authenticate
|
null |
#
A reference to the object used for authentication
A reference to the object used for authentication
|
public
mixed
|
$authorize
|
false |
#
The name of the component to use for Authorization or set this to
'controller' will validate against Controller::isAuthorized() 'actions' will
validate Controller::action against an AclComponent::check() 'crud' will
validate mapActions against an AclComponent::check() array('model'=> 'name');
will validate mapActions against model $name::isAuthorize(user, controller,
mapAction) 'object' will validate Controller::action against
object::isAuthorized(user, controller, action)
The name of the component to use for Authorization or set this to
'controller' will validate against Controller::isAuthorized() 'actions' will
validate Controller::action against an AclComponent::check() 'crud' will
validate mapActions against an AclComponent::check() array('model'=> 'name');
will validate mapActions against model $name::isAuthorize(user, controller,
mapAction) 'object' will validate Controller::action against
object::isAuthorized(user, controller, action)
|
public
string
|
$ajaxLogin
|
null |
#
The name of an optional view element to render when an Ajax request is made
with an invalid or expired session
The name of an optional view element to render when an Ajax request is made
with an invalid or expired session
|
public
string
|
$userModel
|
'User' |
#
The name of the model that represents users which will be authenticated.
Defaults to 'User'.
The name of the model that represents users which will be authenticated.
Defaults to 'User'.
|
public
array
|
$userScope
|
array() |
#
Additional query conditions to use when looking up and authenticating users,
i.e. array('User.is_active' => 1).
Additional query conditions to use when looking up and authenticating users,
i.e. array('User.is_active' => 1).
|
public
array
|
$fields
|
array('username' => 'username', 'password' => 'password') |
#
Allows you to specify non-default login name and password fields used in
$userModel, i.e. array('username' => 'login_name', 'password' =>
'passwd').
Allows you to specify non-default login name and password fields used in
$userModel, i.e. array('username' => 'login_name', 'password' =>
'passwd').
|
public
string
|
$sessionKey
|
null |
#
The session key name where the record of the current user is stored. If
unspecified, it will be "Auth.{$userModel name}".
The session key name where the record of the current user is stored. If
unspecified, it will be "Auth.{$userModel name}".
|
public
string
|
$actionPath
|
null |
#
If using action-based access control, this defines how the paths to action
ACO nodes is computed. If, for example, all controller nodes are nested under an
ACO node named 'Controllers', $actionPath should be set to "Controllers/".
If using action-based access control, this defines how the paths to action
ACO nodes is computed. If, for example, all controller nodes are nested under an
ACO node named 'Controllers', $actionPath should be set to "Controllers/".
|
public
mixed
|
$loginAction
|
null |
#
A URL (defined as a string or array) to the controller action that handles
logins.
A URL (defined as a string or array) to the controller action that handles
logins.
|
public
mixed
|
$loginRedirect
|
null |
#
Normally, if a user is redirected to the $loginAction page, the location they
were redirected from will be stored in the session so that they can be
redirected back after a successful login. If this session value is not set, the
user will be redirected to the page specified in $loginRedirect.
Normally, if a user is redirected to the $loginAction page, the location they
were redirected from will be stored in the session so that they can be
redirected back after a successful login. If this session value is not set, the
user will be redirected to the page specified in $loginRedirect.
|
public
mixed
|
$logoutRedirect
|
null |
#
The the default action to redirect to after the user is logged out. While
AuthComponent does not handle post-logout redirection, a redirect URL will be
returned from AuthComponent::logout(). Defaults to
AuthComponent::$loginAction.
The the default action to redirect to after the user is logged out. While
AuthComponent does not handle post-logout redirection, a redirect URL will be
returned from AuthComponent::logout(). Defaults to
AuthComponent::$loginAction.
See
|
public
string
|
$object
|
null |
#
The name of model or model object, or any other object has an isAuthorized
method.
The name of model or model object, or any other object has an isAuthorized
method.
|
public
string
|
$loginError
|
null |
#
Error to display when user login fails. For security purposes, only one error
is used for all login failures, so as not to expose information on why the login
failed.
Error to display when user login fails. For security purposes, only one error
is used for all login failures, so as not to expose information on why the login
failed.
|
public
string
|
$authError
|
null |
#
Error to display when user attempts to access an object or action to which
they do not have acccess.
Error to display when user attempts to access an object or action to which
they do not have acccess.
|
public
boolean
|
$autoRedirect
|
true |
#
Determines whether AuthComponent will automatically redirect and exit if
login is successful.
Determines whether AuthComponent will automatically redirect and exit if
login is successful.
|
public
array
|
$allowedActions
|
array() |
#
Controller actions for which user validation is not required.
Controller actions for which user validation is not required.
See
|
public
array
|
$actionMap
|
array(
'index' => 'read',
'add' => 'create',
'edit' => 'update',
'view' => 'read',
'remove' => 'delete'
) |
#
Maps actions to CRUD operations. Used for controller-based validation
($validate = 'controller').
Maps actions to CRUD operations. Used for controller-based validation
($validate = 'controller').
See
|
public
array
|
$data
|
array() |
#
Form data from Controller::$data
Form data from Controller::$data
|
public
array
|
$params
|
array() |
#
Parameter data from Controller::$params
Parameter data from Controller::$params
|


TIGER BALM RED EXTRA STRENGTH- camphor (synthetic) and menthol ointment
Haw Par Healthcare Ltd.
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
| Active Ingredients |
Purpose |
| Camphor 11% |
Topical Analgesic |
| Menthol 10% |
Topical Analgesic |
Uses
For temporary relief of minor aches and pains of muscles and joints associated with simple backache, arthritis, bruises, strains and sprains.
Warnings
For external use only
When using this product
- Use only as directed
- Avoid contact with eyes and mucous membranes
- Do not apply to wounds, damaged or irritated skin
- Do not bandage or cover with wrap or use heating pad
- Do not use 1 hour prior to bathing or 30 minutes after bathing.
Stop use and ask a doctor if
- Condition worsens
- Severe skin irritation occurs
- Pain persists for more than 7 days
- Pain clears up and then recurs a few days later.
If pregnant or breast-feeding, or if you have sensitive skin, ask a healthcare professional before use.
Keep out of reach of children. If swallowed, get medical help or contact a Poison Control Center immediately.
Directions
- For adults and children over 12, rub well on the affected area. Repeat 3-4 times daily
- For children 12 years of age or younger, consult a doctor before use.
Other Information
- This product may cause allergic reaction in some individuals. Test on small area before use
- Tiger Balm Red Extra Strength may stain cloth items. To avoid possibility of strains, use Tiger Balm White Regular Strength or Tiger Balm Ultra Strength.
Inactive Ingredients
Cajuput Oil, Cassia Oil, Clove Oil, Dementholised Mint Oil and Paraffin Petrolatum.
Manufactured by Haw Par Healthcare Ltd., Singapore under licence
from Haw Par Corporation Ltd.
PRINCIPAL DISPLAY PANEL - 18 g Jar Box
NDC 66761-308-25
TIGER BALM®
RED EXTRA STRENGTH
PAIN RELIEVING OINTMENT
NET WT: 0.63 OZ (18G)
Haw Par Healthcare Ltd.


Coalescence is the capability of the device of grouping global memory accesses of threads whithin a warp. Global memory loads and stores by threads of a warp 28 are coalesced by the device into as few as one transaction when certain access requirements are met. Remanding that c.c. 3.5 global memory is only L2 cached, while for devices with c.c. 2.x the concurrent accesses of the threads of a warp will coalesce into a number of transactions equal to the number of cache lines necessary to service all of the threads of the warp. By default, all accesses are cached through L1, which has 128-byte lines. For scattered access patterns, to reduce overfetch, it can sometimes be useful to cache only in L2, which caches shorter 32-byte segments
In order to achieve coalescence there should be some coherence29 in memory access by adjacent threads running on the device. Certain memory access patterns enable the hardware to coalesce groups of reads or writes of multiple data items into one operation. Data that cannot be laid out so as to enable coalescing (in general case) and, application that do not exploit this feature will tend to see lesser speedups when used in computations on CUDA. Assuming compute capability 2.x the very first pattern that enable coalescence is when the \(k-th\) accesses the \(k-th\) word in a cache line 30 (not all threads need to partecipate). Morever if the same scenario of sequential access happens, but on misaligned with the cache line, two 128B loads are required in order to fill the L1 cache or even more if L2 is used (see figure [fig:misaligedCoalescence], in red loaded memory portions).


{% extends "base.html" %}
{% block content %}
{% filter markdown %}
# About
This site was created by [Christopher Arndt](https://github.com/SpotlightKid) using
[Flask](https://flask.pocoo.org), the
[cookiecutter-flask](https://github.com/sloria/cookiecutter-flask) template, the
[libretto theme](https://github.com/abrahamvarricatt/libretto-theme-for-nikola) from
[Nikola](https://getnikola.com/), and too many Flask extensions to list here.
The source code for this site is available on
[GitHub](https://github.com/SpotlightKid/fmchallenge-webapp).
{% endfilter %}
{% endblock %}


making it look like readable English. Many desktop publishing
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution o f letters, a s opposed to using 'Content h ere, content here', making it look like readable English. Many desktop publishing packages and web
page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution o
Copyright 2019 All Right Reserved By. Free html Templates


The biggest Google tech conference in CEE.
All about Android, Web, and Cloud.
BUY TICKET
PARTNERS
SPEAKERS
12
13
October
Lviv, Ukraine
Planeta Kino


Welcome to the Leveling Page!
Edah: EDAH
Time Block: BLOCK
This page displays suggested chug assignments for one edah in a time
block. Assignments are highlighted according to the camper's preference:
first, second,
third, fourth or worse.
- To change a camper's assignment, drag the camper's bubble from one
activity to another. When you are ready to save your manual changes, click
Save. To see a camper's preferred chugim, hover your mouse over
the bubble for that camper.
- To re-run the assignment algorithm, click Reassign. This will
reassign campers automatically.
- If a camper signed up late, or changed registration, they might not have
an assignment yet. Such campers will appear in a box
labeled Not Assigned Yet. To assign these campers,
you can drag them to a chug and click Save, or click the Reassign button.
- To exit this page and return to the staff home page, click Done.


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Hierarchy For Package limmen.business.services.implementations
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object
limmen.business.services.implementations.
AlbumServiceImpl
(implements limmen.business.services.
AlbumService
)
limmen.business.services.implementations.
AlbumServiceImplTest
limmen.business.services.implementations.
ArtistServiceImpl
(implements limmen.business.services.
ArtistService
)
limmen.business.services.implementations.
ArtistServiceImplTest
limmen.business.services.implementations.
CustomerServiceImpl
(implements limmen.business.services.
CustomerService
)
limmen.business.services.implementations.
CustomerServiceImplTest
limmen.business.services.implementations.
EmployeeServiceImpl
(implements limmen.business.services.
EmployeeService
)
limmen.business.services.implementations.
EmployeeServiceImplTest
limmen.business.services.implementations.
GenreServiceImpl
(implements limmen.business.services.
GenreService
)
limmen.business.services.implementations.
GenreServiceImplTest
limmen.business.services.implementations.
InvoiceLineServiceImpl
(implements limmen.business.services.
InvoiceLineService
)
limmen.business.services.implementations.
InvoiceLineServiceImplTest
limmen.business.services.implementations.
InvoiceServiceImpl
(implements limmen.business.services.
InvoiceService
)
limmen.business.services.implementations.
InvoiceServiceImplTest
limmen.business.services.implementations.
MediaTypeServiceImpl
(implements limmen.business.services.
MediaTypeService
)
limmen.business.services.implementations.
MediaTypeServiceImplTest
limmen.business.services.implementations.
PlaylistServiceImpl
(implements limmen.business.services.
PlaylistService
)
limmen.business.services.implementations.
PlaylistServiceImplTest
limmen.business.services.implementations.
PlaylistTrackServiceImpl
(implements limmen.business.services.
PlaylistTrackService
)
limmen.business.services.implementations.
PlaylistTrackServiceImplTest
limmen.business.services.implementations.
TrackServiceImpl
(implements limmen.business.services.
TrackService
)
limmen.business.services.implementations.
TrackServiceImplTest
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes


A circle patch.
Create true circle at center xy = (x, y) with given radius. Unlike CirclePolygon which is a polygonal approximation, this uses Bézier splines and is much closer to a scale-free circle.
Methods
| __init__(xy, **kwargs[, radius]) | Create true circle at center xy = (x, y) with given radius. |
| add_callback(func) | Adds a callback function that will be called whenever one of |
| contains(ev) | |
| contains_point(point) | Returns True if the given point is inside the path |
| convert_xunits(x) | For artists in an axes, if the xaxis has units support, |
| convert_yunits(y) | For artists in an axes, if the yaxis has units support, |
| draw(artist, renderer, *args, **kwargs) | Draw the Patch to the given renderer. |
| findobj([match]) | pyplot signature: |
| get_aa() | Returns True if the Patch is to be drawn with antialiasing. |
| get_agg_filter() | return filter function to be used for agg filter |
| get_alpha() | Return the alpha value used for blending - not supported on all |
| get_animated() | Return the artist’s animated state |
| get_antialiased() | Returns True if the Patch is to be drawn with antialiasing. |
| get_axes() | Return the Axes instance the artist |
| get_children() | Return a list of the child :class:`Artist`s this |
| get_clip_box() | Return artist clipbox |
| get_clip_on() | Return whether artist uses clipping |
| get_clip_path() | Return artist clip path |
| get_contains() | Return the _contains test used by the artist, or None for default. |
| get_data_transform() | |
| get_ec() | Return the edge color of the Patch. |
| get_edgecolor() | Return the edge color of the Patch. |
| get_extents() | Return a Bbox object defining |
| get_facecolor() | Return the face color of the Patch. |
| get_fc() | Return the face color of the Patch. |
| get_figure() | Return the Figure instance the |
| get_fill() | return whether fill is set |
| get_gid() | Returns the group id |
| get_hatch() | Return the current hatching pattern |
| get_label() | Get the label used for this artist in the legend. |
| get_linestyle() | Return the linestyle. |
| get_linewidth() | Return the line width in points. |
| get_ls() | Return the linestyle. |
| get_lw() | Return the line width in points. |
| get_patch_transform() | |
| get_path() | Return the vertices of the rectangle |
| get_path_effects() | |
| get_picker() | Return the picker object used by this artist |
| get_radius() | return the radius of the circle |
| get_rasterized() | return True if the artist is to be rasterized |
| get_snap() | Returns the snap setting which may be: |
| get_transform() | Return the Transform applied |
| get_transformed_clip_path_and_affine() | Return the clip path with the non-affine part of its |
| get_url() | Returns the url |
| get_verts() | Return a copy of the vertices used in this patch |
| get_visible() | Return the artist’s visiblity |
| get_window_extent([renderer]) | |
| get_zorder() | Return the Artist‘s zorder. |
| have_units() | Return True if units are set on the x or y axes |
| hitlist(event) | List the children of the artist which contain the mouse event event. |
| is_figure_set() | Returns True if the artist is assigned to a |
| is_transform_set() | Returns True if Artist has a transform explicitly |
| pchanged() | Fire an event when property changed, calling all of the |
| pick(mouseevent) | call signature: |
| pickable() | Return True if Artist is pickable. |
| properties() | return a dictionary mapping property name -> value for all Artist props |
| remove() | Remove the artist from the figure if possible. |
| remove_callback(oid) | Remove a callback based on its id. |
| set(**kwargs) | A tkstyle set command, pass kwargs to set properties |
| set_aa(aa) | alias for set_antialiased |
| set_agg_filter(filter_func) | set agg_filter fuction. |
| set_alpha(alpha) | Set the alpha tranparency of the patch. |
| set_animated(b) | Set the artist’s animation state. |
| set_antialiased(aa) | Set whether to use antialiased rendering |
| set_axes(axes) | Set the Axes instance in which the |
| set_clip_box(clipbox) | Set the artist’s clip Bbox. |
| set_clip_on(b) | Set whether artist uses clipping. |
| set_clip_path(path[, transform]) | Set the artist’s clip path, which may be: |
| set_color(c) | Set both the edgecolor and the facecolor. |
| set_contains(picker) | Replace the contains test used by this artist. |
| set_ec(color) | alias for set_edgecolor |
| set_edgecolor(color) | Set the patch edge color |
| set_facecolor(color) | Set the patch face color |
| set_fc(color) | alias for set_facecolor |
| set_figure(fig) | Set the Figure instance the artist |
| set_fill(b) | Set whether to fill the patch |
| set_gid(gid) | Sets the (group) id for the artist |
| set_hatch(hatch) | Set the hatching pattern |
| set_label(s) | Set the label to s for auto legend. |
| set_linestyle(ls) | Set the patch linestyle |
| set_linewidth(w) | Set the patch linewidth in points |
| set_lod(on) | Set Level of Detail on or off. If on, the artists may examine |
| set_ls(ls) | alias for set_linestyle |
| set_lw(lw) | alias for set_linewidth |
| set_path_effects(path_effects) | set path_effects, which should be a list of instances of |
| set_picker(picker) | Set the epsilon for picking used by this artist |
| set_radius(radius) | Set the radius of the circle |
| set_rasterized(rasterized) | Force rasterized (bitmap) drawing in vector backend output. |
| set_snap(snap) | Sets the snap setting which may be: |
| set_transform(t) | Set the Transform instance |
| set_url(url) | Sets the url for the artist |
| set_visible(b) | Set the artist’s visiblity. |
| set_zorder(level) | Set the zorder for the artist. |
| update(props) | Update the properties of this Artist from the |
| update_from(other) | Updates this Patch from the properties of other. |
Attributes
| fill | return whether fill is set |
| radius | return the radius of the circle |


Copyright
Note : You may at any time read the book, store it in your ereaders
The book itself is subject to copyright.
You cannot use the book, or parts of the book into your own publications, without the permission of the author.
author:
Jan Jansen<EMAIL_ADDRESS>LICENSE:
All the software is subject to the Apache 2.0 license (same as zephyr), which is very liberal.


Book Details
Book Title: {{ book.title }}
Book Author: {{ book.author | uppercase }}
Price: {{ book.price | currency:"Rs." }}
Published Date: {{ book.published_date | date: "MMMM-dd-yyyy" }}
Published Year: {{ book.published_date | date: "yyyy" }}