| Class and Description |
|---|
| AbstractSession
Interface to the Session that provides access to the BlazingMQ broker
|
| AckMessage
ACK message representation.
|
| AckMessageHandler
User callback interface to handle incoming ACK messages.
|
| BMQException
A
RuntimeException which is raised when any failure happens during BlazingMQ SDK call
execution. |
| CompressionAlgorithm
PUT message payload compression algorithm
|
| CorrelationId
Provides an interface usable as an efficient identifier.
|
| Event
Represents a BlazingMQ event.
|
| HostHealthMonitor
Provides an interface for monitoring the health of the host.
|
| HostHealthMonitor.Handler
Provides an interface for handling changes detected by
HostHealthMonitor |
| HostHealthState
Enumeration for different host health states
|
| MessageGUID
Provides a value-semantic global unique identifier for BlazingMQ messages.
|
| MessageProperties
Interface to manipulate with message properties.
|
| MessageProperty
Represents a message property, which is a name-value pair.
|
| MessageProperty.Type
Enum for supported data types for a message property.
|
| PushMessage
PUSH message representation.
|
| PushMessageHandler
User callback interface to handle incoming PUSH messages.
|
| PutMessage
PUT message representation.
|
| Queue
SDK Queue representation.
|
| QueueControlEvent
Represents the queue related event that reports a status of asynchronous operation usually
initiated by the user.
|
| QueueControlEvent.Type |
| QueueEvent
Represents a BlazingMQ event related to the particular queue state.
|
| QueueEventHandler
User callback interface to handle queue related events.
|
| QueueFlags
Represents all the flags that can be used at
getQueue(com.bloomberg.bmq.Uri, long, com.bloomberg.bmq.QueueEventHandler, com.bloomberg.bmq.AckMessageHandler, com.bloomberg.bmq.PushMessageHandler) . |
| QueueOptions
A value-semantic type for options related to a queue.
|
| QueueOptions.Builder
A helper class to create immutable
QueueOptions with custom settings. |
| ResultCodes.AckCode |
| ResultCodes.AckResult |
| ResultCodes.CloseQueueCode |
| ResultCodes.CloseQueueResult |
| ResultCodes.ConfigureQueueCode |
| ResultCodes.ConfigureQueueResult |
| ResultCodes.GenericCode |
| ResultCodes.GenericResult |
| ResultCodes.OpenQueueCode |
| ResultCodes.OpenQueueResult |
| ResultCodes.OperationResultCode |
| SessionEvent
Represents a BlazingMQ event related to the whole session state.
|
| SessionEvent.ConnectionLost
Event that notifies the session has lost the broker connection.
|
| SessionEvent.HostHealthRestored
Event that notifies the health of the host has restored.
|
| SessionEvent.HostUnhealthy
Event that notifies the host has become unhealthy.
|
| SessionEvent.Reconnected
Event that notifies the session has restored the broker connection.
|
| SessionEvent.SlowConsumerHighWatermark
Event that notifies the inbound event buffer has reached the high watermark value.
|
| SessionEvent.SlowConsumerNormal
Event that notifies the inbound event buffer has reached the low watermark value.
|
| SessionEvent.StartStatus
Session start status event.
|
| SessionEvent.StateRestored
Event that notifies the session has restored the state of all opened queues.
|
| SessionEvent.StopStatus
Session stop status event.
|
| SessionEvent.Type
Session event types.
|
| SessionEventHandler
User callback interface to handle session related events.
|
| SessionOptions
A value-semantic type to configure session with the broker.
|
| SessionOptions.Builder
Helper class to create a
SesssionOptions object with custom settings. |
| SessionOptions.InboundEventBufferWaterMark
Immutable helper class to set sizes (in number of events) for the inbound event buffer high
and low watermarks.
|
| SessionOptions.WriteBufferWaterMark
Immutable helper class to set sizes (in bytes) for write cache high and low watermarks on the
channel.
|
| Uri
Provides value-semantic type and utilities for a BlazingMQ queue URI.
|
Copyright © 2023 Bloomberg L.P.. All rights reserved.


apikey
Click me and wait
Visit
console.inten.to
to get the key.
More information in the browser console


Notebooks
Story: The lion and the giraffe
The lion and the giraffe
Title
The lion and the giraffe
Collection
Summary
A lion springs up and bites a giraffe who falls on the lion and kills it.
Comments
1) p.322v: an insert (pasted in) featuring |xam words which have not been translated, 2) This story is found in Book I
Contributors
Date
May 1871 (finished on 20 May)
Categories
Keywords
lion (and the giraffe) , lion (hunts the giraffe) , lion (the giraffe falls on) , lion (ribs of broken by the giraffe) , giraffe (the lion and) , giraffe (kills the lion by falling on it) , giraffe (bitten by the lion) , giraffe (falls on the lion) , vulture (and the lion and the giraffe)
Story Pages
320-325


public class Neighbors
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
getClassValue()
,
getRank()
,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
boolean |
m_UseNaiveSearch
whether to use the naive search, searching a list, instead of KDTree
|
| Constructor and Description |
|---|
Neighbors(Instance inst,
Instance orig,
int kNN,
Instances train,
Instances test)
initializes the search, but the search still has to be initiated with
find() . |
Neighbors(Instance inst,
int kNN,
Instances train,
Instances test)
initializes the search, but the search still has to be initiated with
find() . |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order.
|
void |
find()
searches for the neighbors
|
double |
getClassValue()
Returns the current class associated with the neighbors, i.e., majority
vote, in case of a tie, the first class label.
|
Instance |
getInstance()
returns the instance the neighbors are determined for (returns the
original instance, not having the missing values replaced)
|
Instance |
getInstance(boolean original)
returns the instance the neighbors are determined for, either the original
one or the the one after replacing missing values
|
int |
getKNN()
returns the number of neighbors
|
int |
getRank()
Returns the rank of this neighbor, i.e., the difference between the
number of instances with known class labels for the two class labels.
|
boolean |
getUseNaiveSearch()
Returns whether the naive search or the KDTree is used to search for the
neighbors
|
boolean |
getVerbose()
Returns whether additional information is printed
|
void |
invalidate()
Invalidates the class and the rank.
|
boolean |
isComplete()
returns TRUE if the neighborhood has no more unlabeled neighbors
|
boolean |
isUpdated()
whether the class value was updated after the last invalidate() call
|
void |
setUseNaiveSearch(boolean useNaiveSearch)
Sets whether to use the naive list search (= TRUE) or the KDTree (= FALSE)
is used for finding the neighbors
|
void |
setVerbose(boolean verbose)
Sets whether to output some additional information
|
java.lang.String |
toString()
returns the neighborlist in a string representation
|
void |
updateClassValue()
sets the class value of the instance to the one calculated, but only
if the class value was missing
|
public boolean m_UseNaiveSearch
public Neighbors(Instance inst, int kNN, Instances train, Instances test)
find()
. The extra call of the find()
is only
that other options can be set before the search is performed.inst
- the instance to find the neighbors forkNN
- the number of neighbors to look fortrain
- the training instancestest
- the test instancesfind()
public Neighbors(Instance inst, Instance orig, int kNN, Instances train, Instances test)
find()
. The extra call of the find()
is only
that other options can be set before the search is performed.inst
- the instance to find the neighbors fororig
- the original instance before applying the
ReplaceMissingValues filterkNN
- the number of neighbors to look fortrain
- the training instancestest
- the test instancesfind()
public void setVerbose(boolean verbose)
verbose
- if true more information will be printedpublic boolean getVerbose()
public void setUseNaiveSearch(boolean useNaiveSearch)
useNaiveSearch
- if true the naive list search is used instead of
the KDTreepublic boolean getUseNaiveSearch()
public void invalidate()
updateClassValue()
updateClassValue()
public void find()
public int getKNN()
public Instance getInstance()
public Instance getInstance(boolean original)
original
- if true, the original instance is returnedpublic int getRank()
public double getClassValue()
public boolean isComplete()
public boolean isUpdated()
updateClassValue()
,
invalidate()
public void updateClassValue()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- the object to compare withpublic java.lang.String toString()
toString
in class java.lang.Object


library(zlib)
provides a binding to the
http://www.zlib.net/zlib general purpose compression library. The prolog
library aims as seamlessly reading and writing files compatible to the gzip
program as well as compressed (network) communication.
Zlib is a widespread library implementing the RFC1950 (zlib wrapper), RFC1951 (deflate stream) and RFC1952 (gzip wrapper) compression standards. The SWI-Prolog binding is a foreign library that creates a compressed stream as a wrapper around a normal stream. Implemented this way, it can perform a wide variety of tasks:
The core predicate of the library is zopen/3.
The remainder of the functionality of library(zlib)
is
defined in Prolog and can be used as a starting point for other
high-level primitives. See also ztest.pl
providing test and
demo code. This file is part of the source distribution.
Part of the functionality of this library can also be realised using the pipe interface and the gzip program. For example, a gziped file can also be opened in Prolog using the code below.
... open(pipe('gunzip < file.gz'), read, In), ...
The advantage of this library over using an external program for such tasks is enhanced platform independence and reduced time to open a file. Platform independence is improved as we do not have to worry about availability of the gunzip utility and we do not have to worry about shell and filename quoting issues. While the above replacement code works well on most modern Unix systems, it only works with special precautions on Windows.1Install gunzip, deal with Windows path-names, the windows shell and quoting.
The library becomes unavoidable if we consider compressed network communication. Here we get the stream from tcp_open_socket/3. The library provides efficient creation of a compressed stream, as well as support for flushing output through the standard Prolog flush_output/1 call.
Defined options on output streams are:
deflate
(default), raw_deflate
or gzip
.
The deflate
envelope is simple and short and is typically
used for compressed (network) communication. The raw_deflate
does not include an envelope and is often used as a step in crypographic
encodings. The gzip
envelope is compatible to the gzip
program and intended to read/write compressed files.true
, restart reading if the input is not at
end-of-file. The default is true
for gzip streams.
Generic options are:
true
(default), closing the compressed stream also
closes (and thus invalidates) the wrapped stream. If false
,
the wrapped stream is not closed. This can be used to
read/write a compressed data block as partial input/output on a stream.
gzopen(File, Mode, Stream,[])
.gzip
.
Using flush_output/1
on a compressed stream causes a
Z_SYNC_FLUSH
on the stream. Using close/1
on a compressed stream causes a Z_FINISH
on the stream. If
the stream uses the gzip
format, a gzip compatible
footer is written to the stream. If close_parent
is set
(default) the underlying stream is closed too. Otherwise it remains open
and the user can continue communication in non-compressed format or
reopen the stream for compression using zopen/3.


I bought an ISI whipped cream maker and a 24 pack of nitrous. It was a lot of fun, to be honest. Not worth the $35 for the maker and the $15 for the nitrous, but I wanted more anyway.
I went through 2 subsequent 24 packs in a week or so. I noticed I would be short of breath and was coughing a lot more, especially when smoking.  I hadn't opened it in a while and remember reading an earlier erowid report on how there was sludge in N20 containers. I opened the whipped cream maker and noticed there the inside was covered in a thin brown/black gel. I suspect it was 'best whip' brand that was largely responsible, since that was the brand i bought the most of. I also purchased ISI brand as well. I notice acute respiratory problems, but maybe it will pass.
 Anyway, I realize this isn't the most scientific account, but I'm also not making anything up either. The bottom line is there's residue in whippets that probably accumulate in the lungs. By the way, this all took place from thanksgiving till slightly after New years.
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.


