Copyright 2002-2006 by The BioBike Team (contact<EMAIL_ADDRESS>In this lesson we're going to see how one can extract complex biological relationship from biological literature, specifically, from PubMed abstracts. The idea is to write functions that automatically read the abstract and return regulatory relationships. Doing this "right" would require us to solve the ancient AI problem of "Natural Language Understanding", which hasn't been solved by anyone entirely. So we're not going to do it "right". Instead, we'll do what everyone does: throw various techniques at the problem and see what we can get out of it.
But before we can process PubMed abstracts, we need to get some of them. BioBike has a built-in interface to search pubmed. Since we're only going to do a small example here, we want to focus on some cases that we think as going to be interesting. Let's focus on the function of the p53 protein, which is a cell cycle checkpoing that is implicated in some cancers. We're interested in either p53 induction or things that p53 induces, so we'll start with a query that's likely to get us a focused set:
(set-timelimit 60) ; The pubmed query can take a little while. (setq 100abs (mapcar #^abstracttext (pubmed-query '("p53" "induces") :RETURN-N 100))PUBMED-QUERY search pubmed for entries that have the indicated terms ("p53" and "induces"), and returns result frames which have various fields: abstract, authors, etc. Since we only want the abstracts for now, we map over the results and just grab the abtsracttext slot. This, as I'm sure you noticed, resulted in a huge long list of strings of the abstract of these hundred papers. This set of strings will be our base set for the rest of this less.
Note that in what follows, you answers may vary slightly from those shown here because you might not get the exact same set of 100 abstracts as I got just now while writing this tutorial. So just be aware that the outputs may look different. (Of course, eventually you'll want to try out your own queries, so the outputs should look different on those cases!)
Let's start out by figuring out what-all is in the dataset we have. By "what all" I mean, what common concepts are contained in the data. The concepts aren't just the words, but also are sets of words that form phrases. One thing that is always a problem in NLP is cleaning up the input -- especially getting rid of punctuation, and splitting up the strings at the right places. Let's write a function that does this for us. What it needs to do is, first, to replace all punctuation with spaces, and then split up the sentence at spaces, and then return anything that is a real word (that is, not just "" -- the empty string). And while we're at it, let's turn everything into lower case. Here's that function:
(defun break-up-sentence (sentence) ;; Clean out random punctuation: (loop for punc across ",-.;:?!()\/" do (setq sentence (substitute #\space punc sentence))) ;; Now break up into pieces and return anything with content: (loop for word in (string-split sentence) when (> (length word) 0) collect (string-downcase word)) ) ;;; Let's try it out: (setq spain-rain (break-up-sentence "The rain in Spain ... or is it the snow? Who knows!")) :: ("the" "rain" "in" "spain" "or" "is" "it" "the" "snow" "who" "knows")Notice that there's no punctuation nor empty strings, and everything is in lower case. Great, let's apply this to our abstracts:
>> (setq 100abs (mapcar #'break-up-sentence (remove-if-not #'stringp 100abs))) ;;; [The remove-if-not is there because sometimes there's no abstract, ;;; or the abstract is weird, like a single number.]
Now let count phrases of length N, where we'll do N of 1, 2, 3, etc. (called "n-tuples", but we'll call them "n-phrases") To count n-phrases we'll make a hash table for them:
>> (defvar *n-phrase->count* (make-hash-table :test #'equal))Next we need a function that will collect up all the phrases in a sentence that are a given length from an abstract. This is a tiny bit trick because you have to end before the end of the sentence:
(defun all-n-phrases (n words) (loop for words+ on words until (null (nthcdr (1- n) words+)) collect (loop for i below n as word in words+ collect word))) ;;; And we'll test it on our sentence from above: >> (all-n-phrases 1 spain-rain) :: (("the") ("rain") ("in") ("spain") ("or") ("is") ("it") ("the") ("snow") ("who") ("knows")) >> (all-n-phrases 2 spain-rain) :: (("the" "rain") ("rain" "in") ("in" "spain") ("spain" "or") ("or" "is") ("is" "it") ("it" "the") ("the" "snow") ("snow" "who") ("who" "knows")) >> (all-n-phrases 3 spain-rain) :: (("the" "rain" "in") ("rain" "in" "spain") ("in" "spain" "or") ("spain" "or" "is") ("or" "is" "it") ("is" "it" "the") ("it" "the" "snow") ("the" "snow" "who") ("snow" "who" "knows"))Perfect! Notice that the 1-tuples (1-phrases) are just lists of the words themselves, and that the 2- and 3- (etc.) phrases overlap one another. This is what we want because we're interesting in every subphrase.
Now we need a function to count up the phrases -- that is, to add them to table with a count of 1 if they aren't there already, and if they are there already, increment the count:
(defun count-n-phrase (phrase) (if (gethash phrase *n-phrase->count*) (incf (gethash phrase *n-phrase->count*)) (setf (gethash phrase *n-phrase->count*) 1)))Now all we need to do is to run this for the counts we want:
(defun phrase-count (ns abstracts) (clrhash *n-phrase->count*) (loop for abstract in abstracts do (loop for n in ns do (loop for n-phrase in (all-n-phrases n abstract) do (count-n-phrase n-phrase))))) ;;; Ready??? >> (phrase-count '(1 2 3 4 5) 100abs) :: NIL ;;; Hmmm. That was pretty unexciting.  Let's write sort the phrases by count rank order:
(sort (loop for count being the hash-value of *n-phrase->count* using (hash-key phrase) collect (list count phrase)) #'> :key #'first)) ((996 ("of")) (899 ("the")) (706 ("in")) (706 ("and")) (361 ("to")) (320 ("p53")) (319 ("a")) (269 ("that")) (266 ("cells")) (241 ("by")) (238 ("cell")) (213 ("apoptosis")) (201 ("is")) (201 ("with")) (142 ("we")) (140 ("was")) (138 ("induced")) (129 ("of" "the")) (124 ("expression")) (121 ("as")) (120 ("in" "the")) (114 ("dna")) (103 ("for")) (91 ("not")) (90 ("protein")) (89 ("2")) (87 ("cancer")) (83 ("activation")) (82 ("tumor")) (82 ("on")) (81 ("1")) (80 ("this")) (79 ("induces")) (79 ("or")) (78 ("caspase")) (78 ("an")) (72 ("of" "p53")) (69 ("human")) (69 ("these")) (69 ("dependent")) (67 ("were")) (65 ("which")) (64 ("be")) (64 ("death")) (63 ("growth")) (59 ("cycle")) (59 ("expression" "of")) (59 ("cell" "cycle")) (58 ("activity")) (57 ("results")) (55 ("apoptotic")) (53 ("damage")) (52 ("gene")) (52 ("apoptosis" "in")) (51 ("are")) (51 ("activation" "of")) ...Aha! Our first result! A few things are worth notice here.  Let's try sorting it the other way 'round:
(sort (loop for count being the hash-value of *n-phrase->count* using (hash-key phrase) collect (list count phrase)) #'< :key #'first)) ((1 ("have" "indicated")) (1 ("chemopreventive" "agent")) (1 ("completely" "abolished")) (1 ("percutaneous" "transluminal" "coronary")) (1 ("resting")) (1 ("summit" "and")) (1 ("damage" "through" "the" "phosphorylation" "of")) (1 ("all" "produced" "concentration" "dependent" "suppression")) (1 ("13q12" "3" "with" "the")) (1 ("recently" "identified" "aldehyde" "originating" "from")) (1 ("using" "an" "exclusion" "dye")) (1 ("abolished" "by" "injection" "of" "a")) (1 ("prostate" "colon" "and")) (1 ("the" "safety" "and" "activity")) (1 ("it" "has" "been")) (1 ("cell" "lines" "exposed" "to" "hypoxia")) (1 ("as" "well" "as" "healthy" "subjects")) (1 ("a" "novel" "class" "of" "p53")) (1 ("this" "enzyme")) (1 ("was" "significantly" "phosphorylated" "when" "human")) ...Hmmmm. Again, some of these are useful and some aren't. As a first approximation, let's filter out any phrase that has obviously useless words in it. We can use the sorted list above to make up that list of words, called "stop words":
(defparameter *stop-words* '("of" "the" "in" "and" "to" "a" "that" "by" "is" "with" "we" "was" "as" "for" "this" "or" "an" "were" "which" "be" "are")) ;;; Let's just drop these from our abstracts: (setq 100abs (mapcar #'(lambda (sent) (loop for word in sent unless (member word *stop-words* :test #'string-equal) collect word)) 100abs)) ;;; And we'll try again from the top: (phrase-count '(1 2 3 4 5) 100abs) (sort (loop for count being the hash-value of *n-phrase->count* using (hash-key phrase) collect (list count phrase)) #'> :key #'first)) ((320 ("p53")) (266 ("cells")) (238 ("cell")) (213 ("apoptosis")) (138 ("induced")) (124 ("expression")) (114 ("dna")) (91 ("not")) (90 ("protein")) (89 ("2")) (87 ("cancer")) (83 ("activation")) (82 ("tumor")) (82 ("on")) (81 ("1")) (79 ("induces")) (78 ("caspase")) (69 ("human")) (69 ("these")) (69 ("dependent")) (64 ("death")) (63 ("growth")) (59 ("cycle")) (59 ("cell" "cycle")) (58 ("activity")) (57 ("results")) (55 ("apoptotic")) (53 ("damage")) (52 ("gene")) (50 ("at")) (50 ("but")) (50 ("dna" "damage")) (50 ("may")) (49 ("treatment")) (49 ("levels")) (49 ("also")) (48 ("induction")) (47 ("from")) (46 ("induced" "apoptosis")) (45 ("c")) (43 ("type")) (43 ("has")) (43 ("both")) (41 ("cell" "death")) (41 ("can")) (40 ("kinase")) (40 ("transcription")) (40 ("3")) (40 ("pathway")) (40 ("increased")) (39 ("mediated")) (37 ("proliferation")) (37 ("phosphorylation")) (37 ("been")) (36 ("senescence")) (35 ("effect")) (35 ("arrest")) ... (sort (loop for count being the hash-value of *n-phrase->count* using (hash-key phrase) collect (list count phrase)) #'< :key #'first)) ((1 ("have" "indicated")) (1 ("chemopreventive" "agent")) (1 ("(0" "4" "mg/ml)" "induced" "apoptosis")) (1 ("metabolites" "13(s)" "hydroxyoctadecadienoic" "acid" "15(s)")) (1 ("completely" "abolished")) (1 ("percutaneous" "transluminal" "coronary")) (1 ("resting")) (1 ("cancer" "dose" "form" "selenium" "determining")) (1 ("agent" "these" "vitro")) (1 ("all" "produced" "concentration" "dependent" "suppression")) (1 ("expression" "p53" "induced")) (1 ("benzo[a]pyrene" "investigate" "whether" "transformation" "phenotypes")) (1 ("surface" "protein" "expression" "p53" "independent")) ...Hmmm. That's a little better. Maybe 1 word phrases are all that interesting, and maybe neither are 5 word phrases. Let's try just 3 and 4 word phrases:
(phrase-count '(3 4) 100abs) (sort (loop for count being the hash-value of *n-phrase->count* using (hash-key phrase) collect (list count phrase)) #'> :key #'first)) ((15 ("wild" "type" "p53")) (15 ("cell" "cycle" "progression")) (14 ("cell" "cycle" "arrest")) (13 ("15" "lox" "1")) (9 ("apoptotic" "cell" "death")) (8 ("phase" "cell" "cycle")) (8 ("induced" "cell" "death")) (8 ("colon" "cancer" "cells")) (8 ("cytochrome" "c" "release")) (7 ("doi" "10" "1038/sj")) (7 ("advance" "online" "publication")) (7 ("after" "dna" "damage")) (7 ("2005" "doi" "10")) (7 ("2005" "doi" "10" "1038/sj")) (7 ("p53" "expressing" "cells")) (7 ("p53" "tumor" "suppressor")) (6 ("upregulation" "cox" "2")) (6 ("response" "dna" "damage")) (6 ("trail" "induced" "apoptosis")) (6 ("cox" "2" "expression")) (6 ("mitochondrial" "membrane" "potential")) (6 ("cells" "treated" "e(2)")) (5 ("treated" "e(2)" "4" "ohe(2)")) (5 ("<" "=" "0")) (5 ("(p" "<" "=")) (5 ("wiley" "liss" "inc")) (5 ("cyclin" "dependent" "kinase")) (5 ("no" "induced" "apoptosis")) ...Aha! That's a little more intersting. Let's explore this a little by writing a function to ask about specific phrases, or ones with specific words in them:
(defun word-phrases (word) (sort (loop for count being the hash-value of *n-phrase->count* using (hash-key phrase) when (member word phrase :test #'string-equal) collect (list count phrase)) #'> :key #'first)) >> (word-phrases "p53") ((15 ("wild" "type" "p53")) (7 ("p53" "expressing" "cells")) (7 ("p53" "tumor" "suppressor")) (5 ("tumor" "suppressor" "p53")) (4 ("p53" "dependent" "apoptosis")) (3 ("p53" "mediated" "apoptosis")) (3 ("left" "ventricular" "p53")) (3 ("p53" "tumor" "suppressor" "gene")) (3 ("mutant" "p53" "expressing")) (3 ("phosphorylation" "p53" "at" "ser15")) (3 ("wt" "p53" "expressing")) (3 ("phosphorylation" "p53" "at")) ... >> (word-phrases "induces") ((5 ("dna" "damage" "induces")) (2 ("induces" "apoptotic" "cell")) (2 ("induces" "growth" "arrest")) (2 ("induces" "apoptosis" "cell")) (2 ("induces" "htert" "expression")) (2 ("proliferation" "induces" "apoptosis")) (2 ("induces" "dna" "damage")) (2 ("induces" "apoptotic" "cell" "death")) (2 ("induces" "apoptosis" "caspase")) (1 ("ssx1" "induces" "cki")) (1 ("induces" "expressions" "p19" "p21")) >> (word-phrases "suppresses") ((1 ("proliferation" "suppresses" "apoptosis")) (1 ("contrast" "nucleolin" "overexpression" "suppresses")) (1 ("suppresses" "p53" "translation")) (1 ("suppresses" "apoptosis" "leading" "epidermal")) (1 ("keratinocyte" "proliferation" "suppresses")) (1 ("nucleolin" "overexpression" "suppresses" "p53")) (1 ("overexpression" "suppresses" "p53")) (1 ("suppresses" "p53" "translation" "induction")) (1 ("augments" "keratinocyte" "proliferation" "suppresses")) (1 ("nucleolin" "overexpression" "suppresses")) (1 ("keratinocyte" "proliferation" "suppresses" "apoptosis")) (1 ("overexpression" "suppresses" "p53" "translation")) (1 ("proliferation" "suppresses" "apoptosis" "leading")) (1 ("suppresses" "apoptosis" "leading")))There are many interesting subphrases among the above, for example: ("nucleolin" "overexpression" "suppresses" "p53"), ("ssx1" "induces" "cki"), and ("induces" "expressions" "p19" "p21").... [presumably we lost an "of" and an "and" in the last one.]
So it looks like we could try to focus our parsing on verb phrase forms like "something INDUCES something" or "something SUPPRESSES something", but the "somethings" on each side have to be of various lengths on order to make any sense. The problem is that phrases in biology can take on various word lengths ranging from simple words like "p53" to complex phrases like "p53 tumor suppressor gene" -- but how will be know when we have which kind of thing?! It's not clear that this counting-things approach is going to get us there alone. Let's try something a little more clever.
Really what we're after is grammatical forms that look like:
noun-phrase verb noun-phraseNow, it should be obvious that in order to make this work we need to know what part of speech each word has (noun versus verb) This is usually the realm of a dictionary. For the time being, however, we're just going to assign parts of speech to the words that we know to be verbs, and assume that everything else is a noun for now. Let's define some verbs:
(defparameter *verbs* '("induce" "induces" "induced" ...Whoa! Wait a minute! Why do we have to put all of these in? Aren't they all just different forms of the same verb?! Well, sure, but this is a second major issue in "real" natural language processing, sometimes called "morphological analysis", and we're not going to work on it at the moment. Suffice to say that it's not easy to decide, for example, wheras it might be easy to know that "dogs" is the plural of "dog", how do we know that "geese" is the plural of "goose" without just knowing? That there are worse cases! So take it for now that we're going to have to put in every version of every word we want to have understood. Now where were we.... Oh yes:
(defparameter *verbs* '("induce" "induces" "induced" "express" "expresses" "expressed" "suppress" "suppresses" "suppressed"))Okay, that'll do for now. So everything else is considered a noun. How about noun phrases; is any old sequence of nouns going to be acceptable?
Let's restrict our nps to those that appear in our *n-phrase->count* table with more than some set number of appearances. Since we can build that table with any specific length of phrase, and excluding any word we like (the stop words) we can pretty carefully specify what we want to include as a noun phrase (np). Here's the final function to fill the table with just the nps we want:
(defun phrase-count (ns excluded-words count-limit abstracts) (clrhash *n-phrase->count*) (loop for abstract in abstracts do (loop for n in ns do (loop for n-phrase in (all-n-phrases n abstract) unless (intersection n-phrase excluded-words :test #'string-equal) do (count-n-phrase n-phrase)))) (loop for count being the hash-values of *n-phrase->count* using (hash-key phrase) when (< count count-limit) do (remhash phrase *n-phrase->count*))) ;;; Let's try it: (phrase-count '(2 3 4) *verbs* 4 100abs) (sort (loop for count being the hash-value of *n-phrase->count* using (hash-key phrase) collect (list count phrase)) #'> :key #'first)) ((59 ("cell" "cycle")) (50 ("dna" "damage")) (41 ("cell" "death")) (33 ("wild" "type")) (26 ("cell" "lines")) (24 ("cancer" "cells")) (23 ("tumor" "suppressor")) (22 ("bcl" "2")) (21 ("but" "not")) (19 ("did" "not")) (19 ("colon" "cancer")) (19 ("has" "been")) (18 ("these" "results")) (17 ("tumor" "cells")) (17 ("caspase" "8")) (16 ("caspase" "3")) (16 ("cell" "growth")) (15 ("wild" "type" "p53")) (15 ("cell" "cycle" "progression")) (15 ("caspase" "2")) (15 ("cycle" "progression")) (15 ("type" "p53")) (14 ("15" "lox")) (14 ("cyclin" "d1")) (14 ("cycle" "arrest")) (14 ("cell" "line")) (14 ("p53" "dependent")) (14 ("cell" "cycle" "arrest")) ...That looks pretty nice. (There are some more stop words we should have excluded, like "but" and "these", but overall this looks like a pretty useable noun phrase list!)
So now all that we need to do is to write the code that parse the sentences. In a minute we'll get into a more complex parse, but for now all we need to do it to look for the pattern: (...noun-phrase verb noun-phrase...).
Let's start by defining functions to tell us whether a list of words is either a noun phrase or a verb phrase:
(defun np? (phrase) (gethash phrase *n-phrase->count*)) ;;; and: (defun vp? (phrase) (and (= 1 (length phrase)) (member (first phrase) *verbs* :test #'string-equal)))Now all we need to do is to parse up the sentence into series of possible divisions, and ask for each one whether it's of the right form (noun-phrase verb noun-phrase). The function that's going to do the asking is this one -- we'll pass it what we think is an np, and then what we think is a vp and then what we think is the second np:
(defun np-v-np? (np1 vp np2) (and (np? np1) (vp? vp) (np? np2)))But what are we going to pass it? Well, given any number of words, we want all possible ways of breaking the words into triples. That's very slightly tricky; well do it with two positional counters:
(defun break-into-triples (words) (loop for p1 from 1 to (- (length words) 1) append (loop for p2 from (1+ p1) to (- (length words) 1) collect (list (subseq words 0 p1) (subseq words p1 p2) (subseq words p2))))) >> (pprint (break-into-triples '(a b c d e f g h))) :: (((A) (B) (C D E F G H)) ((A) (B C) (D E F G H)) ((A) (B C D) (E F G H)) ((A) (B C D E) (F G H)) ((A) (B C D E F) (G H)) ((A) (B C D E F G) (H)) ((A B) (C) (D E F G H)) ((A B) (C D) (E F G H)) ((A B) (C D E) (F G H)) ((A B) (C D E F) (G H)) ((A B) (C D E F G) (H)) ((A B C) (D) (E F G H)) ((A B C) (D E) (F G H)) ((A B C) (D E F) (G H)) ((A B C) (D E F G) (H)) ((A B C D) (E) (F G H)) ((A B C D) (E F) (G H)) ((A B C D) (E F G) (H)) ((A B C D E) (F) (G H)) ((A B C D E) (F G) (H)) ((A B C D E F) (G) (H)))Cool; Worked right out of the box! But, hmmmm. Actually, this is far more complex than it really needs to be because we know that a verb can only be a single word. In fact, this is going to give us a huge number of obviously impossible sequences... and huge may be an understatement. Watch how many possibilities there are for a 100 word abstract:
(length (break-into-triples (loop for i from 1 to 100 collect i))) :: 4851Whoa! All we really need is the ones with one word in the middle:
(defun break-into-triples (words) (loop for position from 1 to (- (length words) 2) collect (list (subseq words 0 position) (list (nth position words)) (subseq words (1+ position))))) >> (pprint (break-into-triples '(a b c d e f g h))) :: (((A) (B) (C D E F G H)) ((A B) (C) (D E F G H)) ((A B C) (D) (E F G H)) ((A B C D) (E) (F G H)) ((A B C D E) (F) (G H)) ((A B C D E F) (G) (H))) >> (length (break-into-triples (loop for i from 1 to 100 collect i))) :: 98Ahhhh. Much simpler ... and more importantly: MUCH shorter! That should speed things up substantially!
(Note that if this gets a list of words less than three long, I don't know what it'll do; I think it'll return a nil, but, technically, its behavior in that case is called "undefined"!)
Next we want to collect every reasonable-length sequence from the input sentence (one of the abstracts). That's also easy; n can only be up to 9 (4 + 1 + 4), and no smaller than 5 (2 + 1 + 2). Turns out we already have that function, way way above we wrote: ALL-N-PHRASES. Here it is again:
(defun all-n-phrases (n words) (loop for words+ on words until (null (nthcdr (1- n) words+)) collect (loop for i below n as word in words+ collect word))) ;;; Let's try it: >> (all-n-phrases 3 '(a b c d e f g h)) :: ((A B C) (B C D) (C D E) (D E F) (E F G) (F G H))Do the outer loop that takes all phrases of 5, 6, 7, 8, and 9, breaks them into triples, and tries each one looks like this:
(defun parse-as-np-vp-np (words) (loop for n from 5 to 9 append (loop for phrase in (all-n-phrases n words) append (loop for (np1 vp np2) in (break-into-triples phrase) when (np-v-np? np1 vp np2) collect phrase))))Okay. We should be ready to do the wild thing... Do we dare? Oh what the heck:
(loop for abs in 100abs append (parse-as-np-vp-np abs)) [...long pause while it searches a HUGE number of possible phrases...] (("cancer" "cells" "express" "low" "levels") ("tj" "135" "induced" "hsc" "apoptosis") ("k" "bzip" "induce" "p53" "p21") ("cell" "growth" "induced" "apoptotic" "cell") ("cell" "growth" "induced" "apoptotic" "cell" "death") ("dna" "damage" "induces" "atm" "dependent") ("syt" "ssx1" "induced" "transcriptional" "activity") ("syt" "ssx1" "suppressed" "cell" "growth") ("cpd" "5" "induced" "apoptosis" "human") )Wow! That's actually pretty neat... we found a set of actually sensible results. Some are clearly a little off, like "cancer cells express low levels" (of what?!), but others actually seem to make significant sense, like: "tj 135 induced hsc apoptosis", "cell growth induced apoptotic cell death", and "syt ssx1 suppressed cell growth" (as well as, we note "induced transcriptional activity"). If we were to add more verbs and refine our sense of what counts as a noun phrase, we might be able to extract a great deal of reasonable information from the literature abstracts in this fairly simple-minded way.
This lesson has got a bit long-winded, so were going to take a break and come back in a later lesson to do somewhat more refined BioNLP, but we note that in just a few lines of code we've managed go from raw pubmed abstracts to a set of fairly plausible analyses. For fun, let's wrap it all up in a bundle and try it on something new:
(defun pubmed-parse (query n-abstracts-to-analyze) (let ((abstracts (mapcar #'(lambda (sent) (loop for word in sent unless (member word *stop-words* :test #'string-equal) collect word)) (mapcar #'break-up-sentence (remove-if-not #'stringp (mapcar #^abstracttext (pubmed-query query :RETURN-N n-abstracts-to-analyze))))))) (clrhash *n-phrase->count*) (phrase-count '(2 3 4) *verbs* 4 abstracts) (loop for abs in abstracts append (parse-as-np-vp-np abs)))) ;;; Darest we try it out??? >> (pubmed-parse '("p53" "induces") 30) ; Just do 30 to speed up a little :: (("cancer" "cells" "express" "low" "levels") ("tj" "135" "induced" "hsc" "apoptosis")) ;;; Tada! Let's add some more verbs and try some others:(defparameter *verbs* '("induce" "induces" "induced" "express" "expresses" "expressed" "suppress" "suppresses" "suppressed" "regulate" "regulates" "regulated" "activate" "activates" "activated" "inhibit" "inhibits" "inhibited" )) >> (pubmed-parse '("dcmu" "inhibits") 60) :: (("did" "not" "inhibit" "electron" "transport") ("thylakoid" "membrane" "activates" "translation" "elongation") ("photosystem" "ii" "induce" "delta" "ph") ("1" "dimethylurea" "inhibits" "red" "light") ("1" "1" "dimethylurea" "inhibits" "red" "light") ("dichlorophenyl)" "1" "1" "dimethylurea" "inhibits" "red" "light")) ;;; And if we want to get a general sense of what's hot: >> (pubmed-parse '("activates" "inhibits") 60) :: (("transcription" "factor" "activates" "cell" "cycle") ("trx" "1" "activates" "nf" "kappab") ("mll" "af4" "induced" "cell" "lines") ("mmp" "2" "inhibits" "beta" "ar") ("inhibition" "mmp" "2" "inhibits" "beta" "ar") ("mmp" "2" "inhibits" "beta" "ar" "stimulated") ("inhibition" "mmp" "2" "inhibits" "beta" "ar" "stimulated") ("glucose" "transport" "activated" "alpha" "pgg")) >> (pubmed-parse '("stem" "cell" "cycle") 60) :: ("cancer" "cells" "induced" "cell" "cycle" "arrest"))Now, you might well ask: "So what? What's this do for me?" Well, now that we have this tool that lets us look for common relationships in PubMed, let's so a little exploring. Recall the tutorial on regulatory simulation. Here's the picture from Li, et al. (2004) The yeast cell-cycle network is robustly designed. PNAS, 101(14), 4781-4786:
Li et al. did a great deal of literature search to figure out this graph. Let's see if, using our new tools, we could have saved them some time.
It looks like clb1 and clb2 are central to Li's model. Let's look up their relationships:
>> (pubmed-parse '("clb1" "clb2") 60) :: (("cell" "cycle" "regulated" "promoter" "activation") ("cell" "cycle" "regulated" "cyclin" "dependent") ("cln1" "cln2" "expressed" "g1" "s") ("clb1" "clb2" "expressed" "g2" "m"))Lo and behold! Another piece of the same model: ("cln1" "cln2" "expressed" "g1" "s")! Hmmmm.  Let's try a different part:>> (pubmed-parse '("cyclin" "cdc2") 60) :: (("nf" "y" "regulated" "cell" "cycle") ("cyclin" "b" "induced" "s" "phase") ("cell" "proliferation" "induced" "cell" "death") ("silymarin" "silibinin" "induced" "g2" "m") ("cell" "growth" "induced" "cell" "cycle"))Wow, we even found the very top node: ("cell" "growth" "induced" "cell" "cycle")!This isn't to suggest that could do this automatically... Hmmmm. Or does it? What if we kept a record of the "factoids" (these little phrases) that we are discovered, just like we kept a record of the n-phrases above, and scanned pubmed over and over, using the same technology we just developed for every word that we come across that look like the name of an agent (maybe we could identify these by whether they have numbers, like "cdc20" etc), until we run out of new non-words. Would we end up with and entire theory of the cell?????
Exercise for the student!
Copyright 2002-2006 by The BioBike Team (contact jshrager@stanford.edu)


ALCOVE Model¶
Reference : [Krus92]
Module : alcove
The above module contains the necessary functions that aid in implementing the ALCOVE model. The documentation for these functions is described below.
-
Alcove.alcove.
find_del_alpha
(current_stimulus_id, current_stimulus, lambda_alpha, c, hidden_representation, output_activations, hidden_activations, w, categories)¶ Function that calculates the amount of change that should be added to each dimension’s attentional weight in the learning phase (equation 6 in [Krus92])
- Parameters
current_stimulus_id (int) – Current stimulus ID or stimulus number
current_stimulus (list) – Current stimulus representation in the psychological space. For example, current stimulus could be [0, 1, 1, 0]
lambda_alpha (float) – Learning rate for the attentional weights. The same learning rate applies to all the weights. It is one of the free parameters of the model
c (float) – Specificity constant. It is one of the free parameters of the model
hidden_representation (np.array) – The hidden layer nodes are again represented as co-ordinates in the psychological space. The hidden layer node representations are given to this function in the form of a n x N matrix, where n is the number of hidden layer nodes and N is the number of dimensions of the psychological space
output_activations (list) – This is the list containing the activations of each node in the output category layer
hidden_activations (list) – This is the list that contains all the hidden layer node activations
w (list) – This is the list of association weights from hidden layer to output layer. If there are J hidden layer nodes and K output category nodes, then this list has dimensions J x K. For example, if there are two output category nodes and three hidden layer nodes, then w could be [[0.5, 0.2], [0.3, 0.7], [-0.33, -0.77]]
categories (list) – This is the list that indicates which stimulus belongs to which category. For example, out of 5 stimuli, if stimuli #0, #2, #4 belongs to category 0 and the rest belongs to category 1, then categories_Idx = [[0,2,4],[1,3]]
- Returns
A list containing the amount of change that should be added to each dimension’s attentional weight in the learning phase
- Return type
list
-
Alcove.alcove.
find_del_w
(lambda_w, output_activations, hidden_activations, categories)¶ Function that calculates the amount of change that should be added to w in the learning phase (equation 5 in [Krus92])
- Parameters
lambda_w (float) – Learning rate for the weights. The same learning rate applies to all the weights. It is one of the free parameters of the model
output_activations (list) – This is the list containing the activations of each node in the output category layer
hidden_activations (list) – This is the list that contains all the hidden layer node activations
categories (list) – This is the list that indicates which stimulus belongs to which category. For example, out of 5 stimuli, if stimuli #0, #2, #4 belongs to category 0 and the rest belongs to category 1, then categories_Idx = [[0,2,4],[1,3]]
- Returns
The amount of change that should be added to w in the learning phase
- Return type
float
Function that calculates the hidden layer activations (equation 1 in [Krus92])
- Parameters
current_stimulus (list) – Presenting a stimulus activates all the hidden layer nodes to different extents. The current stimulus is represented as co-ordinates in psychological space and is given as a list of length N, where N is the number of dimensions of the psychological space. For example, current_stimulus could be [1,0,1,1]
stimulus_representation (np.array) – The stimuli are given to this function in the form of a n x N matrix, where n is the number of stimuli and N is the number of dimensions of each stimuli in the psychological space
hidden_representation (np.array) – The hidden layer nodes are again represented as co-ordinates in the psychological space. The hidden layer node representations are given to this function in the form of a n x N matrix, where n is the number of hidden layer nodes and N is the number of dimensions of the psychological space
alpha (list) – Attentional weights for each dimension. For example, if there are four dimensions in the psychological space and if equal attention is assumed for all these dimensions, then alpha is supplied as [0.25, 0.25, 0.25, 0.25]
r (int) – This is the Minkowski’s distance metric. A value of 1 corresponds to city-block metric (generally used when the stimuli has separable dimensions) ; A value of 2 corresponds to Eucledian distance metric (generally used when the stimuli has integral dimensions)
q (int) – Similarity Gradient. A value of 1 corresponds to exponential similarity gradient. A value of 2 corresponds to Gaussian similarity gradient
c (float) – Specificity constant. This determines the overall width of the activation profiles of the hidden layer nodes. Large values of c results in rapid decrease in similarity and hence narrow activation profiles, whereas small values of c results in wide activation profiles. It is one of the free parameters of the model
- Returns
A list containing the activations of each node in the hidden layer
- Return type
list
-
Alcove.alcove.
output_layer_activations
(categories, hidden_activations, w)¶ Each category is represented as a node in the output layer. This function calculates the activations of each of these output category nodes (equation 2 in [Krus92])
- Parameters
categories (list) – This is the list that indicates which stimulus belongs to which category. For example, out of 5 stimuli, if stimuli #0, #2, #4 belongs to category 0 and the rest belongs to category 1, then categories_Idx = [[0,2,4],[1,3]]
hidden_activations (list) – This is the list that contains all the hidden layer node activations
w (list) – This is the list of association weights from hidden layer to output layer. If there are J hidden layer nodes and K output category nodes, then this list has dimensions J x K. For example, if there are two output category nodes and three hidden layer nodes, then w could be [[0.5, 0.2], [0.3, 0.7], [-0.33, -0.77]]
- Returns
A list containing the activations of each node in the output category layer
- Return type
list
-
Alcove.alcove.
probability_of_category
(K, phi, output_activations)¶ Function that calculates the probability of categorizing the current stimulus into category K (equation 3 in [Krus92])
- Parameters
K (int) – Category number
phi (float) – Probability mapping constant. It is a free parameter of the model
output_activations (list) – This is the list containing the activations of each node in the output category layer
- Returns
The probability of categorizing the current stimulus into category K
- Return type
float
-
Alcove.alcove.
teacher
(i, K, categories, output_activations)¶ Function that calculates the feedback in learning, which is supplied in the form of teacher values (equation 4b in [Krus92])
- Parameters
i (int) – Stimulus ID or stimulus number
K (int) – Category number
categories (list) – This is the list that indicates which stimulus belongs to which category. For example, out of 5 stimuli, if stimuli #0, #2, #4 belongs to category 0 and the rest belongs to category 1, then categories_Idx = [[0,2,4],[1,3]]
output_activations (list) – This is the list containing the activations of each node in the output category layer
- Returns
Feedback of the model’s performance to the current stimulus in the form of a value that is used in the learning phase.
- Return type
float
Example¶
A Sample Script : sample
The above script illustrates how one can use the alcove module. As an example, the above script generates the plot in figure 5 of [Krus92] for non zero attentional learning. The data set of [ShHJ61] is used.
References
- Krus92(1,2,3,4,5,6,7,8)
Kruschke, John K.: ALCOVE An Exemplar-Based Connectionist Model of Category Learning. In: Psychological Review. 1992, Vol. 99, No. 1, 22-44.
- ShHJ61
Shepard, R. N., Hovland; C. L.; Jenkins, H. M.: Learning and memorization of classifications. In: Psychological Monographs. 75(13, Whole No. 517).


Age: 27
Hometown: Magee, MS
Current City: Seattle, WA
I am originally from Mississippi. I grew up in town right outside of Jackson, Mississippi. Taiwan wentI was a two sport student athlete, where I went on to play collegiate football at Florida State University and graduated from college and decided to pursue professional baseball. Injuries derailed my professional career, in which lead me to pursue my Masters degree at Northwestern University. I'm currently working with a fellowship through an organization, Greater Foundation. My role with the company is Project Managmenent. I really enjoy the work that we are doing and look forward to continue to impact the next generation of leaders.
Florida State University, Northwestern University
My interest in programming came from when I was in college. While at FSU, the football program introduced me to analytics. Jimbo fisher which is the head football at the Florida State University hired a rocket scientist named Chris Jacobs. Chris implemented GPS systems which tracked every movement a player would make in practice and the weight rooom. The data sets that were created from the gps systems cut down on injuries significantly and the data was able to give the coaches a proven formula that enabled the coaching staff/trainers to hold players out of practice because of fatigue.


$DFC2/57282: ? Jump from $CF2E, $CF88: DFC2: A6 82 LDX $82 DFC4: 09 80 ORA #$80 DFC6: B4 A7 LDY $A7,X DFC8: 10 03 BPL $DFCD DFCA: 95 A7 STA $A7,X DFCC: 60 RTS Jump from $DFC8: DFCD: 95 AE STA $AE,X DFCF: 60 RTS Previous Page / Next Page


Setup the FD.io Repository - Centos 7¶
Update the OS¶
Before starting the repository setup, it is a good idea to first update and upgrade the OS; run the following commands to update the OS and get some packages.
$ sudo yum update
$ sudo yum install pygpgme yum-utils
Package Cloud Repository¶
Build artifacts are also posted to a packagecloud.io Repository. This includes official point releases. To use any of these build artifacts, create a file ‘/etc/yum.repos.d/fdio-release.repo’ with the content that points to the version needed. Below are some common examples of the content needed:
VPP Latest Release¶
To allow ‘yum’ access to the official VPP releases, create the file ‘/etc/yum.repos.d/fdio-release.repo’ with the following content.
$ cat /etc/yum.repos.d/fdio-release.repo
[fdio_release]
name=fdio_release
baseurl=https://packagecloud.io/fdio/release/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/fdio/release/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[fdio_release-source]
name=fdio_release-source
baseurl=https://packagecloud.io/fdio/release/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/fdio/release/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
Update your local yum cache.
$ sudo yum clean all
$ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_release'
The ‘yum install vpp’ command will install the most recent release. To install older releases, run the following command to get the list of releases provided.
$ sudo yum --showduplicates list vpp* | expand
VPP Master Branch¶
To allow yum access to the nightly builds from the VPP master branch, create the file ‘/etc/yum.repos.d/fdio-release.repo’ with the following content.
$ cat /etc/yum.repos.d/fdio-release.repo
[fdio_master]
name=fdio_master
baseurl=https://packagecloud.io/fdio/master/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/fdio/master/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[fdio_master-source]
name=fdio_master-source
baseurl=https://packagecloud.io/fdio/master/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/fdio/master/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
Update your local yum cache.
$ sudo yum clean all
$ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_master'
The ‘yum install vpp’ command will install the most recent build on the branch. Run the following command to get the list of images produce by the branch.
$ sudo yum clean all
$ sudo yum --showduplicates list vpp* | expand
Install VPP RPMs¶
To install the VPP packet engine, run the following command:
$ sudo yum install vpp
The vpp RPM depends on the vpp-lib and vpp-selinux-policy RPMs, so they will be installed as well.
Note
The vpp-selinux-policy will not enable SELinux on the system. It will install a Custom VPP SELinux policy that will be used if SELinux is enabled at any time.
There are additional packages that are optional. These packages can be combined with the command above and installed all at once, or installed as needed:
$ sudo yum install vpp-plugins vpp-devel vpp-api-python vpp-api-lua vpp-api-java vpp-debuginfo vpp-devel libvpp0
Starting VPP¶
Once VPP is installed on the system, to run VPP as a systemd service on CentOS, run the following command:
$ sudo systemctl start vpp
Then to enable VPP to start on system reboot, run the following command:
$ sudo systemctl enable vpp
Outside of running VPP as a systemd service, VPP can be started manually or made to run within GDB for debugging. See Running VPP for more details and ways to tailor VPP to a specific system.
Uninstall the VPP RPMs¶
To uninstall a VPP RPM, run the following command:
$ sudo yum autoremove vpp*


Home pet robot for geeks to play and research AI
More infoSturdy and shiny. No soldering required
Powered by Raspberry Pi. Comes with preinstalled Raspbian Jessie
Comes with OpenCV and Tensorflow-trained SSD neural network to detect images
Tank powered by python, controlled from an android phone
Control the robot from your android phone
Everything is included into package - Raspberry Pi and other electrical parts, chassis with all the screws and nuts, acrylic plates and jumper wires and even a screwdriver. No soldering required.
If you have any questions let us know


19
1 A declaration about Egypt.
See, Yahweh rides on a swift cloud and is coming to Egypt;
the idols of Egypt quake before him, and the hearts of the Egyptians melt within themselves.
2 "I will stir up Egyptians against Egyptians: a man will fight against his brother, and a man against his neighbor;
city will be against city, and kingdom against kingdom.
3 The spirit of Egypt will be weakened from within. I will destroy his advice,
though they sought the advice of idols, dead mens' spirits, mediums, and spiritualists.
4 I will give the Egyptians into the hand of a harsh master, and a strong king will rule over them—
this is the declaration of the Lord, Yahweh of hosts."
5 The waters of the sea will dry up, and the river will dry up and become empty.
6 The rivers will become foul; the streams of Egypt will dwindle and dry up;
the reeds and flags will wither away.
7 The reeds by the Nile,
by the mouth of the Nile, and all the sown fields of the Nile will dry up, turn to dust, and blow away.
8 The fishermen will wail and mourn, and all who cast a hook into the Nile will mourn
like those who spread nets on the waters will grieve.
9 The workers in combed flax and those who weave white cloth will turn pale.
10 The cloth workers of Egypt will be crushed; all who work for hire will be grieved within themselves.
11 The princes of Zoan are completely foolish. The advice of the wisest advisors of Pharaoh has become senseless.

12 Where then are your wise men?
Let them tell you and make known what Yahweh of hosts plans concerning Egypt.
13 The princes of Zoan have become fools, the princes of Memphis are deceived; they have made Egypt go astray, who are the cornerstones of her tribes.
14 Yahweh has mixed a spirit of distortion into her midst,
and they have led Egypt astray in all she does, like a drunk staggering in his vomit.
15 There is nothing anyone can do for Egypt, whether head or tail, palm branch or reed.
16 In that day, the Egyptians will be like women. They will tremble and fear because of the upraised hand of Yahweh of hosts that he raises over them.
17 The land of Judah will become a cause of staggering to Egypt. Whenever anyone reminds them of her, they will be afraid, because of the plan of Yahweh, that he is planning against them.
18 In that day there will be five cities in the land of Egypt that speak the language of Canaan and swear allegiance to Yahweh of hosts. One of these cities will be called The City of the Sun.
19 In that day there will be an altar to Yahweh in the middle of the land of Egypt, and a stone pillar at the border to Yahweh.
20 It will be as a sign and a witness to Yahweh of hosts in the land of Egypt. When they cry to Yahweh because of oppressors, he will send them a savior and a defender, and he will deliver them.
21 Yahweh will be known to Egypt, and the Egyptians will know Yahweh in that day. They will worship with sacrifices and offerings, and will make vows to Yahweh and fulfill them.
22 Yahweh will afflict Egypt, afflicting and healing. They will return to Yahweh; he will hear their prayer and will heal them.
23 In that day there will be a highway from Egypt to Assyria, and the Assyrian will come to Egypt, and the Egyptian to Assyria; and the Egyptians will worship with the Assyrians.
24 In that day, Israel will be the third with Egypt and Assyria, a blessing in the midst of the earth;
25 Yahweh of hosts will bless them and say, "Blessed be Egypt, my people; Assyria, the work of my hands; and Israel, my inheritance."


[1]
Map i missed a neighborhood i suppose that trip from your eyes off about 30-50'.
[2]
Blue tooth is useless poi database Mechanized voice and immediately used earlier in bread vehicle mounting hardware.


Login
An error occurred transacting with the server.
×
{{conerror}}
Login
Login
Not a valid e-mail address
UserId required. Enter a valid email id
Reset password
×
Reset Password
A verification link will be sent to your Email acccount.
Submit
Not a valid e-mail address
UserId required.Enter a valid email id


Objective: Build a CodePen.io app that successfully reverse-engineers this
Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.
Rule #2: You may use whichever libraries or APIs you need.
Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.
Hint: If you don't want to start from scratch, you can fork this simple Bootstrap portfolio template on CodePen
Here are the user stories you must enable, and optional bonus user stories:
User Story: As a user, I can access all of the portfolio webpage's content just by scrolling.
User Story: As a user, I can click different buttons that will take me to the portfolio creator's different social media pages.
User Story: As a user, I can see thumbnail images of different projects the portfolio creator has built (if you haven't built any websites before, use placeholders.)
Bonus User Story: As a user, I navigate to different sections of the webpage by clicking buttons in the navigation.
Don't worry if you don't have anything to showcase on your portfolio yet - you will build several apps on the next few CodePen challenges, and can come back and update your portfolio later.
There are many great portfolio templates out there, but for this challenge, you'll need to build a portfolio page yourself. Using Bootstrap will make this much easier for you.
Remember to use Read-Search-Ask if you get stuck.
When you are finished, click the "I've completed this challenge" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.
Below you'll find some of my recent work.
Don't be shy! Say Hello!


Prithwi Sinha
Founder and CEO
Founder and CEO
Co-Founder
Chief Sales Officer
Chief Marketing Officer
Web Development Management
Product Manager
Product Manager
App Development Team Lead
Registered Students
Student has been helped to achieve their dreams
More than 10,000 people visits our site monthly
Ranked among the top 10 growing online learning startups in West Africa


For instructions: see the README file in /assets/scripts.
NB: When you complete an exploration the text "Exploration completed" should appear in the paragraph below it. This checks that events are being sent from the Oppia iframe to the containing page.


Evening Reading - November 22, 2019
It's time to confirm the end of the week. Here's your Friday Edition of Evening Reading.
by Asif KhanHey Shacknews, it's time for Evening Reading. Let's officially close out our day of posting. Please take a look.
Borat has a point about Facebook
Sacha Baron Cohen nailed down a lot of great points about Facebook in his ADL speech. Check out the full speech below.
Slack with the savage takedown on Microsoft Teams
Wow, Microsoft sure did steal that whole ball rolling on a table idea. We use Slack at Shacknews, and we like it just fine.
The Butt Fumble happened 7 years ago today
LOL.
Florida Dog is a good boy
What a good dog!
In case you missed it at Shacknews:
- Sonic the Hedgehog Arby's Kids Meals will have you going fast to the restroom
- Shack Chat: What game are you stoked to play over Thanksgiving break?
- Black Future '88 review: Failure is imminent
- Rooster Teeth VP arrested on felony domestic abuse charges
- Fortnite Fishing Frenzy Contest challenges players to angler royale
- WRATH: Aeon of Ruin brings fresh run n' gun gibs to Steam Early Access
- First Post! November 22, 2019
There you have it, Shacknews. Your Friday Edition of Evening Reading for November 22, 2019. Please consider subscribing to Shacknews Mercury to support our site for as little as $1/month. Here is a photo of Lola to brighten your night.
What are you up to this weekend? Let us know in the Shacknews Chatty comment thread below.


{% extends "base.html" %} {% load staticfiles %} {% block title %}ResearchCompendia Partners{% endblock %} {% block content %}
Organizations committed to promoting reproducibility and openness in the sciences, understand completely the mission we are attempting to further with ResearchCompendia. Researchers and institutions know full well the strain they are under to publish quickly and concisely, and are therefore pressured to share the minimum required of them in terms of data code and documentation. We wish to ease the burden on researchers while promoting a culture of well documented, sustainable and reproducible research, by making it easy and quick for them to publish, track, archive and link all relevant digital data and methods in one place.
Therefore, we are very interested in partnering with any institutions and organizations that make complementary efforts or have similar missions. We are eager to partner with groups and projects in all relevant realms, whether that be policy, promotion, technical tools for researchers, archival resources, research workflow improvement and tracking tools, or any other project, service or mission you might think also promotes this cause.
If you are interested in working with us or just wish to discuss plans and ideas, please contact us.
Any individuals who believe they have skills, connections, or resources relevant to the mission of ResearchCompendia for the promotion of open and reproducible research. Please contact us. We have an active fellows program and we would be eager to have you join our team. We can offer unique research experiences, and experience in the promotion and development of an advanced web app. We will only ask for whatever time and resource commitment you are comfortable with.
We are attempting to offer a valuable service to the world of academic research. The mission of reproducibility is not only directly beneficial to the careers of researchers, and to the advancement of science, but it is also incredibly important for the reconstruction of trust in the scientific and academic world. As retraction rates increase and more and more subfields are rocked by scandals or irreproducible research, support for the sciences in society also drops. We wish to show verifiably the rigor, impartiality, and integrity that we know most published research displays. To do this, we need to be able to provide the tools offered by ResearchCompendia reliably and stably.
For ResearchCompendia to sustainably host, archive, and track an increasingly large number of contributions, as well as support a growing active user base for our cloud resources, we need sustainable funding for data and code hosting, computational resources, promotional resources, and human resources. If you or your organization is interested in supporting our mission please contact us.
ResearchCompendia hosts code and data associated with articles published in scientific journals. Journal editors are welcome to invite and encourage the authors who publish in their journals to upload their code and data to ResearchCompendia. This invitation can be mentioned on the journal website and in the revision and acceptance letters. A example is provided below:
"The JOURNAL OF XXX would like to invite you to enrich and defend your article by uploading relevant computer code, data, and supplementary materials on the ResearchCompendia online repository. Your article will be then linked to a dedicated and easily citable ResearchCompendia website. To create a compendium, please go to: http://www.researchcompendia.org"
The service is completely free. Please contact us if you need more information.
It is in the interest of all scientific publications that the research they promote be fully verifiable and reproducible. The sharing of data and code has not only been shown to increase a journal's impact factor, by increasing citation rates, but also increases the trust in that journal because data sharing policies reduce the number of retractions published.
It is partly the responsibility of employing institutions to encourage a culture of responsible and reproducible research. It is important for the reputations of both the researchers and their host institutions. If you are a part of an institution that wishes to promote such values, we implore you to encourage your researchers to share their data, code and methods for all publications. Toward that goal, we would hope that you would list ResearchCompendia among the many other useful tools for researchers on any institutional documents or websites discussing such policies and practices.
If you wish to promote for, collaborate with, or to support ResearchCompendia in any other ways, please contact us.
ResearchCompendia is intended both as a tool to improve the communication of science, and to make the lives of publishing scientists easier. There are many reasons to create a compendium with our site:
Please create a compendium here if you wish to share data and code from your publications in a convenient and easily citable way. Please contact us if you have any questions, comments, or feature requests.
If you wish to verify, reproduce, or build on previous research, please browse our existing compendia and see if we have anything of interest. We will be adding remote execution and commenting functionality shortly.


Sai Raghavendra
Projects
Experience and Academics
Photography
CV
Charles, Boston
Prudential, MA
Chicago,IL
North Hampshire,NH
Salem
See more here


This example demonstrate how to add node above the clicked node.
To add parent node please click on Add Parent Node. To add leaf node, expand any parent node and click on Add Leaf Node


- Source:
Members
(static) types :String
A map of types used by `SPE.utils.ensureTypedArg` and
`SPE.utils.ensureArrayTypedArg` to compare types against.
Type:
- String
Properties:
| Name | Type | Description |
|---|---|---|
BOOLEAN |
String | Boolean type. |
STRING |
String | String type. |
NUMBER |
String | Number type. |
OBJECT |
String | Object type. |
- Source:
Methods
(static) arrayValuesAreEqual(array) → {Boolean}
Check if all items in an array are equal. Uses strict equality.
Parameters:
| Name | Type | Description |
|---|---|---|
array |
Array | The array of values to check equality of. |
- Source:
Returns:
Whether the array's values are all equal or not.
- Type
- Boolean
(static) clamp(value, min, max) → {Number}
Clamp a number to between the given min and max values.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
Number | The number to clamp. |
min |
Number | The minimum value. |
max |
Number | The maximum value. |
- Source:
Returns:
The clamped number.
- Type
- Number
(static) ensureArrayInstanceOf(arg, instance, defaultValue) → {Object}
Given an array of values, ensure the instances of all items in the array
matches the given instance constructor falling back to a default value if
the check fails.
If given value isn't an Array, delegates to `SPE.utils.ensureInstanceOf`.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
Array | Object | The value to perform the instanceof check on. |
instance |
function | The constructor of the instance to check against. |
defaultValue |
Object | A default fallback value if instance check fails |
- Source:
Returns:
The given value if type check passes, or the default value if it fails.
- Type
- Object
(static) ensureArrayTypedArg(arg, type, defaultValue) → {boolean|string|number|object}
Given an array of values, a type, and a default value,
ensure the given array's contents ALL adhere to the provided type,
returning the default value if type check fails.
If the given value to check isn't an Array, delegates to SPE.utils.ensureTypedArg.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
Array | boolean | string | number | object | The array of values to check type of. |
type |
String | The type that should be adhered to. |
defaultValue |
boolean | string | number | object | A default fallback value. |
- Source:
Returns:
The given value if type check passes, or the default value if it fails.
- Type
- boolean | string | number | object
(static) ensureInstanceOf(arg, instance, defaultValue) → {Object}
Ensures the given value is an instance of a constructor function.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
Object | The value to check instance of. |
instance |
function | The constructor of the instance to check against. |
defaultValue |
Object | A default fallback value if instance check fails |
- Source:
Returns:
The given value if type check passes, or the default value if it fails.
- Type
- Object
(static) ensureTypedArg(arg, type, defaultValue) → {boolean|string|number|object}
Given a value, a type, and a default value to fallback to,
ensure the given argument adheres to the type requesting,
returning the default value if type check is false.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
boolean | string | number | object | The value to perform a type-check on. |
type |
String | The type the `arg` argument should adhere to. |
defaultValue |
boolean | string | number | object | A default value to fallback on if the type check fails. |
- Source:
Returns:
The given value if type check passes, or the default value if it fails.
- Type
- boolean | string | number | object
(static) ensureValueOverLifetimeCompliance(property, minLength, maxLength)
Ensures that any "value-over-lifetime" properties of an emitter are
of the correct length (as dictated by `SPE.valueOverLifetimeLength`).
Delegates to `SPE.utils.interpolateArray` for array resizing.
If properties aren't arrays, then property values are put into one.
Parameters:
| Name | Type | Description |
|---|---|---|
property |
Object | The property of an SPE.Emitter instance to check compliance of. |
minLength |
Number | The minimum length of the array to create. |
maxLength |
Number | The maximum length of the array to create. |
- Source:
(static) interpolateArray(srcArray, newLength) → {Array}
Performs linear interpolation (lerp) on an array.
For example, lerping [1, 10], with a `newLength` of 10 will produce [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].
Delegates to `SPE.utils.lerpTypeAgnostic` to perform the actual
interpolation.
Parameters:
| Name | Type | Description |
|---|---|---|
srcArray |
Array | The array to lerp. |
newLength |
Number | The length the array should be interpolated to. |
- Source:
Returns:
The interpolated array.
- Type
- Array
(static) lerp(start, end, delta) → {Number}
Perform a linear interpolation operation on two numbers.
Parameters:
| Name | Type | Description |
|---|---|---|
start |
Number | The start value. |
end |
Number | The end value. |
delta |
Number | The position to interpolate to. |
- Source:
Returns:
The result of the lerp operation.
- Type
- Number
(static) lerpTypeAgnostic(start, end, delta) → {number|object|undefined}
Linearly interpolates two values of various types. The given values
must be of the same type for the interpolation to work.
Parameters:
| Name | Type | Description |
|---|---|---|
start |
number | Object | The start value of the lerp. |
end |
number | object | The end value of the lerp. |
delta |
Number | The delta posiiton of the lerp operation. Ideally between 0 and 1 (inclusive). |
- Source:
Returns:
The result of the operation. Result will be undefined if
the start and end arguments aren't a supported type, or
if their types do not match.
- Type
- number | object | undefined
(static) randomColor(attribute, index, base, spread)
Given an SPE.Shader attribute instance, and various other settings,
assign Color values to the attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
attribute |
Object | The instance of SPE.ShaderAttribute to save the result to. |
index |
Number | The offset in the attribute's TypedArray to save the result from. |
base |
Object | THREE.Color instance describing the start color. |
spread |
Object | THREE.Vector3 instance describing the random variance to apply to the start color. |
- Source:
(static) randomFloat(base, spread) → {Number}
Given a start value and a spread value, create and return a random
number.
Parameters:
| Name | Type | Description |
|---|---|---|
base |
Number | The start value. |
spread |
Number | The size of the random variance to apply. |
- Source:
Returns:
A randomised number.
- Type
- Number
(static) randomVector3(attribute, index, base, spread, spreadClamp)
Given an SPE.ShaderAttribute instance, and various other settings,
assign values to the attribute's array in a `vec3` format.
Parameters:
| Name | Type | Description |
|---|---|---|
attribute |
Object | The instance of SPE.ShaderAttribute to save the result to. |
index |
Number | The offset in the attribute's TypedArray to save the result from. |
base |
Object | THREE.Vector3 instance describing the start value. |
spread |
Object | THREE.Vector3 instance describing the random variance to apply to the start value. |
spreadClamp |
Object | THREE.Vector3 instance describing the multiples to clamp the randomness to. |
- Source:
(static) randomVector3OnDisc(attribute, index, base, radius, radiusSpread, radiusScale, radiusSpreadClamp)
Assigns a random vector 3 value to an SPE.ShaderAttribute instance, projecting the
given values onto a 2d-disc.
Parameters:
| Name | Type | Description |
|---|---|---|
attribute |
Object | The instance of SPE.ShaderAttribute to save the result to. |
index |
Number | The offset in the attribute's TypedArray to save the result from. |
base |
Object | THREE.Vector3 instance describing the origin of the transform. |
radius |
Number | The radius of the sphere to project onto. |
radiusSpread |
Number | The amount of randomness to apply to the projection result |
radiusScale |
Object | THREE.Vector3 instance describing the scale of each axis of the disc. The z-component is ignored. |
radiusSpreadClamp |
Number | What numeric multiple the projected value should be clamped to. |
- Source:
(static) randomVector3OnSphere(attribute, index, base, radius, radiusSpread, radiusScale, radiusSpreadClamp)
Assigns a random vector 3 value to an SPE.ShaderAttribute instance, projecting the
given values onto a sphere.
Parameters:
| Name | Type | Description |
|---|---|---|
attribute |
Object | The instance of SPE.ShaderAttribute to save the result to. |
index |
Number | The offset in the attribute's TypedArray to save the result from. |
base |
Object | THREE.Vector3 instance describing the origin of the transform. |
radius |
Number | The radius of the sphere to project onto. |
radiusSpread |
Number | The amount of randomness to apply to the projection result |
radiusScale |
Object | THREE.Vector3 instance describing the scale of each axis of the sphere. |
radiusSpreadClamp |
Number | What numeric multiple the projected value should be clamped to. |
- Source:
(static) roundToNearestMultiple(n, multiple) → {Number}
Rounds a number to a nearest multiple.
Parameters:
| Name | Type | Description |
|---|---|---|
n |
Number | The number to round. |
multiple |
Number | The multiple to round to. |
- Source:
Returns:
The result of the round operation.
- Type
- Number
(static) zeroToEpsilon(value, randomise) → {Number}
If the given value is less than the epsilon value, then return
a randomised epsilon value if specified, or just the epsilon value if not.
Works for negative numbers as well as positive.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
Number | The value to perform the operation on. |
randomise |
Boolean | Whether the value should be randomised. |
- Source:
Returns:
The result of the operation.
- Type
- Number


{% extends 'timepiece/invoice/base.html' %} {% load timepiece_tags bootstrap_toolkit %} {% load url from future %} {% block title %}Invoices{% endblock title %} {% block content %}
| Invoice | Reference | Project | Status | Invoiced by | Created on | Starting on | Ending on | Comments |
|---|---|---|---|---|---|---|---|---|
| {{ invoice.pk }} | {{ invoice.number|default:'' }} | {{ invoice.project }} | {{ invoice.status|capfirst }} | {{ invoice.user.get_name_or_username }} | {{ invoice.created|date:'M j, Y P' }} | {{ invoice.start|date:'M j, Y'}} | {{ invoice.end|date:'M j, Y'}} | {{ invoice.comments|truncatewords:12 }} |
There are no invoices.
{% endif %}


VW CEO says new ID.3 car 40per cent cheaper to build than electric Golf
Volkswagen's new ID.3 electric vehicle will be 40per cent cheaper to build than the electric version of its Golf model, Chief Executive Herbert Diess told investors on Monday.
FRANKFURT: Volkswagen's new ID.3 electric vehicle will be 40per cent cheaper to build than the electric version of its Golf model, Chief Executive Herbert Diess told investors on Monday.
The battery in the new ID.3 can be used to add structural rigidity to the body and the modular layout of the battery allows for advantages in packaging and economies of scale.
"If you focus on an electric platform, all in all it accounts for a 40per cent reduction against the predecessor electric Golf," Diess said. "Most of it from cells and the battery system. Around 5-10per cent comes from dedicating an entire plant to electric vehicles."
This cost reduction is one of the reasons that Volkswagen is confident it can shift from making combustion-engined to electric cars without eroding the company's profit margin, VW said.
(Reporting by Edward Taylor; Editing by Ludwig Burger)


'br}
'br}
{\
piconv -- iconv(1), reinvented in perl
piconv [-f from_encoding] [-t to_encoding] [-p|--perlqq|--htmlcref|--xmlcref] [-C N|-c] [-D] [-S scheme] [-s string|file...] piconv -l piconv -r encoding_alias piconv -h
piconv is perl version of iconv, a character encoding converter widely available for various Unixen today. This script was primarily a technology demonstrator for Perl 5.8.0, but you can use piconv in the place of iconv for virtually any case.
piconv converts the character encoding of either s-1STDINs0 or files specified in the argument and prints out to s-1STDOUT.s0
Here is the list of options. Some options can be in short format (-f) or long (--from) one.
-f,--from \fIfrom_encoding\fR 4
Specifies the encoding you are converting from. Unlike iconv, this option can be omitted. In such cases, the current locale is used.
Specifies the encoding you are converting to. Unlike iconv, this option can be omitted. In such cases, the current locale is used.
Therefore, when both -f and -t are omitted, piconv just acts like cat.
uses string instead of file for the source of text.
Lists all available encodings, one per line, in case-insensitive order. Note that only the canonical names are listed; many aliases exist. For example, the names are case-insensitive, and many standard and common aliases work, such as *(L"latin1*(R" for *(L"s-1ISO-8859-1*(R",s0 or *(L"ibm850*(R" instead of *(L"cp850*(R", or *(L"winlatin1*(R" for *(L"cp1252*(R". See Encode::Supported for a full discussion.
-r,--resolve \fIencoding_alias\fR 4
Resolve encoding_alias to Encode canonical encoding name.
Check the validity of the stream if N = 1. When N = -1, something interesting happens when it encounters an invalid character.
Same as f(CW*(C`-C 1*(C'.
Transliterate characters missing in encoding to ex{s-1HHHHs0} where s-1HHHHs0 is the hexadecimal Unicode code point.
Transliterate characters missing in encoding to &#NNN; where s-1NNNs0 is the decimal Unicode code point.
Transliterate characters missing in encoding to &#xHHHH; where s-1HHHHs0 is the hexadecimal Unicode code point.
Show usage.
Invokes debugging mode. Primarily for Encode hackers.
Selects which scheme is to be used for conversion. Available schemes are as follows:
Uses Encode::from_to for conversion. This is the default.
Input strings are decode()d then encode()d. A straight two-step implementation.
The new perlIO layer is used. s-1NI-Ss0' favorite.
You should use this option if you are using s-1UTF-16s0 and others which linefeed is not $/.
Like the -D option, this is also for Encode hackers.
iconv|(1) locale|(3) Encode Encode::Supported Encode::Alias PerlIO


Shared code Server-Client
- Traditionally the client-side code and server-side code has been written in separate languages
- Algorithms are often implemented twice
- Abusive Ajax calls to centralize the logic
- What about Node.js? Yes... but not. "Write everything twice to write everything in Javascript"
With Scala.js, you can utilize the same libraries you use writing your Scala servers when writing your Scala web clients!
- Not having to find two libraries to do a particular common task
- Not needing to implement the same algorithms twice
- Avoid duplicating logic between the client and server


Before Change
results = sl(self.dataset)
// only two spheres but error for all CV-folds
self.failUnlessEqual(results.shape, (len(self.dataset.UC), 2))
// test if we graciously puke if center_ids are out of bounds
dataset0 = self.dataset[:, :50] // so we have no 50th feature
self.failUnlessRaises(IndexError, sl, dataset0)
After Change
// dataset itself
sls = (sphere_searchlight(cv, radius=0, center_ids=[3,50]),
sphere_searchlight(cv, radius=0, center_ids="center_ids"))
for sl in sls:
// run searchlight
results = sl(ds)
// only two spheres but error for all CV-folds
self.failUnlessEqual(results.shape, (len(self.dataset.UC), 2))
// test if we graciously puke if center_ids are out of bounds
dataset0 = ds[:, :50] // so we have no 50th feature
self.failUnlessRaises(IndexError, sls[0], dataset0)
// but it should be fine on the one that gets the ids from the dataset
// itself


ADMIN PANEL
LOGOUT
TOTAL USERS
: {{tnu}}
USERS IN PAST 24H
: {{tnu24}}
TOTAL TEAMS REGISTERED
: {{tteams}}
ADD TEAMS
{% block main %} {% endblock main %}


Before Change
from setuptools import setup, find_packages
setup(
name = "vaderSentiment",
//packages = ["vaderSentiment"], // this must be the same as the name above
packages = find_packages(exclude=["tests*"]), // a better way to do it than the line above -- this way no typo/transpo errors
include_package_data=True,
version = "2.1",
description = "VADER Sentiment Analysis. VADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media, and works well on texts from other domains.",
author = "C.J. Hutto",
author_email =<EMAIL_ADDRESS>license = "MIT License: http://opensource.org/licenses/MIT",
url = "https://github.com/cjhutto/vaderSentiment", // use the URL to the github repo
download_url = "https://github.com/cjhutto/vaderSentiment/archive/master.zip",
keywords = ["vader", "sentiment", "analysis", "opinion", "mining", "nlp", "text", "data",
"text analysis", "opinion analysis", "sentiment analysis", "text mining", "twitter sentiment",
"opinion mining", "social media", "twitter", "social", "media"], // arbitrary keywords
classifiers = ["Development Status :: 4 - Beta", "Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License", "Natural Language :: English",
"Programming Language :: Python :: 2.7", "Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Text Processing :: Linguistic",
"Topic :: Text Processing :: General"],
)
After Change
import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.


Cameron Hutchings Personal PortfolioComputer Science Student At Brock Univeristy linkedin accountgithub account My name is cameron hutchings and i am a computer science student at Brock University |
| Date | Locations |
|---|---|
| May 2017 | Production Engineer Technician |
| May 2016 | Student Technician |
|
|


A recursive decent parser for JSON messages.
More...
#include <parser.hpp>
|
| static std::unique_ptr< json > | parse (std::istream &i) |
| |
| static std::unique_ptr< json > | parse (int fd) |
| |
| static std::unique_ptr< json > | parse (FILE *f) |
| |
| static std::unique_ptr< json > | parse (const char *s) |
| |
| static std::unique_ptr< json > | parse (const std::string &s) |
| |
| static std::unique_ptr< json > | load (const std::string &file_name) |
| |
A recursive decent parser for JSON messages.
A class to parse JSON messages from an input source and store the results in a json object instance.
Definition at line 55 of file parser.hpp.
| parser::parser |
( |
reader & |
r, |
|
|
bool |
read_all = true , |
|
|
size_t |
p_max_token_length = max_token_length , |
|
|
size_t |
p_max_nesting_depth = max_nesting_depth , |
|
|
bool |
p_convert_numbers = true , |
|
|
bool |
p_fallback_to_double = true , |
|
|
bool |
p_convert_strings = true |
|
) |
| |
Constructor. Create a parser that will read from the given reader. If you need to read from some other type of source, then create an appropriate derived class of reader and pass that in here.
- Parameters
-
| r | Where to read the message from. |
| read_all | If true, read the whole file to the end and throw an exception if there is anything other than white space following a parseable JSON message. If false, read until the end of the first parseable JSON message and leave it at that. |
| p_max_nesting_depth | The maximum total depth of nested objects and arrays allowed. |
| p_max_token_length | The maximum length of any individual token, You can change this if you have a strangely huge string in a message or you can make it smaller if you have very constrained memory availability. |
| p_convert_numbers | If true, convert numbers to ints or doubles as appropriate. If false, create the json instance using the json(type, raw_string) method but don't do the numeric conversion. This allows the caller to write custom code to handle numbers outside of the normal int & double ranges. |
| p_fallback_to_double | If true, convert integers that are too large to be stored as an int into doubles instead. |
| p_convert_strings | If true, convert strings into UTF-8 encoded STL strings. If false, create the json instance using the json(type, raw_string) method but leave the caller to do any conversion. This is useful when dealing with messages with broken Unicode characters and the like in them. |
- Exceptions
-
| json_parser_exception | Thrown when there is something syntactically wrong with the message. |
| json_io_exception | Thrown when something goes wrong with reading. |
| json_utf_exception | Thrown when an invalid string is found in the message. |
Definition at line 47 of file parser.cpp.
| unique_ptr< json > parser::load |
( |
const std::string & |
file_name | ) |
|
|
static |
Convenience method. Open a file, parse the entire contents, then close it. The file_name parameter is the name of the file.
- Parameters
-
| file_name | File name to read the message from. |
- Exceptions
-
| json_io_exception | Thrown when something goes wrong with reading. |
| json_utf_exception | Thrown when an invalid string is found in the message. |
Definition at line 365 of file parser.cpp.
| unique_ptr< json > parser::parse |
( |
std::istream & |
i | ) |
|
|
static |
Convenience method. Parse a JSON message read from an istream. If you need more detailed control of the options, create a reader and parser object directly.
- Parameters
-
| i | Where to read the message from. |
- Exceptions
-
| json_io_exception | Thrown when something goes wrong with reading. |
| json_utf_exception | Thrown when an invalid string is found in the message. |
Definition at line 330 of file parser.cpp.
| unique_ptr< json > parser::parse |
( |
int |
fd | ) |
|
|
static |
Convenience method. Parse a JSON message read from a POSIX file descriptor. If you need more detailed control of the options, create a reader and parser object directly.
- Parameters
-
| fd | Where to read the message from. |
- Exceptions
-
| json_io_exception | Thrown when something goes wrong with reading. |
| json_utf_exception | Thrown when an invalid string is found in the message. |
Definition at line 338 of file parser.cpp.
| unique_ptr< json > parser::parse |
( |
FILE * |
f | ) |
|
|
static |
Convenience method. Parse a JSON message read from a stdio file. If you need more detailed control of the options, create a reader and parser object directly.
- Parameters
-
| f | Where to read the message from. |
- Exceptions
-
| json_io_exception | Thrown when something goes wrong with reading. |
| json_utf_exception | Thrown when an invalid string is found in the message. |
Definition at line 346 of file parser.cpp.
| unique_ptr< json > parser::parse |
( |
const char * |
s | ) |
|
|
static |
Convenience method. Parse a JSON message read from a string. If you need more detailed control of the options, create a reader and parser object directly.
- Parameters
-
| s | Where to read the message from. |
- Exceptions
-
| json_io_exception | Thrown when something goes wrong with reading. |
| json_utf_exception | Thrown when an invalid string is found in the message. |
Definition at line 353 of file parser.cpp.
| unique_ptr< json > parser::parse |
( |
const std::string & |
s | ) |
|
|
static |
Convenience method. Parse a JSON message read from a string. If you need more detailed control of the options, create a reader and parser object directly.
- Parameters
-
| s | Where to read the message from. |
- Exceptions
-
| json_io_exception | Thrown when something goes wrong with reading. |
| json_utf_exception | Thrown when an invalid string is found in the message. |
Definition at line 359 of file parser.cpp.
| unique_ptr< json > parser::parse |
( |
| ) |
|
Parse a single json object from the stream. The object is dynamically allocated to prevent the need to make a deep copy at any point.
Definition at line 306 of file parser.cpp.
| const size_t argo::parser::max_nesting_depth = 1000 |
|
static |
The default maximum nesting depth (objects and arrays) of a message that can be parsed.
Definition at line 72 of file parser.hpp.
| const size_t argo::parser::max_token_length = 100*1024 |
|
static |
The default maximum length of any individual lexical token (string and number being the relevant ones in this context).
Definition at line 66 of file parser.hpp.
The documentation for this class was generated from the following files:


---
layout: post
title: ! 'Top Tip: How to become a UNIX Geek'
tags:
- Education
- Linux
status: publish
type: post
published: true
meta:
_edit_last: '451289'
---
I have no idea if this will work for everyone, but this is how I became a UNIX (and later Linux) geek:
- Read "The UNIX Programming Environment", Ch 1-5 at least. An excellent introduction to the philosophy of UNIX as well as the basics of using it as a user and later a programmer.
- Get a copy of "UNIX Power Tools" as a desktop reference; however you aim to read it all.
- Make sure you have a network connected UNIX/Linux system on which you can lavish loving care and practice your new skills
- Keep reading books, manuals, articles, blogs, forums etc etc.


#include <PLCrashReport.h>
Public Attributes | |
| const char | magic [7] |
| Crash log magic identifier, not NULL terminated. | |
| const uint8_t | version |
| Crash log encoding/format version. | |
| const uint8_t | data [] |
| File data. |
Crash log files start with 7 byte magic identifier (PLCRASH_REPORT_FILE_MAGIC), followed by a single unsigned byte version number (PLCRASH_REPORT_FILE_VERSION). The crash log message format itself is extensible, so this version number will only be incremented in the event of an incompatible encoding or format change.


I'm a communications professional who enjoys learning about technology.
I have experience with the following:
I would be happy to tell you more about what I do. The best way to reach me is via email at ts@email.com.


***********************************************************
Bottoms Up
All AE Shorts
Under $30
Endless Options For Every Adventure In Every Length You Love
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo22d?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Shop Now
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo22f?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Malia
Surfer From Haleiwa, HI
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo22h?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
Take Your Look Up A Notch…
 Any Style. Any Order.
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo14?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
Summer Lovin’
aerie® Bras, Undies & More
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo22o?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo29?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Forward
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo7?RAF_TRACK=&AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Become A Fan On Facebook
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo27?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Follow Us On Twitter
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo30?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Instagram
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo5?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Pinterest
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo28?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
shopkick
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo1?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
Come Hang Out…Find A Store
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo26?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Mobile Alerts
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo6?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Download The AE App
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo24?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Earn Up To 40% Off
Sign Up For AEREWARDS
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo25?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
Beginning May 30, 2013 at 3:00 am EDT through June 5,
2013 at 11:59 pm PDT, get all AE shorts for under $30, valid in AE
Stores and at AE.com. This discount applies to AE merchandise costs
only, not tax and shipping & handling costs. Not applicable toward
previously purchased merchandise. Offer excludes Aerie. AE shorts under
$30 promotion and associated terms & conditions subject to change at
AE’s sole discretion.
Beginning May 30, 2013 at 3:00 am EDT through June 5, 2013 at 11:59 pm
PDT, buy any AE Top and get a second AE Top of equal or lesser value for
50% off only in AE Stores and AE.com. When adding multiple products of
different prices to the same order, the discount is applied to the
lowest priced qualifying item(s). Discount applies to AE merchandise
costs only, not tax and shipping & handling costs. Not applicable toward
previously purchased merchandise. Excludes AE clearance, AEO Factory 40%
Off Shop, Aerie and merchandise from these brands: Adidas, Bass, BC, Bed
Stu, Birkenstock, Chronicle, Clarks, Creative Rec, DV, Eastland, GOLA,
Havaianas, Keds, Me Too, MIA, Minnetonka, New Balance, New Balance/PF
Flyers, Old Soles, Palladium, Pro Keds, Reebok, Saucony, Seychelles,
Sperry, Steve Madden, Sweet Shoes, Tailgate, Timberland, Tretorn, Volley
and college and pro merchandise. Discount promotion and associated terms
and conditions subject to change at AE’s sole discretion.
Offer valid on Clearance items beginning May 30, 2013 at 3:00 am EDT
through June 5, 2013 at 11:59 pm PDT only at ae.com and at AE stores.
50% off discount is automatically applied once a Clearance item(s) is
added to the ae.com shopping bag. This 50% off offer can be combined
with other discount offers. No discount code is required at the AE.com
shopping bag. Discount applies to merchandise costs only, not tax and
shipping & handling costs. This discount is not redeemable for cash, nor
is it valid toward any previously purchased merchandise or the purchase
of merchandise certificates, gift cards or e-gift cards. Offer excludes
Aerie and AEO Factory store merchandise, and merchandise from these
brands: Adidas, Bass, BC, Bed Stu, Birkenstock, Clarks, Creative Rec,
DV, Eastland, GOLA, Junk Food, MIA, Minnetonka, New Balance, New
Balance/PF Flyers, Palladium, Reebok, Steve Madden, Tailgate,
Timberland, and Tretorn and college and pro merchandise. Discount and
associated terms & conditions subject to change at AE’s sole discretion.
© 2013 AEO MANAGEMENT CO. ALL RIGHTS RESERVED.
***********************************************************
Update Your Email Address:
<EMAIL_ADDRESS>Sign Up For Email:
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo23?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Privacy Policy:
http://e.ae.com/a/tBRpz$3B7uylYB8y3BgNuZn6SKI/aeo21?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Add<EMAIL_ADDRESS>to your address book.
Our mailing address: 77 Hot Metal Street, Pittsburgh, PA 15203


 For
the most part, Telekinesis can be pulled off just as quickly as a Hex. So if you're worried an initiator
is about to blink in and start a team fight, keep spam casting and canceling it on their initiator so
that once they blink in range, you'll instantly pick them up.
- Rubick has to be facing the direction that you want to cast Telekinesis Land, so if you're trying to
escape either cast the Land immediately after picking an enemy up or not at all.
- Generally you want to cast the Land as soon as possible anyway so that your allies can see where you're
dropping the enemy and can plan accordingly.
- If you're getting chased by multiple heroes, it can be smart to cast the Land towards you, rather than
away from you. During the Lift's duration, the other enemies will have probably passed your target up,
so the Land should stun them on the way back.
- One of the hallmarks of a strong anti-pusher is the ability to draw aggro from a creep wave off of a
tower during pushes. Fade Bolt is probably one of the strongest spells in the game to do this, mainly
because of its zero cast time, huge range, damage reduction ability, and substantial nuke damage. When
you want to slow down the enemy's push, cast it on the creep wave and the creeps will lose interest in
hammering your tower and come for you instead.
- Fade Bolt bounces always take the shortest possible distance when jumping from target to target.
- You can Spell Steal through spell immunity. Just because Enigma is a big golden tear drop doesn't mean
you can't steal Black Hole through BKB.
- Patience is a virtue. Don't steal spells all willy nilly. Go into a team fight knowing the spells that
you would want to steal and wait for them to be cast. You'll only be able to steal ~2 spells per team
fight, so make them count.
- Rubick has zero cast times on any stolen spells. Forget everything you know about landing Leshrac's
Split Earth, be amazed at how you can ejaculate a Fissure in a split second, and revel in how much
better a spell Zeus's Lightning Bolt is when you don't have to fist pump for half a second to cast it.
Counters
- Rubick being in your lane automatically adds another ~375 units that you need to keep in your safety
zone because of instant Telekinesis. Don't let him into your zone.
- Rubick is all about capitalizing on your forgetfulness/laziness. "Oh right, they have a Rubick, I should
have cast Anchor Smash after Ravage. I should have cast Blade Fury after Omnislash. I should have cast
Flak Cannon after Rocket Barrage." Put a condom on all of your spells, it's 99% effective.
- Always check what spell Rubick has stolen by clicking on him. If you're Pudge and Rubick just
Ghostbuster'd your essence, there is a big difference in how the next minute is going to go down if he
stole Rot or if he stole Meat Hook.


RISC-V GNU toolchain with custom instructions
How to add custom instructions and register files to the RISC-V GNU toolchain.
There are several online tutorials available on how to add custom instructions to the RISC-V GNU toolchain. Two notable examples are Hadi’s tutorial here and Vivek’s tutorial here. However, these tutorials do not cover situations that involve adding new register files to the architecture. Although such cases may be rare, they are still possible, as demonstrated by the xBGAS project here. This post provides a summary of the steps I followed to add custom instructions and register files to the RISC-V GNU toolchain in order to support the xBGAS architecture. The source code will be provided at the end of this post.
1. The RISC-V Opcodes Tool.
Before we modify the RISC-V GNU toolchain, we need to generate the MATCH and MASK hexadecimal values which will be used later. The RISC-V Opcodes Tool is a Python script that can generate the MATCH and MASK values for custom instructions. It can be found here. We clone the repository:
git clone https://github.com/riscv/riscv-opcodes
In the unratified
folder, we create a new file rv64_xbgas
and add the following lines:
eld rd rs1 imm12 14..12=3 6..2=0x1D 1..0=3
eaddie rd rs1 imm12 14..12=7 6..2=0x1E 1..0=3
...
For the encoding syntax, you may refer to the README
of the riscv-opcodes
repository. After we add the instructions, we simply run make
and the MATCH and MASK values can be found in the generated encoding.out.h
file. For the xBGAS
RISC-V extension, the MATCH and MASK values are like this:
#define MATCH_EADDIE 0x707b
#define MASK_EADDIE 0x707f
#define MATCH_ELD 0x3077
#define MASK_ELD 0x707f
...
DECLARE_INSN(eld, MATCH_ELD, MASK_ELD)
DECLARE_INSN(eaddie, MATCH_EADDIE, MASK_EADDIE)
...
2. The RISC-V GNU/GCC Binutils.
Modifying the GCC compiler itself is complex and not necessary in most cases. We only need to modify the binutils, which is a collection of binary utility tools developed by the GNU project. The binutils can be found here. We need to modify the following files:
include/opcodes/riscv-opc.h
include/opcode/riscv.h
opcodes/riscv-opc.c
opcodes/riscv-dis.c
gas/config/tc-riscv.c
2.1 include/opcodes/riscv-opc.h
In this file, we add #define
and DECLARE_INSN
elements we generated in the previous step and put them in the appropriate blocks. #define
should be put before #endif /* RISCV_ENCODING_H */
and DECLARE_INSN
should be put after #ifdef DECLARE_INSN
.
Adding the #define
:
/* xBGAS instructions */
#define MATCH_EADDI 0x607b
#define MASK_EADDI 0x707f
#define MATCH_EADDIE 0x707b
#define MASK_EADDIE 0x707f
...
Adding the DECLARE_INSN
:
/* xBGAS instructions. */
DECLARE_INSN(eaddi, MATCH_EADDI, MASK_EADDI)
DECLARE_INSN(eaddie, MATCH_EADDIE, MASK_EADDIE)
...
2.2 include/opcode/riscv.h
In this file, we add the following declarations:
extern const char * const riscv_xbgas_names_numeric[NGPR];
riscv_xbgas_names_numeric
is the data structure that stores the names of the new register files; we will define it in the next step. NGPR
is the MARCO of the number of registers in the register file. For the xBGAS
extension, we have 32 registers in the register file.
2.3 opcodes/riscv-opc.c
At the beginning of this file, similar to other register names, we define the registers for xBGAS:
const char *const riscv_xbgas_names_numeric[NGPR] =
{
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8",
"e9", "e10", "e11", "e12", "e13", "e14", "e15", "e16", "e17",
"e18", "e19", "e20", "e21", "e22", "e23", "e24", "e25", "e26",
"e27", "e28", "e29", "e30", "e31"
};
The opcode or instruction definitions are in the riscv_opcodes
array: const struct riscv_opcode riscv_opcodes[]
. We add the following lines to the end of the array and before {0, 0, INSN_CLASS_NONE, 0, 0, 0, 0, 0}
:
/* xBGAS instructions */
{"eld", 64, INSN_CLASS_I, "d,o(s)", MATCH_ELD, MASK_ELD, match_opcode, 0 },
{"eaddie", 64, INSN_CLASS_I, "G,s,o", MATCH_EADDIE,MASK_EADDIE,match_opcode, 0 },
...
For the meaning of the fields in the riscv_opcode
structure, you may refer to the structure definition in the include/opcode/riscv.h
file.
2.4 opcodes/riscv-dis.c
We made the following changes in this file:
- Add
static const char * const *riscv_xbgas_names;
to hold the register names used by the disassembler. - Add
static const char * const *riscv_xbgas_names;
in the functionsset_default_riscv_dis_options
andparse_riscv_dis_option_without_args
function (afterriscv_fpr_names = ...
).
In the print_insn_args
function, we add the following lines to switch (*oparg)
:
case 'H': /* EXT1: xBGAS extended register */
print (info->stream, dis_style_register, "%s",
riscv_xbgas_names[rs1]);
break;
case 'J': /* EXT2, xBGAS extended register */
print (info->stream, dis_style_register, "%s",
riscv_xbgas_names[EXTRACT_OPERAND (RS2, l)]);
break;
case 'G': /* EXTD/EXT3, xBGAS extended register */
print (info->stream, dis_style_register, "%s",
riscv_xbgas_names[rd]);
break;
The H
, J
and G
will also be used in the next step.
2.5 gas/config/tc-riscv.c
In this file, we made the following changes.
In the reg_class
enumeration, we add the RCLASS_XBGAS
before RCLASS_MAX
. The reg_class
should be like this:
enum reg_class
{
RCLASS_GPR,
RCLASS_FPR,
RCLASS_VECR,
RCLASS_VECM,
RCLASS_XBGAS,
RCLASS_MAX,
RCLASS_CSR
};
Note that RCLASS_XBGAS
should be before RCLASS_MAX
, otherwise, the assembler will not recognize the new register class.
In the validate_riscv_insn
function, we add the following lines to switch (*oparg)
:
- Add
case 'G': /* EXTD/EXT3, xBGAS extended register. */
beforecase 'd': USE_BITS (OP_MASK_RD, OP_SH_RD); break;
. - Add
case 'H': /* EXT1, xBGAS extended register. */
beforecase 's': USE_BITS (OP_MASK_RS1, OP_SH_RS1); break;
. - Add
case 'J': /* EXT2, xBGAS extended register. */
beforecase 't': USE_BITS (OP_MASK_RS2, OP_SH_RS2); break;
.
The G
, H
and J
are the same as the ones in the opcodes/riscv-dis.c
file; they should be unique and not used by other cases.
In the md_begin
function, we add the following lines after other hash_reg_names
functions:
hash_reg_names (RCLASS_XBGAS, riscv_xbgas_names_numeric, NGPR);
In the riscv_ip
function, we add the following lines to switch (*oparg)
:
case 'G': /* EXTD xBGAS destination register */
case 'H': /* EXT1 xBGAS register */
case 'J': /* EXT2 xBGAS register */
if( reg_lookup (&asarg, RCLASS_XBGAS, ®no))
{
char c = *oparg;
if (*asarg == ' ')
++asarg;
/* Now that we have assembled one operand, we use the args
string to figure out where it goes in the instruction. */
switch (c)
{
case 'G':
INSERT_OPERAND (RD, *ip, regno);
break;
case 'H':
INSERT_OPERAND (RS1, *ip, regno);
break;
case 'J':
INSERT_OPERAND (RS2, *ip, regno);
break;
}
continue;
}
break;
In the tc_riscv_regname_to_dw2regnum
function, we add the following lines:
if ((reg = reg_lookup_internal (regname, RCLASS_XBGAS)) >= 0)
return reg + 128;
3. RISC-V GNU Compiler Toolchain
The original RISC-V GNU Compiler Toolchain can be found at the repo. However, as we modified the binutils
, we need to redirect the binutils submodule to our modified version. We can do this by forking the repo and modifying the .gitmodules
file in the RISC-V GNU Compiler Toolchain repo. The .gitmodules
file should be like this:
[submodule "binutils"]
path = binutils
url = https://github.com/Artlands/binutils-xbgas.git
branch = xbgas
...
After that, we run git submodule sync
to update the submodule. Then we can build the RISC-V GNU Compiler Toolchain as usual.
For the xBGAS supported RISC-V GNU Compiler Toolchain, please refer to the repo. The binutils
submodule is redirected to our modified version which can be found at the repo.