With the Nodebox English Linguistics library you can do grammar inflection and semantic operations on English content. You can use the library to conjugate verbs, pluralize nouns, write out numbers, find dictionary descriptions and synonyms for words, summarise texts and parse grammatical structure from sentences.
The library bundles WordNet (using Oliver
Steele’s PyWordNet), NLTK, Damian Conway’s pluralisation rules, Bermi
Ferrer’s singularization rules, Jason Wiener’s
Brill
tagger, several algorithms adopted from Michael Granger’s Ruby Linguistics module, John
Wiseman’s implementation of the Regressive
Imagery Dictionary, Charles K. Ogden’s list of basic English words, and Peter Norvig’s spelling corrector.
| linguistics.zip
(15MB) Last updated for NodeBox <IP_ADDRESS> Licensed under GPL Author: Tom De Smedt |
Put the en library folder in the same folder as your script so PlotDevice can find the library. You can also put it in ~/Library/Application Support/PlotDevice/. It takes some time to load all the data the first time.
import en
The is_number() command returns True when the given value is a number:
print en.is_number(12) print en.is_number("twelve") >>> True >>> True
The is_noun() command returns True when the given string is a noun. You can also check for is_verb(), is_adjective() and is_adverb():
print en.is_noun("banana") >>> True
The is_tag() command returns True when the given string is a tag, for example HTML or XML.
The is_html_tag() command returns True when the string is a HTML tag.
The is_basic_emotion() command returns True if the given word expresses a basic emotion (anger, disgust, fear, joy, sadness, surprise):
print en.is_basic_emotion("cheerful") >>> True
The is_persuasive() command returns True if the given word is a ‘magic’ word (you, money, save, new, results, health, easy, ...):
print en.is_persuasive("money") >>> True
The is_connective() command returns True if the word is a connective (nevertheless, whatever, secondly, ... and words like I, the, own, him which have little semantical value):
print en.is_connective("but") >>> True
The number.ordinal() command returns the ordinal of the given number, 100 yields 100th, 3 yields 3rd and twenty-one yields twenty-first:
print en.number.ordinal(100) print en.number.ordinal("twenty-one") >>> 100th >>> twenty-first
The number.spoken() command writes out the given number:
print en.number.spoken(25) >>> twenty-five
The number.quantify() command quantifies the given word:
print en.number.quantify(10, "chicken") print en.number.quantify(800, "chicken") >>> a number of chickens >>> hundreds of chickens
The list.conjunction() command quantifies a list of words. Notice how goose is correctly pluralized and duck has the right article.
farm = ["goose", "goose", "chicken", "chicken", "chicken"] print en.list.conjunction(farm) >>> several chickens, a pair of geese and a duck
You can also quantify the types of things in the given list, class or module:
print en.list.conjunction((1,2,3,4,5), generalize=True) print en.list.conjunction(en, generalize=True) >>> several integers >>> a number of modules, a number of functions, a number of strings, >>> a pair of lists, a pair of dictionaries, an en verb, an en sentence, >>> an en number, an en noun, an en list, an en content, an en adverb, >>> an en adjective, a None type and a plotdevice graphics cocoa Context class
The noun.article() returns the noun with its indefinite article:
print en.noun.article("university") print en.noun.article("owl") print en.noun.article("hour") >>> a university >>> an owl >>> an hour
The noun.plural() command pluralizes the given noun:
print en.noun.plural("child") print en.noun.plural("kitchen knife") print en.noun.plural("wolf") print en.noun.plural("part-of-speech") >>> children >>> kitchen knives >>> wolves >>> parts-of-speech
You can also do adjective.plural().
An optional classical parameter is True by default and determines if either classical or modern inflection is used (e.g. classical pluralization of octopus yields octopodes instead of octopuses).
The noun.singular() command singularizes the given plural:
print en.noun.singular("people") >>> person
The noun.is_emotion() guesses whether the given noun expresses an emotion by checking if there are synonyms of the word that are basic emotions. Returns True or False by default.
print en.noun.is_emotion("anger") >>> True
Or you can return a string which provides some information with the boolean=False parameter.
print en.adjective.is_emotion("anxious", boolean=False) >>> fear
An additional optional parameter shallow=True speeds up the lookup process but doesn’t check as many synonyms. You can also use verb.is_emotion(), adjective.is_emotion() and adverb.is_emotion().
WordNet describes semantic relations between synonym sets.
The noun.gloss() command returns the dictionary description of a word:
print en.noun.gloss("book") >>> a written work or composition that has been published (printed on pages >>> bound together); "I am reading a good book on economics"
A word can have multiple senses, for example ‘tree’ can mean a tree in a forest but also a tree diagram, or a person named Sir Herbert Beerbohm Tree:
print en.noun.senses("tree") >>> [['tree'], ['tree', 'tree diagram'], ['Tree', 'Sir Beerbohm Tree']]
print en.noun.gloss("tree", sense=1) >>> a figure that branches from a single root; "genealogical tree"
The noun.lexname() command returns a categorization for the given word:
print en.noun.lexname("book") >>> communication
The noun.hyponym() command return examples of the given word:
print en.noun.hyponym("vehicle") >>> [['bumper car', 'Dodgem'], ['craft'], ['military vehicle'], ['rocket', >>> 'projectile'], ['skibob'], ['sled', 'sledge', 'sleigh'], ['steamroller', >>> 'road roller'], ['wheeled vehicle']]
print en.noun.hyponym("tree", sense=1) >>> [['cladogram'], ['stemma']]
The noun.hypernym() command return abstractions of the given word:
print en.noun.hypernym("earth") print en.noun.hypernym("earth", sense=1) >>> [['terrestrial planet']] >>> [['material', 'stuff']]
You can also execute a deep query on hypernyms and hyponyms. Notice how returned values become more and more abstract:
print en.noun.hypernyms("vehicle", sense=0) >>> [['vehicle'], ['conveyance', 'transport'], >>> ['instrumentality', 'instrumentation'], >>> ['artifact', 'artefact'], ['whole', 'unit'], >>> ['object', 'physical object'], >>> ['physical entity'], ['entity']]
The noun.holonym() command returns components of the given word:
print en.noun.holonym("computer") >>> [['busbar', 'bus'], ['cathode-ray tube', 'CRT'], >>> ['central processing unit', 'CPU', 'C.P.U.', 'central processor', >>> 'processor', 'mainframe'] ...
The noun.meronym() command returns the collection in which the given word can be found:
print en.noun.meronym("tree") >>> [['forest', 'wood', 'woods']]
The noun.antonym() returns the semantic opposite of the word:
print en.noun.antonym("black") >>> [['white', 'whiteness']]
Find out what two words have in common:
print en.noun.meet("cat", "dog", sense1=0, sense2=0) >>> [['carnivore']]
The noun.absurd_gloss() returns an absurd description for the word:
print en.noun.absurd_gloss("typography") >>> a business deal on a trivial scale
The return value of a WordNet command is usually a list containing other lists of related words. You can use the en.list.flatten() command to flatten the list:
print en.list.flatten(en.noun.senses("tree")) >>> ['tree', 'tree', 'tree diagram', 'Tree', 'Sir Herbert Beerbohm Tree']
If you want a list of all nouns/verbs/adjectives/adverbs there’s the wordnet.all_nouns(), wordnet.all_verbs() ... commands:
print len(en.wordnet.all_nouns()) >>> 117096
All of the commands shown here for nouns are also available for verbs, adjectives and adverbs, en.verb.hypernyms(’run’), en.adjective.gloss(’beautiful’) etc. are valid commands.
PlotDevice English Linguistics knows the verb tenses for about 10000 English verbs.
The verb.infinitive() command returns the infinitive form of a verb:
print en.verb.infinitive("swimming") >>> swim
The verb.present() command returns the present tense for the given person. Known values for person are 1, 2, 3, ‘1st’, ‘2nd’, ‘3rd’, ‘plural’, ‘*’. Just use the one you like most.
print en.verb.present("gave") print en.verb.present("gave", person=3, negate=False) >>> give >>> gives
The verb.present_participle() command returns the present participle tense:
print en.verb.present_participle("be") >>> being
Return the past tense:
print en.verb.past("give") print en.verb.past("be", person=1, negate=True) >>> gave >>> wasn't
Return the past participle tense:
print en.verb.past_participle("be") >>> been
A list of all possible tenses:
print en.verb.tenses() >>> ['past', '3rd singular present', 'past participle', 'infinitive', >>> 'present participle', '1st singular present', '1st singular past', >>> 'past plural', '2nd singular present', '2nd singular past', >>> '3rd singular past', 'present plural']
The verb.tense() command returns the tense of the given verb:
print en.verb.tense("was") >>> 1st singular past
Return True if the given verb is in the given tense:
print en.verb.is_tense("wasn't", "1st singular past", negated=True) print en.verb.is_present("does", person=1) print en.verb.is_present_participle("doing") print en.verb.is_past_participle("done") >>> True >>> False >>> True >>> True
The verb.is_tense() command also accepts shorthand aliases for tenses: inf, 1sgpres, 2gpres, 3sgpres, pl, prog, 1sgpast, 2sgpast, 3sgpast, pastpl and ppart.
PlotDevice English Linguistics is able to perform spelling corrections based on Peter Norvig’s algorithm. The spelling corrector has an accuracy of about 70%.
The spelling.suggest() returns a list of possible corrections for a given word. The spelling.correct() command returns the corrected version (best guess) of the word.
print en.spelling.suggest("comptuer") >>> ['computer']
PlotDevice English Linguistics is able to do sentence structure analysis using a combination of Jason Wiener’s tagger and NLTK’s chunker. The tagger assigns a part-of-speech tag to each word in the sentence using a (Brill’s) lexicon. A postag is something like NN or VBP marking words as nouns, verbs, determiners, pronouns, etc. The chunker is then able to group syntactic units in the sentence. A syntactic unit is, for example, a determiner followed by adjectives followed by a noun: the tasty little chicken is a syntactic unit.
The sentence.tag() command tags the given sentence. The return value is a list of (word, tag) tuples. However, when you print it out it will look like a string.
print en.sentence.tag("this is so cool") >>> this/DT is/VBZ so/RB cool/JJ
There are lots of part-of-speech tags and it takes some time getting to know them. The full list is here. The sentence.tag_description() returns a (description, examples) tuple for a given tag:
print en.sentence.tag_description("NN") >>> ('noun, singular or mass', 'tiger, chair, laughter')
The sentence.chunk() command returns the chunked sentence:
from pprint import pprint pprint( en.sentence.chunk("we are going to school") ) >>> [['SP', >>> ['NP', ('we', 'PRP')], >>> ['AP', >>> ['VP', ('are', 'VBP'), ('going', 'VBG'), ('to', 'TO')], >>> ['NP', ('school', 'NN')]]]]
Now what does all this mean?
A handy sentence.traverse(sentence, cmd) command lets you feed a chunked sentence to your own command chunk by chunk:
s = "we are going to school" def callback(chunk, token, tag): if chunk != None : print en.sentence.tag_description(chunk)[0].upper() if chunk == None : print token, "("+en.sentence.tag_description(tag)[0]+")" en.sentence.traverse(s, callback) >>> SUBJECT PHRASE >>> NOUN PHRASE >>> we (pronoun, personal) >>> VERB PHRASE AND ARGUMENTS >>> VERB PHRASE >>> are (verb, non-3rd person singular present) >>> going (verb, gerund or present participle) >>> to (infinitival to) >>> NOUN PHRASE >>> school (noun, singular or mass)
A even handier sentence.find(sentence, pattern) command lets you find patterns of text in a sentence:
s = "The world is full of strange and mysterious things." print en.sentence.find(s, "JJ and JJ NN") >>> [[('strange', 'JJ'), ('and', 'CC'), >>> ('mysterious', 'JJ'), ('things', 'NNS')]]
The returned list contains all chunks of text that matched the pattern. In the example above it retrieved all chunks of the form an adjective + and + an adjective + a noun. Notice that when you use something like ‘NN’ in your pattern (noun), NNS (plural nouns) are returned as well.
s = "The hairy hamsters visited the cruel dentist." matches = en.sentence.find(s, "JJ NN") print matches >>> [[('hairy', 'JJ'), ('hamsters', 'NNS')], [('cruel', 'JJ'), ('dentist', 'NN')]]
An optional chunked parameter can be set to False to return strings instead of token/tag tuples. You can put pieces of the pattern between brackets to make them optional, or use wildcards:
s = "This makes the parser an extremely powerful tool." print en.sentence.find(s, "(extreme*) (JJ) NN", chunked=False) >>> ['parser', 'extremely powerful tool']
Finally, if you feel up to it you could feed the following command with a list of your own regular expression units to chunk, mine are pretty basic as I’m not a linguist.
print en.sentence.chunk_rules()
PlotDevice English Linguistics is able to strip keywords from a given text.
en.content.keywords(txt, top=10, nouns=True, singularize=True, filters=[])
The content.keywords() command guesses a list of words that frequently occur in the given text. The return value is a list (length defined by top) of (count, word) tuples. When nouns is True, returns only nouns. The command furthermore ignores connectives, numbers and tags. When singularize is True, attempts to singularize nouns in the text. The optional filters parameter is a list of words which the command should ignore.
So, assuming you would want to summarise web content you can do the following:
from urllib import urlopen html = urlopen("http://news.bbc.co.uk/").read() meta = ["news", "health", "uk", "version", "weather", "video", "sport", "return", "read", "help"] print sentence_keywords(html, filters=meta) >>> [(6, 'funeral'), (5, 'beirut'), (3, 'war'), (3, 'service'), (3, 'radio'), >>> (3, 'lebanon'), (3, 'islamist'), (3, 'function'), (3, 'female')]
PlotDevice English Linguistics is able to do psychological content analysis using John Wiseman’s Python implementation of the Regressive Imagery Dictionary. The RID asigns scores to primary, secondary and emotional process thoughts in a text.
en.content.categorise(str)
The content.categorise() command returns a sorted list of categories found in the text. Each item in the list has the following properties:
Let’s run a little test with Lucas’ Ideas from
the Heart text:
txt = open("heart.txt").read() summary = en.content.categorise(txt) print summary.primary print summary.secondary print summary.emotions >>> 0.290155440415 >>> 0.637305699482 >>> 0.0725388601036 # Lucas' text has a 64% secondary value.
# The top 5 categories in the text: for category in summary[:5]: print category.name, category.count >>> instrumental behavior 30 >>> abstraction 30 >>> social behavior 28 >>> temporal references 24 >>> concreteness 18
# Words in the top "instrumental behavior" category: print summary[0].words >>> ['students', 'make', 'students', 'reached', 'countless', >>> 'student', 'workshop', 'workshop', 'students', 'finish', >>> 'spent', 'produce', 'using', 'work', 'students', 'successful', >>> 'workshop', 'students', 'pursue', 'skills', 'use', >>> 'craftsmanship', 'use', 'using', 'workshops', 'workshops', >>> 'result', 'students', 'workshops', 'student']
You can find all the categories for primary, secondary and emotional scores in the en.rid.primary, en.rid.secondary and en.rid.emotions lists.
PlotDevice English Linguistics comes bundled with Charles K. Ogden list of basic English words: a set of 2000 words that can express 90% of the concepts in English. The list is stored as en.basic.words. It can be filtered for nouns, verbs, adjectives and adverbs:
print en.basic.words >>> ['a', 'able', 'about', 'account', 'acid', 'across', ... ]
print en.basic.verbs >>> ['account', 'act', 'air', 'amount', 'angle', 'answer', ... ]


This package contains various implementations for painting a graph using different technologies, such as Graphics2D, HTML, SVG or VML.


Interface KeyValueTable<KeyT,ValueT>
-
- Type Parameters:
KeyT
- Table Key Type.ValueT
- Table Value Type.
- All Superinterfaces:
java.lang.AutoCloseable
@Beta public interface KeyValueTable<KeyT,ValueT> extends java.lang.AutoCloseable
Defines all operations that are supported on a Key-Value Table.A Key-Value Table is a distributed Key-Value Store that indexes Entries by Keys. It uses Table Segments (non-distributed Key-Value Store backed by a single Pravega Segment) as the fundamental storage primitive and provides a unified view of all Table Segments involved. Each
TableKey
is hashed to a Table Partition which may be represented by one or more Table Segments (depending on the Key-Value Table configuration chosen when it was created). Such partitioning enables the Key-Value Table to be distributed across the Pravega cluster but also introduces some constraints for certain operations (such as multi-key/entry atomic updates). See below for details.Key Families are used to group related Keys together in the same Table Partition, which allows multiple keys/entries belonging to the same Key Family to be updated/removed atomically.
- Multiple Keys/Entries in the same Key Family can be updated or removed atomically (either all changes will be applied or none will).
- Iterating through all Keys/Entries in the same Key Family is possible.
- The same Key may exist in multiple Key Families or even not be associated with any Key Family at all. Such keys are treated as distinct keys and will not interfere with each other (i.e., if key K1 exists in Key Families F1 and F2, then F1.K1 is different from F2.K1 and both are different from K1 (no Key Family association).
- Keys that do not belong to any Key Family will be uniformly distributed across the Key-Value Table Partitions and cannot be used for multi-key/entry atomic updates or removals or be iterated on.
- Keys belonging to the same Key Family are grouped into the same Table Segment; as such, the choice of Key Families can have performance implications. An ideally balanced Key-Value Table is one where no Key is part of any Key Family or the number of Keys in each Key Family is approximately the same. To enable a uniform distribution of Keys over the Key-Value Table, it is highly recommended not to use Key Families at all. If this situation cannot be avoided (i.e., multi-entry atomic updates or iterators are required), then it is recommended that Key Families themselves be diversified and Keys be equally distributed across them. Such approaches will ensure that the Key-Value Table load will be spread across all its Table Segments. An undesirable situation is an extreme case where all the Keys in the Key-Value Table are associated with a single Key Family; in this case the entire Key-Value Table load will be placed on a single backing Table Segment instead of spreading it across many Table Segments, leading to eventual performance degradation.
Types of Updates:
- Unconditional Updates will insert and/or overwrite any existing values for the given Key, regardless of whether
that Key previously existed or not, and regardless of what that Key's version is. Such updates can be performed using
put(String, Object, Object)
orputAll(String, Iterable)
. - Conditional Updates will only overwrite an existing value if the specified
Version
matches the one that is currently present on the server. Conditional inserts can be performed usingputIfAbsent(String, Object, Object)
and will only succeed if the given Key does not already exist in the given Key Family. Conditional updates can be performed usingreplace(String, Object, Object, Version)
. - Unconditional Removals will remove a Key regardless of what that Key's version is. The operation will also
succeed (albeit with no effect) if the Key does not exist. Such removals can be performed using
remove(String, Object)
. - Conditional Removals will remove a Key only if the specified
Version
matches the one that is currently present on the server. Such removals can be performed usingremove(String, Object, Version)
. - Multi-key updates allow mixing different types of updates in the same update batch. Some entries may be conditioned
on their Keys not existing at all (
TableEntry.getKey()
TableKey.getVersion()
equalsVersion.NOT_EXISTS
), some may be conditioned on specific versions and some may not have condition attached at all (TableEntry.getKey()
TableKey.getVersion()
equalsVersion.NO_VERSION
). All the conditions that are present in the update batch must be satisfied in order for the update batch to be accepted - the condition checks and updates are performed atomically. UsereplaceAll(String, Iterable)
for such an update. - Multi-key removals allow mixing different types of removals in the same removal batch. Some removals may be
conditioned on their affected Keys having a specific version and some may not have a condition attached at all
(
TableKey.getVersion()
equalsVersion.NO_VERSION
). Although unusual, it is possible to have a removal conditioned on a Key not existing (TableKey.getVersion()
equalsVersion.NOT_EXISTS
); such an update will have no effect on that Key if it doesn't exist but it will prevent the rest of the removals from the same batch from being applied - this can be used in scenarios where a set of Keys must be removed only if a particular Key is not present. All the conditions that are present in the removal batch must be satisfied in order for the removal batch to be accepted - the condition checks and updates are performed atomically. UseremoveAll(String, Iterable)
for such a removal.
Conditional Update Responses:
- Success: the update or removal has been atomically validated and performed; all updates or removals in the request have been accepted.
- Failure: the update or removal has been rejected due to version mismatch; no update or removal has been performed.
-
NoSuchKeyException
: the update or removal has been conditioned on a specific version (different fromVersion.NOT_EXISTS
orVersion.NO_VERSION
) but the Key does not exist in theKeyValueTable
. -
BadKeyVersionException
: the update or removal has been conditioned on a specific version (different fromVersion.NO_VERSION
but the Key exists in theKeyValueTable
with a different version.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAXIMUM_SERIALIZED_KEY_LENGTH
The maximum serialization length of a Table Segment Key.static int
MAXIMUM_SERIALIZED_VALUE_LENGTH
The maximum serialized length of a Table Segment Value.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes theKeyValueTable
.io.pravega.common.util.AsyncIterator<IteratorItem<TableEntry<KeyT,ValueT>>>
entryIterator(@NonNull java.lang.String keyFamily, int maxEntriesAtOnce, IteratorState state)
Creates a new Iterator over all theTableEntry
instances in thisKeyValueTable
that belong to a specific Key Family.java.util.concurrent.CompletableFuture<TableEntry<KeyT,ValueT>>
get(java.lang.String keyFamily, KeyT key)
Gets the latest value for the a Key that belong to a specific Key Family.java.util.concurrent.CompletableFuture<java.util.List<TableEntry<KeyT,ValueT>>>
getAll(java.lang.String keyFamily, @NonNull java.lang.Iterable<KeyT> keys)
Gets the latest values for a set of Keys that do belong to the same Key Family.KeyValueTableMap<KeyT,ValueT>
getMapFor(java.lang.String keyFamily)
Exposes thisKeyValueTable
instance as aMap
.io.pravega.common.util.AsyncIterator<IteratorItem<TableKey<KeyT>>>
keyIterator(@NonNull java.lang.String keyFamily, int maxKeysAtOnce, IteratorState state)
Creates a new Iterator over all theTableKey
s in thisKeyValueTable
that belong to a specific Key Family.java.util.concurrent.CompletableFuture<Version>
put(java.lang.String keyFamily, KeyT key, ValueT value)
Unconditionally inserts a new or updates an existing Entry in theKeyValueTable
.java.util.concurrent.CompletableFuture<java.util.List<Version>>
putAll(@NonNull java.lang.String keyFamily, @NonNull java.lang.Iterable<java.util.Map.Entry<KeyT,ValueT>> entries)
Unconditionally inserts new or updates existingTableEntry
instances that belong to the same Key Family into thisKeyValueTable
.java.util.concurrent.CompletableFuture<Version>
putIfAbsent(java.lang.String keyFamily, KeyT key, ValueT value)
Conditionally inserts a new Entry in theKeyValueTable
if the given Key is not already present.java.util.concurrent.CompletableFuture<java.lang.Void>
remove(java.lang.String keyFamily, KeyT key)
Unconditionally removes a Key from this Table Segment.java.util.concurrent.CompletableFuture<java.lang.Void>
remove(java.lang.String keyFamily, KeyT key, @NonNull Version version)
Conditionally Removes a Key from this Table Segment.java.util.concurrent.CompletableFuture<java.lang.Void>
removeAll(java.lang.String keyFamily, @NonNull java.lang.Iterable<TableKey<KeyT>> keys)
Removes one or moreTableKey
instances that belong to the same Key Family from this Table Segment.java.util.concurrent.CompletableFuture<Version>
replace(java.lang.String keyFamily, KeyT key, ValueT value, @NonNull Version version)
Conditionally updates an existing Entry in theKeyValueTable
if the given Key exists and its version matches the givenVersion
.java.util.concurrent.CompletableFuture<java.util.List<Version>>
replaceAll(@NonNull java.lang.String keyFamily, @NonNull java.lang.Iterable<TableEntry<KeyT,ValueT>> entries)
Inserts new or updates existingTableEntry
instances that belong to the same Key Family into thisKeyValueTable
.
-
-
-
Field Detail
-
MAXIMUM_SERIALIZED_KEY_LENGTH
static final int MAXIMUM_SERIALIZED_KEY_LENGTH
The maximum serialization length of a Table Segment Key.- See Also:
- Constant Field Values
-
MAXIMUM_SERIALIZED_VALUE_LENGTH
static final int MAXIMUM_SERIALIZED_VALUE_LENGTH
The maximum serialized length of a Table Segment Value.- See Also:
- Constant Field Values
-
-
Method Detail
-
put
java.util.concurrent.CompletableFuture<Version> put(@Nullable java.lang.String keyFamily, @NonNull KeyT key, @NonNull ValueT value)
Unconditionally inserts a new or updates an existing Entry in theKeyValueTable
.- Parameters:
keyFamily
- (Optional) The Key Family for the Entry. If null, this Entry will not be associated with any Key Family.key
- The Key to insert or update.value
- The Value to be associated with the Key.- Returns:
- A CompletableFuture that, when completed, will contain the
Version
associated with the newly inserted or updated entry.
-
putIfAbsent
java.util.concurrent.CompletableFuture<Version> putIfAbsent(@Nullable java.lang.String keyFamily, @NonNull KeyT key, @NonNull ValueT value)
Conditionally inserts a new Entry in theKeyValueTable
if the given Key is not already present.- Parameters:
keyFamily
- (Optional) The Key Family for the Entry. If null, this Entry will not be associated with any Key Family.key
- The Key to insert.value
- The Value to be associated with the Key.- Returns:
- A CompletableFuture that, when completed, will contain the
Version
associated with the newly inserted or updated entry. Notable exceptions:ConditionalTableUpdateException
If the Key is already present in theKeyValueTable
for the provided Key Family. See theKeyValueTable
doc for more details on Conditional Update Responses.
-
putAll
java.util.concurrent.CompletableFuture<java.util.List<Version>> putAll(@NonNull @NonNull java.lang.String keyFamily, @NonNull @NonNull java.lang.Iterable<java.util.Map.Entry<KeyT,ValueT>> entries)
Unconditionally inserts new or updates existingTableEntry
instances that belong to the same Key Family into thisKeyValueTable
. All changes are performed atomically (either all or none will be accepted).- Parameters:
keyFamily
- The Key Family for the all provided Table Entries.entries
- AnIterable
ofMap.Entry
instances to insert or update.- Returns:
- A CompletableFuture that, when completed, will contain a List of
Version
instances which represent the versions for the inserted/updated keys. The size of this list will be the same as the number of items in entries and the versions will be in the same order as the entries.
-
replace
java.util.concurrent.CompletableFuture<Version> replace(@Nullable java.lang.String keyFamily, @NonNull KeyT key, @NonNull ValueT value, @NonNull @NonNull Version version)
Conditionally updates an existing Entry in theKeyValueTable
if the given Key exists and its version matches the givenVersion
.- Parameters:
keyFamily
- (Optional) The Key Family for the Entry. If null, this Entry will not be associated with any Key Family.key
- The Key to update.value
- The new Value to be associated with the Key.version
- AVersion
representing the version that this Key must have in order to replace it.- Returns:
- A CompletableFuture that, when completed, will contain the
Version
associated with the updated entry. Notable exceptions:ConditionalTableUpdateException
If the Key is not present present in theKeyValueTable
for the provided Key Family or it is and has a differentVersion
. See theKeyValueTable
doc for more details on Conditional Update Responses.
-
replaceAll
java.util.concurrent.CompletableFuture<java.util.List<Version>> replaceAll(@NonNull @NonNull java.lang.String keyFamily, @NonNull @NonNull java.lang.Iterable<TableEntry<KeyT,ValueT>> entries)
Inserts new or updates existingTableEntry
instances that belong to the same Key Family into thisKeyValueTable
. All changes are performed atomically (either all or none will be accepted).- Parameters:
keyFamily
- The Key Family for the all providedTableEntry
instances.entries
- AnIterable
ofTableEntry
instances to insert or update. If for at least one such entry,TableEntry.getKey()
TableKey.getVersion()
indicates a conditional update, this will perform an atomic Conditional Update conditioned on the server-side versions matching the provided ones (for allTableEntry
instances that have one); otherwise an Unconditional Update will be performed. SeeKeyValueTable
doc for more details on Types of Updates.- Returns:
- A CompletableFuture that, when completed, will contain a List of
Version
instances which represent the versions for the inserted/updated keys. The size of this list will be the same as entries.size() and the versions will be in the same order as the entries. Notable exceptions:ConditionalTableUpdateException
If this is a Conditional Update and the condition was not satisfied. See theKeyValueTable
doc for more details on Conditional Update Responses.
-
remove
java.util.concurrent.CompletableFuture<java.lang.Void> remove(@Nullable java.lang.String keyFamily, @NonNull KeyT key)
Unconditionally removes a Key from this Table Segment. If the Key does not exist, no action will be taken.- Parameters:
keyFamily
- (Optional) The Key Family for the Key to remove.key
- The Key to remove.- Returns:
- A CompletableFuture that, when completed, will indicate the Key has been removed.
-
remove
java.util.concurrent.CompletableFuture<java.lang.Void> remove(@Nullable java.lang.String keyFamily, @NonNull KeyT key, @NonNull @NonNull Version version)
Conditionally Removes a Key from this Table Segment.- Parameters:
keyFamily
- (Optional) The Key Family for the Key to remove.key
- The Key to remove.version
- AVersion
representing the version that this Key must have in order to remove it.- Returns:
- A CompletableFuture that, when completed, will indicate the Key has been removed. Notable exceptions:
ConditionalTableUpdateException
If this is a Conditional Removal and the condition was not satisfied. See theKeyValueTable
doc for more details on Conditional Update Responses.
-
removeAll
java.util.concurrent.CompletableFuture<java.lang.Void> removeAll(@Nullable java.lang.String keyFamily, @NonNull @NonNull java.lang.Iterable<TableKey<KeyT>> keys)
Removes one or moreTableKey
instances that belong to the same Key Family from this Table Segment. All removals are performed atomically (either all keys or no key will be removed).- Parameters:
keyFamily
- The Key Family for theTableKey
.keys
- AnIterable
of keys to remove. If for at least one such key,TableKey.getVersion()
indicates a conditional update, this will perform an atomic Conditional Remove conditioned on the server-side versions matching the provided ones (for allTableKey
instances that have one); otherwise an Unconditional Remove will be performed. SeeKeyValueTable
doc for more details on Types of Updates.- Returns:
- A CompletableFuture that, when completed, will indicate that the keys have been removed. Notable exceptions:
ConditionalTableUpdateException
If this is a Conditional Removal and the condition was not satisfied. See theKeyValueTable
doc for more details on Conditional Update Responses.
-
get
java.util.concurrent.CompletableFuture<TableEntry<KeyT,ValueT>> get(@Nullable java.lang.String keyFamily, @NonNull KeyT key)
Gets the latest value for the a Key that belong to a specific Key Family.- Parameters:
keyFamily
- (Optional) The Key Family for the Key to get.key
- The Key to get the value for.- Returns:
- A CompletableFuture that, when completed, will contain the requested result. If no such Key exists, this will be completed with a null value.
-
getAll
java.util.concurrent.CompletableFuture<java.util.List<TableEntry<KeyT,ValueT>>> getAll(@Nullable java.lang.String keyFamily, @NonNull @NonNull java.lang.Iterable<KeyT> keys)
Gets the latest values for a set of Keys that do belong to the same Key Family.- Parameters:
keyFamily
- (Optional) The Key Family for all requested Keys.keys
- AnIterable
of Keys to get values for.- Returns:
- A CompletableFuture that, when completed, will contain a List of
TableEntry
instances for the requested keys. The size of the list will be the same as keys.size() and the results will be in the same order as the requested keys. Any keys which do not have a value will have a null entry at their index.
-
keyIterator
io.pravega.common.util.AsyncIterator<IteratorItem<TableKey<KeyT>>> keyIterator(@NonNull @NonNull java.lang.String keyFamily, int maxKeysAtOnce, @Nullable IteratorState state)
Creates a new Iterator over all theTableKey
s in thisKeyValueTable
that belong to a specific Key Family.- Parameters:
keyFamily
- The Key Family for which to iterate over keys.maxKeysAtOnce
- The maximum number ofTableKey
s to return with each call toAsyncIterator.getNext()
.state
- (Optional) AnIteratorState
that represents a continuation token that can be used to resume a previously interrupted iteration. This can be obtained by invokingIteratorItem.getState()
. A null value will create an iterator that lists all keys.- Returns:
- An
AsyncIterator
that can be used to iterate over all the Keys in thisKeyValueTable
that belong to a specific Key Family.
-
entryIterator
io.pravega.common.util.AsyncIterator<IteratorItem<TableEntry<KeyT,ValueT>>> entryIterator(@NonNull @NonNull java.lang.String keyFamily, int maxEntriesAtOnce, @Nullable IteratorState state)
Creates a new Iterator over all theTableEntry
instances in thisKeyValueTable
that belong to a specific Key Family.- Parameters:
keyFamily
- The Key Family for which to iterate over entries.maxEntriesAtOnce
- The maximum number ofTableEntry
instances to return with each call toAsyncIterator.getNext()
.state
- (Optional) AnIteratorState
that represents a continuation token that can be used to resume a previously interrupted iteration. This can be obtained by invokingIteratorItem.getState()
. A null value will create an iterator that lists all entries.- Returns:
- An
AsyncIterator
that can be used to iterate over all the Entries in thisKeyValueTable
that belong to a specific Key Family.
-
close
void close()
Closes theKeyValueTable
. No more updates, removals, retrievals or iterators may be performed using it.- Specified by:
close
in interfacejava.lang.AutoCloseable
- See Also:
AutoCloseable.close()
-
getMapFor
KeyValueTableMap<KeyT,ValueT> getMapFor(@Nullable java.lang.String keyFamily)
Exposes thisKeyValueTable
instance as aMap
. Please refer to theKeyValueTableMap
documentation for special cases and limitations.This is useful for integrating code that expects to deal with a
Map
. Not all theKeyValueTable
functionality can be implemented using aMap
, however theMap
interface is fully implemented.- Parameters:
keyFamily
- (Optional) The Key Family to create theKeyValueTableMap
for. Any operations on the returnedKeyValueTableMap
will only affect this Key Family. If no Key Family is provided (null), then certainKeyValueTableMap
APIs may not be supported. Refer toKeyValueTableMap
documentation for more details.- Returns:
- A new
KeyValueTableMap
instance bound to thisKeyValueTable
and Key Family.
-
-


resource ssh2_connect ( string $host [, int $port = 22 [, array $methods [, array $callbacks ]]] )
Establish a connection to a remote SSH server. Once connected, the client should verify the server's hostkey using ssh2_fingerprint(), then authenticate using either password or public key.
Returns a resource on success, or FALSE on error.


I am a Web Developer who loves coding almost as much as pizza! I have a creative background in Digital Media, and received my BA from the Tyler School of Art in Philadelphia. Since then I have furthered my education in web development at University Penn's LPS Coding Bootcamp.
I’ve always been fascinated with technology and how it has become a necessary part of our daily lives. I have since grown to eat and sleep code with a fundamental understanding of the best coding practices.
FOODtube is a portal for home chefs looking for an independent source of recipes and visual cooking instruction. Not all the best meals come from the Food Network. The app uses both YouTube and the Edamam API to display search results.
Close Project View ProjectLIRI is a Language Interpretation and Recognition Interface. LIRI will be a command line node app that takes in parameters and gives you back data.
Close Project View ProjectExprecipes is a web application that allows users to create thier own "shopping list" to help prepare meals for friends and family. Our app is designed to store user information in our database to help aide in the organization of your favorite recipes.
Close Project View ProjectMemory game build using React JS library. Components state is managed to respond to user events.
Close Project View ProjectThis full-stack site will take in results from your users' surveys, then compare their answers with those from other users. The app will then display the name and picture of the user with the best overall match.
Close Project View ProjectUsing Node.js & MySQL to create an Amazon-like storefront. The app will take in orders from customers and deplete stock from the store's inventory.
Close Project View ProjectKEEP IT 100 will empower consumers to make informed decisions by offering convenient access to a powerful database tracking political spending by corporations. It uses a React front-end, Node back-end, with access to a SQL database of the CPA-Zicklin Index.
Close Project View Project


SweetFreeStuff.com
///////////////////////////////////////////
Enter to Win a $100 Amazon Gift Card from SweetFreeStuff.com!
Posted: 16 Sep 2013 10:15 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/FaxdfDvFgzw/?utm_source=feedburner&utm_medium=email
Grand Prize: $100 Amazon Gift Card 1st Prize: $50 Amazon Gift Card Welcome
to our latest giveaway! . This time we are giving away 1 $100 and 1 $50
Amazon.com gift card to two lucky winners! The giveaway begins September
16th and ends September 27th at 12am ET (EOD September 26th). To enter the
giveaway, []
The post Enter to Win a $100 Amazon Gift Card from SweetFreeStuff.com!
appeared first on SweetFreeStuff.com.
///////////////////////////////////////////
Free Natures Variety Instinct Healthy Weight sample
Posted: 16 Sep 2013 09:44 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/tmqnXqs6RXk/?utm_source=feedburner&utm_medium=email
Free Natures Variety Instinct Healthy Weight sample for dogs or cats.
The post Free Natures Variety Instinct Healthy Weight sample appeared first
on SweetFreeStuff.com.
///////////////////////////////////////////
Free Designer Whey Temporary Tattoos
Posted: 16 Sep 2013 09:16 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/yR_nq9E-620/?utm_source=feedburner&utm_medium=email
Sign up to receive free Designer Whey temporary tattoos. You can also then
enter their photo contest to win a year supply of Designer Whey.
The post Free Designer Whey Temporary Tattoos appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Goat BackCountry.com Sticker
Posted: 16 Sep 2013 05:52 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/HUGPIhvtFGA/?utm_source=feedburner&utm_medium=email
The post Free Goat BackCountry.com Sticker appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free sample of Viva La Juicy Noir Fragrance
Posted: 16 Sep 2013 01:01 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/Zh9a_xO8SSA/?utm_source=feedburner&utm_medium=email
Like their Facebook page to sign up for a free sample. Free Viva La Juicy
Noir Fragrance Mobile Users Click Here
The post Free sample of Viva La Juicy Noir Fragrance appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Bowl of Queso at On the Border
Posted: 16 Sep 2013 12:25 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/Yjo5NKRXAKM/?utm_source=feedburner&utm_medium=email
Join Club Cantina and get free queso! Enter your name, email and zip code
and they will email you a coupon for a free bowl of original queso.
The post Free Bowl of Queso at On the Border appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Nordic Naturals Omega-3 Sample Kit
Posted: 15 Sep 2013 10:15 PM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/Io5xAQoFzEA/?utm_source=feedburner&utm_medium=email
Click Free Sample on the lower right side of the page,
The post Free Nordic Naturals Omega-3 Sample Kit appeared first on
SweetFreeStuff.com.


API¶
pygtc
only has one user-facing function pygtc.plotGTC()
, which generates
the GTC/triangle plot. There are some helper functions that generate the individual
panels in the main GTC, but plotGTC
has options to access these, so they
are only minimally documented here.
plotGTC()¶
-
pygtc.
plotGTC
(chains, **kwargs)¶ Make a great looking Giant Triangle Confusogram (GTC) with one line of code! A GTC is a lot like a triangle (or corner) plot, but you get to put as many sets of data, and overlay as many truths as you like. That’s what can make it so confusing!
Parameters: chains (array-like[nSamples,nDims] or a) – list[[nSamples1,nDims], [nSamples2,nDims], ...] All chains (where a chain is [nSamples,nDims]) in the list must have the same number of dimensions. Note: If you are using
emcee
(http://dan.iel.fm/emcee/current/) - and you should! - each element of chains is anEnsembleSampler.flatchain
object.Keyword Arguments: weights (array-like[nSamples] or a list[[nSamples1], ...]) – Weights for the sample points. The number of 1d arrays passed must correspond to the number of chains, and each weights array must have the same length nSamples as its corresponding chain.
chainLabels (array-like[nChains]) – A list of text labels describing each chain passed to chains. len(chainLabels) must equal len(chains). chainLabels supports LaTex commands enclosed in $..$. Additionally, you can pass None as a label. Default is
None
.paramNames (list-like[nDims]) – A list of text labels describing each dimension of chains. len(paramNames) must equal nDims=chains[0].shape[1]. paramNames supports LaTex commands enclosed in $..$. Additionally, you can pass None as a label. Default is None, however if you pass a
pandas.DataFrame
object, paramNames defaults to theDataFrame
column names.truths (list-like[nDims] or [[nDims], ...]) – A list of parameter values, one for each parameter in chains to highlight in the GTC parameter space, or a list of lists of values to highlight in the parameter space. For each set of truths passed to truths, there must be a value corresponding to every dimension in chains, although any value may be
None
. Default isNone
.truthLabels (list-like[nTruths]) – A list of labels, one for each list passed to truths. truthLabels supports LaTex commands enclosed in $..$. Additionally, you can pass
None
as a label. Default isNone
.truthColors (list-like[nTruths]) – User-defined colors for the truth lines, must be one per set of truths passed to truths. Default color is gray
#4d4d4d
for up to three lines.truthLineStyles (list-like[nTruths]) – User-defined line styles for the truth lines, must be one per set of truths passed to truths. Default line styles are
['--',':','dashdot']
.priors (list of tuples [(mu1, sigma1), ...]) – Each tuple describes a Gaussian to be plotted over that parameter’s histogram. The number of priors must equal the number of dimensions in chains. Default is
None
.plotName (string) – A path to save the GTC to in pdf form. Default is
None
.nConfidenceLevels (int) – The number of contour levels to plot in the 2d histograms. May be 1, 2, or 3. Default is 2.
GaussianConfLevels (bool) – Whether you want 2d Gaussian “sigma” confidence levels (39%, 86%, 99%) instead of the standard 1d confidence levels (68%, 95%, 99%). Default is
False
.nBins (int) – An integer describing the number of bins used to compute the histograms. Default is 30.
smoothingKernel (float) – Size of the Gaussian smoothing kernel in bins. Default is 1. Set to 0 for no smoothing.
filledPlots (bool) – Whether you want the 2d contours and the 1d histograms to be filled. Default is
True
.plotDensity (bool) – Whether you want to see the 2d density of points. Default is
False
.figureSize (float or string) – A number in inches describing the length = width of the GTC, or a string indicating a predefined journal setting and whether the figure will span one column or the full page width. Default is 70/dpi where
dpi = plt.rcParams['figure.dpi']
. Options to choose from are'APJ_column'
,'APJ_page'
,'MNRAS_column'
,'MNRAS_page'
,'AandA_column'
,'AandA_page'
.panelSpacing (string) – Options are
'loose'
or'tight'
. Determines whether there is some space between the subplots of the GTC or not. Default is'tight'
.legendMarker (string) – Options are
'All'
,'None'
,'Auto'
.'All'
and'None'
force-show or force-hide all label markers.'Auto'
shows label markers if two or more truths are plotted.paramRanges (list of tuples [nDim]) – Set the boundaries of each parameter range. Must provide a tuple for each dimension of chains. If
None
is provided for a parameter, the range defaults to the width of the histogram.labelRotation (tuple [2]) – Rotate the tick labels by 45 degrees for less overlap. Sets the x- and y-axis separately. Options are
(True,True)
,(True,False)
,(False,True)
,(False,False)
,None
. UsingNone
sets to default(True,True)
.tickShifts (tuple [2]) – Shift the x/y tick labels horizontally/vertically by a fraction of the tick spacing. Example tickShifts = (0.1, 0.05) shifts the x-tick labels right by ten percent of the tick spacing and shifts the y-tick labels up by five percent of the tick spacing. Default is (0.1, 0.1). If tick rotation is turned off for either axis, then the corresponding shift is set to zero.
colorsOrder (list-like[nDims]) – The color order for chains passed to chains. Default is
['blues', 'greens', 'yellows', 'reds', 'purples']
. Currently,pygtc
is limited to these color values, so you can reorder them, but can’t yet define your own colors.do1dPlots (bool) – Whether or not 1d histrograms are plotted on the diagonal. Default is
True
.doOnly1dPlot (bool) – Plot only ONE 1d histogram. If this is True, then chains must have shape
(samples,1)
. Default isFalse
.mathTextFontSet (string) – Set font family for rendering LaTex. Default is
'stixsans'
. Set toNone
to use the default setting in your matplotlib rc. See Notes for known issues regarding this keyword.customLabelFont (
matplotlib.fontdict
) – Full customization of label fonts. See matplotlib for full documentation. Default is{'family':'Arial', 'size':9}
.customLegendFont (
matplotlib.fontdict
) – Full customization of legend fonts. See matplotlib for full documentation. Default is{'family':'Arial', 'size':9}
.customTickFont (
matplotlib.fontdict
) – Full customization of tick label fonts. See matplotlib for full documentation. Default is{'family':'Arial', 'size':6}
. Attempting to set the color will result in an error.holdRC (bool) – Whether or not to reset rcParams back to default. You may wish to set this to
True
if you are working in interactive mode (ie with IPython or in a JuPyter notebook) and you want the plots that display to be identical to the plots that save in the pdf. See Notes below for more information. Default isFalse
.
Returns: fig – You can do all sorts of fun things with this in terms of customization after it gets returned. If you are using a
JuPyter
notebook with inline plotting enabled, you should assign a variable to catch the return or else the figure will plot twice.Return type: matplotlib.figure
objectNote
If you are calling
plotGTC
from within an interactive python session (ie via IPython or in a JuPyter notebook), the label font in the saved pdf may differ from the plot that appears when callingmatplotlib.pyplot.show()
.This will happen if the mathTextFontSet keyword sets a value that is different than the one stored in
rcParams['mathtext.fontset']
and you are using equations in your labels by enclosing them in $..$. The output pdf will display correctly, but the interactive plot will use whatever is stored in the rcParams default to render the text that is inside the $..$. Unfortunately, this is an oversight in matplotlib’s design, which only allows one global location for specifying this setting. As a workaround, you can setholdRC = True
when callingplotGTC
and it will not reset your rcParams back to their default state. Thus, when the figure renders in interactive mode, it will match the saved pdf. If you wish to reset your rcParams back to default at any point, you can callmatplotlib.rcdefaults()
. However, if you are in a jupyter notebook and have set%matplotlib inline
, then callingmatplotlib.rcdefaults()
may not set things back the way they were, but rerunning the line magic will.
Helper functions¶
__plot2d()¶
-
pygtc.pygtc.
__plot2d
()¶ Plot a 2D histogram in a an axis object and return the axis with plot.
Parameters: - ax (matplotlib.pyplot.axis) – The axis on which to plot the 2D histogram
- nChains (int) – The number of chains to plot.
- chains2d (list-like) – A list of pairs of sample points in the form: [[chain1_x, chain1_y], [chain2_x, chain2_y], ...].
- weights (list-like) – Weights for the chains2d.
- nBins (int) – Number of bins (per side) for the 2d histogram.
- smoothingKernel (int) – Size of the Gaussian smoothing kernel in bins. Set to 0 for no smoothing.
- filledPlots (bool) – Just contours, or filled contours?
- colors (list-like) – List of nChains tuples. Each tuple must have at least nConfidenceLevels colors.
- nConfidenceLevels (int {1,2,3}) – How many confidence levels?
- confLevels (list-like) – List of at least nConfidenceLevels values for confidence levels.
- truths2d (list-like) – A list of nChains tuples of the form: [(truth1_x, truth1_y), etc...].
- truthColors (list-like) – A list of colors for the truths.
- truthLineStyles (list-like) – A list of matplotlib linestyle descriptors, one for each truth.
- plotDensity (bool) – Whether to show points density in addition to contours.
- myColorMap (list-like) – A list of nChains matplotlib colormap specifiers, or actual colormaps.
Note
You should really just call this from the plotGTC function unless you have a strong need to work only with an axis instead of a figure...
__plot1d()¶
-
pygtc.pygtc.
__plot1d
()¶ Plot the 1d histogram and optional prior.
Parameters: - ax (matplotlib.pyplot.axis) – Axis on which to plot the histogram(s)
- nChains (int) – How many chains are you passing?
- chains1d (list-like) – A list of nChains 1d chains: [chain1, chain2, etc...]
- weights (list-like) – A list of nChains weights.
- nBins (int) – How many histogram bins?
- smoothingKernel (int) – Number of bins to smooth over, 0 for no smoothing.
- filledPlots (bool) – Want the area under the curve filled in?
- colors (list-like) – List of nChains tuples. Each tuple must have at least two colors.
- truths1d (list-like) – List of truths to overplot on the histogram.
- truthColors (list-like) – One color for each truth.
- truthLineStyles (list-like) – One matplotlib linestyle specifier per truth.
- prior1d (tuple) – Normal distribution paramters (mu, sigma)
- priorColor (color) – The color to plot the prior.
Note
You should really just call this from the plotGTC function unless you have a strong need to work only with an axis instead of a figure...


This script adds the NGUI menu options to the Unity Editor.
More...
|
| static string | GetHelpURL (Type type) |
| | Get the URL pointing to the documentation for the specified component. More...
|
| |
| static void | Show () |
| | Show generic help. More...
|
| |
| static void | Show (Type type) |
| | Show help for the specific topic. More...
|
| |
| static void | Show (object obj) |
| | Show help for the specific topic. More...
|
| |
This script adds the NGUI menu options to the Unity Editor.
| static string NGUIHelp.GetHelpURL |
( |
Type |
type | ) |
|
|
static |
Get the URL pointing to the documentation for the specified component.
| static void NGUIHelp.Show |
( |
| ) |
|
|
static |
| static void NGUIHelp.Show |
( |
Type |
type | ) |
|
|
static |
Show help for the specific topic.
| static void NGUIHelp.Show |
( |
object |
obj | ) |
|
|
static |
Show help for the specific topic.
The documentation for this class was generated from the following file:
- D:/work/LittleHeroes_Game/Assets/NGUI/Scripts/Editor/NGUIHelp.cs


Modifies the distance matrix obtained from data with batch effects, so as to improve the performance of sample pattern detection, such as clustering, dimension reduction, and construction of networks between subjects. The method has been published in Bioinformatics (Fei et al, 2018, <doi:10.1093/bioinformatics/bty117>). Also available on 'GitHub' <https://github.com/tengfei-emory/QuantNorm>.
| Version: | 1.0.3 |
| Depends: | R (≥ 3.4.0) |
| Imports: | stats |
| Suggests: | GGally, ggplot2, network, pheatmap, rgl, sna |
| Published: | 2018-03-06 |
| Author: | Teng Fei, Tianwei Yu |
| Maintainer: | Teng Fei <tfei at emory.edu> |
| BugReports: | https://github.com/tengfei-emory/QuantNorm/issues |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | QuantNorm results |
| Reference manual: | QuantNorm.pdf |
| Package source: | QuantNorm_1.0.3.tar.gz |
| Windows binaries: | r-devel: QuantNorm_1.0.3.zip, r-release: QuantNorm_1.0.3.zip, r-oldrel: QuantNorm_1.0.3.zip |
| OS X binaries: | r-release: QuantNorm_1.0.3.tgz, r-oldrel: QuantNorm_1.0.3.tgz |
Please use the canonical form https://CRAN.R-project.org/package=QuantNorm to link to this page.


usage.Rmd
library(glossaries)
load_entries(system.file('example/myglossary.yml',package = 'glossaries'))
add_definition(
entry = 'turtle',
name = 'turtle',
desc = 'a large marine reptile with a bony or leathery shell and flippers, coming ashore annually on sandy beaches to lay egg'
)
add_acronym(
entry = 'aic',
name = 'AIC',
desc = 'akaike information criterion'
)
add_acronym(
entry = 'bic',
name = 'BIC',
desc = 'bayes information criterion'
)
| Term | |
|---|---|
| ocean | oceans are wet from a standpoint of water |
| turtle | a large marine reptile with a bony or leathery shell and flippers, coming ashore annually on sandy beaches to lay egg |
In statistics, the Bayes information criterion (BIC) or Schwarz information criterion (also SIC, SBC, SBIC) is a criterion for model selection among a finite set of models; the model with the lowest BIC is preferred. It is based, in part, on the likelihood function and it is closely related to the Akaike information criterion (AIC).
When fitting models, it is possible to increase the likelihood by adding parameters, but doing so may result in overfitting. Both BIC and AIC attempt to resolve this problem by introducing a penalty term for the number of parameters in the model; the penalty term is larger in BIC than in AIC
The BIC was developed by Gideon E. Schwarz and published in a 1978 paper, where he gave a Bayesian argument for adopting it.
The Pacific Ocean (PO) is the largest and deepest of Earth’s oceanic divisions. It extends from the Arctic Ocean in the north to the Southern Ocean (or, depending on definition, to Antarctica) in the south and is bounded by the continents of Asia and Australia in the west and the Americas in the east.
Sea turtle live in the Nothern PO one or more life stages, from hatchling to adult. This includes green, loggerhead, olive ridley, leatherback, and hawksbill sea turtles—all of which are protected under the U.S. Endangered Species Act.


-
EventDateDescriptionCourse Material
-
Lecture1397/11/30
Tuesday -
Lecture1397/12/7
Tuesday -
Lecture1397/12/14
Tuesday -
Lecture1397/12/14
TuesdayFundamentals of Machine Learning[slides] -
Assignment1397/12/14
TuesdayAssignment #1 - Deep Learning Fundamentals released! -
Due1397/12/24 23:59
FridayAssignment #1 due -
Assignment1398/1/1
ThursdayAssignment #2 - Hyperparameter tuning released! -
Due1398/1/11 00:59
SundayAssignment #2 due -
Due1398/1/15 23:59
ThursdayFinal Project - Proposal due -
Lecture1398/1/27
TuesdayComputer Vision[slides] -
Assignment1398/2/9
MondayAssignment #3 - Convolutional Neural Networks released! -
Lecture1398/2/16
MondayProcessing Text and Sequential Data[slides] -
Due1398/2/21 00:59
SaturdayAssignment #3 due -
Lecture1398/2/22
SundayAdvanced Models[slides] -
Lecture1398/2/29
SundayGenerative Deep Learning[slides] -
Due1398/2/31 23:59
TuesdayFinal Project - Progress report due -
Session1398/2/31 23:59
TuesdayFinal Project - Progress report Presentation -
Assignment1398/3/8
WednesdayAssignment #4 - NLP Intro released! -
Due1398/3/17 23:59
FridayAssignment #4 due -
Assignment1398/3/28
TuesdayAssignment #5 - RNNs in Depth released! -
Exam1398/4/9
SundayFinal Exam -
Due1398/4/20 00:59
ThursdayAssignment #5 due -
Session1398/4/25 08:00
TuesdayFinal Project - Presentation -
Due1398/4/28 23:59
FridayFinal Project - Final Report due -
Lecture1398/10/30
MondayTensorFlow 2 Tutorial[slides]


You need to enable JavaScript to run this app.
Home
Newsroom
News Article
Careers
Career Article
Casestudy Article
Solutions
Sub Solutions
Solutions Details
Contact Us
Search Result
Search No Result
Leadership
About
Country
404


new SurfNPerf()
Frontend Web Performance Data Gathering
- Source:
Methods
-
<private, static> _getMeasureDuration(a, b)
-
Get duration of event
Parameters:
Name Type Description a
start event b
end event - Source:
Returns:
duration of event -
<private, static> _measureName(a, b) → {String}
-
Create string that describes event measured
Parameters:
Name Type Description a
start event b
end event - Source:
Returns:
event measured- Type
- String
-
<private, static> _setInitialUrl()
-
Sets a key value pair in the custom global object. The key is 'initialUrl' and the value is the pathname on the browser window
- Source:
-
<private, static> _setMeasure(a, b)
-
Set measuring of event length
Parameters:
Name Type Description a
start event b
end event - Source:
-
<static> contains(array, value) → {boolean}
-
Checks if a given value is present in the inputted array
Parameters:
Name Type Description array
Array Array to check value
Object with default value properties - Source:
Returns:
Boolean indicating whether the given value is present in the inputted array- Type
- boolean
-
<static> defaults(o, d)
-
Takes in an object and provides the object default property values if property not defined in the object
Parameters:
Name Type Description o
Object Object to initialize to default values d
Object Object with default value properties - Source:
-
<static> duration(a, b, options)
-
Get duration of event and round according to options
Parameters:
Name Type Description a
start event b
end event options
Object gives rounding places - Source:
Returns:
rounded duration of event -
<static> eventDuration(eventKey, options)
-
Get rounded total event time
Parameters:
Name Type Description eventKey
options
Object number of decimal places to round - Source:
-
<static> eventEnd(eventKey, options)
-
Update event end time to current time
Parameters:
Name Type Description eventKey
options
Object - Source:
-
<static> eventStart(eventKey)
-
Update event start time to current time
Parameters:
Name Type Description eventKey
- Source:
-
<static> getCustom(custom)
-
Get data for custom properties
Parameters:
Name Type Description custom
event key - Source:
Returns:
custom event value -
<private, static> getDurationMark(eventKey) → {number}
-
Returns
Parameters:
Name Type Description eventKey
- Source:
Returns:
Returns the mark of the event key or timing mark if the event key has a timing mark- Type
- number
-
<static> getEventData(eventKey, key)
-
Get event data if there is any
Parameters:
Name Type Description eventKey
key
- Source:
Returns:
event data -
<static> getFullRequestLoadTime() → {integer}
-
Total time for a page to load from the time the user initiates the access of the page to the firing of the onLoad event
- Source:
Returns:
time in ms- Type
- integer
-
<static> getMark(eventKey) → {number}
-
Returns the mark (or timing mark) of the eventKey. The default timetype is 'highRes' is not specified
Parameters:
Name Type Description eventKey
string - Source:
Returns:
The time mark of the specified eventKey- Type
- number
-
<static> getNetworkLatency() → {integer}
-
Total time for App Cache, DNS, TCP, Request & Response
- Source:
Returns:
time in ms- Type
- integer
-
<static> getNetworkTime() → {integer}
-
Total time for App Cache, DNS & TCP
- Source:
Returns:
time in ms- Type
- integer
-
<static> getProcessingLoadTime() → {integer}
-
Total time to process the Response & fire the onLoad event
- Source:
Returns:
time in ms- Type
- integer
-
<static> getServerTime() → {integer}
-
Total time for Request & Response
- Source:
Returns:
time in ms- Type
- integer
-
<static> initialize()
-
Initializes the SURF_N_PERF instance in the browswer by setting Performance APIs, creating appropriate objects and their values
- Source:
-
<private, static> isTimingMark(eventKey) → {boolean}
-
Returns whether there exists a time mark for the inputted event key
Parameters:
Name Type Description eventKey
- Source:
Returns:
Whether there exists a timing mark for the event key- Type
- boolean
-
<static> mark(eventKey)
-
Sets the eventKey property of various data objects to the current time (also highResTime is the appropriate flag is set)
Parameters:
Name Type Description eventKey
- Source:
-
<static> performanceTiming() → {Object}
-
Returns window.performance.timing if navigationTiming is set to true, else an empty object
- Source:
Returns:
Either window.performance.timing or empty object- Type
- Object
-
<private, static> performanceTimingL2(eventKey) → {number}
-
Calculates the difference between when the loadEventEnd was fired and the inputted eventKey is fired
Parameters:
Name Type Description eventKey
- Source:
Returns:
A value >= 0- Type
- number
-
<static> resetEvent(eventKey, key, value)
-
Reset event data to given inputs
Parameters:
Name Type Description eventKey
key
value
- Source:
-
<private, static> round(n, options) → {number}
-
Rounds inputted number with the inputted format options
Parameters:
Name Type Description n
number Number to be rounded options
Object Options for rounding (like decimal places) - Source:
Returns:
The inputted number rounded according to the input options- Type
- number
-
<private, static> round(a, b, options) → {number}
-
Rounds the difference between the two input numbers with the inputted format options
Parameters:
Name Type Description a
number First number b
number Second number options
Object Options for rounding (like decimal places) - Source:
Returns:
The difference of inputted numbers rounded according to the input options- Type
- number
-
<static> setCustom(custom, custom)
-
Set data for custom properties
Parameters:
Name Type Description custom
event key custom
event value - Source:
-
<private, static> setPerformanceApis()
-
Sets values for global variables _navigationTiming, _highResTime and _userTiming. If window.performance is defined then the values are assigned according to window.performance values, else they are set to false
- Source:
-
<private, static> setPerfProperties()
-
Defines Window.SURN_N_PERF object if it is undefined or its marks property is undefined
- Source:
-
<static> SNPProto.getTimingMark(eventKey, timeType) → {DOMHighResTimeStamp|number}
-
Returns the timing data for a particular eventKey
Parameters:
Name Type Description eventKey
string name of the timing event timeType
string 'highRes' (to return a DOMHighResTimeStamp, if available) or 'DOM' (to return a DOMTimeStamp's value) - optional. Defaults to 'DOM' - Source:
Returns:
time value- Type
- DOMHighResTimeStamp | number
-
<static> SNPProto.now(timeType) → {DOMHighResTimeStamp|number}
-
Returns the timing data for a particular eventKey
Parameters:
Name Type Description timeType
String 'highRes' (to return a DOMHighResTimeStamp, if available) or 'DOM' (to return a DOMTimeStamp's value) - optional. Defaults to 'highRes' - Source:
Returns:
time value- Type
- DOMHighResTimeStamp | number
-
<static> updateEvent(eventKey, key, value)
-
Update event data
Parameters:
Name Type Description eventKey
key
value
- Source:
-
<static> userTiming() → {Object}
-
Returns window.performance if userTiming is set to true, else an empty object
- Source:
Returns:
Either window.performance or empty object- Type
- Object


Sections
Display sections inside tasks. Sections are defined with date and smartly follow tasks and magnet on changes.
Usage
angular.module('myApp', ['gantt', 'gantt.sections']);
<div gantt>
<gantt-sections enabled="..." keep-proportions="..." disable-magnet="..." disable-daily="..."></gantt-sections>
</div>
<link rel="stylesheet" href="angular-gantt-sections.css">
Attributes
-
enabled
Enable sections display.
default:
true
-
keep-proportions
If true, proportions will be kept when the task is resized. If false, sections will stay at the same place relative to the left border of the task container.
default:
true
-
disable-magnet
If true, sections won't follow magnets defined by
column-magnet
andshit-column-magnet
gantt attributes.default:
false
-
disable-daily
If true, sections won't follow daily mode defined by
daily
gantt attribute.default:
false
Model
Sections are defined inside Task object.
{
...
// Inside Task object
sections: {
keepProportions: true/false, // Override plugin configuration (Optional).
disableMagnet: true/false, // Override plugin configuration (Optional).
disableDaily: true/false, // Override plugin configuration (Optional).
items: [
{
from: <Date>, // Date can be a String, Timestamp, Date object or moment object.
to: <Date>, // Date can be a String, Timestamp, Date object or moment object.
classes: <Array|String> // Array or String of class names which should be applied to the section. See ng-class documentation for details (Optional).
},
{
...
}
]
}
}


If Research Was A Plane, Nobody Would Get On.
02 Mar 2014 tagged in brad paisley, hawaiian history, history 298, if love was a plane, liliuokalaniThis week felt like a long one – in more ways than one. It’s right around that time of the semester for midterms and housing discussions and lots of assignments. The prospects of spring break and the possibility of warm weather are right around the corner. Emotions and tensions can get to a breaking point. And I happened to have the pleasure of being in the middle of all of it – stress seemed to be everywhere I turned.
To escape, I decided to return to my Failed Challenge of a few weeks ago: could I find any trace of Queen Liliuokalani’s cancelled visit in New Bedford’s Morning Mercury? I spent my few hours tucked away in the silent microfilm room, endlessly searching that one reel for a glimpse of her name.
I found a lot of interesting information – for example, did you know that President McKinley had been invited to New Bedford’s semicentennial? (He, like the ex-queen, politely declined.) Did you know President McKinley had sent several senators to Hawaii, working with the people to speed along Hawaiian annexation? (It appears it did not go over well with the Hawaiian people.) Did you know that Princess Ka’iulani, next in line to the throne, was considered quite the celebrity of the time? (Her travels through Europe and her time in England, as well as her prospective return to the United States to visit Liliuokalani, were frequently mentioned in The Morning Mercury.)
Unfortunately, while all of this was interesting, none of it directly related to my real purpose for the search. By the end of the week, the one thing I had hoped might bring me a lapse from my stress could not. Once again, I had failed to find my answers. To be honest, I left the library in a huff of frustration, headed home for a rough weekend.
To continue being honest, I wasn’t entirely sure what I was going to write for this week’s blog post. After all, I had nothing to show for my work this week, no evidence of my hours with the reels, no information worth passing on.
So to start, I was about to title this piece “A Failed Challenge, Pt. 2.” However, I was reminded of what Prof. Miller had told me after she read my previous piece. In history, there is rarely such a thing as a failed challenge. Or rather, most of history is a failed challenge. As a historian, when I go searching for information or documents or pictures, I am often searching for something that no one else has found. Nine times out of ten, I am not going to find what it is I am looking for. And that’s okay – great, even! That’s the kind of stuff historians and researchers deal with everyday! What I have experienced is partly a failed challenge – one that did not result in what I was looking for – but also a successful challenge – in that I did learn something. And so while the pain of not getting what I wanted is still frustrating, it’s good to know that at some point, everyone gets to this point. But don’t they keep researching?
So, instead, I chose a line from one of my favorite songs – “If Love Was A Plane” by Brad Paisley. The song, which discusses the pleasures and heartbreaking realities of relationships, states that the odds of a relationship working out are six in ten. As Paisley points out, if a plane had odds like that, no one would ever fly. But we don’t tell people that at the start of a relationship, do we? As Prof. Miller pointed out to me, research of this kind has worse odds – a factor that I hadn’t realized until I had to deal with it.
This internship (like most internships) is one where I am supposed to earn practical work experience in a field of interest. And in research, what I call “failure” is practical work experience. So I know that I will experience many more “failures” (though hopefully not in the course of this project, because I would like to have more varied blog posts.) But I also know that “failure” is a common result for what I am doing. I need to take the bridge and last refrain of the song in mind. Even though I know the chances of finding exactly what I’m looking for are small, to hell with the odds – I’m going to keep moving forward in my research.


Nominal
The HVRHS Emergency Alert Systems are operating normally and have detected no threats or faults.


Local Roads Selector Test
This page demonstrates how to use the localRoadsSelector.js jQuery widget. View the page's source for details.
Instructions
- Zoom into the map.
- Click on an intersection to find the first point of the route.
- Click additional intersections to generate a route.
Debug


https://leetcode.com/problems/simplify-path/
Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path. In a UNIX-style file system, a period . refers to the current directory. Furthermore, a double period .. moves the directory up a level. For more information, see: Absolute path vs relative path in Linux/Unix Note that the returned canonical path must always begin with a slash /, and there must be only a single slash / between two directory names. The last directory name (if it exists) must not end with a trailing /. Also, the canonical path must be the shortest string representing the absolute path. Example 1: Input: "/home/" Output: "/home" Explanation: Note that there is no trailing slash after the last directory name. Example 2: Input: "/../" Output: "/" Explanation: Going one level up from the root directory is a no-op, as the root level is the highest level you can go. Example 3: Input: "/home//foo/" Output: "/home/foo" Explanation: In the canonical path, multiple consecutive slashes are replaced by a single one. Example 4: Input: "/a/./b/../../c/" Output: "/c" Example 5: Input: "/a/../../b/../c//.//" Output: "/c" Example 6: Input: "/a//b////c/d//././/.." Output: "/a/b/c"1.
class Solution(object): def simplifyPath(self, path): """ :type path: str :rtype: str """
class Solution(object): def simplifyPath(self, path): """ :type path: str :rtype: str """ path_list = path.split('/') path2_list = [] for x in path_list: if x == '': pass elif x == '.': pass elif x == '..': if len(path2_list) > 0: del path2_list[-1] else: pass else: path2_list.append(x) result = '' for x in path2_list: result = result + '/' + x if result == '': result = '/' return result


'Java' .jar files for the 'Tabula' <http://tabula.technology/> 'Java' library, which are required by the 'tabulizer' R package. The version numbering of this package corresponds to versions of 'tabula-java' library releases <https://github.com/tabulapdf/tabula-java/releases/>.
| Version: | 1.0.1 |
| Imports: | rJava |
| Published: | 2018-05-14 |
| Author: | Thomas J. Leeper [aut], Tom Paskhalis [cre], Manuel Aristarán [ctb, cph] (tabula java library) |
| Maintainer: | Tom Paskhalis <tpaskhalis at gmail.com> |
| BugReports: | https://github.com/ropensci/tabulizerjars/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/ropensci/tabulizerjars |
| NeedsCompilation: | no |
| SystemRequirements: | Java (>= 7.0) |
| Materials: | NEWS |
| CRAN checks: | tabulizerjars results |
| Reference manual: | tabulizerjars.pdf |
| Package source: | tabulizerjars_1.0.1.tar.gz |
| Windows binaries: | r-devel: tabulizerjars_1.0.1.zip, r-release: tabulizerjars_1.0.1.zip, r-oldrel: tabulizerjars_1.0.1.zip |
| OS X binaries: | r-release: tabulizerjars_1.0.1.tgz, r-oldrel: tabulizerjars_1.0.1.tgz |
| Reverse imports: | tabulizer |
Please use the canonical form https://CRAN.R-project.org/package=tabulizerjars to link to this page.


src/Canvas3D.js
"use strict"
import GridBasedModel from "./models/GridBasedModel.js"
import Grid3D from "./grid/Grid3D.js"
import * as THREE from "three"
import TrackballControls from "three-trackballcontrols"
//import PixelsByCell from "./stats/PixelsByCell.js"
import BorderPixelsByCell from "./stats/BorderPixelsByCell.js"
import ActivityConstraint from "./hamiltonian/ActivityConstraint.js"
import ActivityMultiBackground from "./hamiltonian/ActivityMultiBackground.js"
class Canvas3D {
constructor( C, options ){
if( C instanceof GridBasedModel ){
/**
* The underlying model that is drawn on the canvas.
* @type {GridBasedModel|CPM|CA}
*/
this.C = C
this.grid = this.C.grid
if( !( this.grid instanceof Grid3D ) ){
throw("Canvas3D only works with 3D models with grid of class Grid3D!")
}
/** Grid size in each dimension, taken from the CPM or grid object to draw.
@type {GridSize} each element is the grid size in that dimension in pixels */
this.extents = C.extents
}
this.step = options.step || 10
this.zoom = options.zoom || 1
this.drawgrid = options.drawgrid || true
this.gridColor = options.gridColor || "AAAAAA"
this.gridColor = this.getCol( this.gridColor )
if( typeof document !== "undefined" ){
/** @ignore */
this.container = document.getElementById("stage")
} else {
throw("Canvas3D is currently only supported in the browser.")
}
this.scene = new THREE.Scene()
this.drawvoxels = {}
this.material = new THREE.MeshLambertMaterial( { color: this.getCol("000000"), transparent: true, opacity : 0.2 } )
this.setupCamera()
this.controls = new TrackballControls( this.camera, this.container )
this.setup()
}
getCol( col ){
col = "#" + col
return new THREE.Color( col ).getHex()
}
setupCamera(){
let camera = new THREE.PerspectiveCamera( 45, 1, 1, this.C.extents[2]*100 )
// Place the camera at the x,y coordinates of the midpoint, and z coordinate slightly above the grid.
let zpos = Math.floor( this.C.extents[2]*3)
//camera.position = { x : this.C.extents[0]/2, y: this.C.extents[1]/2, z: zpos}
camera.position.set( this.C.extents[0]/2, this.C.extents[1]/2,zpos )
//camera.up.set( -1, 0, 0 )
// Viewing direction of the camera
let gridMidpoint = [ this.C.extents[0]/2, this.C.extents[1]/2, this.C.extents[2]/2 ]
camera.lookAt( new THREE.Vector3( gridMidpoint[0], gridMidpoint[1], gridMidpoint[2] ) )
this.camera = camera
}
setupControls(){
this.controls.rotateSpeed = 1.0
this.controls.zoomSpeed = 1.2
this.controls.panSpeed = 0.8
this.controls.noZoom = false
this.controls.noPan = false
this.controls.staticMoving = true
this.controls.dynamicDampingFactor = 0.3
this.controls.target.set( this.C.midpoint[0], this.C.midpoint[1], this.C.midpoint[2] )
this.controls.keys = [ 65, 83, 68 ]
}
drawGrid(){
if( this.drawgrid ){
let material = new THREE.LineBasicMaterial( { color: this.gridColor , opacity: 0.4, transparent: true } )
// plane z = 0
let geometry = new THREE.Geometry()
for ( let x = 0; x <= this.C.extents[0]; x += this.step ) {
geometry.vertices.push( new THREE.Vector3( x, 0, 0 ) )
geometry.vertices.push( new THREE.Vector3( x, 0, this.C.extents[2] ) )
}
for( let z = 0; z <= this.C.extents[2]; z += this.step ){
geometry.vertices.push( new THREE.Vector3( 0, 0, z ) )
geometry.vertices.push( new THREE.Vector3( this.C.extents[0], 0, z ) )
}
let line = new THREE.LineSegments( geometry, material )
this.scene.add( line )
// plane x = 0
geometry = new THREE.Geometry()
for ( let y = 0; y <= this.C.extents[1]; y += this.step ) {
geometry.vertices.push( new THREE.Vector3( 0, y, 0 ) )
geometry.vertices.push( new THREE.Vector3( 0, y, this.C.extents[2] ) )
}
for( let z = 0; z <= this.C.extents[2]; z += this.step ){
geometry.vertices.push( new THREE.Vector3( 0, 0, z ) )
geometry.vertices.push( new THREE.Vector3( 0, this.C.extents[1], z ) )
}
line = new THREE.LineSegments( geometry, material )
this.scene.add( line )
// plane y = 0
geometry = new THREE.Geometry()
for ( let x = 0; x <= this.C.extents[1]; x += this.step ) {
geometry.vertices.push( new THREE.Vector3( x, 0, 0 ) )
geometry.vertices.push( new THREE.Vector3( x, 0, this.C.extents[2] ) )
}
for( let z = 0; z <= this.C.extents[2]; z += this.step ){
geometry.vertices.push( new THREE.Vector3( 0, 0, z ) )
geometry.vertices.push( new THREE.Vector3( this.C.extents[0], 0, z ) )
}
line = new THREE.LineSegments( geometry, material )
this.scene.add( line )
}
}
setupLights(){
let ambientLight = new THREE.AmbientLight( 0x606060 )
this.scene.add( ambientLight )
let directionalLight = new THREE.DirectionalLight( 0xffffff )
directionalLight.position.set( .5, .5, 1 ).normalize()
this.scene.add( directionalLight )
}
setupRenderer(){
this.renderer = new THREE.WebGLRenderer( { antialias: true } )
this.renderer.setClearColor( 0xFFFFFF )
//this.renderer.setPixelRatio( window.devicePixelRatio )
let w = this.C.extents[0]*this.zoom/2
let h = this.C.extents[1]*this.zoom/2
this.renderer.setSize( w, h )
this.container.appendChild( this.renderer.domElement )
}
// Initialize a movie frame
setup(){
//this.setupCamera()
this.setupControls()
this.drawGrid()
this.setupLights()
this.controls.update()
this.setupRenderer()
}
/* DRAWING FUNCTIONS ---------------------- */
clear(){
for( let i of Object.keys( this.drawvoxels ) ){
this.drawvoxels[i].visible = false
}
}
setVoxel( pos, color ){
let i = this.C.grid.p2i( pos )
if( !( i in this.drawvoxels ) ){
let material = new THREE.MeshLambertMaterial( { color: this.getCol("000000"), transparent: true, opacity : 0.2 } )
let cube = new THREE.Mesh( new THREE.BoxGeometry( 1, 1, 1 ),material )
cube.position.x = pos[0]
cube.position.y = pos[1]
cube.position.z = pos[2]
this.scene.add(cube)
this.drawvoxels[i] = cube
}
this.drawvoxels[i].visible = true
this.drawvoxels[i].material.color.setHex( color )
//this.drawvoxels[i].material.opacity=.2
}
drawCells( kind, col ){
if( ! col ){
col = "#000000"
}
let color
if( typeof col == "string" ){
color = this.getCol( col )
}
// We color only the borderpixels of 3D cells
let cellborderpixelsbyid = this.C.getStat( BorderPixelsByCell )
for( let cid of Object.keys( cellborderpixelsbyid ) ){
if( kind < 0 || this.C.cellKind(cid) == kind ){
if( typeof col == "function" ){
color = this.getCol( col(cid) )
}
for( let cp of cellborderpixelsbyid[cid] ){
this.setVoxel( cp, color )
}
}
}
}
drawActivityValues( kind, A ){
if( !A ){
for( let c of this.C.soft_constraints ){
if( c instanceof ActivityConstraint | c instanceof ActivityMultiBackground ){
A = c; break
}
}
}
if( !A ){
throw("Cannot find activity values to draw!")
}
// cst contains the pixel ids of all non-background/non-stroma cells in
// the grid.
let pos, cellid, a
// loop over all pixels belonging to non-background, non-stroma
let color = {r:1,g:1,b:0}
for( let x of this.C.cellPixels() ){
pos = x[0]
cellid = x[1]
// For all pixels that belong to the current kind, compute
// color based on activity values, convert to hex, and draw.
if( this.C.cellKind(cellid) == kind ){
a = A.pxact( this.C.grid.p2i( pos ) )/A.conf["MAX_ACT"][kind]
if( a > 0 ){
if( a > 0.5 ){
color["r"] = 1
color["g"]= (2-2*a)
} else {
color["r"] = (2*a)
color["g"] = 1
}
let hexcolor = new THREE.Color( color.r, color.g, color.b ).getHex()
this.setVoxel( pos, hexcolor )
}
}
}
}
render(){
this.renderer.render( this.scene, this.camera )
}
}
export default Canvas3D


This page is synchronized from the post: ‘一起来游台北故宫博物馆 之 书画篇 上’
Update your browser to view this website correctly. Update my browser now
×


Impresario Phillip Henslow (Geoffrey Rush) is very concerned. He has outstanding debts and his theatre, the Rose, lies idle while his young playwright, William Shakespeare (Joseph Fiennes) dithers about finishing his latest work, a comedy called Romeo and Ethel, A Pirate's Adventure'. To make matters worse, his chief creditor, Fennyman (Tom Wilkinson) expresses his dissatisfaction by dangling Henslow over an open fire, and threatens worse if his debts are not swiftly repaid. So begins Shakespeare in Love, a gloriously witty, piquant and unashamedly theatrical yarn of the creation of the play Romeo and Juliet, one of the most famous and touching stories in literature (in English, anyway). Shakespeare is suffering from writer's block - he needs a muse, and (with his wife safely stashed in the country), he casts his eye around but is not impressed by the women he sees. His mood is not helped by the fact that everyone wants a comedy (whereas he would like to create something more worthy) and his fierce rival, Marlowe (Rupert Everett) is enjoying critical and popular acclaim. Everything changes when Shakespeare sees Viola De Lessops (Gwyneth Paltrow), the beautiful daughter of a wealthy aristocrat. Viola is also a fan of theatre and particularly of the sonnets of a promising young playwright called Shakespeare. They eventually meet and fall deeply in love. Unfortunately, Viola has been promised in marriage to the insufferably arrogant Lord Wessex (Colin Firth), a union approved by Queen Elizabeth (Judi Dench), and therefore insoluble. As Shakespeare begins shaping his play, its character changes from comedy to drama to outright tragedy, as it mirrors the impossible but all-consuming love affair between a poor commoner and a rich aristocrat. The movie skilfully weaves two rather different stories into a dramatic and beautiful tale. The first one is a hilarious account of the struggle to put on a show and I wish Kenneth Branagh had seen this film before he inflicted The Bleak Midwinter on the rest of us. There are lots of sly jokes as applicable to the film industry today as theatre then or now. Such as the decision to give the actors a share of the profits rather than paying them.(Henslow explains, "But it will never make money" and Fennyman replies, "Exactly"). Spoken like a true producer. Indeed, a wager is made that art cannot move people in the same way as real life - that art is lightweight and artificial. Viola disagrees - true art will always touch people. A dig at the entertainment industry today, perhaps ? There is always a danger that attempting humour in a medieval setting will invoke memories of Monty Python or Blackadder, but the writers (Marc Norman and Tom Stoppard) avoid such pitfalls. They do have fun speculating on the sources of Shakespeare's inspiration. He hears a preacher shouting at the unheeding, passing crowd, "A plague on both your houses". He decides on some of the plot while out drinking with Marlowe. What really illuminates the story, (and provides most of the inspiration) and raises it above the ordinary, is the on-screen relationship of Voila and Shakespeare. Joseph Fiennes brings a passionate intensity to the young Shakespeare, and his character, mischievous, committed, determined, impatient and erudite, is convincing as the man who could only conjure such emotions in his works by having tasted such extremes of desire. The object of his desire has never looked better. Women world-wide must be a bit disgruntled. Having spent years reading women's magazines assuring them that "You too are special in your own way" along come women like Cameron Diaz and Gwyneth Paltrow, who are beautiful, talented, critically acclaimed, hugely popular and filthy rich. It's not good for morale. It's easy to see why Shakespeare would risk his life to see her - she looks sublime. With her long golden curls and delicate features, she calls to mind Botticelli's Birth of Venus. Paltrow's Viola is also strong-willed, intelligent and romantic. She also has (yet again) a faultless English accent (at this stage, she's just showing off ). The prurient amongst you may also appreciate the fact that she strips off - rest assured it's in the best possible taste.  The movie, though sumptuous in terms of costume and scenery, makes no real claim at veracity whatsoever, and one suspects that Shakespeare's antics, as portrayed, would have shortened his life considerably in reality. There are some minor quibbles - some of the humour is a little farfetched - but these are very minor distractions. What is refreshing is that a movie such as this can get made in the first place. As we approach the 1999 Oscars, Gwyneth Paltrow must surely get at least a nomination for her performance. Funnily enough, one of her rivals may well be Cate Blanchett for her portrayal of...Queen Elizabeth. Directed by John Madden.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Search for Files and Folders by typing the prefix file: in the search bar. Continue typing the filename to filter the results. e.g: file:contacts
Select the text that you would like swop. Press the Swop Text Hotkey (command + shift + x). The Dittostack window will appear. Select an item that you would like to paste and press enter. The selected item will be pasted in place of the original text you selected. The original text you selected is then placed on the clipboard ready for you to paste.
Select an item, then press (shift + enter). The selected text will be converted to Uppercase and the result will be pasted.
Select an item, then press (alt + shift + enter). The selected text will be converted to Lowercase and the result will be pasted.


Welcome to Knockout Docs
Create...
Document
Spreadsheet
Survey
Documents
Spreadsheets
Surveys
Search:
Debug:


Click the "Start Quiz" button and answer some simple JavaScript questions. Be aware that this is a timeded quiz! Answer as quickly as you can, but incorrect answers will decrease the time by 15 seconds! Your reamining time at the end of the quiz is your score, so be fast AND accurate!


rotate(90) rotate_symmetry scale_up(0.2) scale_down(-0.2) canvas_circle canvas_rect canvas_triangle canvas_text crop_Area change_grayscale up_brightness down_brightness


You have reached a cached page at the PATRIC site.
Please clear your browser's cache, then click HERE to return to the updated PATRIC site
How to clear cache?
- Google Chrome: Clear browsing data
- Firefox: How to clear the Firefox cache
- Safari: If Safari doesn‘t load a page
- Internet Explorer: View and delete your browsing history in Internet Explore


Encodes actions that transform descriptors.
The desc-patch.json format encodes actions that transform descriptors, in JSON format.
| Direction | Type | Description |
|---|---|---|
| Decode | DescActions | A list of DescAction values. |
| Encode | DescActions | A list of DescAction values. |


DO you want to explore
a modern tech mesuem
This is page for physics timeline of Tech Museum of IIT Ropar
By G10 [Mechanical] Group of Batch 2017
This is page for physics timeline of Tech Museum of IIT Ropar
Explore and learn.
These is another theme under TECH MUSEUM of IIT Ropar. Under Physics we have timline from BC to Future Physics whic shows its evelution ans impact on socity.


SM Entertainment's Lee Soo Man announces collaborative work with 'Intel Studios' for new K-Pop content
by beansssSM Entertainment's head producer Lee Soo Man will be working directly with 'Intel Studios' for a series of new, collaborative K-Pop contents, the label announced on November 14.
SME and 'Intel' plan on creating new, immersive media content for K-Pop storytelling, integrating large scale volumetric video capture technology, real-time interactive content, and augmented reality (AR). Lee Soo Man recently visited 'Intel Studios' in Los Angeles, California and held a meeting with chief creator Diego Prilusky, to share his vision of K-Pop contents and discuss how to integrate cutting-edge technology and into K-Pop storytelling, to create never-seen-before fan experiences.
Lee Soo Man has so far been leading production of the first collaborative project - called ‘Immersive Media 360: NCT 127 - 'Superhuman'’. Audiences will be able to enjoy and interact with NCT 127’s performance, which was created at Intel Studios and enables viewers to experience the content from any angle and perspective.
Brand new contents created by this partnership between SM Entertainment and 'Intel Studio' will be showcased in SMTOWN in Seoul, South Korea, some time soon.


This page is still under construction, so to contact me please go to Scratch or Weebly. You will need a Scratch account to contact me via Scratch.
* Scratch is a project of the lifelong kindergarten group at MIT media lab. Visit https://scratch.mit.edu for more info.
Download for another System
2016 jrehd3.
View mobile website.
View archived website.
This website adheres to the Scratch Community Guildlines in it's entirety.
Hosted on Github Pages for free. Visit pages.github.com for more informations.


--- layout: default status: publish published: true title: Message Sent author_login: neil author_email<EMAIL_ADDRESS>categories: [] tags: [] comments: [] ---
Thanks for taking the time to contact us.
If you have provided an email address, we will be emailing you soon.
Millard Technical Services Limited
Delta Famiglia
86 Tettenhall Road
Wolverhampton
WV1 4TF


Visualize and Compare
Details : Two testing algorithms run individually, performance data collected and visualized to find the better algorithm. Developed hashmaps, treemaps, stacked bar charts and worked on creating a basic navigation system to shift through the visualizations.
Tech : D3 library, HTML, CSS, Javascript


Log in
Sign up
(Open
On Campus
Online
Corporate Training
4
5
Sign up
Email
Password
(8 characters minimum)
Password confirmation
Log in


Setting Image Properties
How to set the optional properties of an image using the Image Manager of the DotNetNuke.RadEditorProvider for the RTE.
- If the image has already been inserted, right-click on the image and select Properties... from the drop down list. Alternatively, if you are currently adding the image, click on the Properties tab of the Image Manager.
- Click the Lock Ratio / Unlock Ratio button to unlock or lock the width/height ratio at any time. Unlocking the ratio enables the width and/or height to be modified independently.
- In the Width text box, enter the width in pixels which the image will be displayed as.
- In the Height text box, enter the height in pixels which the image will be displayed as.
- At Border Color, click the Color Picker button and select the border color. Note: A Border Width must be entered to display the border.
- In the Border Width text box, enter the pixel width for the border - OR - Use the Increase and Decrease arrows.
- In the Alt Text text box, enter the alternative text for this image.
- In the Long Description text box, enter the long description for this image.
- At Image Alignment, click the Alignment Selector button and select the alignment for this image.
- At Margin, set any of these fields:
- In the Top text box, enter a pixel value or use the Increase and Decrease arrows to set the top margin.
- In the Bottom text box, enter a pixel value or use the Increase and Decrease arrows to set the bottom margin.
- In the Right text box, enter a pixel value or use the Increase and Decrease arrows to set the right margin.
- In the Left text box, enter a pixel value or use the Increase and Decrease arrows to set the left margin.
- At CSS Class, select a class for this image.
-
Click the OK button confirm.
Setting the properties of an existing image
Setting the properties of an image during insertion


{% extends "driving/layout.html" %} {% block page_title %} Save and return {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} {{formData | safe}} Do you want to save your information to return to it later at any time? Do you want to save your information to return to it later at any time? We can send you an email that allows you to save your progress and return your information at any time. Yes No {% endblock %}
We can send you an email that allows you to save your progress and return your information at any time.