MDW Coding Guidelines
The following standards should be followed as generally
accepted good programming practices when developing MDW Workflow projects or
the MDW Framework.
General
- To ensure compliance with coding style and formatting
conventions, import the following into your Eclipse workspace preferences
(Window > Preferences > Java > Code Style):
- Formatter:
http://cshare.ad.qintra.com/sites/MDW/Developer%20Resources/Environment/MDWCodeFormatter.xml
- Templates:
http://cshare.ad.qintra.com/sites/MDW/Developer%20Resources/Environment/MDWCodeTemplates.xml
- Incorporate JavaDoc comments into
your code for each top-level type (class or interface), and for each
method whose implementation contains significant processing logic. A
method whose purpose is readily apparent from its name (such as a simple
getter or setter) does not require a JavaDoc comment.
- Method names should be verb-based
to indicate the action or outcome which will result from invoking the
method (eg: createProcessInstance()).
- Maximize readability by keeping
your code modular. Avoid long and confusing method implementations by
keeping your methods granular and chaining method calls where each call
performs a discreet portion of your logic. For situations involving
complex processing where lengthy methods are unavoidable, include comments
in your code to explain what is happening so that other developers will be
able to understand the flow.
Logging
- Application logging should employ
an MDW StandardLogger instance obtained by calling
LoggerUtil.getInstance().getStandardLogger(). Do not use
System.out.println(). Store the logger as an instance variable, and avoid
accessing the logger instance of your superclass (this can lead to
confusion since the class reported in the log file will be the superclass
instead of the subclass where the logger method was invoked).
- Note: when implementing a custom
activity, use the BaseActivity superclass methods such as logdebug() ,
logwarn(), logsevere(), logexception(), etc. These methods have built in
formatting which contains information about process, process instance,
activity and activity instance.
logdebug(("Listener
Invoked: Message is " + msg.getString());
From within Groovy script or Dynamic
Java activities, access to these methods is provided via the
ActivityRuntimeContext:
runtimeContext.logdebug(….)
- For logging output at INFO or
DEBUG levels, test whether the appropriate logging level is enabled before
building your output parameter string value. This avoids the overhead of
concatenating and building the output string when it may be discarded by
the logger if logging is not enabled at the specified level.
Incorrect:
logdebug("Listener
Invoked: Message is " + msg.getString());
Correct:
if (isDebugEnabled())
{
logdebug
("Listener Invoked: Message is " + msg.getString());
}
Exception Handling
- When deciding whether to catch an
Exception, consider whether your code is the appropriate place to handle
the exception. If you have catch blocks for multiple exceptions which all
contain the same behavior, it is more readable and maintainable to catch a
common base exception type.
Incorrect:
catch (ServiceLocatorException ex) {
logger.severeException(ex.getMessage(), ex);
}
catch (EventException ex) {
logger.severeException(ex.getMessage(), ex);
}
catch (DataAccessException ex) {
logger.severeException(ex.getMessage(), ex);
}
Correct:
catch (MDWException ex) {
logger.severeException(ex.getMessage(), ex);
}
- It is legitimate to catch an
exception in order to rethrow it as an exception type declared in your
message header. In this case it is best to wrap the originating exception
in your rethrown exception so that when it is logged the entire exception
causality chain will be available.
Incorrect:
catch (EventException ex) {
throw new BusListenerException(EXCEPTION_CD,
ex.getMessage());
}
Correct:
catch (EventException ex) {
throw new BusListenerException(EXCEPTION_CD,
ex.getMessage(), ex);
}
Collections
- Specify the general java.util
collection Interfaces (List, Map, etc) in your APIs rather than specific
implementations (ArrayList, HashMap, etc). This provides a level of
encapsulation which will enable the underlying implementation to change
without requiring an interface change.
- When accessing a collection
returned by an API, treat the returned value as the general purpose entity
rather than casting to the underlying type:
Incorrect:
ArrayList orderItems = (ArrayList)
serviceEjb.getOrderItems();
OrderItem firstItem = (OrderItem) orderItems.get(0);
Correct:
Collection orderItems = serviceEjb.getOrderItems();
Iterator orderIter = orderItems.iterator();
while (orderIter.hasNext()) {
OrderItem item = (OrderItem) orderIter.next();
}
MDW
- Access to the Hibernate-specific model
implementation classes in your workflow should be encapsulated in your
Data Access Objects. The goal is to isolate references to our persistence
layer implementation so that if desired we can easily decouple from
Hibernate and plug in another Object/Relational mapping library.
- Much commonly-used functionality
is encapsulated in the base classes provided by the MDWFramework.
Developers should take some time familiarizing themselves with the
MDWFramework API so that they are aware of what's available. The JavaDoc
information for MDWFramework is published to the following URL:
http://cshare.ad.qintra.com/sites/MDW/Developer%20Resources/Framework%20API%20JavaDocs.html
XMLBeans
- XMLBeans provide the binding
framework for converting XML documents to Java objects based on their
schema definitions. The XMLBean document objects are usually closely
coupled to the particular system interface defined in the XSD (for example
an interface between NotificationWorkflow and NFS). Avoid directly
accessing elements in your XMLBeans in your mainline workflow processing
so that your workflow is insulated from interface changes. One strategy
have been employed to provide this separation:
- Create XMLBean wrapper classes
to expose an interface-independent view of your XML data. The wrapper
classes encapsulate the logic for mapping between the XML document and
the data model. For an example of this approach see OrderDetailsWrapper.java
in ESOWF project.
Either way, the convention is to
include your structure/wrapper classes in a project module called WorkflowNameStructures.
These structures should not have dependencies on anything other than your
schemas module and your model module.
- XMLBeans provide an Enum
implementation for XSD elements whose values are governed by xsd:string
enumeration restrictions. To take advantage of the type safety built into
the Enums, always test and set these element values using enumeration
constants:
Incorrect:
if (request.requestType().toString().equals("NEW"))
{
…
}
Correct:
if
(request.getRequestType().equals(RequestDocument.Request.NEW)) {
…
}


When an element has an inline display that element takes up the amount of horizontal space that it's contents visually uses, assuming the element has no margin, padding or borders to account for. This means that we can have multiple elements appear on the same line and is the reason for the existence of the line break tag
. It is also important to note that when an element is displayed inline it will not compute padding correctly.
.inlinedemo {
background-color:#FF6201;
display: inline;
margin: 1em;
padding: 1em;
}
.inlineblock {
background-color:#FF6201;
display: inline-block;
margin: 1em;
padding: 1em;
}

Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet

In CSS a block element is an element which takes up all of the horizontal space that is available to it creating a line break after the element. Some examples of this are
,
, and
 tags. Of course using CSS you can make any element function like a block element by simply changing its display setting for example a span.
span {
display: block;
}
The idea of inline block is to create an element that will behave like an inline element where the flow of the document is concerned and behave like a block element where the inside of that element is concerned. Take these
 elements displayed in both inline-block and inline.
Test Code

lorem ipsum

lorem ipsum

lorem ipsum

lorem ipsum

As you can see the inline-block
 handles the line break only by breaking the line for its own container whereas the inline element breaks the line for both containers.


--- layout: post title: My Mistake date: '2004-08-11T17:11:00-04:00' tags: - '2004' tumblr_url: http://poetry.liabogoev.com/post/938704528/my-mistake ---
I sometimes regret it,
I sometimes feel bad,
I do it anyway,
Though it makes her feel sad.
I am a bully,
Though that’s not what I see,
I think I’m so cool,
But that cannot be.
Many times I love her,
very much indeed,
Bur if that’s true,
Why her plea I did not heed?
I really, truly,
Regret what I did,
It may be too late,
Though she is just a kid.

I don’t know
how to do it,
I’m afraid
I really bit.
I hope she
will forgive me,
Though I don’t
Know how it can be.
I need to change
My behavior, true.
I think
I got the clue.
So if you’re a bully,
hear me well, if you forgot,
Wounds will heal,
but words will not.


4.0.0-0
Templates are markup (html, ejs, etc) that Nxus modules can use to render a UX. The Templater module provides a common API for defining and accessing templates. Specifically, you can use partials and templates defined by other modules, meaning you write less code for common components.
> npm install nxus-templater --save
Templater supports EJS and HTML as default template types. If you'd like to add in additional parsers, check out the renderer documentation.
All templates share a single namespace, so its a good idea to add a prefix to your template names to avoid conflicts. For example mymodule-mytemplate.ejs
.
import {templater} from 'nxus-templater'
There are three types of templates you can register.
If you would like to register a single template, you can use the template provider and specify a file:
templater.template('path/to/some/file.ejs')
Based on the filename, the template will be given the name file
and rendered using the EJS renderer.
Optionally, you can specify another template to wrap the output (for partial style templates).
templater.template('path/to/some/file.ejs', 'page')
Alternatively, if you have a folder with all your templates, you can add them all using templateDir
.
For example, given the following directory structure:
- /templates
|- my-template.ejs
Templater will expose my-template
as a new template.
templater.templateDir('path/to/some/dir/')
Each template will be processed using the template
function above. You can also specify a wrapper template.
templater.templateDir('path/to/some/dir/', 'page')
Alt you can specify a glob pattern to only register certain files:
templater.templateDir('path/to/some/dir/myname-*.ejs', 'page')
You can also pass in a handler method instead of a file path. Templater expects that this handler returns a string with the rendered content, or a Promise that resolves to a string.
The handler will be passed in the name of the template requested, as well as any render options specified.
var handler = function(args, name) {
return "<html>.....";
}
templater.templateFunction('default', handler)
let opts = {content: "some content"}
templater.render('default', opts).then((content) => {
console.log('rendered content', content)
})
If you want to specify a different wrapper template than was originally set, you can add a template
key to the opts object.
opts.template = 'new-template'
templater.render('partial-template', opts).then((content) => {
console.log('rendered complete content', content)l
})
In place of EJS' include
function for rendering sub-templates, you can use the render
function to use a templater-registered template name within a template:
<%- render('app-nav`) %>
or with specific options
<%- render('app-nav', navItems) %>
Modules can provide additional context options to be available to templates. :
templater.on('renderContext', () => {return {username: 'Steve'}})
The event handler is passed the original template name and args, so if req
or other is provided it is available to you, or if you want to only provide context for some templates, but you do not need to return the whole modified args:
templater.on('renderContext', (args, name) => {return {username: args.req ? args.req.user : '' }})
Templater will also fire a template specific event
templater.on('renderContext.my-template', () => {return {username: 'Steve'}})
Values that are arrays are concated rather than overwritten, so that for instance scripts
can collect script URLs from many modules:
templater.on('renderContext', () => {return {scripts: ['/url/script.js']}})
templater.on('renderContext', () => {return {scripts: ['/url/other.js']}})
Will result in scripts
containing an array with both these values. The list will be filtered to only have unique values, so you can specify scripts in dependency order and not worry if other modules are asking for the same common js files repeatedly. The default set of templates provided by this module include rendering of this scripts
variable already.
Templater provides template registering and rendering, built on top of the renderer
Extends NxusModule
Registers the specified template. By default, the template name will match the file name, and the renderer
used will be determined by the file extension. For example: ./templates/my-template.ejs
will be registered as
my-template
using the EJS rendering engine.
Registers all templates in the specified directory.
Register a handler function as a template. The registered function should return either a string or a Promise that resolves to string containing the template.
The rendering framework for Nxus applications.
import {renderer} from 'nxus-templater/modules/renderer'
renderer.renderer(type, handler);
Where type
is usually the filename extension and handler
returns the rendered text when called with contents to render and an optional opts
object.
renderer.render(type, text).then((renderedText) => {console.log(renderedText)});
You can pass an optional arugment opts
for options to pass to the renderer.
renderer.render(type, text, {title: 'My Title'}).then((renderedText) => {console.log(renderedText)});
renderer.renderFile(type, filename).then((renderedText) => {});
You can pass an optional arugment opts
for options to pass to the renderer.
Renderer renders different files and content using common rendering engines, like EJS and MarkDown.
Extends NxusModule


WDD 230: ASSIGNMENT PORTAL
- Lesson 2: Design Principles
- Lesson 3: Assignment Link
- Lesson 4: Preston Town Page
- Lesson 5: Preston Town Page continued
- Lesson 6: Assignment Link
- Lesson 7: Gallery
- Lesson 7: Lazy Loading
- Lesson 8: Storm Center
- Lesson 9: Prophets
- Lesson 9: Wireframes
- Lesson 9: Home
- Lesson 10: Preston
- Lesson 11: Final Website
- Lesson 12: Assignment Link
- Lesson 13: Assignment Link
- Lesson 14: Assignment Link


Freya
Chart metrics
Namespace
Metric
Start time
seconds
minutes
hours
days
weeks
Aggregate
None
avg
max
min
sum
Sampling:
seconds
minutes
hours
days
weeks
Stacked
Fetch & graph
Clear
Spam random metrics
Namespace
Metric name
Number of metrics
Spam interval (ms)
Spam
API Call Log
Clear


In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and later apply the result to a video stream (really just a series of images). Check out the video clip "raw-lines-example.mp4" (also contained in this repository) to see what the output should look like after using the helper functions below.
Once you have a result that looks roughly like "raw-lines-example.mp4", you'll need to get creative and try to average and/or extrapolate the line segments you've detected to map out the full extent of the lane lines. You can see an example of the result you're going for in the video "P1_example.mp4". Ultimately, you would like to draw just one line for the left side of the lane, and one for the right.
Let's have a look at our first image called 'test_images/solidWhiteRight.jpg'. Run the 2 cells below (hit Shift-Enter or the "play" button above) to display the image.
Note: If, at any point, you encounter frozen display windows or other confounding issues, you can always start again with a clean slate by going to the "Kernel" menu above and selecting "Restart & Clear Output".
The tools you have are color selection, region of interest selection, grayscaling, Gaussian smoothing, Canny Edge Detection and Hough Tranform line detection. You are also free to explore and try other techniques that were not presented in the lesson. Your goal is piece together a pipeline to detect the line segments in the image, then average/extrapolate them and draw them onto the image for display (as below). Once you have a working pipeline, try it out on the video stream below.
Run the cell below to import some packages. If you get an import error
for a package you've already installed, try changing your kernel (select the Kernel menu above --> Change Kernel). Still have problems? Try relaunching Jupyter Notebook from the terminal prompt. Also, see this forum post for more troubleshooting tips.
#importing some useful packages
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import pandas as pd
import cv2
%matplotlib inline
#reading in an image
image = mpimg.imread('test_images/solidWhiteCurve.jpg')
#printing out some stats and plotting
print('This image is:', type(image), 'with dimesions:', image.shape)
plt.imshow(image) # if you wanted to show a single color channel image called 'gray', for example, call as plt.imshow(gray, cmap='gray')
Some OpenCV functions (beyond those introduced in the lesson) that might be useful for this project are:
cv2.inRange()
for color selection
cv2.fillPoly()
for regions selection
cv2.line()
to draw lines on an image given endpoints
cv2.addWeighted()
to coadd / overlay two images
cv2.cvtColor()
to grayscale or change color
cv2.imwrite()
to output images to file
cv2.bitwise_and()
to apply a mask to an image
Check out the OpenCV documentation to learn about these and discover even more awesome functionality!
Below are some helper functions to help get you started. They should look familiar from the lesson!
import math
def grayscale(img):
"""Applies the Grayscale transform
This will return an image with only one color channel
but NOTE: to see the returned image as grayscale
(assuming your grayscaled image is called 'gray')
you should call plt.imshow(gray, cmap='gray')"""
return cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
# Or use BGR2GRAY if you read an image with cv2.imread()
# return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
def canny(img, low_threshold, high_threshold):
"""Applies the Canny transform"""
return cv2.Canny(img, low_threshold, high_threshold)
def gaussian_blur(img, kernel_size):
"""Applies a Gaussian Noise kernel"""
return cv2.GaussianBlur(img, (kernel_size, kernel_size), 0)
def region_of_interest(img, vertices):
"""
Applies an image mask.
Only keeps the region of the image defined by the polygon
formed from `vertices`. The rest of the image is set to black.
"""
#defining a blank mask to start with
mask = np.zeros_like(img)
#defining a 3 channel or 1 channel color to fill the mask with depending on the input image
if len(img.shape) > 2:
channel_count = img.shape[2] # i.e. 3 or 4 depending on your image
ignore_mask_color = (255,) * channel_count
else:
ignore_mask_color = 255
#filling pixels inside the polygon defined by "vertices" with the fill color
cv2.fillPoly(mask, vertices, ignore_mask_color)
#returning the image only where mask pixels are nonzero
masked_image = cv2.bitwise_and(img, mask)
return masked_image
def draw_lines(img, lines, color=[255, 0, 0], thickness=2, alpha=1):
"""
NOTE: this is the function you might want to use as a starting point once you want to
average/extrapolate the line segments you detect to map out the full
extent of the lane (going from the result shown in raw-lines-example.mp4
to that shown in P1_example.mp4).
Think about things like separating line segments by their
slope ((y2-y1)/(x2-x1)) to decide which segments are part of the left
line vs. the right line. Then, you can average the position of each of
the lines and extrapolate to the top and bottom of the lane.
This function draws `lines` with `color` and `thickness`.
Lines are drawn on the image inplace (mutates the image).
If you want to make the lines semi-transparent, think about combining
this function with the weighted_img() function below
"""
overlay = img.copy()
for line in lines:
for x1,y1,x2,y2 in line:
cv2.line(overlay, (x1, y1), (x2, y2), color, thickness)
cv2.addWeighted(overlay, alpha, img, 1 - alpha, 0, img)
def hough_lines(img, rho, theta, threshold, min_line_len, max_line_gap):
"""
`img` should be the output of a Canny transform.
Returns an image with hough lines drawn.
"""
lines_xy = cv2.HoughLinesP(img, rho, theta, threshold, np.array([]), minLineLength=min_line_len, maxLineGap=max_line_gap)
lines_polar = cv2.HoughLines(img, rho, theta, threshold, np.array([]))
line_img = np.zeros((img.shape[0], img.shape[1], 3), dtype=np.uint8)
draw_lines(line_img, lines_xy)
return (line_img,lines_xy,lines_polar)
# Python 3 has support for cool math symbols.
def weighted_img(img, initial_img, α=0.8, β=1., λ=0.):
"""
`img` is the output of the hough_lines(), An image with lines drawn on it.
Should be a blank image (all black) with lines drawn on it.
`initial_img` should be the image before any processing.
The result image is computed as follows:
initial_img * α + img * β + λ
NOTE: initial_img and img must be the same shape!
"""
return cv2.addWeighted(initial_img, α, img, β, λ)
Now you should build your pipeline to work on the images in the directory "test_images"
You should make sure your pipeline works well on these images before you try the videos.
import numpy as np
import itertools
from scipy import linalg
from sklearn import mixture
from scipy.stats import norm
import os
os.listdir("test_images/")
run your solution on all test_images and make copies into the test_images directory).
#depricated not used.
def find_mean_x_at_using_gmm(intercept, y, slope, dist, x_max, x_range, plot=False):
m = slope.copy()
c = intercept.copy()
m[m==0] = 0.001
x = (y-c)/m
x_all = []
for d,xi in zip(dist.round(),x):
x_all.extend(d*[xi])
X_pre = np.array(x_all)
X = X_pre[(X_pre>x_range[0]) & (X_pre<(x_range[1]))]
X = np.reshape(X,(X.shape[0],1))
cv_types = ['spherical', 'tied', 'diag', 'full']
gmm = mixture.GaussianMixture(n_components=2,covariance_type=cv_types[0])
gmm.fit(X)
if plot:
plt.figure()
plt.hist(X,bins=x_max,range=[0,x_max])
plt.figure()
x_axis = np.arange(0, x_max)
for m,v in zip(gmm.means_, gmm.covariances_):
plt.plot(x_axis, norm.pdf(x_axis,m,v**0.5))
top_x = gmm.means_.ravel().copy()
top_x.sort()
if plot:
print(top_x)
return top_x
#function to draw histograms on an image
def draw_hist(image, x, y, y_offset, x_offset, y_max=100):
y = (y/y.max())*y_max
lines = []
for xi,yi in zip(x,y):
lines.append([[xi+x_offset, y_offset, xi+x_offset, y_offset-yi]])
lines = np.round(np.array(lines)).astype(int)
draw_lines(image, lines, color=[np.random.randint(255), np.random.randint(255), np.random.randint(255)]
, thickness=2)
#Fitting a gaussian distribution and removing points that are outside of sd_threshold for reducing noise
def remove_anomalies_removed(x, dist, sd_threshold=1):
dist_n = dist/dist.sum()
m_pre = (x*dist_n).sum()
sd_pre = (((m_pre-x)**2)*dist_n).sum()**0.5
left_threshold = m_pre - sd_threshold*sd_pre
right_threshold = m_pre + sd_threshold*sd_pre
x_f = x[(x>left_threshold) & (x<right_threshold)]
dist_f = dist_n[(x>left_threshold) & (x<right_threshold)]
return x_f, dist_f
#finding mean x at a given y by extending all the line segments from hough transformaion.
def find_mean_x_at(intercept, y, slope, dist, x_max, x_range, plot=False):
m = slope.copy()
c = intercept.copy()
m[m==0] = 0.001
x = (y-c)/m
x1_pre = x[(slope>0) & (x>x_range[0]) & (x<x_range[1])]
x1_dist = dist[(slope>0) & (x>x_range[0]) & (x<x_range[1])]
#x1_f, x1_dist_f = remove_anomalies_removed(x1_pre[(x1_pre>x_range[0]) & (x1_pre<x_range[1])], x1_dist)
x1_f, x1_dist_f = remove_anomalies_removed(x1_pre, x1_dist)
dist_1_y, dist_1_x = np.histogram(x1_f,bins=x_max-1,weights=x1_dist_f)
x2_pre = x[(slope<0) & (x>x_range[0]) & (x<x_range[1])]
x2_dist = dist[(slope<0) & (x>x_range[0]) & (x<x_range[1])]
#x2_f, x2_dist_f = remove_anomalies_removed(x2_pre[(x2_pre>x_range[0]) & (x2_pre<x_range[1])], x2_dist)
x2_f, x2_dist_f = remove_anomalies_removed(x2_pre, x2_dist)
dist_2_y, dist_2_x = np.histogram(x2_f,bins=x_max-1,weights=x2_dist_f)
top_x = np.array([x1_f.mean(), x2_f.mean()])
top_x.sort()
return top_x, [dist_1_x, dist_1_y, dist_2_x, dist_2_y]
def plot_image(plot_images, image, cmap=None, title="", new_fig=True):
if plot_images:
if new_fig:
plt.figure()
plt.imshow(image, cmap=cmap)
plt.title(title)
def process_image(image, plot_debug_images=False, plot_final_image=False, plot_dist = False, title=None):
ysize = image.shape[0]
xsize = image.shape[1]
left_bottom = [0, ysize]
right_bottom = np.array([xsize, ysize])
apex = right_bottom/2
vertices = np.array([[left_bottom, right_bottom, apex]])
#convert to grayscale
gray = grayscale(image)
plot_image(plot_debug_images, gray, 'Greys_r', title="Grayscaled")
#blur to remove noise
blured = gaussian_blur(gray, 5)
plot_image(plot_debug_images, blured, 'Greys_r', title="Grayscaled and Blurred")
#detecting edges using canny algorithm
edges = canny(blured, 50, 150)
plot_image(plot_debug_images, edges, 'Greys_r', title="With Edges Detected")
#keeping only area of interest
masked_img = region_of_interest(edges, np.int32(vertices))
plot_image(plot_debug_images, masked_img, 'Greys_r', title="Masked Area of Interest")
#Extracting lines
lines_img, lines_xy, lines_polar = hough_lines(masked_img,1,0.1,20,10,10)
plot_image(plot_debug_images, lines_img, 'Greys_r', title="Extracted Lines using Hough Transformation")
#lines superimposed with original image
superimposed_img = weighted_img(lines_img, image)
plot_image(plot_debug_images, superimposed_img, title="Lines Superimposed on Original Image")
# Finding slope, intercept, and distance of all line segements from hough transformation
df = pd.DataFrame(lines_xy[:,0,:])
df.columns = ["x1", "y1", "x2", "y2"]
slope = (df.y2-df.y1)/(df.x2-df.x1)
slope[slope.apply(np.isinf)] = 10**10
dist = ((df.y2-df.y1)**2+(df.x2-df.x1)**2)**0.5
intercept = df.y1-(slope*df.x1)
#Finding the mean intercept from the line segments
lane_y_end = int(ysize*0.65)
top_x1, dist_bottom = find_mean_x_at(intercept, ysize, slope, dist, xsize, x_range=[0,xsize]
, plot=plot_debug_images)
x1_bottom,x2_bottom = top_x1[0], top_x1[1]
top_x2, dist_apex = find_mean_x_at(intercept, lane_y_end, slope, dist, xsize, x_range=[xsize/3,xsize*3/4]
, plot=plot_debug_images)
x1_apex,x2_apex = top_x2[0], top_x2[1]
y1_bottom = y2_bottom = ysize
y1_apex = y2_apex = lane_y_end
#drawing the lane lines
lines_f = []
lines_f.append([x1_bottom, y1_bottom, x1_apex, y1_apex])
lines_f.append([x2_bottom, y2_bottom, x2_apex, y2_apex])
image_f = image.copy()
draw_lines(image_f, np.array([lines_f]).astype(int), thickness=15, alpha=0.3)
final_image_title = title if title else "With Detected Lanes"
#drawing distribution of intercepts for debugging
if plot_dist:
draw_hist(image_f, dist_apex[0], dist_apex[1], lane_y_end, 0, y_max=100)
draw_hist(image_f, dist_apex[2], dist_apex[3], lane_y_end, 0, y_max=100)
draw_hist(image_f, dist_bottom[0], dist_bottom[1], ysize*0.99, 0, y_max=100)
draw_hist(image_f, dist_bottom[2], dist_bottom[3], ysize*0.99, 0, y_max=100)
final_image_title = final_image_title + " (Debug View)"
plot_image(plot_final_image, image_f, title=final_image_title)
return image_f
image = mpimg.imread('test_images/solidWhiteCurve.jpg')
process_image(image, plot_final_image=True, plot_dist=False ,plot_debug_images=True, title="");
for file in os.listdir("test_images/"):
image = mpimg.imread('test_images/{}'.format(file))
process_image(image, plot_final_image=True, plot_dist=True, title=file);
You know what's cooler than drawing lanes over images? Drawing lanes over video!
We can test our solution on two provided videos:
solidWhiteRight.mp4
solidYellowLeft.mp4
Note: if you get an import error
when you run the next cell, try changing your kernel (select the Kernel menu above --> Change Kernel). Still have problems? Try relaunching Jupyter Notebook from the terminal prompt. Also, check out this forum post for more troubleshooting tips.
If you get an error that looks like this:
NeedDownloadError: Need ffmpeg exe.
You can download it by calling:
imageio.plugins.ffmpeg.download()
Follow the instructions in the error message and check out this forum post for more troubleshooting tips across operating systems.
# Import everything needed to edit/save/watch video clips
from moviepy.editor import VideoFileClip
from IPython.display import HTML
Let's try the one with the solid white lane on the right first ...
white_output = 'output_videos/white.mp4'
clip1 = VideoFileClip("input_videos/solidWhiteRight.mp4")
white_clip = clip1.fl_image(lambda img: process_image(img, plot_dist=False)) #NOTE: this function expects color images!!
%time white_clip.write_videofile(white_output, audio=False)
Play the video inline, or if you prefer find the video in your filesystem (should be in the same directory) and play it in your video player of choice.
HTML("""
<video width="960" height="540" controls>
<source src="{0}">
</video>
""".format(white_output))
At this point, if you were successful you probably have the Hough line segments drawn onto the road, but what about identifying the full extent of the lane and marking it clearly as in the example video (P1_example.mp4)? Think about defining a line to run the full length of the visible lane based on the line segments you identified with the Hough Transform. Modify your draw_lines function accordingly and try re-running your pipeline.
Now for the one with the solid yellow lane on the left. This one's more tricky!
yellow_output = 'output_videos/yellow.mp4'
clip2 = VideoFileClip('input_videos/solidYellowLeft.mp4')
yellow_clip = clip2.fl_image(lambda img: process_image(img, plot_dist=False))
%time yellow_clip.write_videofile(yellow_output, audio=False)
HTML("""
<video width="960" height="540" controls>
<source src="{0}">
</video>
""".format(yellow_output))
Congratulations on finding the lane lines! As the final step in this project, we would like you to share your thoughts on your lane finding pipeline... specifically, how could you imagine making your algorithm better / more robust? Where will your current algorithm be likely to fail?
Please add your thoughts below, and if you're up for making your pipeline more robust, be sure to scroll down and check out the optional challenge video below!
If you're satisfied with your video outputs it's time to submit! Submit this ipython notebook for review.
Try your lane finding pipeline on the video below. Does it still work? Can you figure out a way to make it more robust? If you're up for the challenge, modify your pipeline so it works with this video and submit it along with the rest of your project!
challenge_output = 'output_videos/extra.mp4'
clip2 = VideoFileClip('input_videos/challenge.mp4')
challenge_clip = clip2.fl_image(lambda img: process_image(img, plot_dist=False))
%time challenge_clip.write_videofile(challenge_output, audio=False)
HTML("""
<video width="960" height="540" controls>
<source src="{0}">
</video>
""".format(challenge_output))


Free API: Get a web development fact
Cullaborative API by the Northwest web app developers.
Go to this default page
Get a random fact
Get by ID
Use query format instead
Cullaborative API by the Northwest web app developers.


You have no favorite events yet!
{{currentUser.name}} has no favorite events yet!
You have no favorite lists yet!
{{currentUser.name}} has no favorite lists yet!
You have no favorite places yet!
{{currentUser.name}} has no favorite places yet!


{% extends 'layout.html' %} {% block content %}
I am a Father of a {{ age }} year old little girl and a Senior Software Engineer at Bluebean Software with more than {{ years_of_experience }} years developing software applications.

Otherwise I sing Bass at the Gauteng Chorister.


:: com :: sun :: star :: ui ::
|
| interface XDockingAreaAcceptor |
|
- Description
- this interface enables developer to implement different docking area
acceptors which are used by the frame based layout manager.
A docking area acceptor is responsible to control the docking area of a
container window. As OLE for example supports inplace and outplace editing,
there are different parts of code responsible for the container window.
This interface enables developer to make support implementations for these
scenarios.
- Since
- OOo 2.0
- See also
- ::com::sun::star::frame::XFrame
|
| Methods' Summary |
| getContainerWindow |
provide the container window where the layout manager can request border
space for docking windows.
|
| requestDockingAreaSpace |
method to ask an implementation if the provided space for docking windows
is available or not.
|
| setDockingAreaSpace |
method to brief an implementation that we need new border space.
|
| Methods' Details |
getContainerWindow
| ::com::sun::star::awt::XWindow |
| getContainerWindow(); |
- Description
- provide the container window where the layout manager can request border
space for docking windows.
Additionally the layout manager uses this window to create its own child
windows for docking purposes.
|
|
requestDockingAreaSpace
| boolean |
| requestDockingAreaSpace( |
[in] ::com::sun::star::awt::Rectangle |
RequestedSpace ); |
- Description
- method to ask an implementation if the provided space for docking windows
is available or not.
The ::com::sun::star::awt::Rectangle parameter is
filled by the caller with pixel data. The members of
::com::sun::star::awt::Rectangle must be filled
as following:
- X = requested area on left side (in pixel)
- Y = requested area on top side (in pixel)
- Width = requested area on right side (in pixel)
- Height = requested area on bottom side (in pixel)
|
|
setDockingAreaSpace
| void |
| setDockingAreaSpace( |
[in] ::com::sun::star::awt::Rectangle |
BorderSpace ); |
- Description
- method to brief an implementation that we need new border space.
The callee must size its document window so that we have the amount
of space we have provided. The ::com::sun::star::awt::Rectangle
parameter is filled by the caller with pixel data. The members of
::com::sun::star::awt::Rectangle must be filled as
following:
- X = new area on left side (in pixel)
- Y = new area on top side (in pixel)
- Width = new area on right side (in pixel)
- Height = new area on bottom side (in pixel)
|
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


| Modifier and Type | Class and Description |
|---|---|
class |
AccountFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
AddressFetcher |
class |
ApplicationFetcher |
class |
AuthorizedConnectAppFetcher |
class |
AvailablePhoneNumberCountryFetcher |
class |
CallFetcher |
class |
ConferenceFetcher |
class |
ConnectAppFetcher |
class |
IncomingPhoneNumberFetcher |
class |
KeyFetcher |
class |
MessageFetcher |
class |
NotificationFetcher |
class |
OutgoingCallerIdFetcher |
class |
QueueFetcher |
class |
RecordingFetcher |
class |
SandboxFetcher |
class |
SigningKeyFetcher |
class |
TranscriptionFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
FeedbackFetcher |
class |
FeedbackSummaryFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
ParticipantFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
MediaFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
MemberFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
CredentialListFetcher |
class |
DomainFetcher |
class |
IpAccessControlListFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
CredentialFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
CredentialListMappingFetcher |
class |
IpAccessControlListMappingFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
IpAddressFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
ShortCodeFetcher |
class |
SmsMessageFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
TriggerFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
ServiceFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
ChannelFetcher |
class |
RoleFetcher |
class |
UserFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
PhoneNumberFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
AlertFetcher |
class |
EventFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
BindingFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
CommandFetcher |
class |
DeviceFetcher |
class |
RatePlanFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
UsageFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
CountryFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
NumberFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
WorkspaceFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
ActivityFetcher |
class |
TaskFetcher |
class |
TaskQueueFetcher |
class |
WorkerFetcher |
class |
WorkflowFetcher |
class |
WorkspaceStatisticsFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
ReservationFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
TaskQueueStatisticsFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
WorkersStatisticsFetcher |
class |
WorkerStatisticsFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
WorkflowStatisticsFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
TrunkFetcher |
| Modifier and Type | Class and Description |
|---|---|
class |
OriginationUrlFetcher |
Copyright © 2011 Twilio, Inc. All Rights Reserved.


SystemC
2.3.3
Accellera SystemC proof-of-concept library
Class Hierarchy
Go to the textual class hierarchy
Generated on Sun Jun 9 2019 09:03:50 for SystemC by
1.8.13


The Vary header is sent by the web server to indicate what makes a HTTP object Vary. This makes a lot of sense with headers like Accept-Encoding. When a server issues a "Vary: Accept-Encoding" it tells Varnish that its needs to cache a separate version for every different Accept-Encoding that is coming from the clients. So, if a clients only accepts gzip encoding Varnish won't serve the version of the page encoded with the deflate encoding.
The problem is that the Accept-Encoding field contains a lot of different encodings. If one browser sends:
Accept-Encoding: gzip,deflate
And another one sends:
Accept-Encoding: deflate,gzip
Varnish will keep two variants of the page requested due to the different Accept-Encoding headers. Normalizing the accept-encoding header will sure that you have as few variants as possible. The following VCL code will normalize the Accept-Encoding headers:
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg)$") {
# No point in compressing these
remove req.http.Accept-Encoding;
} elsif (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} elsif (req.http.Accept-Encoding ~ "deflate") {
set req.http.Accept-Encoding = "deflate";
} else {
# unknown algorithm
remove req.http.Accept-Encoding;
}
}
The code sets the Accept-Encoding header from the client to either gzip, deflate with a preference for gzip.
Some applications or application servers send Vary: User-Agent along with their content. This instructs Varnish to cache a separate copy for every variation of User-Agent there is. There are plenty. Even a single patchlevel of the same browser will generate at least 10 different User-Agent headers based just on what operating system they are running.
So if you really need to Vary based on User-Agent be sure to normalize the header or your hit rate will suffer badly. Use the above code as a template.