SelfSupModel
-
class
packnet_sfm.models.SelfSupModel.
SelfSupModel
(**kwargs)[source] Bases:
packnet_sfm.models.SfmModel.SfmModel
Model that inherits a depth and pose network from SfmModel and includes the photometric loss for self-supervised training.
- Parameters
kwargs (dict) – Extra parameters
-
forward
(batch, return_logs=False, progress=0.0)[source] Processes a batch.
- Parameters
batch (dict) – Input batch
return_logs (bool) – True if logs are stored
progress – Training progress percentage
- Returns
output – Dictionary containing a “loss” scalar and different metrics and predictions for logging and downstream usage.
- Return type
dict
-
property
logs
Return logs.
-
self_supervised_loss
(image, ref_images, inv_depths, poses, intrinsics, return_logs=False, progress=0.0)[source] Calculates the self-supervised photometric loss.
- Parameters
image (torch.Tensor [B,3,H,W]) – Original image
ref_images (list of torch.Tensor [B,3,H,W]) – Reference images from context
inv_depths (torch.Tensor [B,1,H,W]) – Predicted inverse depth maps from the original image
poses (list of Pose) – List containing predicted poses between original and context images
intrinsics (torch.Tensor [B,3,3]) – Camera intrinsics
return_logs (bool) – True if logs are stored
progress – Training progress percentage
- Returns
output – Dictionary containing a “loss” scalar a “metrics” dictionary
- Return type
dict


macop.algorithms.multi.MOEAD¶
Multi-Ojective Evolutionary Algorithm with Scalar Decomposition algorithm
Functions
|
Classes
|
Multi-Ojective Evolutionary Algorithm with Scalar Decomposition |
-
class
macop.algorithms.multi.MOEAD.
MOEAD
(_mu, _T, _initalizer, _evaluator, _operators, _policy, _validator, _maximise=True, _parent=None)[source]¶ Multi-Ojective Evolutionary Algorithm with Scalar Decomposition
-
mu
¶ {int} – number of sub problems
-
T
¶ {[float]} – number of neightbors for each sub problem
-
nObjectives
¶ {int} – number of objectives (based of number evaluator)
-
initalizer
¶ {function} – basic function strategy to initialize solution
-
evaluator
¶ {[function]} – list of basic function in order to obtained fitness (multiple objectives)
-
operators
¶ {[Operator]} – list of operator to use when launching algorithm
-
policy
¶ {Policy} – Policy class implementation strategy to select operators
-
validator
¶ {function} – basic function to check if solution is valid or not under some constraints
-
maximise
¶ {bool} – specify kind of optimisation problem
-
population
¶ [{Solution}] – population of solution, one for each sub problem
-
pfPop
¶ [{Solution}] – pareto front population
-
weights
¶ [[{float}]] – random weights used for custom mu sub problems
-
callbacks
¶ {[Callback]} – list of Callback class implementation to do some instructions every number of evaluations and load when initializing algorithm
-


Tutorial¶
A minimal working example for EUKulele
can be tested using the instructions on this page.
You can obtain sample metagenomic data from the following Dropbox link, using the following commands on a Linux system:
wget https://www.dropbox.com/s/l4kvbpqftdad5ib/sample_eukulele.tar.gz?dl=1
tar xzf sample_eukulele.tar.gz?dl=1
Then cd
into sample_EUKulele
. A problem with tarring across systems and through Dropbox requires you to run:
rm samples_MAGs/._sample_*
Now, you’ll have e clean folder containing only metagenomic samples that you can use for test driving EUKulele
.
Next, create a conda
environment and activate it, using:
conda env create -f EUKulele-env.yaml
conda activate EUKulele
This must also be done inside the directory you installed via Dropbox, which contains a conda
configuration file that will make sure that every dependency of EUKulele
that cannot be installed via pip is available on your system.
You should now download EUKulele
via pip
using:
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps EUKulele
If any dependency is not satisfied, you can install it manually using pip install <requirement> --user
. If you install EUKulele
via conda
instead of via pip
, all of the dependencies are installed for you automatically.
Once everything is setup and all dependencies satisfied, from within the sample_EUKulele
directory, run:
EUKulele --config curr_config.yaml
Where curr_config.yaml
is a configuration file in the directory you downloaded which contains all of the flags needed for a basic EUKulele
run. Feel free to open this file if you’re curious, and compare it to the full list of parameters available to customize EUKulele
.
Then check the folder test_out_23July
in the current directory.


Owning Palette: Configure VIs
Requires: Logger
Sets the flag to prune, i.e. delete, all files greater than the maximum file count. For example, if there are ten (10) files on disk, and the maximum file count is set to two (2) and this is true, then the eight (8) oldest log files will be deleted. If this false, then the eight (8) oldest log files will remain on disk, but rollover of two files will continue. The default is false because this was the default behavior before the addition of this feature.
| Error In describes error conditions that occur before this node runs. This input provides standard error in functionality. | |
| Prune All indicates whether to delete all log files on disk in excess of the maximum file count (true) or just the oldest (false). | |
| Error Out contains error information. This output provides standard error out functionality. |


Before Change
def rsample(self, sample_shape=torch.Size(), base_samples=None):
if base_samples is not None:
// Make sure that the base samples agree with the distribution
if tuple(self.mean.size()) != tuple(self.mean.size()[-self.mean.dim() :]):
raise RuntimeError(
"The size of base_samples (minus sample shape dimensions) should agree with the size "
"of self.mean. Expected ...{} but got {}".format(self.loc.size(), base_samples.size())
)
sample_shape = torch.Size(tuple(base_samples.size(i) for i in range(base_samples.dim() - self.mean.dim())))
base_samples = base_samples.view(*sample_shape, *self.loc.shape)
samples = super(MultitaskMultivariateNormal, self).rsample(sample_shape=sample_shape, base_samples=base_samples)
samples = samples.view(sample_shape + self._output_shape)
After Change
base_samples = base_samples.view(*sample_shape, *self.loc.shape)
samples = super().rsample(sample_shape=sample_shape, base_samples=base_samples)
if not self._interleaved:
samples = samples.transpose(-1, -2).contiguous()
return samples.view(sample_shape + self._output_shape)
@property
def variance(self):


- Municipal Archives Bodies in Transit Records
- Emigrant Savings Bank Test Account Books
- Fales Library Digital Downtown
- NYC NYPL Business Directories
For more see
newyorkscapes.org/project
Wilson Business Directory, 1852-53
New York City Directories: Potentials and Pitfalls
- Provide attestations of addresses, including those not on maps
- Occupations and names for the peopled landscape of the city
- Additional attributes such as widowhood of females, marking of "colored"-ness
- Chronological breadth: ~1786-1801, 1849-1922
NYU + NYPL Space/Time: Goals and Objectives
- Build full digital-image-to-Space/Time-data workflow
- Cleaning, ordering, and ingesting "At a Distance"
- Replicable workflows for other city's directories
- Maximize accuracy with minimal human correction
Tesseract and OCR
Doggett & Rode 1851/52 Directory
- Tesseract3 (with training) ➔ Tesseract4 (without training): 10-15% improvement
- OCR error rate of 5% sample with Tesseract4: 11% (with a std dev of 0.07 on post-1849 directories)
A Typology of OCR Errors and Uncertainties
| Type |
Percent of Sample |
Remedy |
| Blacklist character(s) |
0.94% |
Match string at a distance and swap offending character |
| No whitelist characters |
4.08% |
Discard(?) |
A Typology of OCR Errors and Uncertainties
| Type |
Percent of Sample | Remedy |
| Words not in name/occ/street dictionaries |
2.2% |
Crowdsource corrections (if any) |
| Remainders |
7.8% |
Sort errors/non-errors and match leftovers at a distance |
Goal
From OCR'd text:
Hoffmann Max, physician, 70 Suffolk
Hoffmann Paul, clerk, h 61 Ridge
Hoffmaster Charles A. carver, 220 Centre, h Westchester
Hogan Catharine, wid. John, teacher, 28 James, h 55 James
To a searchable map:

Hoffmann Max, physician, 70 Suffolk

Hoffmann Paul, clerk, h 61 Ridge

Hoffmaster Charles A. carver, 220 Centre, h West-

chester

<span class='ocr_line' title="bbox<PHONE_NUMBER> 655;">
Hogan Catharine, wid. John, teacher, 28 James, h

<span class='ocr_line' title="bbox<PHONE_NUMBER> 679;">
55 James

Tesseract outputs hOCR: XML for OCR output
Visualization of bounding boxes of lines from hOCR
- Remove headers, page numbers, etc.;
- Connect indented lines
Turn hOCR lines into city directory entries
Histogram of X position of hOCR lines
const stats = require('simple-statistics')
const xs = page.lines.map((line) => line.properties.bbox[0])
// One indent per column, and four clusters for
// other stuff like page numbers and headings
const columnCount = 2
const clusterCount = columnCount * 2 + 4
// Find clusters of x coordinates, sort by size
const clusters = stats
.ckmeans(xs, clusterCount)
.sort((a, b) => b.length - a.length)
// Compute mode of clusters, and use only
// the clusters we need
const columns = clusters
.slice(0, columnCount)
.map(stats.mode)
console.log(columns)
// [ 34, 840 ]
Finding columns with Simple Statistics
For all lines that are outside of 2 columns:
- Find closest line in upper-left direction ↖
- Connect them if this line is inside column ⟷
Connecting indented lines
Finding the closest line with a 2D spatial index
const rbush = require('rbush')
// Create an Rbush R-tree index of all line bounding boxes:
const tree = rbush(page.lines.length)
tree.load(page.lines.map((line, index) => {
const x = line.properties.bbox[0], y = line.properties.bbox[1]
return {minX: x, minY: y, maxX: x, maxY: y, index}
}))
Create a 2D spatial index of all lines with RBush
const knn = require('rbush-knn')
page.lines
// Only process lines that are not in one of the columns
.filter((line) => line.columnIndex === undefined)
.forEach((line, lineIndex) => {
const lineX = line.properties.bbox[0]
const lineY = line.properties.bbox[1]
const filter = (item) => {
const knnLine = page.lines[item.index]
const knnLineX = knnLine.properties.bbox[0]
const knnLineY = knnLine.properties.bbox[1]
return lineIndex !== item.index &&
knnLine.columnIndex !== undefined &&
knnLineX <= lineX && knnLineY <= lineY
})
// Find closest 1 line to [lineX, lineY]
const neighbors = knn(tree, lineX, lineY, 1, filter)
// If neighbors.length >= 0, we should connect previousLine + line
const previousLine = neighbors[0]
})
rbush-knn: k-nearest neighbors search for RBush
From:

Hoffmaster Charles A. carver, 220 Centre, h West-