Ballerina 1.1.1 is a patch release iteration of its previous 1.1.0 release, which introduces the below functionalities. Also, this release addresses a few bug fixes and improvements.
You can use the inbuilt updating capability (introduced in jBallerina 1.1.0) to update to jBallerina 1.1.1 as follows.
If you are already using jBallerina version 1.1.0, you can directly update your distribution to jBallerina 1.1.1 by executing the below command:
ballerina dist update
However, you need to execute the below commands if you have installed:
ballerina dist pull jballerina-1.1.1
ballerina dist use jballerina-1.1.1
If you have not installed jBallerina, then download the installers to install.
Add major improvements to the Ballerina build phase to reduce the total build time by ~30%.
Add support for the Signature Help feature.
Previously, the implementation initialized an object field’s default value in the __init()
function of the object, which caused the default values to be set to the field even when the __init()
method was called explicitly.
For example, the below sample prints “foo” as the value of f.s
since the default value “foo” was set as the value of f.s
whenever the __init()
method was called.
import ballerina/io;
type Foo object {
string s = "foo";
function __init() {
}
function reInit() {
self.__init();
}
};
public function main() {
Foo f = new();
// Update field `s`.
f.s = "bar";
f.reInit();
io:println(f.s);
}
This is fixed in 1.1.1 so that now this sample prints “bar”.