chester

To:
{"lines":
[
{"text": "Hoffmaster Charles A. carver, 220 Centre, h Westchester"}
]
}
Input and output of our Node.js module for hOCR files
- How do we extract structured knowledge from a directory entry?
Problem
A sample directory sheet...
Find names of individuals and companies
Find occupations
Find predicates of space
Find addresses and locations
George Binkenburg, pianomkr. h. 924 Third av.
- name
⇒ "George Binkenburg"
- occupation
⇒ "pianomkr."
- location predicate
⇒ "h." (home)
- address
⇒ "924 Third av."
Four main types of labels
Can we do this using regular expressions?
First intuition: Regular expressions
Not really!
- OCR transcriptions are never perfect
- There are mistranscriptions in the parsed text
- This makes it very difficult to consistently tokenize the entries
First intuition: Regular expressions
- For instance, consider the (correctly) transcribed entry:
Binkenburg George, pianomkr. h. 924 Third av.
- From this, it seems reasonable to split the entry just based on "," and "." characters, and we'd be pretty close!
- Binkenburg George, pianomkr. h. 924 Third av.
First intuition: Regular expressions
- Unfortunately, we rarely see such clean parses!
- Something like this is much more likely:
- BInkenbu rg Geor ge pianomkr. h 924 Th1rd av
First intuition: Regular expressions
- And not only can we not trust the transcriptions 100%...
- We also can't predict the amount of elements in an entry without inspecting first!
- Burtnett Daniel, pres. cit. f. ins. co. 67 Wall & 64 Bowery, h. 14 Perry
- Burt Edwin C. boots & shoes, 43 Broadway, h. 327 Henry, Brooklyn
First intuition: Regular expressions
Can we do this using regular expressions, plus a ton of conditional statements?
Second intuition: A lot of conditionals!
... and we tried exactly this!
Sort of!
- The approach is:
- Since we can't assume that any delimiter is correctly parsed, we'll first just tokenize everything we can
- Bush Anna, widow of Henry J. r. 152 W. 13th
- ⇒ ["Bush", "Anna", ",", "widow", "of", "Henry", "J",
"
.", "r", ".", "152", "W", ".", "13th"]
Second intuition: A lot of conditionals!
- Then, we go through the tokens one by one, and try to figure out what label they belong to
- We can use heuristic methods for classifying each token
- Does it contain a number? If so, it's probably part of an address.
- Does it contain a known street name? If so, it's again part of an address.
- Is it a known occupation? If so, it must be an occupation name.
- ...
Second intuition: A lot of conditionals!
- This turns out to be a somewhat promising approach, but it is very tedious to engineer...
- Our accuracy is contingent on our ability to correctly:
- Think of all of the relevant heuristic methods
- Interpret and weigh the results of the heuristics correctly
Second intuition: a lot of conditionals!
Can algorithms from machine learning do this better?
Third intuition: Conditional random fields (CRF)
YES! 100% YES!
- We use a supervised-learning algorithm called "conditional random fields" (CRF)
- Instead of trying to pre-empt what factors are important in labeling, and then interpret the results, we demonstrate by way of labeled examples, and let CRF infer what is important
- Excellent blog post from NYTimes Developers on CRF
Third intuition: Conditional random fields (CRF)
- First we create training examples, at the same individual-token level as before:
- Each token is labeled in terms of what tag it is part of
CRF training data
| Label |
Abbreviation |
Example |
| START |
START |
(beginning of entry) |
| END |
END |
(end of entry) |
| Delimiter |
D |
"," , "." |
| Name component |
NC |
"Alice" |
| Occupation component |
OC |
"laborer" |
| Position attribute |
PA |
"h." |
| Address component |
AC |
"718", "Washington" |
CRF labels
- This sequence of labels accompanying the tokens is used for training, and also is the form that CRF predictions will take
- Given a sequence of labels, we can then easily parse the record into discrete elements
- START NC NC D OC OC D PA AC AC PA AC AC END
START NC NC D OC OC D PA AC AC PA AC AC END
- name occupation address 1, address 2
CRF label decoding
- Conditional random fields uses a discriminative classifier to produce the sequence of labels which maximizes:
P( word-label | word-features)
- Features encode information relevant to a word's label in a way that is sensitive to the word itself, as well as that word's location in a sequence
CRF parameter learning
- Features are usually boolean (true/false) attributes that are computed for each token
- In CRF, features describe not only the "present" token, but can also look at adjacent tokens
- We have to create features similar to the heuristic functions we used earlier
CRF feature engineering
- During training time, the algorithm will proceed through the examples, and find the optimal feature weights that maximize the probability of getting the correct label
- (... this particular task is "convex", meaning there is only one optimum, so we can find it easily)
- This process is done iteratively, often using a training algorithm called stochastic gradient descent
- (... but luckily for us, we use a library that abstracts this away!)
CRF training
- Assume that the input we are trying to classify is:
- Bush Chauncey, commissioner, 157 B'way, h. Rathbun's hotel
CRF features
- First we'll go through the input, one token at a time, and featurize
CRF features
- Bush Chauncey, commissioner, 157 B'way, h. Rathbun's hotel
- current_word-is_start_of_sentence: TRUE
- current_word-is_end_of_sentence: FALSE
- current_word-contains_a_number: FALSE
- current_word-character_capitalized: TRUE
- ...
- next_word-is_start_of_sentence: FALSE
- ...
- previous_word-is_start_of_sentence: NULL
- ...
CRF feature example, iteration 1
- Bush Chauncey, commissioner, 157 B'way, h. Rathbun's hotel
- current_word-is_start_of_sentence: FALSE
- current_word-is_end_of_sentence: FALSE
- current_word-contains_a_number: FALSE
- current_word-character_capitalized: TRUE
- ...
- next_word-is_start_of_sentence: FALSE
- ...
- previous_word-is_start_of_sentence: TRUE
- ...
CRF feature example, iteration 2
- We have a lot of freedom in designing what features to extract
- Features can represent many aspects of the input
- Word shape
- Suffixes and prefixes
- Types of characters in the input
- Whether or not the input is a known entity
CRF feature engineering
- We used Python's sklearn-crfsuite package
- It conforms to the popular scikit-learn package API
- It's in Python, so it's straightforward to write custom feature extractors
CRF implementation
- What does CRF allow us to do?
- We just have to create features that are sensitive to differences of tokens
- But, we don't actually have to determine if those differences are useful or not!
- CRF infers from training examples (by perceiving in terms of feature vectors) what the most important factors in predicting labels are
CRF implementation
- How good is CRF?
- Super good! Really, really good.
- But we don't really have many stats to back that claim up
- Since the majority of our input is unlabeled, it's hard to evaluate against it directly
CRF accuracy
- You can find our city directory CRF module, as well as our training data, on Github
- We're currently using only about 70 hand-labeled training examples, and this seems to work very well
- Additional tweaks are mostly around edge-cases and infrequent types of statements
Implementation details
Assembling training data in a spreadsheet
{
"pageNum": 80,
"bbox": [62, 473, 756, 505],
"text": "Canvin John, pilot, 309 Water, h. 23 Hamilton",
"parsed": {
"subjects": ["Canvin John"],
"occupations": ["pilot"],
"addresses":[
["309 Water"],
["23 Hamilton","h"]
]
}
}
A city directory entry as structured data
Finding 23 Hamilton Street...
Hamilton Street no longer exists...
We need a database of historical addresses!
Let's use NYPL's digitized maps!
Our dataset of historical house numbers
A database of historical streets, traced from maps & atlases
Extract data from different sources, convert to NDJSON
Datasets from the NYC Space/Time Directory visualized with QGIS
- 861 streets
- 74,635 house numbers
New insights from combining historical datasets
- 861 streets
- 74,635 house numbers
- 48,754 addresses
const normalizer = require('@spacetime/nyc-street-normalizer')
const input = [
"13th avenue", "Vernon Blvd", "E. 35th", "Macdougal",
"Shore Rd", "B'way", "E. Twenty-Second St",
]
input.forEach((street) => console.log(street, '⟶', normalizer(street)))
// 13th avenue ⟶ Thirteenth Avenue
// Vernon Blvd ⟶ Vernon Boulevard
// E. 35th ⟶ East 35th Street
// Macdougal ⟶ MacDougal Street
// Shore Rd ⟶ Shore Road
// B'way ⟶ Broadway
// E. Twenty-Second St ⟶ East 22nd Street
Example code, showing street name normalization
Normalized address from city directory:
{
"pageNum": 80,
"bbox": [62, 473, 756, 505],
"text": "Canvin John, pilot, 309 Water, h. 23 Hamilton",
"normalizedAddress": "23 Hamilton Street"
}
Historical address, with coordinates:
{
"name": "23 Hamilton Street",
"data": {
"mapId":7138,
"borough":"Manhattan"
},
"geometry": {
"type": "Point",
"coordinates": [-73.9955835, 40.7110962]
}
}
Match normalized addresses from two datasets
- 861 streets
- 74,635 house numbers
- 48,754 addresses
- 3,133,624 city directory entries (28 volumes)
- 967,482 geocoded entries
967,482 geocoded city directory entries
Occupations, counted
Names, counted
What's next?
Making all this data searchable and visible!
A new UI to search & visualize all NYC Space/Time Directory data
Who wants a beer?


To simulate a problem which occurs when a user vits two web sites which access the same public data, we make two iframes,


Axis Layer
Time and Grid axis
click and drag to navigate
Time and Grid axis with a Waveform
click and drag to navigate


Welcome Manager
LOG OUT
Toggle navigation
Airline Corp
Flights
Routes
Crews
Airports
Customers
Flight Information
Planes
CUSTOMERS
Show Customers with + 10.000 miles
Username
Name
Surname
Tel
Reservations
ogzdemr
Oguz
Demir
+905394937476
ogzdemr
Oguz
Demir
+905394937476
ogzdemr
Oguz
Demir
+905394937476
ogzdemr
Oguz
Demir
+905394937476
ogzdemr
Oguz
Demir
+905394937476


{% extends 'techpong/base.html' %}
{% block additional_header %}
{% if request.user and request.user.username and request.user.profile.company %}
{% else %}
{% endif %}
{% endblock %}
{% block content %}
Create Your Own Ladder
StartupPong.com is open source and hosted for free. Fork
the repo and
set up your own site or simply sign up here and get your own company
ladder instantly.


Async
The .net libraries have higher-level APIs for async work (so you don't have to manage the low level Threading).
- .Net 4: Task Parallel Library and see below
- .Net 4.5: Async
Asynchronous patterns in FCL
There are 3 main patterns in .net:
- APM: Asynchronous Programming Model (BeginX, EndX(IAsyncResult), with AsyncCallbacks)
- EAP: Event based Asynchronous Pattern (callback events, eg BackgroundWorker)
- TAP: Task-based Asynchronous Pattern (Task Programming Library in .net 4)
The await/async pattern in .net 4.5 extends this so that asynchronous code is written like normal synchronous code.
NB: concurrency (parallelism) isn't quite the same as asynchronous, but the Task combination methods .WhenAll and .WhenAny enable concurrency.
Task
Task is a higher level API for managing threads, and is enhanced in .net 4.5 with awaiters.
Task corresponds to what other APIs call a "Future" or "Promise".
| Threads | Tasks |
|---|---|
| new Thread(Method).Start(); |
//.net 4.0 Task.Factory.StartNew(Method); //.net 4.5 Task.Run(Method); Tasks are always Started.
|
| Thread.Sleep(1000); | Task.Delay(1000); //.net 4.5 |
| thread.Join(); | task.Wait(); |
- You can turn APM into awaitable Tasks with the .AsTask() extension.
- For WinForms/WPF, you're always in the main UI context, so there are no problems referencing controls (you can mark Tasks with .ConfigureAwait(false) if UI is not required).
Exceptions
An async task may throw either an AggregateException or a TaskCancelledException.
But it is possible to have a void-return to not be captured... and uncaptured exceptions will crash the app when garbage collected.
- Use a global exception handler
- Async has it's own unhandled exception event: TaskScheduler.UnobservedTaskException
.Net 4.0 Task Parallel Library
//separate creation from scheduling
//var task1 = new Task<int>(() => int.MaxValue);
//task1.Start();
//preferred
var task = Task.Factory.StartNew(() => int.MaxValue);
try
{
//block with a timeout
if (!task.Wait(TimeSpan.FromSeconds(1)))
{
Debug.WriteLine("It took longer than a second");
}
return task.Result;
}
catch (AggregateException exception)
{
// exception.InnerExceptions can include nested AggregateExceptions
// so exception.Flatten() to simplify
exception.Handle(x =>
{
if (x is OverflowException)
{
Console.WriteLine("Overflow handled");
return true;
}
return false;
});
}
Func Results
var task = Task<int>.Factory.StartNew(() => 1 + 2);
int result = task.Result; //this blocks- like task.Wait()
Multiple tasks
var tasks = new Task[2]
{
Task.Factory.StartNew(Work1),
Task.Factory.StartNew(Work2)
};
//Block until all tasks complete.
Task.WaitAll(tasks);
- Creation: you can create with Factory.StartNew (preferred), or various Action/Func ctors.
- Waiting: Task.WaitAll(tasks), Task.WaitAny(tasks), task.Wait with timespan.
- Exceptions: Everything is nested in AggregateException (thrown on Waits or accessing Result)
Continuations
var continuationTask = Task.Factory
.StartNew(() => ReadFile())
.ContinueWith(x => ReadLines(x.Result));
Also ContinueWhenAll, ContinueWhenAny
Cancellations
MSDN. Pass in a cancellation token and cancel the token source on the main thread.
var tokenSource = new CancellationTokenSource();
var token = tokenSource.Token;
var task = Task.Factory.StartNew(() =>
{
token.ThrowIfCancellationRequested();
for (var i = 0; i < 3; i++)
{
Thread.Sleep(TimeSpan.FromSeconds(1));
//raise an OperationCanceledException
if (token.IsCancellationRequested)
token.ThrowIfCancellationRequested();
}
//pass in the token
}, token);
//cancel it
tokenSource.Cancel();
//run it
try
{
task.Wait();
}
catch (AggregateException)
{
//will hit here
}
Console.WriteLine(task.IsCanceled);
Async- await (.net 4.5)
await makes the rest of the method a continuation. You can't use it in catch/finally blocks.
await Task.Run(() => 1 + 2);
//You must also mark lambdas "async" when they include an await...
var result = await Task.Run(async () =>
{
await Task.Delay(1000);
return CpuIntensive();
});
- Await says to wait for a method that is marked async (similar to task.Wait, but makes rest of method into a callback)
A void return cannot be awaited- it's a fire and forget.
await = "pause here until completed" - the thread is not blocked - Async method keyword tells the compiler the method has an await.(there's a compiler warning if it doesn't).
An async method may return void, Task or Task<T> (in WinRT, IAsyncOperation<T>). - By convention, the method name has the suffix Async
You can also store and await later (concurrency:)
var task1 = RunAsync();
var task2 = Run2Async();
Task.WaitAll(new Task[] { task1, task2 });
//or
await Task.WhenAll(task1, task2);
var result1 = task1.Result;
var result2 = task2.Result;
Or, more simply:
var task1 = RunAsync();
var task2 = Run2Async();
//tasks are now running simultaneously
var result1 = await task1; //wait for first task to finish
var result2 = await task2; //wait for second
Prevent reentrancy
You can cache the Task... Note no async/await here.
private static Dictionary<string, Task<string>> _cache =
new Dictionary<string, Task<string>>();
private static Task<string> GetPageAsync(string uri) //no "async"
{
Task<string> task;
if (_cache.TryGetValue(uri, out task)) return task;
//no "await" keyword- set the dictionary value to the task
return _cache[uri] = new HttpClient().GetStringAsync(uri);
}
Cancellation
You can create a Task with a Task.Delay(timeout) which then fires a cancellationToken. But in .net 4.5 it is simpler to just set the timeout in the CancellationTokenSource ctor.
//timeout of one second
var cts = new CancellationTokenSource(TimeSpan.FromSeconds(1));
var get = await new HttpClient().GetAsync(url, cts.Token);
get.EnsureSuccessStatusCode();
var response = await get.Content.ReadAsStringAsync();
Wrap in try/catch(OperationCancelledException) Then cts.Cancel(); to cancel.
NB: WInRT doesn't have tokens, but you can use the extension method .AsTask(token) to turn it into standard .net.
CancellationToken is a struct, so in implementing methods the input argument should get an empty token
private async static Task<string> RunAsync(
CancellationToken token = default(CancellationToken))
Progress
You can also use Progress<T>.Report(value) for progress reporting.
//create the progress with an Action (eg update UI progress bar)
var progress = new Progress<int>(i => Console.WriteLine(i));
var task1 = RunAsync(progress);
private async static Task<string> RunAsync(IProgress<int> progress,
CancellationToken token = default(CancellationToken))
{
for (int i = 0; i < 10; i++)
{
await Task.Delay(400);
progress.Report(i);
}
return "Done";
}
Async void
Testing
MSTest supports async Task testmethods since VS2012. When using mocks, use Task.FromResult(x)
var moq = new Mock<IService>();
moq.Setup(x => x.Save(It.IsAny<Message>())).Returns(Task.FromResult((int?)1));


Unlock everything
Save 67%
$49.99/year
7-day free trial
$12.99/month
Join
Access to all workout plans
Access to personal coaches
Access to yummy meal plans
Access to 1000+ mixes


{{ .Summary }}
{{ define "main" }}
Writings and code from a programmer.
For more information on my background and experience, please see the about section.
Published {{ .Date.Format "January 2, 2006" }} {{ range .Params.tags }} #{{ . }} {{ end }}
{{ .Summary }}
Reading time: about {{ .ReadingTime }} minutes
{{ end }}


Home
Data Visualization
Browse Data
Data Download
Documentation
About
Incumbency Profile
Lok Sabha
Haryana
Maharashtra
Lok Sabha
Vidhan Sabha
Bookmark...
Download Visualization Data
Election Type
Select Election Type
General Elections
Assembly Elections
State Name
Select State
Select Assembly
Select All
Bookmark...
Election Type
Select Election Type
General Elections (GE)
Assembly Elections (AE)
State Name
Select
Select Assembly
Select All
*After selecting one or more assemblies please scroll down to accept terms and conditions and download the electoral data
Variable Names and Description
I accept the terms and conditions mentioned here.
Download


GL.Shader Class
Shader class to upload programs to the GPU
Constructor
GL.Shader
-
vertexSource
-
fragmentSource
-
macros
Parameters:
-
vertexSource
String(it also allows to pass a compiled vertex shader)
-
fragmentSource
String(it also allows to pass a compiled fragment shader)
-
macros
Object(optional) precompiler macros to be applied when compiling
Item Index
Methods
- bind
- draw
- drawBuffers
- drawRange
- extractShaderInfo
- getLocation
- hasAttribute
- hasUniform
- setUniform
- Shader.compileSource
- Shader.createFX
- Shader.expandImports
- Shader.fromURL
- Shader.getBlendShader
- Shader.getBlurShader
- Shader.getColoredScreenShader
- Shader.getFlatScreenShader
- Shader.getFlatShader
- Shader.getFXAAShader
- Shader.getPartialQuadShader
- Shader.getQuadShader
- Shader.getScreenShader
- Shader.getUniformFunc
- toViewport
- uniforms
- updateShader
Methods
bind
()
enables the shader (calls useProgram)
draw
-
mesh
-
mode
-
index_buffer_name
Renders a mesh using this shader, remember to use the function uniforms before to enable the shader
Parameters:
-
mesh
Mesh -
mode
Numbercould be gl.LINES, gl.POINTS, gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN
-
index_buffer_name
Stringthe name of the index buffer, if not provided triangles will be assumed
drawBuffers
-
vertexBuffers
-
indexBuffer
-
mode
-
range_start
-
range_length
render several buffers with a given index buffer
Parameters:
-
vertexBuffers
Objectan object containing all the buffers
-
indexBuffer
IndexBuffer -
mode
Numbercould be gl.LINES, gl.POINTS, gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN
-
range_start
Numberfirst primitive to render
-
range_length
Numbernumber of primitives to render
drawRange
-
mesh
-
mode
-
start
-
length
-
index_buffer_name
Renders a range of a mesh using this shader
Parameters:
-
mesh
Mesh -
mode
Numbercould be gl.LINES, gl.POINTS, gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN
-
start
Numberfirst primitive to render
-
length
Numbernumber of primitives to render
-
index_buffer_name
Stringthe name of the index buffer, if not provided triangles will be assumed
extractShaderInfo
()
It extract all the info about the compiled shader program, all the info about uniforms and attributes. This info is stored so it works faster during rendering.
getLocation
-
name
Returns the location of a uniform or attribute
Parameters:
-
name
String
Returns:
location
hasAttribute
-
name
Returns if this shader has an attribute with the given name
Parameters:
-
name
Stringname of the attribute
Returns:
hasUniform
-
name
Returns if this shader has a uniform with the given name
Parameters:
-
name
Stringname of the uniform
Returns:
setUniform
-
name
-
value
Uploads a uniform to the Shader. You dont need to specify types, they are infered from the shader info. Shader must be binded!
Parameters:
-
name
String -
value
Shader.compileSource
-
type
-
source
Compiles one single shader source (could be gl.VERTEX_SHADER or gl.FRAGMENT_SHADER) and returns the webgl shader handler Used internaly to compile the vertex and fragment shader. It throws an exception if there is any error in the code
Parameters:
-
type
Numbercould be gl.VERTEX_SHADER or gl.FRAGMENT_SHADER
-
source
Stringthe source file to compile
Returns:
the handler from webgl
Shader.createFX
-
code
-
[uniforms=null]
Allows to create a simple shader meant to be used to process a texture, instead of having to define the generic Vertex & Fragment Shader code
Parameters:
-
code
Stringstring containg code, like "color = color * 2.0;"
-
[uniforms=null]
String optionalstring containg extra uniforms, like "uniform vec3 u_pos;"
Shader.expandImports
-
code
-
files
Given a source code with the directive #import it expands it inserting the code using Shader.files to fetch for import files. Warning: Imports are evaluated only the first inclusion, the rest are ignored to avoid double inclusion of functions Also, imports cannot have other imports inside.
Parameters:
-
code
Stringthe source code
-
files
Object[Optional] object with files to import from (otherwise Shader.files is used)
Returns:
the code with the lines #import removed and replaced by the code
Shader.fromURL
-
vs_path
-
fs_path
-
on_complete
Create a shader from two urls. While the system is fetching the two urls, the shader contains a dummy shader that renders black.
Parameters:
-
vs_path
Stringthe url to the vertex shader
-
fs_path
Stringthe url to the fragment shader
-
on_complete
Function[Optional] a callback to call once the shader is ready.
Returns:
Shader.getBlendShader
()
Returns a shader that blends two textures shader must have: u_factor, u_texture, u_texture2
Shader.getBlurShader
()
Returns a shader used to apply gaussian blur to one texture in one axis (you should use it twice to get a gaussian blur) shader params are: vec2 u_offset, float u_intensity
Shader.getColoredScreenShader
()
Returns a shader ready to render a colored textured quad in fullscreen, use with Mesh.getScreenQuad() mesh shader params vec4 u_color and sampler2D u_texture
Shader.getFlatScreenShader
()
Returns a shader ready to render a flat color quad in fullscreen, use with Mesh.getScreenQuad() mesh shader params: vec4 u_color
Shader.getFlatShader
()
Returns a flat shader (useful to render lines)
Shader.getFXAAShader
()
Returns a shader to apply FXAA antialiasing params are vec2 u_viewportSize, vec2 u_iViewportSize or you can call shader.setup()
Shader.getPartialQuadShader
()
Returns a shader ready to render part of a texture into the viewport shader must have: u_position, u_size, u_viewport, u_transform, u_texture_area (vec4)
Shader.getQuadShader
()
Returns a shader ready to render a quad with transform, use with Mesh.getScreenQuad() mesh shader must have: u_position, u_size, u_viewport, u_transform (mat3)
Shader.getScreenShader
()
Returns a shader ready to render a textured quad in fullscreen, use with Mesh.getScreenQuad() mesh shader params: sampler2D u_texture
Shader.getUniformFunc
-
data
Tells you which function to call when uploading a uniform according to the data type in the shader Used internally from extractShaderInfo to optimize calls
Parameters:
-
data
Objectinfo about the uniform
Returns:
toViewport
-
uniforms
Renders a fullscreen quad with this shader applied
Parameters:
-
uniforms
Object
uniforms
-
uniforms
Uploads a set of uniforms to the Shader. You dont need to specify types, they are infered from the shader info.
Parameters:
-
uniforms
Object
updateShader
-
vertexSource
-
fragmentSource
-
macros
It updates the code inside one shader
Parameters:
-
vertexSource
String -
fragmentSource
String -
macros
Object[optional]


Bulgarian president vetoes appointment of new prosecutor
SOFIA, Bulgaria (AP) - Bulgaria’s president has vetoed the appointment of Ivan Geshev as new chief prosecutor.
President Rumen Radev on Thursday that he would ask the judicial panel that elected Geshev, currently a deputy chief prosecutor, to review its choice.
Last month, the panel voted 20-4 to elect Geshev for a seven-year term. The 49-year-old Geshev was the only candidate for the powerful post, which sparked protests from critics.
Radev said that “nominating a single candidate not only deprives the procedure of competitiveness, but also takes away prestige and legitimacy from the future chief prosecutor.”
The judicial panel now can either start a new selection procedure or confirm its initial appointment in a second vote, which the president cannot veto a second time.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


Ludwig is a toolbox that allows to train and test deep learning models without the need to write code.
A new data type-based approach to deep learning model design that makes the tool suited for many different applications.
Experienced users have deep control over model building and training, while newcomers will find it easy to use.
Easy to add new model architecture and new feature data-types.
Deep learning models internals are often considered black boxes, but we provide standard visualizations to understand their performances and compare their predictions.
No coding skills are required to train a model and use it for obtaining predictions.
Ludwig is release under the open source Apache License 2.0.
Just run pip install ludwig
and it will be ready to use. Some features may require
further steps, read Getting Started.
Prepare your data in a CSV file, define input and output feature in a model definition YAML file and run:
ludwig train
--data_csv file.csv
--model_definition definition.yaml
Prepare your data in a CSV file and use a pre-trained model to predict the output targets:
ludwig predict
--data_csv data.csv
--model path_to_model
Ludwig comes with many visualization options. If you want to look at the learning curves of your model for instance, run:
ludwig visualize
--visualization learning_curves
--training_statistics train_statistics.json
Train models and use them to predict directly from Python
from ludwig.api import LudwigModel
# train a model
model_definition = {...}
model = LudwigModel(model_definition)
train_stats = model.train(training_dataframe)
# or load a model
model = LudwigModel.load(model_path)
# obtain predictions
predictions = model.predict(test_dataframe)
@Article{Molino2019,
author = "Piero Molino",
year = 2019,
title = "Ludwig: a type-based declarative deep learning toolbox"
journal = "To appear"
}


A simple video selector UI
Begin by clicking on a video card to view in the overlay of a custom-built video player.
{{ selector.description }}
Duration: {{ selector.info }}


| Interface | Description |
|---|---|
| DeviceListener |
Contains the methods that all device listener need.
|
| GamepadListener |
Listens to gamepad events.
|
| KeyboardListener |
Listens to keyboard events.
|
| MouseListener |
Listens to mouse events.
|
| XIGamepadListener |
An extended GamepadListener that provides full support for the triggers on XInput gamepads.
|
| Class | Description |
|---|---|
| DefaultGamepad |
Represents a gamepad that uses the DirectInput API.
|
| Device |
Represents an input device.
|
| DeviceEvent |
Represents an abstract input event.
|
| DeviceManager |
Manages the input devices.
|
| Gamepad |
Represents a gamepad.
|
| GamepadAdapter |
Implements the GamepadListener interface.
|
| GamepadEvent |
Represents an event that was fired by a gamepad.
|
| Keyboard |
Represents a keyboard.
|
| KeyboardAdapter |
Implements the KeyboardListener interface.
|
| KeyboardEvent |
Represents an event that was triggered by a keyboard.
|
| Mouse |
Represents a mouse.
|
| MouseAdapter |
Implements the MouseListener interface.
|
| MouseControl |
Responsible for controlling the mouse with a gamepad.
|
| MouseEvent |
Represents an event that can be fired by mice.
|
| XIGamepad |
Represents a gamepad that uses the XInput API.
|
| XIGamepadAdapter |
Implements the XIGamepadListener interface.
|
| XIGamepadEvent |
Represents an event that was fired by a gamepad that uses the XInput API.
|
| XIMouseControl |
An extended MouseControl that will invert up and down cursor movement.
|
| Enum | Description |
|---|---|
| Direction |
Represents a direction.
|


Cops find 26 kids behind phony wall in Colorado day care
by Ben FeuerherdPolice checking out reports of an overcrowded daycare in Colorado at first found no kids there at all — then made a shocking discovery.
Day care workers had hidden 26 preschoolers in a basement behind a false wall, authorities said.
Cops responded to the Play Mountain Place in Colorado Springs on Wednesday and while they didn’t see any kids at first, they began hearing noises coming from below, officials said.
The sounds were coming from a phony wall which hid a secret staircase to a finished basement where two adults and the 26 kids were, authorities said.
None of the kids — who were all under the age of 3 — appeared to be injured or held against their will, police said.
The day care’s license was suspended, but no one was charged in the incident.
With Post wires


Who we are
we begin since march 2011 working in cookies indusrties we are the most famous international cookies shop in the world
Contact us
- Phone: 00157564***
- Email<EMAIL_ADDRESS>we begin since march 2011 working in cookies indusrties we are the most famous international cookies shop in the world


|
Drake
|
Classes | |
| class | DrakeLcm |
| A wrapper around a real LCM instance. More... | |
| class | DrakeLcmInterface |
| A pure virtual interface that enables LCM to be mocked. More... | |
| class | DrakeLcmLog |
| A LCM interface for logging LCM messages to a file or playing back from a existing log. More... | |
| class | DrakeMockLcm |
| An implementation of DrakeLcmInterface that manipulates LCM messages in memory, not on the wire. More... | |
| class | DrakeSubscriptionInterface |
| A helper class returned by DrakeLcmInterface::Subscribe() that allows for (possibly automatic) unsubscription and/or queue capacity control. More... | |
| class | Subscriber |
Subscribes to and stores a copy of the most recent message on a given channel, for some Message type. More... | |
Functions | |
| template<typename Message > | |
| void | Publish (DrakeLcmInterface *lcm, const std::string &channel, const Message &message, std::optional< double > time_sec={}) |
Publishes an LCM message on channel channel . More... | |
| template<typename Message > | |
| std::shared_ptr< DrakeSubscriptionInterface > | Subscribe (DrakeLcmInterface *lcm, const std::string &channel, std::function< void(const Message &)> handler, std::function< void()> on_error={}) |
Subscribes to an LCM channel named channel and decodes messages of type Message . More... | |
| int | LcmHandleSubscriptionsUntil (DrakeLcmInterface *lcm, const std::function< bool(void)> &finished, int timeout_millis=100) |
Convenience function that repeatedly calls lcm->HandleSubscriptions() with a timeout value of timeout_millis , until finished() returns true. More... | |
| template<typename Message > | |
| std::vector< uint8_t > | EncodeLcmMessage (const Message &message) |
| Encodes an LCM message to a series of bytes. More... | |
| template<typename Message > | |
| Message | DecodeLcmMessage (const std::vector< uint8_t > &bytes) |
| Decodes an LCM message from a series of bytes. More... | |
| template<typename Message > | |
| bool | AreLcmMessagesEqual (const Message &a, const Message &b) |
| Compares two LCM messages of the same type to see if they are equal. More... | |
| bool | CompareLcmtDrakeSignalMessages (const lcmt_drake_signal &actual_message, const lcmt_drake_signal &expected_message) |
Compares two drake::lcmt_drake_signal messages are equal. More... | |
| bool drake::lcm::AreLcmMessagesEqual | ( | const Message & | a, |
| const Message & | b | ||
| ) |
Compares two LCM messages of the same type to see if they are equal.
| bool drake::lcm::CompareLcmtDrakeSignalMessages | ( | const lcmt_drake_signal & | actual_message, |
| const lcmt_drake_signal & | expected_message | ||
| ) |
Compares two drake::lcmt_drake_signal
messages are equal.
| [in] | actual_message | The actual message to be compared against expected_message . |
| [in] | expected_message | The expected message to be compared against actual message. |
true
if actual_message
and expected_message
are equal. | Message drake::lcm::DecodeLcmMessage | ( | const std::vector< uint8_t > & | bytes | ) |
Decodes an LCM message from a series of bytes.
| std::runtime_error | if decoding fails. |
| std::vector<uint8_t> drake::lcm::EncodeLcmMessage | ( | const Message & | message | ) |
Encodes an LCM message to a series of bytes.
| int drake::lcm::LcmHandleSubscriptionsUntil | ( | DrakeLcmInterface * | lcm, |
| const std::function< bool(void)> & | finished, | ||
| int | timeout_millis = 100 |
||
| ) |
Convenience function that repeatedly calls lcm->HandleSubscriptions()
with a timeout value of timeout_millis
, until finished()
returns true.
Returns the total number of messages handled.
| void drake::lcm::Publish | ( | DrakeLcmInterface * | lcm, |
| const std::string & | channel, | ||
| const Message & | message, | ||
| std::optional< double > | time_sec = {} |
||
| ) |
Publishes an LCM message on channel channel
.
| lcm | The LCM service on which to publish the message. Must not be null. |
| channel | The channel on which to publish the message. Must not be the empty string. |
| message | The message to publish. |
| time_sec | Time in seconds when the publish event occurred. If unknown, use the default value of nullopt. |
| std::shared_ptr<DrakeSubscriptionInterface> drake::lcm::Subscribe | ( | DrakeLcmInterface * | lcm, |
| const std::string & | channel, | ||
| std::function< void(const Message &)> | handler, | ||
| std::function< void()> | on_error = {} |
||
| ) |
Subscribes to an LCM channel named channel
and decodes messages of type Message
.
See also drake::lcm::Subscriber for a simple way to passively observe received messages, without the need to write a handler function.
| lcm | The LCM service on which to subscribe. Must not be null. |
| channel | The channel on which to subscribe. Must not be the empty string. |
| handler | The callback when a message is received and decoded without error. |
| on_error | The callback when a message is received and cannot be decoded; if no error handler is given, an exception is thrown instead. |
false
, so that ignoring this result leaves the subscription intact. Refer to the DrakeSubscriptionInterface class overview for details.


Google Sites Offers Templates; Claims It's Easier Than Sharepoint
Google, it’s about time you released this. Goodbye baby blues. Hello choice.Google Sites is getting an upgrade. Starting today, Google will provide templates that it claims makes it possible for users with no technical background to create web sites with a degree of functionality that includes page layouts, adding links for navigation and embedded gadgets.
Templates are available for intranets, project sites, team sites, employee profile pages and other sites that people would use within the enterprise. Employees using Google Sites may submit their own templates to a gallery, similar to the services that Sharepoint offers.
Google Sites is making a clear strike against Microsoft which requires a certain level of technical skill to create a Sharepoint site.
The differences between Google and Microsoft are often quite striking. Microsoft is a document-centric organization. Sharepoint uses a file system architecture for customers to deposit their documents. With Sharepoint, companies may use a web inetrface to share their documents.
Google’s approach is entirely web centric. Documents are web pages. Each document is a link, not a file. When documents are uploaded to Google, they are converted, so to speak, each document receiving its own unique URL.
It is this approach that you see with Google Sites. By being entirely web-centric, Google believes it is making it easier for employees to share information, act faster and cross-pollinate ideas.
It’s difficult to say which approach is better though web converts will tell you that sharing web links is far easier than files. We agree with that point but the Sharepoint environment is tremendously popular. It has its core set of users who are happy that they can share documents in such a manner. Most organizations work in a document centric environment and are therefore comfortable with Sharepoint. It’s an environment that many people trust.
Discuss


Prenatal care is the healthcare you receive while pregnant. Regular prenatal care throughout your pregnancy helps to catch potential concerns early and reduces the risk of pregnancy and birth complications.
During pregnancy, regular prenatal visits can help your health care provider monitor your health and the baby's health. Teens might need specialized prenatal care.
During pregnancy, a teen will need more folic acid, calcium, iron and other essential nutrients. A daily prenatal vitamin can help fill any gaps. You can find these vitamins in practically any pharmacy. Make sure to discuss with a health care professional about the best vitamins for you and your baby before buying any.
Regular physical activity can help ease discomfort and boost your energy level. Encourage yourself to get a health care provider's OK before starting or continuing an exercise program, especially if you have an underlying medical condition.
Gaining the right amount of weight can support the baby's health — and make it easier for you to lose weight after delivery.
Alcohol, tobacco and any illegal drugs are off-limits during pregnancy. Even use of supplements and prescription and over-the-counter medications deserve caution.
These classes can help prepare yourself for pregnancy, childbirth, breast-feeding and being a parent. Of course, you may not always be able to afford these classes, which is why there are websites where you can find resources exactly for this, like Pampers Website and youtube channels like Bridget Teyler's, a childbirth educator and doula whose youtube channel is packed with helpful advice and tips!
Pregnancy is a great time to try and look after yourself and get lots of nutrients for you and your baby, giving him/her the best start in life. Try to eat lots of different foods every day and include something from each of the following main food groups;
Try to base your meals on these; they give you the energy you and your baby need.
Try to eat 5 different fruits and vegetables a day, a small glass of fruit juice can count as one. They contain lots of vitamins and minerals for your baby’s growth and development.
Try to eat a couple of these a day; they are important for your baby’s growth. Canned fish is cheap and nutritious and so are canned peas, beans and lentils like baked beans, chick peas and red kidney beans.
Try to eat a couple of these a day; they are important for your baby’s bones.
Water is the healthiest and cheapest!
It can be a good source of vitamin C, but high in sugar, so stick to one small glass a day with your breakfast, lunch or dinner.
It can be enjoyed with a snack or on its own. It’s high in calcium so it‘s good for you and your baby's bones.
 The list goes on and on, if you wish to learn what other foods you should or shouldn't eat during pregnancy, follow this link or this one.


READ NEW ARTICLES FIRST
theLEADERS
INSPIRATION - ONLINE LEADERSHIP JOURNAL
INSPIRATION 2020
Attention
Coronavirus danger
Read moreREAD NEW ARTICLES FIRST
theLEADERS
INSPIRATION - ONLINE LEADERSHIP JOURNAL
INSPIRATION 2020
Attention
Coronavirus danger
Read more


I realised last night while watching a presentation by Lea Verou that I could streamline my CSS Grid layouts. I’d previously been creating an overall page grid on the body
then defining some grid areas, but was frustrated that this didn’t help with aligning nested elements to that grid.
Use the right tool for the job
For example in the case of the main header, if I wanted its child logo, nav
and search box elements to snap to the grid I found myself having to set display:grid
and grid-template-areas
again on the header.
It didn’t feel very DRY but my understanding was that while we await subgrid, this was a necessary evil.
What I should have been using is display:contents
.
ul {
color: #00b7a8;
}
ul span {
color #333;
}
This is a paragraph. It’s an affront to test ligatures so often. It’s just something I threw together. This sentence contains a link to W3C, which you have probably visited. This sentence contains a link to someplace else. This is an offsite link . In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.
A blog is useful for many reasons. It can become a source of leads, it can be the place where, in the future, you might sell your products if you want to become an indie developer, or it can simply be the place where you have your audience and express your ideas.
- this is an ordered list item. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.
- this is another ordered list item
- this is another ordered list item
- Use proper accents e.g. résumé and jalapeño.
- Use proper math symbols, like × instead of x.
- Smarten quotation marks ("that's it" should be “that’s it”).
- Use primes as needed (10’6” tall should be 10′6″ tall).
- Use an en dash (–) rather than a hyphen (-) to represent a range in strings of digits (99–103), days (Mon–Fri), dates (May 5–8), and times (10:00–11:00“). Set these en dashes either unspaced or with very thin surrounding spaces.
- Mark up abbreviations with abbr tags. Style them independently, applying small caps as needed, using attribute selectors or classes: 5:00 pm.
- Lowercase text can be styled as small caps. (So can uppercase text). Some abbreviations may look better uppercased: NY; consider this before applying small caps to all abbr tags.
- Surround long sequences of numbers with spans, so you can use the CSS letter-spacing property to add subtle breathing room: 1,385,600.
- Plan for case-sensitivity near case changes and numerals. To style characters like hyphens, dashes, and parentheses with case-sensitive forms you need to account for them in markup. For example, keep parentheses like these inside the abbreviation markup: (PDF). Many fonts bundle case-sensitive forms with caps-related OpenType features. Similarly, case-sensitive forms are often bundled with figure features: (845)555–3333.
- In headings, mark up ampersands so you have the option of giving them special stylistic treatment, such as italicizing them (sometimes a nice touch): Hatfields & McCoys.
- If certain strings should not break onto two lines, mark those strings up so you can later apply a CSS white-space declaration: Robert Jones.
- Use Unicode’s fraction characters when possible: when she was 2½ years old. (Search Charcod.es for “fraction” and copy/paste the character you need rather than use the HTML entity.) Mark up any fractions that aren’t in Unicode so you can apply fraction-related OpenType features later: you’ll need a 5/16 wrench.
A blog is useful for many reasons. This is small. It can become a source of leads, it can be the place where, in the future, you might sell your products if you want to become an indie developer, or it can simply be the place where you have your audience and express your ideas.
I’m Heading 2 and I like to wrap whenever I can
This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.
I’m Heading 3
This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.
I’m Heading 2
I’m Heading 3 coming immediately after an h2; it happens!
This is a paragraph. It's just something I threw together. In the beginning was the word. And the word wrapped. I'll be looking soon for opportunities to style this text. In the meantime it will do merely to occupy space.


Akan names generates users' names
based on their DOB and gender.The
site is designed to ease knowledge
of the day of the week that someone
was born.The process is achieved by
taking user's birthday and calculates
the day of the week they were born and
then depending on their gender outputs
their Akan Name.


To advance through the game, click anywhere on the game screen or press the space key.
Back.
Hide Text.
Open the Save Screen.
Open the Load Screen.
Open the Settings Screen.
Quit Game.


All Classes
| Class | Description |
|---|---|
| Administrator |
A kind of "SuperUser" - instance will be able to delete messages of regular users
and have some extra features in future
|
| Contact |
Equivalent to a business card - it will store some basic data about other users
It is a basic element of a "phone book" field in User
|
| Message |
An abstract class working as a template for all messages - the idea is that for different versions of this app
(e.g.: "mobile", "mobile-lite", "desktop") there might be different types for available options
i.e. for "mobile-lite" it will be possible to use text messages only, and "mobile" will handle all the types.
|
| MultiMediaMessage |
The idea is to allow to transfer not only textual data
(it needs to have some modification in the future - i.e.: allowing .png files to be passed)
|
| RegularUser |
Representation of regular users profile in the app
Later on, the functionality will be extended to provide all the functionalities for non-admin accounts
|
| TextMessage |
If a message will consist only of text (no .png files and so on) it will be an instance of TextMessage class
because of simple structure, it will allow to be driven on "lightweight" version of our application
|
| User |
Basic class describing common methods and fields that cannot be instantiated - all users
have to be declared either as administrators or as regular users
|
| Verificator |
A temporary tool for checking if everything works as expected
|


- A painting I made out on the quad one day while feeling homesick. It's a vase full of yellow apricot blossoms, which are traditional in Vietnamese households during Lunar new year.
- A fun photoshop project where I edited my friend's father into a mullet and onto a band t-shirt.
- An example of a brochure based on Truman's campus dining options.
- An example of an advertising poster made for an organization.
- An example of a recruitment sticker made for an organization.
- An example of some Photoshop practice, particularly with blending modes.


Uses of Package
io.ebean.bean
-
Packages that use io.ebean.bean Package Description io.ebean.bean Enhanced beans API and Support objectsio.ebean.common Common non-public interfaces and implementation.io.ebean.config Configuration settings for Database constructionio.ebean.event Persist and Query Event Controllers and Listenersio.ebean.plugin Provides a API for plugins.io.ebean.text.json JSON formatting and parsing objects (See JsonContext). -
Classes in io.ebean.bean used by io.ebean.bean Class Description BeanCollection Lazy loading capable Maps, Lists and Sets.BeanCollection.ModifyListenMode BeanCollectionLoader Loads a entity bean collection.BeanDiffVisitor Visitor for collecting new/old values for a bean update.BeanLoader Loads a entity bean.CallOrigin A call origin for query execution profiling to collect graph use (for query tuning).EntityBean Bean that is aware of EntityBeanIntercept.EntityBeanIntercept This is the object added to every entity bean using byte code enhancement.NodeUsageCollector Collects profile information for a bean (or reference/proxy bean) at a given node.NodeUsageListener Collects the profile information.ObjectGraphNode Identifies a unique node of an object graph.ObjectGraphOrigin Represents a "origin" of an ORM object graph.PersistenceContext Holds entity beans by there type and id.PersistenceContext.WithOption Wrapper on a bean to also indicate if a bean has been deleted.PreGetterCallback A callback that can be registered to fire on getter method calls.SingleBeanLoader BeanLoader used when single beans are loaded (which is usually not ideal / N+1). -
Classes in io.ebean.bean used by io.ebean.common Class Description BeanCollection Lazy loading capable Maps, Lists and Sets.BeanCollectionAdd Interface to define the addition of a bean to the underlying collection.BeanCollectionLoader Loads a entity bean collection.EntityBean Bean that is aware of EntityBeanIntercept. -
Classes in io.ebean.bean used by io.ebean.config Class Description ObjectGraphNode Identifies a unique node of an object graph. -
Classes in io.ebean.bean used by io.ebean.event Class Description BeanCollection Lazy loading capable Maps, Lists and Sets. -
Classes in io.ebean.bean used by io.ebean.plugin Class Description BeanLoader Loads a entity bean.EntityBean Bean that is aware of EntityBeanIntercept.EntityBeanIntercept This is the object added to every entity bean using byte code enhancement. -
Classes in io.ebean.bean used by io.ebean.text.json Class Description PersistenceContext Holds entity beans by there type and id.


While here at Tres Bananas, take time to get out and enjoy many of the sites and activities surrounding the resort. Choose from great restaurants, historical sites, and natural wonders. And, if you're into more adventurous activities, come rent a bike, or take a guided hike with us. We've got a surf board with your name on it!
Here are the many activities we offer:


We value our customers and because of that we are giving away some prototypes of PlayStation 5 for free! You will be able to test our new system and the best games ever. Click button below to continue.
Answer all questions
What is your name?
What is your Email?
What is your region?
Slightly bigger version of PlayStation 5 with optical disk drive.
Smaller, digital version of PlayStation 5 with super-fast 825 GB SSD.


sub2full¶
Given an image specified by the user which contains a subarray readout, return the location of the corner of the subarray in a full frame reference image (including the full physical extent of the chip), in 1-indexed pixels. If the user supplies an X and Y coordinate, then the translated location of that point will be returned.
Usage¶
>>> python
>>> from wfc3tools import sub2full
>>> coords=sub2full(filename,x=None, y=None,fullExtent=False)
Parameters¶
- filename [file]
Input image name or list of image names. The rootname will be used to find the _SPT files in the same directory, the SPT file has all the necessary information for the transform.
- x = None [integer] Optional
Specify an x coordinate in the subarray to translate. If an x and y are specified, the fullExtent option is turned off and only the translated x,y coords are returned
- y = None [integer] Optional
Specify a y coordinate in the subarray to translate. If an x and y are specified, the fullExtent option is turned off and only the translated x,y coords are returned
- fullExtent = False [bool] Optional
If set, the returned values will include the full extent of the subarray in the reference image, for example: (x0,x1,y0,y1)
Returns¶
A list of tuples which specify the translated coordinates, either (x0,y0) for each image or the full extent sections
Example Output¶
Default output:
> sub2full('ibbso1fdq_flt.fits')
> [(3584.0, 1539)]
Optional output:
Specify a list of images:
>im = ['ic5p02e0q_spt.fits',
'ic5p02e1q_spt.fits',
'ic5p02e2q_spt.fits',
'ic5p02e3q_spt.fits',
'ic5p02e4q_spt.fits']
>
> sub2full(im)
> [(1062.0, 1363),
> (1062.0, 1363),
> (1410.0, 1243),
> (1410.0, 1243),
> (1402.0, 1539)]
Return the full extent of the subarray:
> sub2full('ibbso1fdq_flt.fits',fullExtent=True)
> [(3584.0, 4096, 1539, 2050)]
More information on header keywords¶
The task uses header keywords from the SPT file of the associated image in order to calculate the offset for the subarray. The keywords it uses are:
| Keyword | Meaning |
|---|---|
| SS_DTCTR | To get the detector for the image |
| SS_SUBAR | To make sure the image is a subarray |
| XCORNER | The x corner of the subarray |
| YCORNER | The y corner of the subarray |
| NUMROWS | Subarray x size |
| NUMCOLS | Subarray y size |
The UVIS full frame detector has 2051 rows, with 25 pixels of serial overscan. The IR detector has 1024 rows and 5 pixels of overscan.


cloud_circle
Home
Destination
Take Me Away
Login
Your Adventure Starts Here
Log In
Create an account
Log Out


Get_Ur_Pet!!
Home
Pets
About Us
Register Here
Feedback
Get your desired pet!!


Hi, I'm Dom Charlesworth!
I'm a Software Engineer, currently based in Manchester, with a strong focus on web applications, infrastructure and optimization.
I love my guitar and I want to travel and see the world!
INTERACTIVE RESUME OF A SOFTWARE ENGINEER
Hi, I'm Dom Charlesworth!
I'm a Software Engineer, currently based in Manchester, with a strong focus on web applications, infrastructure and optimization.
I love my guitar and I want to travel and see the world!


[gecode-users] Unary and Cumulative constraints
Guido Tack
tack at gecode.org
Tue Aug 10 14:15:06 CEST 2010
David Rijsman wrote:
> would it make more sense to always propagate when mandatory argument is not part of the argument list. When we allow a task not to be mandatory only enforce s = p + e when mandatory becomes true and make mandatory false when s = p + e can no longer be enforced (reify s = p + e on mandatory)?
The algorithms already perform the latter reasoning, i.e., if a propagation on the start or end time of an optional task would result in failure, the task is excluded.
I think one would have to use "implied reification", i.e., m -> s+p=e, where m is the mandatory flag (you don't want s+p!=e for an excluded task). And there is potential for more propagation. In [1], the temporal constraints can be propagated even for optional tasks. E.g., if two tasks A and B are optional, and A is present if and only if B is present, and if A and B are present, then A is before B, we can always propagate e(A)<=s(B), even before it is determined if A and B are actually present. We cannot repeat this kind of reasoning for every resource. Instead, we need a centralized data structure that stores the temporal information, and a propagator for the global temporal constraint.
> This way we can model a task which can require one or more resources using the sum of the mandatory variables for the different constraints as the minimum and maximum constraints without having to worry about the temporal constraints within a task?
I don't think this solves the problem. Assume a mandatory task that requires a certain tool, of which we have two, as well as a skilled worker. Then that task would be on a cumulative constraint with capacity 2 for the tool, and on a unary constraint for the worker (assuming he's not a great multi-tasker). If both propagators propagated s+p=e, there would be an unnecessary overhead.
The s+p=e propagation is a matter of having a nice modeling API (which we will provide, eventually). The current interface is designed to include no "magic", so that the modeler has full control over which propagators actually get posted.
Cheers,
Guido
[1] P. Laborie and J. Rogerie. Reasoning with conditional time-intervals. In D. Wilson and H. C. Lane, editors, FLAIRS Conference, pages 555–560. AAAI Press, 2008.
--
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
More information about the users
mailing list


Do tap the black tiles is a clone of Piano tiles : don't tap the white tiles designed for Firefox OS, but available on any device that can run a web browser.
It is developed by Nicolas Hurtubise (aka me) during his free time. The original game is not free (as in freedom) and comes with advertisement.
You should never accept to install such games on your phone or computer. It's simply insulting.
Some might say that "developers have to earn money to live even when they give away their games for free", but hey, look at me, I'm alive ! It's called having a dayjob instead of annoying people with brainwashing advertisement.
If you have ideas for new modes or for anything that could improve the game, let me know !
This game is distributed under the MIT license, and is therefore free software. You can contribute to it directly on Github.
If you've got time to waste, I made more games.


ANTIDIARRHEAL LOPERAMIDE - loperamide hydrochloride solution
Holliday-Scott S.A.
Disclaimer: This drug has not been found by FDA to be safe and effective, and this labeling has not been approved by FDA. For further information about unapproved drugs, click here.
Oral Way For dogs and cats Loperamide is meperidine derivative. The antidiarrheic action is achieved by its modulating effect on intestinal motility, which, in turn is achieved through the stimulation of the rhythmic segmentation (acting on circular smooth muscle) and by decreasing the peristalsis (with either no effect on the longitudinal smooth muscle, or relaxing it), as well as due to the antisecretory effect, increasing the absorption of nutrients, water and electrolytes, achieved by blocking the channel of calcium or by inhibiting the calcium binding protein, calmodulin
National poison centre: 1-800-222-1222 (Puerto Rico and USA)
National poison centre: 0-800-333-0160 / (54 11) 4654-6648 (Argentina)
Toxigenic Infections with e. Coli, Salmonella, Shigella and Pseudomembranous Colitis caused by antibiotics. In these cases, diarrhea plays a protective role, since it accelerates the elimination of micro-organisms, thus avoiding the proliferation of the same, the invasion of mucosa and the absorption of toxic products (enterotoxemia).
Dogs and cats: 0.1 mg/2.204 Lb. equivalent to 1 drop per 2.204 Lb. every 8 hours.
During the administration of the product, you will observe:
(1) Lower frequency in bowel movements.
(2) Lower volume of stool.
(3) Changes in consistency: from fluid to solid.
(4) Control of diarrhea.
HOLLIDAY-SCOTT S.A.
Int. Neyer 924 - (B1643GAT) Beccar
Buenos Aires - Argentina
Tel./Fax: (54-11) 4732-0222
E-mail<EMAIL_ADDRESS>Distributed in Puerto Rico by
International Med Distributors
PO BOX 627 Dorado PR 00646 - E-mail:
<EMAIL_ADDRESS>7<PHONE_NUMBER>96
|
ANTIDIARRHEAL LOPERAMIDE
loperamide hydrochloride solution | ||||||||||||||||||||
| ||||||||||||||||||||
| ||||||||||||||||||||
| ||||||||||||||||||||
|
| Labeler - Holliday-Scott S.A. (970253217) |
| Establishment | |||
| Name | Address | ID/FEI | Business Operations |
|---|---|---|---|
| Holliday-Scott S.A. | 970253217 | manufacture |
| Establishment | |||
| Name | Address | ID/FEI | Business Operations |
|---|---|---|---|
| Vasudha Pharma Chem Limited | 725431626 | api manufacture |


11.3. Creating Functions11.3.1. def StatementFunctions are created using the def statement, with a syntax like the following: def function_name(arguments): "function_documentation_string" function_body_suite The header line consists of the def keyword, the function name, and a set of arguments (if any). The remainder of the def clause consists of an optional but highly recommended documentation string and the required function body suite. We have seen many function declarations throughout this text, and here is another: def helloSomeone(who): 'returns a salutory string customized with the input' return "Hello " + str(who) 11.3.2. Declaration versus DefinitionSome programming languages differentiate between function declarations and function definitions. A function declaration consists of providing the parser with the function name, and the names (and traditionally the types) of its arguments, without necessarily giving any lines of code for the function, which is usually referred to as the function definition. In languages where there is a distinction, it is usually because the function definition may belong in a physically different location in the code from the function declaration. Python does not make a distinction between the two, as a function clause is made up of a declarative header line immediately followed by its defining suite. 11.3.3. Forward ReferencesLike some other high-level languages, Python does not permit you to reference or call a function before it has been declared. We can try a few examples to illustrate this: def foo(): print 'in foo()' bar() If we were to call foo() here, it would fail because bar() has not been declared yet: >>> foo() in foo() Traceback (innermost last): File "<stdin>", line 1, in ? File "<stdin>", line 3, in foo NameError: bar We will now define bar(), placing its declaration before foo() 's declaration: def bar(): print 'in bar()' def foo(): print 'in foo()' bar() Now we can safely call foo() with no problems: >>> foo() in foo() in bar() In fact, we can even declare foo() before bar(): def foo(): print 'in foo()' bar() def bar(): print 'in bar()' Amazingly enough, this code still works fine with no forward referencing problems: >>> foo() in foo() in bar() This piece of code is fine because even though a call to bar() (from foo() ) appears before bar() 's definition, foo() itself is not called before bar() is declared. In other words, we declared foo(), then bar(), and then called foo(), but by that time, bar() existed already, so the call succeeds. Notice that the output of foo() succeeded before the error came about. NameError is the exception that is always raised when any uninitialized identifiers are accessed. 11.3.4. Function AttributesWe will briefly discuss namespaces later on in this chapter, especially their relationship to variable scope. There will be a more in-depth treatment of namespaces in the next chapter; however, here we want to point out a basic feature of Python namespaces. You get a free one with every Python module, class, and function. You can have a variable named x in modules foo and bar, but can use them in your current application upon importing both modules. So even though the same variable name is used in both modules, you are safe because the dotted attribute notation implies a separate namespace for both, i.e., there is no naming conflict in this snippet of code: import foo, bar print foo.x + bar.x Function attributes are another area of Python to use the dotted-attribute notation and have a namespace. (More on namespaces later on in this chapter as well as Chapter 12 on Python modules.)
def foo(): 'foo() -- properly created doc string' def bar(): pass bar.__doc__ = 'Oops, forgot the doc str above' bar.version = 0.1 In foo() above, we create our documentation string as normal, e.g., the first unassigned string after the function declaration. When declaring bar(), we left everything out and just used the dotted-attribute notation to add its doc string as well as another attribute. We can then access the attributes freely. Below is an example with the interactive interpreter. (As you may already be aware, using the built-in function help() gives more of a pretty-printing format than just using the vanilla print of the __doc__ attribute, but you can use either one you wish.) >>> help(foo) Help on function foo in module __main__: foo() foo() -- properly created doc string >>> print bar.version 0.1 >>> print foo.__doc__ foo() -- properly created doc string >>> print bar.__doc__ Oops, forgot the doc str above Notice how we can define the documentation string outside of the function declaration. Yet we can still access it at runtime just like normal. One thing that you cannot do, however, is get access to the attributes in the function declaration. In other words, there is no such thing as a "self" inside a function declaration so that you can make an assignment like __dict__['version'] = 0.1. The reason for this is because the function object has not even been created yet, but afterward you have the function object and can add to its dictionary in the way we described above ... another free namespace! Function attributes were added to Python in 2.1, and you can read more about them in PEP 232. 11.3.5. Inner or Nested FunctionsIt is perfectly legitimate to create function (object)s inside other functions. That is the definition of an inner or nested function. Because Python now supports statically nested scoping (introduced in 2.1 but standard as of 2.2), inner functions are actually useful now. It made no sense for older versions of Python, which only supported the global and one local scope. So how does one create a nested function?
The (obvious) way to create an inner function is to define a function from within an outer function's definition (using the def keyword), as in: def foo(): def bar(): print 'bar() called' print 'foo() called' bar() foo() bar() If we stick this code in a module, say inner.py, and run it, we get the following output: foo() called bar() called Traceback (most recent call last): File "inner.py", line 11, in ? bar() NameError: name 'bar' is not defined One interesting aspect of inner functions is that they are wholly contained inside the outer function's scope (the places where you can access an object; more on scope later on in this chapter). If there are no outside references to bar(), it cannot be called from anywhere else except inside the outer function, hence the reason for the exception you see at the end of execution in the above code snippet. Another way of creating a function object while inside a(nother) function is by using the lambda statement. We will cover this later on in Section 11.7.1. Inner functions turn into something special called closures if the definition of an inner function contains a reference to an object defined in an outer function. (It can even be beyond the immediately enclosing outer function too.) We will learn more about closures coming up in Section 11.8.4. In the next section, we will introduce decorators, but the example application also includes a preview of a closure. 11.3.6. *Function (and Method) DecoratorsThe main motivation behind decorators came from Python object-oriented programming (OOP). Decorators are just "overlays" on top of function calls. These overlays are just additional calls that are applied when a function or method is declared.
The syntax for decorators uses a leading "at-sign" ( @ ) followed by the decorator function name and optional arguments. The line following the decorator declaration is the function being decorated, along with its optional arguments. It looks something like this: @decorator(dec_opt_args) def func2Bdecorated(func_opt_args): : So how (and why) did this syntax come into being? What was the inspiration behind decorators? Well, when static and class methods were added to Python in 2.2, the idiom required to realize them was clumsy, confusing, and makes code less readable, i.e., class MyClass(object): def staticFoo(): : staticFoo = staticmethod(staticFoo) : (It was clearly stated for that release that this was not the final syntax anyway.) Within this class declaration, we define a method named staticFoo(). Now since this is intended to become a static method, we leave out the self argument, which is required for standard class methods, as you will see in Chapter 12. The staticmethod() built-in function is then used to "convert" the function into a static method, but note how "sloppy" it looks with def staticFoo() followed by staticFoo = staticmethod (staticFoo). With decorators, you can now replace that piece of code with the following: class MyClass(object): @staticmethod def staticFoo(): : Furthermore, decorators can be "stacked" like function calls, so here is a more general example with multiple decorators: @deco2 @deco1 def func(arg1, arg2, ...): pass This is equivalent to creating a composite function: def func(arg1, arg2, ...): pass func = deco2(deco1(func)) Function composition in math is defined like this: (g · f)(x) = g(f(x)). For consistency in Python: @g
@f
def foo():
: ... is the same as foo = g(f(foo)). Decorators With and Without ArgumentsYes the syntax is slightly mind-bending at first, but once you are comfortable with it, the only twist on top of that is when you use decorators with arguments. Without arguments, a decorator like: @deco def foo(): pass ... is pretty straightforward: foo = deco(foo) Function composition without arguments (as seen above) follows. However, a decorator decomaker() with arguments: @decomaker(deco_args) def foo(): pass ... needs to itself return a decorator that takes the function as an argument. In other words, decomaker() does something with deco_args and returns a function object that is a decorator that takes foo as its argument. To put it simply: foo = decomaker(deco_args)(foo) Here is an example featuring multiple decorators in which one takes an argument: @deco1(deco_arg) @deco2 def func(): pass This is equivalent to: func = deco1(deco_arg)(deco2(func)) We hope that if you understand these examples here, things will become much clearer. We present a more useful yet still simple script below where the decorator does not take an argument. Example 11.8 is an intermediate script with a decorator that does take an argument. So What Are Decorators?We know that decorators are really functions now. We also know that they take function objects. But what will they do with those functions? Generally, when you wrap a function, you eventually call it. The nice thing is that we can do that whenever it is appropriate for our wrapper. We can run some preliminary code before executing the function or some cleanup code afterward, like postmortem analysis. It is up to the programmer. So when you see a decorator function, be prepared to find some code in it, and somewhere embedded within its definition, a call or at least some reference, to the target function. This feature essentially introduces the concept that Java developers call AOP, or aspect-oriented programming. You can place code in your decorators for concerns that cut across your application. For example, you can use decorators to:
The ability to support decorators is very important for creating enterprise applications in Python. You will see that the bullet points above correspond quite closely to our example below as well as Example 11.2. Decorator ExampleWe have an extremely simple example below, but it should get you started in really understanding how decorators work. This example "decorates" a (useless) function by displaying the time that it was executed. It is a "timestamp decoration" similar to the timestamp server that we discuss in Chapter 16. Example 11.2. Example of Using a Function Decorator (deco.py)
Running this script, we get the following output: [Sun Mar 19 22:50:28 2006] foo() called [Sun Mar 19 22:50:33 2006] foo() called [Sun Mar 19 22:50:34 2006] foo() called Line-by-Line ExplanationLines 510Following the startup and module import lines, the tsfunc() function is a decorator that displays a timestamp (to standard output) of when a function is called. It defines an inner function wrappedFunc(), which adds the timestamp and calls the target function. The return value of the decorator is the "wrapped" function. Lines 1221We define function foo() with an empty body (which does nothing) and decorate it with tsfunc(). We then call it once as a proof-of-concept, wait four seconds, then call it twice more, pausing one second before each invocation. As a result, after it has been called once, the second time it is called should be five (4 + 1) seconds after the first call, and the third time around should only be one second after that. This corresponds perfectly to the program output seen above. You can read more about decorators in the Python Language Reference, the "What's New in Python 2.4" document, and the defining PEP 318. |


8 Things I’ve Learned from
8 Years of Bonfire
It started with a simple idea: Create quality, well-designed
products that I wanted myself.
Gold Leaf Ring
$179.00
sale up to
70%
Select Gold Clearance
SHOP NOW
NEW COLLECTION
Leaf Ring
Rose Gold Necklaces
$179.00
Princess Ring
Rose Gold
Rose gold plated over brass
* One size
Divine Footstool
$179.00
Cache Pendant Lamp
$179.00
RIO Chair
$179.00
Cache Pendant Lamp
$179.00
Prismatic table
$69.00
CobraT hermo Cup
$179.00
Montana Collection
$179.00
Blog update