StormLib API Reference
SFileRemoveFile
bool WINAPI SFileRemoveFile( HANDLE hMpq, // Handle to the MPQ const char * szFileName, // The name of a file to be removed DWORD dwSearchScope // Ignored );
Function SFileRemoveFile removes a file from MPQ. The MPQ must have been open by SFileOpenArchive or created by SFileCreateArchive. Note that this operation leaves a gap in the MPQ file. To reduce size of the MPQ, use SFileCompactArchive.
When the function succeeds, it returns nonzero. On an error, the function returns false and GetLastError gives the error code.
The function only removes file with the specified locale. Unlike SFileOpenFileEx, if the file with preset locale doesn't exist in the MPQ, the function fails. For more informations about preset locale, see SFileSetLocale.
| Available in Storm.dll | No |
| Ordinal number in Storm.dll 1.00 | N/A |
| Ordinal number in Storm.dll 1.09 | N/A |
Copyright (c) Ladislav Zezula 2003 - 2010


the and RSV with respiratory for from {background ARIMA infection syncytial virus climate margin was {border-style data px;} #ffffff;} between factors model that not activity meteorological monthly relative which .âˆ—âˆ—âˆ— The incidence lag samples temperature using are children may time were (,,)(,,) Lag among infections rainfall humidity prevalence average have speed study year peak px; this tropical {font-family correlation font-size models observed rainy series shown test wind (Table Chulalongkorn December Infect../S RSV-positive Respiratory also analysis associated been but countries double; during most number pattern prediction seasonality several studies two used weather years âˆ’â€‰. From Infect. January RMSE Thailand, age based bold border-color border-width cases confirmed human influence lower months one percentage showed solid; tested viral virus, {font-style {font-weight â€" (lag .âˆ— .âˆ—âˆ— Although Commons Creative International RSV-A S). Supplementary Thailand This University amount any appeared circulation courier; disease em; environmental epidemiological examined highest humidity, including increased line) local mean month months. over positive potential predicted pt;} rainfall, rank regional risk seasons significant similar testing tract trends useful variables young


Si gli gnocchi si fanno proprio così aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaa
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh già


Adding new data layer¶
All data layers have to inherit from
DataLayer
class. We recommend that you use
tf.data
while implementing your data layer.
You need to implement the following methods:
- Static methods:
get_required_params()
andget_optional_params()
to specify required and optional parameters correspondingly __init__(self, params, num_workers=None, worker_id=None)
:- The
params
parameter should be a Python dictionary with options. Such as mini-batch shapes, padding, where to get the data from, etc. - If you are using
tf.data
, most of the ETL (extract-transform-load) logic should happen here.
- The
gen_input_tensors(self)
:- This method should return a list of Tensors or Placeholders in which
new data will be fed. With each call it should return new objects
(for multi-GPU support). In case of
tf.data
, you can use output oftf.data.Iterator.get_next()
. - For example: TODO.
- This method should return a list of Tensors or Placeholders in which
new data will be fed. With each call it should return new objects
(for multi-GPU support). In case of
next_batch_feed_dict(self)
:- Most likely should return empty Python dictionary if you are using
tf.data
. - If you are using Placeholders in
gen_input_tensors(self)
, this method should return corresponding feed_dictionary.
- Most likely should return empty Python dictionary if you are using
shuffle(self)
:- If you are not using
tf.data
this method should shuffle your dataset.
- If you are not using
get_size_in_samples(self)
:- Should return the size of your dataset in samples.


My Favorite Weather is:
>
©
Microsoft Corporation. All rights reserved. Terms of use.
For new and updated Web samples, visit the
MSDN Online Web & Internet Samples
site.


{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages and messages[0][0] == 'formerror' %}
{{ messages[0][1] |e }}
{% endif %}
{% endwith %}
about edit navigation
Here you can customize the left navigation menu,
defining which links are visible for visitors, students, and faculty.
You can copy & paste default navigation menu below as a starting point.


pytaxize¶
This is a port of the R package taxize. There is a lot going on in the R version of this library, so it will take a while to get all the same functionality over here.
Why? A significant advantage of a Python version of taxize will be for those that are pythonistas at heart. Also, you could use pytaxize in a web app, whereas you could with taxize (e.g., in a Shiny app), but it wouldn’t scale, be very fast, etc.
Installation¶
Stable from pypi
pip install pytaxize
Development version
sudo pip install git+git://github.com/sckott/pytaxize.git#egg=pytaxize
Taxonomic Ids¶
I’ve started working on a class interface for taxonomic IDs, which will have a bunch of extension methods to do various things with taxon ids. What’s available right now is just getting COL ids.
from pytaxize import Ids
res = Ids('Poa annua')
res.ncbi()
res.ids
{'Poa annua': [{'id': '93036',
'name': 'Poa annua',
'rank': 'species',
'uri': 'https://www.ncbi.nlm.nih.gov/taxonomy/93036'}]}
ITIS¶
from pytaxize import itis
itis.accepted_names(504239)
{'acceptedName': 'Dasiphora fruticosa',
'acceptedTsn': '836659',
'author': '(L.) Rydb.'}
itis.hierarchy_up(tsn = 36485)
{'author': 'Raf.',
'parentName': 'Asteraceae',
'parentTsn': '35420',
'rankName': 'Genus',
'taxonName': 'Agoseris',
'tsn': '36485'}
Catalogue of Life¶
from pytaxize import col
x = col.children(name=["Apis"])
x[0][0:2]
[{'id': '7a4a38c5095963949d6d6ec917d471de',
'name': 'Apis andreniformis',
'rank': 'Species'},
{'id': '39610a4ceff7e5244e334a3fbc5e47e5',
'name': 'Apis cerana',
'rank': 'Species'}]
Modules¶
- pytaxize modules
Introduction to pygbif modules.
- Taxonomic Identifiers Class
The Ids class
- Children
The Children class
- Classification
The Classification class
- Scientific and common names
Scientific to common names, and vice versa
- NCBI
The ncbi module: NCBI methods
- ITIS
The itis module: ITIS methods
- Global Names Resolver
The gn module: methods for Global Names Index and Resolver
- Catalogue of Life
The col module: Catalogue of Life methods
- Other methods
Variety of other methods
All the rest¶
- Changelog
See what has changed in recent pygbif versions.
- Contributors
pygbif contributors.
- Contributing
Learn how to contribute to the pygbif project.
- Contributor Code of Conduct
Expected behavior in this community. By participating in this project you agree to abide by its terms.
- LICENSE
The pygbif license.


{% extends "_base.html" %} {% block content %}
Override this sample content and starting building by editing or replacing {{ PROJECT_PATH }}/{{ PATH }}
.
To change this project's S3 configuration or default context, edit {{ PROJECT_PATH }}/tarbell_config.py
.
Tarbell uses Jinja2 for templating. Read the excellent documentation to learn more about using Jinja.
This base template uses the Twitter Bootstrap CSS framework.
All files in the _base
directory are available from the root path of the preview server and published project. So _base/css/base.css
can be previewed http://localhost:5000/css/base.css
. However, if you create a file with the same name and path relative to your project directory, this file will be served up instead.
This base template comes with basic template snippets that are intended to be overridden. To add a custom header or footer for your project, simply copy _base/_nav.html
or _base/_footer.html
into your project directory and edit it, or create your own.
Files and directories prefixed with an underscore (_
) as well as any file pattern specified in tarbell_config.py
will not be published. These files can still be previewed locally.
This project uses Google spreadsheets to manage context variables. The spreadsheet can be edited here.
{% else %}This project does not use Google spreadsheets to manage context variables. They must be set in the DEFAULT_CONTEXT
section of {{ PROJECT_PATH }}/tarbell_config.py
.
In the values worksheet, there are columns named key
and value
. Every value is available to the template by referencing the key. Here's an example:
The key is headline
and the value {{ headline }}.
Print this headline in your code with something like {{ "{{ headline }}" }}
.
Use the worksheet name to access data.
{{ "{% for row in data %}" }} {{ "" }} {{ " {{ row.column1 }}:" }} {{ " {{ row.column2 }}" }} {{ "
" }} {{ "{% endfor %}" }}
Output:
{% for row in data %}{{ row.Column1}}: {{ row.Column2}}
{% endfor %}Requires a column named key
.
{{ "" }} {{ " key1, column 1:" }} {{ " {{ keyed_data.key1.column1 }}" }} {{ "
" }} {{ "" }} {{ " key2, column 2:" }} {{ " {{ keyed_data.key2.column2 }}" }} {{ "
" }}
Output:
key1, column 1: {{ keyed_data.key1.column1 }}
key2, column 2: {{ keyed_data.key2.column2 }}


Notebooks
Story: The effect of a new maiden's gaze
The effect of a new maiden's gaze
Title
The effect of a new maiden's gaze
Collection
Summary
If a pubertal girl sees the men bringing game home they become fixed to the ground.
Comments
1) This story is found in Book II-37
Contributors
Date
October 1873
Categories
New maidens, Custom and daily life
Keywords
new maidens (girls) , new maidens (the effect of their looks or gaze) , new maidens (transfix and transform people) , new maidens (prohibitions regarding) , new maidens (the treatment of) , new maidens (are secluded in a hut) , new maidens (and game and hunting) , hunting (and effect of gaze of new maiden) , gaze (the effect of a new maiden's) , hut (new maiden's secluded in) , hut (and the effect of a new maiden's gaze)
Story Pages
3337v


README¶
image-anonymisation¶
Using pre-trained TensorFlow models to remove vehicles and people from images
Getting started¶
Clone or download the code¶
Option 1 - With Git:
git clone https://github.com/NPRA/image-anonymisation.git
(Requires git
to be installed)
Option 2 - Manual download: Select “Clone or download” and “Download ZIP” above. Then extract the downloaded archive to a suitable location.
Installing Build Tools for Visual Studio 2019¶
Build Tools for Visual Studio 2019 is required to build some of the package-dependencies.
Download the installer.
Run the installer as Administrator
Select “C++ build tools” during installation.
Installing Anaconda¶
Download the installer.
Run installer as Administrator.
Select “Install for all users” during installation.
Creating the conda-environment¶
Open an “Anaconda PowerShell Prompt” as Administrator.
In the Anaconda PowerShell Prompt, navigate to the root directory of the cloned repository.
Create the conda-environment by running:
conda env create -f environment.yml
This will create a new environment named
image-anonymisation
.Activate the environment by running: .. code-block:: Bash
conda activate image-anonymisation
NOTE: If you are unable to run the script in a terminal with conda initialized, you can use the
bin/run.ps1
(PowerShell only) script, with the-conda_path
argument to invoke the application.
Installing the Oracle Instant Client¶
Oracle Instant Client
(or any other Oracle Database installation which contains the Oracle Client libraries) is required when
using the optional database functionality. Download the client, and add the path to the instantclient_xx_x
folder to the PATH
environment variable.
NOTE: If you do not want to modify the PATH
variable, you can use bin/run.ps1
, with the -oracle_path
argument
to invoke the application instead.
Proxy setup¶
If Anaconda fails to create the environment above due to a HTTP error, you might need to configure Anaconda to use a proxy. Set the following environment variables:
HTTPS_PROXY=<your_proxy>
and
HTTP_PROXY=<your_proxy>
(These are only required for installation and model downloading, and can therefore be removed after the environment has been created, and the model file has been downloaded.)
You should now be able to create the environment with the same command as above.
Manual proxy configuration in conda and pip¶
If you are unable to set the environment variables, you can specify the proxy to anaconda and pip directly.
In
~/.condarc
add the following lines:proxy_servers: https: <your_proxy>
You should now be able to create the conda environment with:
conda env create -f environment.yml
Note that the
pip
-part of the installation will fail, but the conda packages will be installed.Activate the environment:
conda activate image-anonymisation
The
pip
-packages will now have to be installed manually:pip install cx-oracle==7.3.0 func-timeout==4.3.5 iso8601==0.1.12 m2r==0.2.1 opencv-python==<IP_ADDRESS> pillow==7.0.0 --proxy <your_proxy>
The
webp
package requires a little more work. First, installimportlib_resources
andconan
:pip install importlib_resources>=1.0.0 conan>=1.8.0 --proxy <your_proxy>
Now,
conan
has to be configured to use the proxy server. In~/.conan/conan.conf
under[proxies]
, add the lines:http = <your_proxy> https = <your_proxy>
The
webp
package can now be installed withpip install webp==0.1.0a15 --proxy <your_proxy>
Usage¶
The program will traverse the file-tree rooted at the input folder, and mask all .jpg images within the tree. The masked images will be written to an output directory with identical structure as the input folder. The program should be executed as a python-module from the root directory:
usage: python -m src.main [-h] [-i INPUT_FOLDER] [-o OUTPUT_FOLDER] [-a ARCHIVE_FOLDER]
[-l LOG_FOLDER] [--skip-clear-cache] [-k CONFIG_FILE]
Image anonymisation
optional arguments:
-h, --help show this help message and exit
-i INPUT_FOLDER, --input-folder INPUT_FOLDER
Base directory for input images.
-o OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER
Base directory for masked (output) images and metadata
files
-a ARCHIVE_FOLDER, --archive-folder ARCHIVE_FOLDER
Optional base directory for archiving original images.
-l LOG_FOLDER, --log-folder LOG_FOLDER
Optional path to directory of log file. The log file
will be named <log\folder>\<timestamp> <hostname>.log
--skip-clear-cache Disables the clearing of cache files at startup.
-k CONFIG_FILE Path to custom configuration file. See the README for
details. Default is config\default_config.yml
Note: Make sure that the conda environment is activated before executing the command above.
Batch script and PowerShell script.¶
The anonymisation can be ran without manually activating the conda environment, by running either bin/run-with-prompt.bat
or bin/run.ps1
.
The latter also works when conda is not initialized in the shell, as long as the conda_path
parameter is specified correctly.
Documentation¶
The HTML documentation can be built from the docs
directory by running
.\make.bat html
Configuration¶
The user-specifiable configuration parameters can be found in config/default_config.yml. The available parameters are listed below.
Miscellaneous configuration parameters¶
draw_mask
: Apply the mask to the output image?delete_input
: Delete the original image from the input directory when the masking is completed?force_remask
: Recompute masks even though a .webp file exists in the output folder.lazy_paths
: Whenlazy_paths = True
, traverse the file tree during the masking process. Otherwise, all paths will be identified and stored before the masking starts.file_access_retry_seconds
: Number of seconds to wait before (re)trying to access a file/directory which cannot currently be reached. This applies to both reading input files, and writing output files.file_access_timeout_seconds
: Total number of seconds to wait before giving up on accessing a file/directory which cannot currently be reached. This also applies to both reading input files, and writing output files.datetime_format: Timestamp format. See https://docs.python.org/3.7/library/datetime.html#strftime-strptime-behavior for more information.
log_file_name
: Name of the log file.{datetime}
will be replaced with a timestamp formatted asdatetime_format
.{hostname}
will be replaced with the host name.log_level
: Logging level for the application. This controls the log level for terminal logging and file logging (if it is enabled). Must be one of {“DEBUG”, “INFO”, “WARNING”, “ERROR”}.application_version
: Version number for the application. Will be written to JSON files and database.exif_mappenavn: Formatter for mappenavn in the JSON file. relative_input_dir is the path to the folder containing the image, relative to exif_top_dir below. For instance, if the image is located at C:FooBarBazHelloWorld.jpg`, and``exif_top_dir = Bar
, then
relative_input_dirwill be
BazHello`.exif_top_dir
: Top directory forrelative_input_dir
. See above for an explanation.
File I/O parameters¶
remote_json
: Write the EXIF .json file to the output (remote) directory?local_json
: Write the EXIF .json file to the input (local) directory?archive_json
: Write the EXIF .json file to the archive directory?remote_mask
: Write mask file to the output (remote) directory?local_mask
: Write the mask file to the input (local) directory?archive_mask
: Write mask file to the archive directory?
Parameters for asynchronous execution¶
enable_async
: Enable asynchronous post-processing? When True, the file exports (anonymised image, mask file and JSON file) will be executed asynchronously in order to increase processing speed.max_num_async_workers
: Maximum number of asynchronous workers allowed to be active simultaneously. Should be <= (CPU core count - 1)
Parameters for the masking model¶
model_type: Type of masking model. Currently, there are three available models with varying speed and accuracy. The slowest model produces the most accurate masks, while the masks from the medium model are slightly worse. The masks from the “Fast” model are currently not recommended due to poor quality. Must be either “Slow”, “Medium” or “Fast”. “Medium” is recommended. Default: “Medium”
mask_dilation_pixels: Approximate number of pixels for mask dilation. This will help ensure that an identified object is completely covered by the corresponding mask. Set mask_dilation_pixels = 0 to disable mask dilation. Default:
4
max_num_pixels
: Maximum number of pixels in images to be processed by the masking model. If the number of pixels exceeds this value, it will be resized before the masker is applied. This will NOT change the resolution of the output image.
Parameters controlling the appearance of the anonymised regions¶
mask_color: “RGB tuple (0-255) indicating the masking color. Setting this option will override the colors specified below. Example: Setting
mask_color = [50, 50, 50]
will make all masks dark gray.blur: Blurring coefficient (1-100) which specifies the degree of blurring to apply within the mask. When this parameter is specified, the image will be blurred, and not masked with a specific color. Set blur = None to disable blurring, and use colored masks instead. Default:
15
gray_blur: Convert the image to grayscale before blurring? (Ignored if blurring is disabled) Default:
True
normalized_gray_blur: Normalize the gray level within each mask after blurring? This will make bright colors indistinguishable from dark colors. NOTE: Requires
gray_blur=True
Default: True
E-mail configuration¶
uncaught_exception_email
: Send an email if the program exits abnormally due to an uncaught exception.processing_error_email
: Send an email if a processing error is encountered, but the program is able to continuefinished_email
: Send an email when the anonymisation finishes normally.email_attach_log
: Attach the log file to emails?
Database configuration¶
write_exif_to_db
: Write the EXIF data to the database?db_max_n_accumulated_rows
: Maximum number of rows to accumulate locally before writing all accumulated rows to the database.db_max_n_errors
: If the number of failed insertions/updates exceeds this number, a RuntimeError will be raised.db_max_cache_size
: If the number of cached rows exceeds this number, a RuntimeError will be raised.
Custom configuration file¶
The application supports custom configuration files with the same structure as config/default_config.yml
.
Note that custom configuration files should define all variables defined in config/default_config.yml
.
Use the -k
argument to specify a custom config file. (See Usage for details.)
Email notifications¶
The application can send an email notification on an abnormal exit, a processing error, or on completion. These noticifations can be enabled/disabled
with the flags uncaught_exception_email
, processing_error_email
and finished_email
, available in config.py
. The email sending feature requires a
sender, receiver(s), and an SMTP-server in order to work. These can be specified by creating a file named email_config.py
in the config
directory, which
contains the following:
# Sender's address
from_address =<EMAIL_ADDRESS># Receiver address(es)
to_addresses =<EMAIL_ADDRESS><EMAIL_ADDRESS>...]
# SMTP-server address
smtp_host = "<smtp server address>"
# SMTP-server port
port = <smtp port>
EXIF data to database¶
Use the scripts.db.create_db_config
script to create a database configuration file:
usage: python -m scripts.db.create_db_config [-h] --user USER --password PASSWORD --dsn DSN
[--schema SCHEMA] --table_name TABLE_NAME
Create the db_config.py file, which configures the database connection.
optional arguments:
-h, --help show this help message and exit
--user USER Database username
--password PASSWORD Database password (will be encrypted)
--dsn DSN Data source name (DSN)
--schema SCHEMA Optional schema. Default is None
--table_name TABLE_NAME
Database table name.
The program expects to find the table layout in the YAML file config/db_tables/<table_name>.yml
. The file should contain the following keys:
pk_column
: The name of thePRIMARY KEY
column.columns: A list of columns, where each element has the keys:
name
: Name of the column.dtype
: Oracle SQL datatype for the column.formatter
: Name of a function in formatters.py, which returns the column value from the given JSON-contents.extra
: Extra column contstraints, such asNOT NULL
orPRIMARY KEY
.spatial_metadata
: This is only required ifdtype
isSDO_GEOMETRY
. Contains geometric metadata about the objects in the column. Expected keys are:dimension
: Number of dimensions. Must be2
or3
.srid
: SRID for the object’s coordinate system.dim_elements
: A list where each element hasname
,min
,max
andtol
. The elements are used to create theDIMINFO
array in the spatial metadata table.
For a table named my_table
, the contents of config/db_tables/my_table.yml
might look like:
pk_column: UUID
columns:
# ID column. Used as primary key
- name: UUID
dtype: VARCHAR(255)
formatter: uuid
extra: PRIMARY KEY
# Timestamp column
- name: Timestamp
dtype: DATE
formatter: timestamp
extra: NOT NULL
# Optional position column
- name: Position
dtype: SDO_GEOMETRY
formatter: position
extra:
spatial_metadata:
dimension: 2
srid: 4326
dim_elements:
- name: Longitude
min: -180
max: 180
tol: 0.5
- name: Latitude
min: -90
max: 90
tol: 0.5
Note that the example above expects to find the functions uuid
, timestamp
and position
, in src.db.formatters
.
When the parameters above have been configured correctly, the EXIF data can be written to the database by using the json_to_db
script:
python -m scripts.db.json_to_db -i <base input folder>
This will recursively traverse <base input folder>
, read all .json files, and write the contents to the specified database.
Database writing can also be done automatically during anonymisation. This is enabled by setting write_exif_to_db = True
in config.py
.
Tests¶
The tests/
directory provides a large number of tests which can be used to check that the application works as expected. Use the pytest
command
to run the tests:
pytest tests
Note that this will skip the tests marked as slow
and db
. Add the --run-slow
to run the slow
tests, and --run-db
to run the db
tests.
The tests marked with db
requires a test database to be running locally. The test database is a
Single instance Oracle database (18c XE), running in a docker container.
Docker is therefore required to build and run the test database.
To build the docker image, run:
.\tests\db\setup\build.ps1
To start the test database, run:
.\tests\db\setup\start.ps1
Note that the tests marked with db
will fail if the test database is not running.
Extra scripts¶
The following extra scripts are available:
scripts.create_json
: Traverses a directory tree and creates JSON-files for all.jpg
files found in the tree.scripts.check_folders
: Traverses a set of input/output/archive folders and checks that all files are present/not present, as specified in the config file.scripts.evaluate
: Evaluates the current model on a specified testing dataset. Requirespycocotools
to be installed.scripts.db.create_table
: Creates the specified database table.scripts.db.insert_geom_metadata
: Inserts the appropriate metadata for the specified table into theMDSYS.USER_GEOM_METADATA
view.scripts.db.json_to_db
: Traverses a directory tree and writes the contents of all found.json
files to the specified database table.
Each script can be invoked by running:
python -m <script> <args>
Use the -h
argument to get a description for each script, and a list of possible arguments.


Rory McIlroy two off lead going into final round of DP World Tour Championship
McIlroy headed into the weekend six shots off overnight leader Lorenzo-Vera after following his opening 64 with a 74 on Friday
by Press AssociationRory McIlroy climbed to within two strokes of joint leaders John Rahm and Mike Lorenzo-Vera at the DP World Tour Championship in Dubai after shooting a third-round 65.
McIlroy headed into the weekend six shots off overnight leader Lorenzo-Vera after following his opening 64 with a 74 on Friday, but hit back by posting five birdies and an eagle on the seventh hole in a bogey-free round.
The Northern Irishman sits third, on 13-under, two shots behind Rahm and Lorenzo-Vera after producing the round of the day.
Spaniard Rahm hit seven birdies and one bogey for a 66 and Frenchman Lorenzo-Vera dropped a shot on the 18th after four birdies to finish with 69.
Lorenzo-Vera had led by three shots at the end of the second round, but is now tied with Rahm, while Tommy Fleetwood sits four shots back in fourth place on 11-under after three birdies and a bogey in a third-round 70.
Belgium's Thomas Pieters is fifth after carding a second-successive 68, one ahead of Sweden's Marcus Kinhult, who also hit 68 on Saturday.
Danny Willett jumped six places and into contention in joint-seventh place - seven shots behind the leaders - after a 67, which would have been even better had he not bogeyed the last.
Fellow Englishman Matthew Fitzpatrick climbed eight places into joint ninth after a 68, while the biggest movers of the day were Sergio Garcia and Andy Sullivan, who rose to joint 11th after both posted 67s.
If you haven't already, be sure to like our Irish Mirror Sport and Irish Mirror GAA pages on Facebook and follow us on Twitter.
How to follow the Irish Mirror on social media
You can like our main Facebook page here.
Our Irish Mirror Sports page - which brings you all your Irish and UK sports news - can be found here.
You can also check out our Irish Mirror GAA sports page.
The Irish Mirror Twitter account is @IrishMirror while our sports account is @MirrorSportIE.
Our Instagram account can be found here.


St. Mary's Food Bank looking for donations of Thanksgiving turkeys
by abc15.com staffPHOENIX — Wanted: 10,000 turkeys for families in need.
St. Mary’s Food Bank is asking for help reaching its goal of 10,000 turkeys to distribute to families this Thanksgiving.
On Saturday, November 23, St. Mary’s is hosting its 13th annual Super Saturday Turkey Drive. The event goes from 8 a.m. to 2 p.m. at locations around the Valley.
Last year, the food bank provided 11,000 holiday food boxes in the three days leading up to Thanksgiving. Their hope is to provide families with a turkey and other holiday dinner items.
Thanksgiving food box distribution will happen this year from Monday, November 25 through Wednesday, November 27. Families who wish to receive a box will need to bring an ID and are asked to only visit once per family. Read time and location details on distribution here.
What to donate on Super Saturday:
- Turkeys
- Other food (both perishable and non-perishable)
- Money
Where to donate on Super Saturday:
- St. Mary’s Food Bank Del Webb: 2831 N 31st Ave, Phoenix, 85009
- St. Mary’s Food Bank Surprise: 13050 W Elm St., Surprise, 85378
Albertsons:
- 5040 W Cactus Rd, Glendale AZ 85304 (51st Avenue and Cactus)
- 8035 N 19th Ave, Phoenix AZ 85021 (19th Avenue and Northern)
- 2785 N Scottsdale Rd, Scottsdale AZ 85257 (Thomas and Scottsdale Rd)
- 11475 E Via Linda, Scottsdale, AZ 85259 (Via Linda and Frank Lloyd Wright)
- 6965 N Hayden Rd, Scottsdale AZ 85250 (Indian Bend and Hayden)
- 8950 W Bell Rd, Peoria AZ 85382 (91st Avenue and Bell Road)
- 18411 N Cave Creek Rd, Phoenix AZ 85032 (Cave Creek and Union Hills)
- 8240 W Deer Valley Rd, Peoria, AZ 85382 (83rd Avenue and Deer Valley)
- 3130 W Carefree Hwy, Phoenix AZ 85086 (Carefree Highway and the I-17)
- 21001 N Tatum Blvd, Phoenix AZ 85050 (Tatum and Deer Valley)
- 12970 W Indian School Rd, Litchfield Park, AZ 85340 (Indian School and Dysart Road)
Safeway:
- 520 W Osborn Rd, Phoenix AZ 85013 (7th Ave and Osborn)
- 3800 West Happy Valley Road, Glendale, 85310
- 14696 N Frank Lloyd Wright Blvd, Scottsdale, AZ 85260 (FLW and Raintree)
- 4747 E Elliot Rd, Phoenix AZ 85044 (48th and Elliot)
- 4005 E Chandler Blvd, Phoenix AZ 85044 (40th St and Chandler Blvd)
- 4747 E Greenway Rd, Phoenix, AZ 85032 (Tatum and Greenway)
- 1500 E Cedar Ave, Flagstaff AZ 86001 (Not using SMFBA Resources)
- 23565 N Scottsdale Rd, Scottsdale AZ 85255 (Pinnacle Peak and Scottsdale)
- 20901 N Pima Rd, Scottsdale AZ 85255 (Pima and Thompson Peak)
- 6501 E Greenway Pkwy, Scottsdale AZ 85254 (64th St and Greenway)
- 13440 N 7th St, Phoenix AZ 85022 (7th St and Thunderbird)
- 10773 N Scottsdale Rd, Scottsdale AZ 85254 (Scottsdale Rd and Shea)
- 3132 E Camelback Rd, Phoenix AZ 85016 (32nd St and Camelback)
- 13503 Camino del Sol, Sun City West AZ 85375 (Camino del Sol and NRH Johnson Blvd)
- 4750 E Indian School Rd, Phoenix AZ 85018 (Indian School and Arcadia Dr)
- 10641 W Olive Ave, Peoria, AZ 85345 (107th Ave and Olive)
- 3655 W Anthem Way, Anthem, AZ 85086 (Anthem Way and I-17 Freeway)


General
- OpsDB is for internal use only within Wish and data should be confidential and private
- If you are unfamiliar with a certain function/page, do not alter any settings/data until you have asked for permission/understand what you are doing. Post in the #opsdb or #infra channel to ask questions. The data in opsdb is live and in production
- All company policies should be followed


| Attribute | Stats |
|---|---|
| Games Played | {{ TotalGameCount1 }}
|
| Total Wins | {{ TotalWins1 }}
|
| Total Losses | {{ TotalLosses1 }}
|
| Win Ratio | {{ WinRatio1 }}
|
| Average Finish Place | {{ Avgfinishplace1 }}
|
| Total Kills | {{ TotalKills1 }}
|
| Average Kills | {{ AvgKills1 }}
|
| Average Damages | {{ Avgdamagematch1 }}
|
| Total Revives | {{ TotalRevives1 }}
|
| Total Assists | {{ TotalAssists1 }}
|
| Longest Range Kill | {{ LongestRangeKill1 }}
|
| Total Headshots | {{ TotalHeadshots1 }}
|
| Number of Suicides | {{ numberofsuicides1 }}
|
| Number of Teamkills | {{ numberofteamkills1 }}
|
| Most Used Weapon | {{ MostUsedWeapon1 }} |
{{final_score1}} |
| Attribute | Stats |
|---|---|
| Games Played | {{ TotalGameCount2 }}
|
| Total Wins | {{ TotalWins2 }}
|
| Total Losses | {{ TotalLosses2 }}
|
| Win Ratio | {{ WinRatio2 }}
|
| Average Finish Place | {{ Avgfinishplace2 }}
|
| Total Kills | {{ TotalKills2 }}
|
| Average Kills | {{ AvgKills2 }}
|
| Average Damages | {{ Avgdamagematch2 }}
|
| Total Revives | {{ TotalRevives2 }}
|
| Total Assists | {{ TotalAssists2 }}
|
| Longest Range Kill | {{ LongestRangeKill2 }}
|
| Total Headshots | {{ TotalHeadshots2 }}
|
| Number of Suicides | {{ numberofsuicides2 }}
|
| Number of Teamkills | {{ numberofteamkills2 }}
|
| Most Used Weapon | {{ MostUsedWeapon2 }} |
{{final_score2}} |
| Attribute | Stats |
|---|---|
| Games Played | {{ TotalGameCount3 }}
|
| Total Wins | {{ TotalWins3 }}
|
| Total Losses | {{ TotalLosses3 }}
|
| Win Ratio | {{ WinRatio3 }}
|
| Average Finish Place | {{ Avgfinishplace3 }}
|
| Total Kills | {{ TotalKills3 }}
|
| Average Kills | {{ AvgKills3 }}
|
| Average Damages | {{ Avgdamagematch3 }}
|
| Total Revives | {{ TotalRevives3 }}
|
| Total Assists | {{ TotalAssists3 }}
|
| Longest Range Kill | {{ LongestRangeKill3 }}
|
| Total Headshots | {{ TotalHeadshots3 }}
|
| Number of Suicides | {{ numberofsuicides3 }}
|
| Number of Teamkills | {{ numberofteamkills3 }}
|
| Most Used Weapon | {{ MostUsedWeapon3 }} |
{{final_score3}} |


1kg King Edward potatoes
100ml milk
50g salted butter
Freshly grated nutmeg
Salt and pepper to taste


{{ title }}
{{ bigImage }}
{{ miniImage }}
About
{{ about }}
Specs
{{ specs }}
Your full name
Your email
Address
Field of application


ServiceBrokerService
The following operations are supported. For a formal definition, please review the Service Description.
XmlType (Namespace="http://ilab.mit.edu")
WebService (Namespace="http://ilab.mit.edu")
Header Namespace = "http://ilab.mit.edu"
Data Namespace = "http://ilab.mit.edu"
Note: sbAuthHeader is a long ID and passkey only, and must have been generated by this BatchServiceBroker. It is also used to Recreate a session using a TicketTypes.SESSION_IDENTIFICATION. In the InterativeSB the coupon used is from an experiment collection, not a session collection.
- sbHeader
string DeleteClientItem(string name)
Recreate Session
Removes an client item from the user's opaque data store - sbHeader
public string[] ListAllClientItems()
Recreate Session
Enumerates the names of all client items in the user's opaque data store - sbHeader
string LoadClientItem(string name)
Recreate Session
Returns the value of an client item in the user's opaque data store - sbHeader
void SaveClientItem(string name, string itemValue)
Recreate Session
Sets a client item value in the user's opaque data store
Client
- sbHeader
bool Cancel(int experimentID)
Cancels a previously submitted experiment. If the experiment is already running, makes best efforts to abort execution, but there is no guarantee that the experiment will not run to completion
Experiment
ExperimentInformation[] GetExperimentInformation(int[] experimentIDs)
Recreate Session
Retrieves experiment metadata for experiments specified by an array of experiment IDs.
LabExperimentStatus GetExperimentStatus(int experimentID)
Checks on the status of a previously submitted experiment
void Notify(int experimentID)
Notification from the Lab Server that a previously submitted experiment has terminated.
string RetrieveAnnotation(int experimentID)
Retrieves a previously saved experiment annotation.
string RetrieveLabConfiguration(int experimentID)
Recreate Session
Retrieves a previously saved lab configuration for a particular experiment
ResultReport RetrieveExperimentResult(int experimentID)
Recreate Session
Retrieves the results from (or errors generated by) a previously submitted experiment
Status Code key:
1: if waiting in the execution queue
2: if currently running
3: if terminated normally
4: if terminated with errors (this includes cancellation by user in mid-execution)
5: if cancelled by user before execution had begun
6: if unknown labExperimentID.
7: Assigned by Service Broker if experiment is not valid (done in submit call)
string RetrieveSpecification(int experimentID)
Recreate Session
Retrieves a previously saved experiment specification
string SaveAnnotation(int experimentID, string annotation)
Recreate Session
Saves or modifies an optional user defined annotation to the experiment record.
ClientSubmissionReport Submit(string labServerID, string experimentSpecification, int priorityHint, bool emailNotification)
Submits an experiment specification to the lab server for exection
ValidationReport Validate(string labServerID, string experimentSpecification)
Submits an experiment specification to the lab server for exection
- sbHeader
string GetLabConfiguration(string labServerID)
Gets the lab configuration of a lab server - sbHeader
string GetLabInfo(string labServerID)
Gets general information about a lab server - sbHeader
LabStatus GetLabStatus(string labServerID)
Checks on the status of the lab server - sbHeader
WaitEstimate GetEffectiveQueueLength(string labServerID, int priorityHint)
Checks on the effective queue length of the Lab Server
Lab Server


“ON CLOTHES”
KHALIL GIBRAN
FROM THE PROPHET
And the weaver said,
“Speak to us of Clothes.”
And he answered:
Your clothes conceal much of your beauty,
yet they hide not the unbeautiful.
And though you seek in garments the freedom of privacy
you may find in them a harness and a chain.
Would that you could
meet the sun and the wind
with more of your skin
and less of your raiment,
For the breath of life
is in the sunlight
and the hand of life
is in the wind.
Some of you say,
“It is the north wind who has
woven the clothes to wear.”
But shame
was his loom,
and the softening of the
sinews was his thread.


--- layout: page title: Folding@Home permalink: /projects/foldingathome/ ---
Folding@Home is a distributed computing project that allows people to contribute to the research of Cancer, HIV/Aids, Alzheimer’s, Parkinson’s, and other diseases by volunteering their computing power to run protein folding simulations.
Started in 2000 at Stanford University, today it includes nearly 200,000 computers world wide outputting over 40 teraflops of computing power – effectively stronger than any super computer in the world today.
You can learn more about the project on the official website or on Wikipedia.


Appearance
Staryu is a small brown Pokemon in the shape of a star. In the middle, it has a red core surrounded by a yellow rim (almost gold).


I’ve been meaning to write this post for a while. Even though CRM 4 is on the way out now, I still find myself working with clients that have legacy CRM 4 systems in production. Whether it is porting code or fixing bugs, CRM 4 is far from gone.
For those of you that don’t know, the DynamicEntity type gives us a way to write code against an arbitrary CRM4 installation without having to generate a custom service proxy. We don’t get the advantages of having all of the field names specified (early binding) but we don’t have to recompile for different client installations in order to get access to new fields.
However, despite of (or perhaps due to) the flexibility that DynamicEntities afford, there are some idiosyncratic things about how data property values are set and retrieved.
The hallmark of CRM 4 DyanmicEntities is the use of property classes for the data fields of the entity. These classes are all of the form XXXProperty, where XXX is something like String, CrmMoney, etc. CRM 2011 has largely done away with these special-purpose field wrappers, but in CRM 4 we are stuck with them. This wouldn’t be so bad, but there are some inconsistencies in their use in the Microsoft CRM API. I’ll go over a few cases that have bitten me in the past here.
1. Iteration
1 2 3 |
|
When we use a foreach construct, the IEnumerator implementation returns a Property type. Why is this inconsistent? Well it isn’t from an API standpoint, but it was very confusing to me when I took a look at how the data was actually stored at runtime. Hint: there are no Property objects to be found in the backing store. They are created dynamically in the IEnumerator implementation. Take a look at the disassembly of IGetEnumerator():
1 2 3 4 5 6 7 8 9 |
|
We can see that the Property types are actually being created and returned on-the-fly from the internal data store _nameToPropertyValue.
2. Assignment
We can do assignment in one of two ways. In each case the value that we assign will be slightly different.
1 2 |
|
or
1
|
|
This example also applies to retrieval of the property value, that is, if we want to get the plain string without the StringProperty wrapper we would write:
1
|
|
I’ve noticed that when we make an assignment using a Property, the SDK library actually throws it away and only stores the inner value! This makes the property simply an ephemeral container that is effectively used only for conveying the field name. Check out disassembly for PropertyCollection.Add():
1 2 3 4 |
|
So when iterating and using Add() we are dealing with Property types. When using [] indexer notation we are dealing with the underlying value data type. I find this to be quite inconsistent and tedious, but as long as it is kept in mind, things work out ok.
Hopefully this clears up some confusion about the finer points of DynamicEntities for you!


I always have to look up the syntax for CASE statements in SQL. Don't use it often, and it's just different enough from C# to throw me.
10/20/2008, 9:56:37 AM
Favs: 0
Retweets: 0
link--- layout: tweet ---
I always have to look up the syntax for CASE statements in SQL. Don't use it often, and it's just different enough from C# to throw me.
10/20/2008, 9:56:37 AM
Favs: 0
Retweets: 0
link


 Without your own shadow, and the telegraph poles which follow the supposed trail, you'd be as hopeless as a sparrow in the oven.
Arthur Rimbaud, in his account of crossing the Alps in 1878, quoted in Somebody Else : Arthur Rimbaud In Africa 1880–91 by Charles Nicholl (1997)


The RETURN statement can be used to produce the result of a query. It is mandatory to specify a RETURN statement at the end of each block in a data-selection query, otherwise the query result would be undefined. Using RETURN on the main level in data-modification queries is optional.
The general syntax for RETURN is:
RETURN expression
The expression returned by RETURN is produced for each iteration in the block the RETURN statement is placed in. That means the result of a RETURN statement is always an array. This includes an empty array if no documents matched the query and a single return value returned as array with one element.
To return all elements from the currently iterated array without modification, the following simple form can be used:
FOR variableName IN expression
RETURN variableName
As RETURN allows specifying an expression, arbitrary computations can be performed to calculate the result elements. Any of the variables valid in the scope the RETURN is placed in can be used for the computations.
To iterate over all documents of a collection called users and return the full documents, you can write:
FOR u IN users
RETURN u
In each iteration of the for-loop, a document of the users collection is assigned to a variable u and returned unmodified in this example. To return only one attribute of each document, you could use a different return expression:
FOR u IN users
RETURN u.name
Or to return multiple attributes, an object can be constructed like this:
FOR u IN users
RETURN { name: u.name, age: u.age }
Note: RETURN will close the current scope and eliminate all local variables in it. This is important to remember when working with subqueries.
Dynamic attribute names are supported as well:
FOR u IN users
RETURN { [ u._id ]: u.age }
The document _id of every user is used as expression to compute the attribute key in this example:
[
{
"users/9883": 32
},
{
"users/9915": 27
},
{
"users/10074": 69
}
]
The result contains one object per user with a single key/value pair each.
This is usually not desired. For a single object, that maps user IDs to ages,
the individual results need to be merged and returned with another RETURN
:
RETURN MERGE(
FOR u IN users
RETURN { [ u._id ]: u.age }
)
[
{
"users/10074": 69,
"users/9883": 32,
"users/9915": 27
}
]
Keep in mind that if the key expression evaluates to the same value multiple times, only one of the key/value pairs with the duplicate name will survive MERGE(). To avoid this, you can go without dynamic attribute names, use static names instead and return all document properties as attribute values:
FOR u IN users
RETURN { name: u.name, age: u.age }
[
{
"name": "John Smith",
"age": 32
},
{
"name": "James Hendrix",
"age": 69
},
{
"name": "Katie Foster",
"age": 27
}
]
Since ArangoDB 2.7, RETURN can optionally be followed by the DISTINCT keyword. The DISTINCT keyword will ensure uniqueness of the values returned by the RETURN statement:
FOR variableName IN expression
RETURN DISTINCT expression
If the DISTINCT is applied on an expression that itself is an array or a subquery, the DISTINCT will not make the values in each array or subquery result unique, but instead ensure that the result contains only distinct arrays or subquery results. To make the result of an array or a subquery unique, simply apply the DISTINCT for the array or the subquery.
For example, the following query will apply DISTINCT on its subquery results, but not inside the subquery:
FOR what IN 1..2
RETURN DISTINCT (
FOR i IN [ 1, 2, 3, 4, 1, 3 ]
RETURN i
)
Here we'll have a FOR loop with two iterations that each execute a subquery. The DISTINCT here is applied on the two subquery results. Both subqueries return the same result value (that is [ 1, 2, 3, 4, 1, 3 ]), so after DISTINCT there will only be one occurrence of the value [ 1, 2, 3, 4, 1, 3 ] left:
[
[ 1, 2, 3, 4, 1, 3 ]
]
If the goal is to apply the DISTINCT inside the subquery, it needs to be moved there:
FOR what IN 1..2
LET sub = (
FOR i IN [ 1, 2, 3, 4, 1, 3 ]
RETURN DISTINCT i
)
RETURN sub
In the above case, the DISTINCT will make the subquery results unique, so that each subquery will return a unique array of values ([ 1, 2, 3, 4 ]). As the subquery is executed twice and there is no DISTINCT on the top-level, that array will be returned twice:
[
[ 1, 2, 3, 4 ],
[ 1, 2, 3, 4 ]
]
Note: the order of results was undefined for RETURN DISTINCT until before ArangoDB 3.3. Starting with ArangoDB 3.3, RETURN DISTINCT will not change the order of the results it is applied on.
Note: RETURN DISTINCT is not allowed on the top-level of a query if there is no FOR loop preceding it.


New Media and Web Design
Trillium Media Design will bring your company’s Web presence to the next level. We offer a comprehensive range of services.
Meeting Your Buisness Needs
Our expert designers are creative and eager to work with you.
Trillium Media Design will bring your company’s Web presence to the next level. We offer a comprehensive range of services.
Our expert designers are creative and eager to work with you.


LLVMSwift
LLVMSwift is a set of Swifty API wrappers for the LLVM C API. It makes compiler development feel great from Swift!
Usage
To start emitting IR, you’ll want to create a Module
object, with an optional Context
parameter,
and an IRBuilder
that will build instructions for that module.
let module = Module(name: "main")
let builder = IRBuilder(module: module)
Once you do that, you can start adding functions, global variables, and generating instructions!
let main = builder.addFunction(name: "main",
type: FunctionType(argTypes: [],
returnType: VoidType()))
let entry = main.appendBasicBlock(named: "entry")
builder.positionAtEnd(of: entry)
builder.buildRetVoid()
module.dump()
The IRBuilder class has methods for almost all functions from the LLVM C API, like:
builder.buildAdd
builder.buildSub
builder.buildMul
builder.buildCondBr
builder.addSwitch
and so many more.
Plus, it provides common wrappers around oft-used types like Function
, Global
, Switch
, and PhiNode
.

- Install LLVM 3.9 using your favorite package manager. For example:
brew install llvm
- Ensure
llvm-config
is in yourPATH
- That will reside in the
/bin
folder wherever your package manager installed LLVM.
- That will reside in the
- Create a pkg-config file for your specific LLVM installation.
- We have a utility for this:
swift utils/make-pkgconfig.swift
- We have a utility for this:
Once you do that, you can add LLVMSwift as a dependency for your own Swift compiler projects!
Installation without Swift Package Manager
We really recommend using SwiftPM with LLVMSwift, but if your project is
structured in such a way that makes using SwiftPM impractical or impossible,
you can still use LLVMSwift by passing the -DNO_SWIFTPM
to swift when
compiling.
- Xcode:
- Add this repository as a git submodule
- Add the files in
Sources/
to your Xcode project. - Under
Other Swift Flags
, add-DNO_SWIFTPM
. - Under
Library Search Paths
add the output ofllvm-config --libdir
- Under
Header Search Paths
add the output ofllvm-config --includedir
- Under
Link Target with Libraries
drag in/path/to/your/llvm/lib/libLLVM.dylib
This project is used by Trill for all its code generation.
Authors
- Harlan Haskins (@harlanhaskins)
- Robert Widmann (@CodaFi)
License
This project is released under the MIT license, a copy of which is available in this repo.


Premium Materials
Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase
Quality Assurance
For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument.
free trial for one month
You will be allow to access our free books for month after which you can purchase the premium
Premium Materials
Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase
Quality Assurance
For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument.
free trial for one month
You will be allow to access our free books for month after which you can purchase the premium


--- layout: page title: About header-img: "img/abstract-bg.jpg" ---
I'm a native New Yorker, currently living in the DC area. I have a background in digital media with a focus on monetization, ad operations, and client services. During my previous experience, I became interested in learning more about the technology powering the various websites and applications I worked on. I decided to pursue coding so that I could transition into web and product development roles and take my career in a different direction.


player 17 include/graphic-camera.h Status_Access player; player 43 src/graphic-camera.c Status_Access Player = access->player; player 149 src/graphic-camera.c Status_Access Player = access->player; player 286 src/graphic-camera.c static void set_player(Camera_Access access, Status_Access player) { player 289 src/graphic-camera.c player->base->Real_Position.x = center.x; player 290 src/graphic-camera.c player->base->Real_Position.y = center.y; player 292 src/graphic-camera.c player->base->Graph_Position.x = center.x; player 293 src/graphic-camera.c player->base->Graph_Position.y = center.y; player 295 src/graphic-camera.c access->player = player; player 78 src/main.c position.x = GRID_LENGTH * camera_1->player->base->Graph_Position.x; player 79 src/main.c position.y = GRID_LENGTH * camera_1->player->base->Graph_Position.y; player 80 src/main.c SDL_RenderCopy(render, camera_1->player->base->Mark->access, NULL, &(position)); player 87 src/main.c if (!Point.eq(&(npc->base->Real_Position), &(camera_1->player->base->Real_Position))) { player 124 src/main.c character.set_style(camera_1->player, result);


Image Converter
1. Select Locations
Where are the images?
Where is the CSV file?
2. Define Columns
What columns are in your CSV file?
+
3. Select Output
What is the current file name format?
What should be the new file name format?
+


DataStore
Listings
(current)
Offer Data
About
Upload Data
Upload your data in the appropriate JSON format to list it on the platform
MetaData
Upload Data


| DOSE: T+ 0:00 |
125 mg |
oral |
MDMA |
(powder / crystals) |
| T+ 6:00 |
20 drops |
oral |
Valerian |
(extract) |
I recently attended a dance music festival in England where there was a fully stocked herbalist on site. I decided to buy some Valerian extract specifically for it's sedative effects and at the recommendation of a friend who is studying herbal medicine at university.
I take stimulants such as MDMA and Methamphetamine fairly regularly when I go out clubbing, I find they give me the lift I need to enjoy enjoy the music to the full and keep my energy levels at maximum. The only problem with this is, what goes up must come down! I've found the intensity and length of my comedowns have increased with the length of time i've been taking these drugs and recently have been on the lookout for something which will allow me to get a proper nights sleep and avoid the more pronounced psychological after-effects of speed + ecstasy.
After getting home from the festival I decided to try the Valerian as a comedown cure. That weekend I attended one the big local techno clubs here in Edinburgh, Scotland. I took a fairly large single dose of crystal MDMA quite early on in the night, once the club was over and I realised there was going to be no after-party, I decided to head home. On the way home I was starting to feel the MDMA rush wear off and turn into the recogniseable 'comedown head'. When I got home, I fished out a half bottle of tonic wine, drank most of it, and dispensed the Valerian extract into the last mouthful before swallowing it. About 30 minutes later the Valerian kicked in. I felt tired, but relaxed and calm. I retired to bed shortly afterwards and slept like a baby. I had no bad dreams and the next day I felt properly refreshed. It was as if I had never taken the MDMA the night before.
I would recommend this herb to anyone who takes stimulants on a regular basis. I would also recommend it to anyone who suffers from mild anxiety or insomnia. It really is a wonder of nature!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


As a customer,
I want to withdraw cash from an ATM,
so that I don’t have to wait in line at the bank
Given the account is overdrawn
And the card is valid
When the customer requests cash
Then ensure a rejection message is displayed
And ensure cash is not dispensed
And ensure the card is returned
Not really :)
Feature: Artist Album length
As an Artists API consumer
In order to display total album length to my customers
I need to be able to query an album for its length in seconds
Scenario: Album length query
Given the musician Oscar Peterson has an ID of "oscar_peterson"
And his album Night Train has an ID of "night_train"
When I send a GET request to "/artists/{artistId}/album/{albumId}/length"
And the sum length of all the tracks on the album is 2533 seconds
And there is a 2 second gap between all tracks
Then the API query response body should contain a total album length of 2555 seconds
@Given("^the musician Oscar Peterson has an ID of (.*?)$")
public void the_musician_oscar_peterson_has_an_id_of(String artistId) throws Throwable {
this.artistId = artistId;
}
@Given("^his album Night Train has an ID of (.*?)$")
public void his_album_night_train_has_an_id_of(String artistId) throws Throwable {
this.albumId = albumId;
}
@When("^I send a GET request to (.*?)$")
public void when_i_send_a_get_request_to(String pathTemplate) throws Throwable {
String path = substitute(pathTemplate, this.artistId, this.albumId);
this.response = get(path)
}
@When("^the sum length of all the tracks on the album is 2533 seconds$")
public void the_sum_length_of_all_the_tracks_on_the_album_is_2533_seconds() throws Throwable {
// no-op for description only
}
@When("^there is a 2 second gap between all tracks$")
public void there_is_a_2_second_gap_between_all_tracks() throws Throwable {
// no-op for description only
}
@Then("^the API query response body should contain a total album length of (\\d+) seconds$")
public void the_api_query_response_body_should_contain_total_album_length(String expectedLength)
throws Throwable {
assertThat(Integer.parseInt(response.getBody()), is(expectedLength));
}
(please be nice!)