PerCuriam
SUPREME COURT OF THE UNITED STATES
FORD MOTOR COMPANY v. UNITED STATES
Per Curiam.
When a taxpayer overpays his taxes, he is generally entitled to interest from the Government for the period between the payment and the ultimate refund. See 26 U. S. C. §6611(a). That interest begins to run “from the date of overpayment.” §§6611(b)(1), (b)(2). But the Code does not define “the date of overpayment.”
In this case, after the Internal Revenue Service advised Ford Motor Company that it had underpaid its taxes from 1983 until 1989, Ford remitted a series of deposits to the IRS totaling $875 million. Those deposits stopped the ac-crual of interest that Ford would otherwise owe once the audits were completed and the amount of its underpayment was finally determined. See §6601; Rev. Proc. 84–58, 1984–2 Cum. Bull. 501. Later, Ford requested that the IRS treat the deposits as advance payments of the additional tax that Ford owed. Eventually the parties determined that Ford had overpaid its taxes in the relevant years, thereby entitling Ford to a return of the over-payment as well as interest. But the parties disagreed about when the interest began to run under 26 U. S. C. §6611(b)(1). Ford argued that “the date of overpayment” was the date that it first remitted the deposits to the IRS. Ibid. The Government countered that the date of overpayment was the date that Ford requested that the IRS treat the remittances as payments of tax. The difference between the parties’ competing interpretations of §6611(b) is worth some $445 million.
Ford sued the Government in Federal District Court, asserting jurisdiction under 28 U. S. C. §1346(a)(1). The Government did not contest the court’s jurisdiction. See Brief in Opposition 3, n. 3. The District Court accepted the Government’s construction of §6611(b) and granted its motion for judgment on the pleadings. A panel of the Court of Appeals for the Sixth Circuit affirmed, concluding that §6611 is a waiver of sovereign immunity that must be construed strictly in favor of the Government. 508 Fed. Appx. 506 (2012).
Ford sought certiorari, arguing that the Sixth Circuit was wrong to give §6611 a strict construction. In Ford’s view, it is 28 U. S. C. §1346—not §6611—that waives the Government’s immunity from this suit, and §6611(b) is a substantive provision that should not be construed strictly. See Gómez-Pérez v. Potter, 553 U. S. 474, 491 (2008) ; United States v. White Mountain Apache Tribe, 537 U. S. 465–473 (2003). In its response to Ford’s petition for certiorari, however, the Government contended for the first time that §1346(a)(1) does not apply at all to this suit; it argues that the only basis for jurisdiction, and “the only general waiver of sovereign immunity that encompasses [Ford’s] claim,” is the Tucker Act, 28 U. S. C. §1491(a). Brief in Opposition 3, n. 3. Although the Government acquiesced in jurisdiction in the lower courts, if the Government is now correct that the Tucker Act applies to this suit, jurisdiction over this case was proper only in the United States Court of Federal Claims. See §1491(a).
This Court “is one of final review, ‘not of first view.’ ” FCC v. Fox Television Stations, Inc., 556 U. S. 502, 529 (2009) (quoting Cutter v. Wilkinson, 544 U. S. 709, 718, n. 7 (2005) ). The Sixth Circuit should have the first opportunity to consider the Government’s new contention with respect to jurisdiction in this case. Depending on that court’s answer, it may also consider what impact, if any, the jurisdictional determination has on the merits issues, especially whether or not §6611 is a waiver of sovereign immunity that should be construed strictly.
The petition for certiorari is granted, the judgment of the Sixth Circuit is vacated, and the case is remanded for further proceedings.
It is so ordered.


Foreword
This document is intended as a reference manual for the Topoi language. It lists the language constructs, and gives their precise syntax and informal semantics. It is by no means a tutorial introduction to the language.
In future we will make a proper landing page for the language. But right now it serves as our internal team's draft.
Notations
The syntax of the languages is given in BNF-like notation.
Where square brackets [...]
denote optional components, curly brackets {...}
denotes zero, one or several repetitions of the encolesd components.
Curly brackets with a trailing asterisk sign {...}*
denote one or several repetitions of the encolosed components.
Parentheses (...)
denote grouping of components.
Identifier and Keywords
identifier ::= letter (letter | "_" | "'" )* | "_" identifier
qualified_identifier ::= (identifier ".")+
When referencing something inside a module or a record, or a tuple, we use a qualified name (qualified_identifier
).
Comment and Documentation
prefix ::= letter (letter | "_" | "'" )* | "_" prefix
comment ::= "--" (char)* newline
doc_comment ::= "--|" (char)* newline
prefixed_doc_comment ::= "--|" prefix "|" (char)* newline
block_comment ::= "--[" (char)* "]--"
prefixed_block_comment ::= "--[" prefix "|" (char)* "]--"
Content enclosed in documentation comment (doc_comment
) and prefixed block comment (prefixed_block_comment
) are conversed in AST and will be output or generated as web content.
The prefix is just a name that will let compiler pass to know what generator used to process the content inside the doc comment or block comment. eg.: LaTex, KaTeX, markdown...


(Jetstream startup instructions HERE.)
—
You should now be logged into your Jetstream computer! You should see something like this:
ubuntu@ip-172-30-1-252:~$
this is the command prompt.
Run:
sudo apt-get -y update && \
sudo apt-get -y install trimmomatic fastqc python-pip \
samtools zlib1g-dev ncurses-dev python-dev
Install anaconda:
curl -O https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
bash Anaconda3-4.2.0-Linux-x86_64.sh
Then update your environment and install khmer:
source ~/.bashrc
pip install -U setuptools
pip install -U pip
pip install -U Cython
pip install https://github.com/dib-lab/khmer/archive/master.zip
Let’s also run a Jupyter Notebook. First, configure it a teensy bit more securely, and also have it run in the background:
jupyter notebook --generate-config
cat >>~/.jupyter/jupyter_notebook_config.py <<EOF
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:5d813e5d59a7:b4e430cf6dbd1aad04838c6e9cf684f4d76e245c'
c.NotebookApp.port = 8000
EOF
Now, run!
jupyter notebook &
On Jetstream, you can get the Web page address by executing:
Note, the password is ‘davis’.
Note
If your network blocks port 8000 (e.g. cruznet at UCSC), you can run:
ssh -N -f -L localhost:8000:localhost:8000 username@remotehost
to tunnel the remote Jupyter notebook server over SSH.
We’re going to be using a subset of data from Hu et al., 2016.
(See DATA.html for a list of the data sets we’re using in this tutorial.)
We’ve loaded subsets of the data onto an Amazon location for you, to
make everything faster for today’s work. We’re going to put the
files on your computer locally under the directory ~/data
:
mkdir ~/data
Next, let’s grab part of the data set:
cd ~/data
curl -O -L https://s3-us-west-1.amazonaws.com/dib-training.ucdavis.edu/metagenomics-scripps-2016-10-12/SRR1976948_1.fastq.gz
curl -O -L https://s3-us-west-1.amazonaws.com/dib-training.ucdavis.edu/metagenomics-scripps-2016-10-12/SRR1976948_2.fastq.gz
Let’s make sure we downloaded all of our data using md5sum.:
md5sum SRR1976948_1.fastq.gz SRR1976948_2.fastq.gz
You should see this:
37bc70919a21fccb134ff2fefcda03ce SRR1976948_1.fastq.gz
29919864e4650e633cc409688b9748e2 SRR1976948_2.fastq.gz
Now if you type:
ls -l
you should see something like:
total 346936
-rw-rw-r-- 1 ubuntu ubuntu 169620631 Oct 11 23:37 SRR1976948_1.fastq.gz
-rw-rw-r-- 1 ubuntu ubuntu 185636992 Oct 11 23:38 SRR1976948_2.fastq.gz
These are 1m read subsets of the original data, taken from the beginning of the file.
One problem with these files is that they are writeable - by default, UNIX makes things writeable by the file owner. This poses an issue with creating typos or errors in raw data. Let’s fix that before we go on any further:
chmod u-w *
We’ll talk about what these files are below.
First, make a working directory; this will be a place where you can futz around with a copy of the data without messing up your primary data:
mkdir ~/work
cd ~/work
Now, make a “virtual copy” of the data in your working directory by linking it in –
ln -fs ~/data/* .
These are FASTQ files – let’s take a look at them:
less SRR1976948_1.fastq.gz
(use the spacebar to scroll down, and type ‘q’ to exit ‘less’)
Question:
Links:
We’re going to use FastQC to summarize the data. We already installed ‘fastqc’ on our computer for you.
Now, run FastQC on two files:
fastqc SRR1976948_1.fastq.gz
fastqc SRR1976948_2.fastq.gz
Now type ‘ls’:
ls -d *fastqc.zip*
to list the files, and you should see:
SRR1976948_1_fastqc.zip
SRR1976948_2_fastqc.zip
Inside each of the fatqc directories you will find reports from the fastqc. You can download these files using your Jupyter Notebook console, if you like; or you can look at these copies of them:
Questions:
Links:
There are several caveats about FastQC - the main one is that it only calculates certain statistics (like duplicated sequences) for subsets of the data (e.g. duplicate sequences are only analyzed for the first
Now we’re going to do some trimming! We’ll be using Trimmomatic, which (as with fastqc) we’ve already installed via apt-get.
The first thing we’ll need are the adapters to trim off:
curl -O -L http://dib-training.ucdavis.edu.s3.amazonaws.com/mRNAseq-semi-2015-03-04/TruSeq2-PE.fa
Now, to run Trimmomatic:
TrimmomaticPE SRR1976948_1.fastq.gz \
SRR1976948_2.fastq.gz \
SRR1976948_1.qc.fq.gz s1_se \
SRR1976948_2.qc.fq.gz s2_se \
ILLUMINACLIP:TruSeq2-PE.fa:2:40:15 \
LEADING:2 TRAILING:2 \
SLIDINGWINDOW:4:2 \
MINLEN:25
You should see output that looks like this:
...
Input Read Pairs: 1000000 Both Surviving: 885734 (88.57%) Forward Only Surviving: 114262 (11.43%) Reverse Only Surviving: 4 (0.00%) Dropped: 0 (0.00%)
TrimmomaticPE: Completed successfully
Questions:
For a discussion of optimal trimming strategies, see MacManes, 2014 – it’s about RNAseq but similar arguments should apply to metagenome assembly.
Links:
Run FastQC again on the trimmed files:
fastqc SRR1976948_1.qc.fq.gz
fastqc SRR1976948_2.qc.fq.gz
And now view my copies of these files:
Let’s take a look at the output files:
less SRR1976948_1.qc.fq.gz
(again, use spacebar to scroll, ‘q’ to exit less).
Questions:
Optional: K-mer Spectral Error Trimming


Hi! I am Yashwant
A Web Development Beginner
Some of the Projects I Build
A Jquery based project depicting my journey at Army Institute of Technology.
Other technologies used:
1. HTML5
2. CSS3
Tribute to our Honorable Prime Minister for being a constant source of motivation.
Technologies used:
1. HTML5
2. CSS3
A Jquery based project depicting my journey at Army Institute of Technology.
Other technologies used:
1. HTML5
2. CSS3
A Jquery based project depicting my journey at Army Institute of Technology.
Other technologies used:
1. HTML5
2. CSS3


#include "_doctype.html"
curl - Web Site Editing Guidlines
#include "css.t"
#include "_menu.html"
#include "setup.t"
TITLE(Web Site Editing Guidelines)
This document is intended for the curl web site editors only.
You need an account on sourceforge.net and that account needs to be a member
in project curl. You check out the entire curl web site with:
cvs -d:ext:[user]@cvs.curl.sourceforge.net:/cvsroot/curl checkout www
When you've checked out the web pages from CVS, there's a file named
'CVS-README' present which contains some hard technical facts about
things. Read that first.
To think of:
- The pages are preprocessed before they are finalized. The preprocessor
is a simple C-style one, but please take care so that #if and #ifdefs
have an ending #endif and so on.
- The web site is updated from CVS every 20 minutes. Even if you fix a
mistake, it will stay that way at least until next update. Don't panic!
- The same contents appear on several different hosts, with one main site.
Include the host name 'curl.haxx.se' only when linking to pages/contents
that are not mirrored. See list below.
What to edit/update?
- Add news items whenever you have interesting "news" you think the curl
community might enjoy. The news section also serves a purpose of making
it apparent that the site is living. Try to follow the tradition and
style of previous news items. Note the use of the macros.
- Try to keep the download page up-to-date. If new versions of packages
mentioned on the site is available, try to make the page reflect that
fact. Do note the use of the 'TRCURRENT' and 'TRNCURRENT' (N is for NOT)
macros.
- Edit bad language use, bad spelling or confusing use of words.
- If the problem is in a page out of control from the web site, chances are
that the page is generated automatically from a file in the source code
archive and then that file could be corrected instead.
Site content that is not mirrored and thus only available from curl.haxx.se:
- /mail/ Mailing list archives
- /download/ Curl release archives/packages
- /beta/ Curl pre-releases and beta archives
- /search/ Site content search
- /latest.cgi script for display curl archive status on mirrors
- /dev/ development notes
#include "_footer.html"


PubMatic Jenkins Login
Email:
Required
Not a valid email
Password:
Required
Minlength is 5
Maxlength is 10
Log On


iFridge
Inventory
Shopping List
Recipe Finder
Settings
Add Item
Name
Expiration Date
Please select a category:
Fresh Produce
Proteins
Dairy
Drinks
Frozen Foods
Beauty/Medicine
Miscellaneous
Submit
Cancel


My First webpage
It is a sunny, scorching day. I feel the humidity along with a sense of responsibility. Yes! I am at work.
I can see a couple of earth movers burying the open holes and I can clearly relate it to what I have done to my dreams.
All my dreams and desires are buried just like them- The holes. Few of my dreams are dead, few suffocating and the remaining are alive and thriving their way hard to reach the summit and feel the Sun.
Despite the enigma, there is some sort of avidity and mirth at the bottom of my heart. It's her. Yes!! She's the one.  For a moment, leaving the whole crowd around in a state of perplexity, and incognizant to what's happening.
Beyond all the imperfections in my life, thinking about her pushes me harder than any.
Even if I put my life on line and make it chaos free, she is that one last piece of puzzle which inevitably holds the key to completeness of a beautiful picture making it seamless!


@* * Copyright 2019 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import uk.gov.hmrc.hmrcemailrenderer.templates.onlinepaymentservice.DateFormatter @(params: Map[String, Any]) @reason = @{ params("REASON") match { case "0" => "" case "1" => "the Direct Debit Instruction has been cancelled" case "3" => "your account has been transferred to a new bank/building society" case "5" => "they do not recognise the account number" case "6" => "they do not hold an active Direct Debit Instruction" case "B" => "the account has been closed" // We are assured that no other reasons will ever be received. // Therefore we treat this case as exceptional and the email generation will fail. } } @uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "VAT Return Direct Debit: payment not collected") {
Dear @params("NAME")
Direct Debit mandate reference @params("DDIREFERENCE")
@if(params("REASON") == "0") {Our request for payment of £@params("AMOUNT") on @DateFormatter.formatDate(params("COLLECTIONDATE").toString) has been returned by your bank marked ‘refer to payer’.
We will not try to collect this payment again. You need to arrange to make payment by another method immediately (unless you have already paid).
Your Direct Debit Instruction has not been cancelled, so we will continue to collect future payments.
} else {Our request for payment of £@params("AMOUNT") on @DateFormatter.formatDate(params("COLLECTIONDATE").toString) has been rejected by your bank. This is because @reason.
You need to arrange to make payment by another method immediately.
If you want to make payments in the future by Direct Debit, you need to set up a new instruction.
}From HMRC Direct Debit Team
}


4
Sending updates from Linux / AIX / Mac OS
curl -X POST -H "Content-Type: application/json" -d '{"stream_name":"element1","value":"4"}' https://servername/send


USE
How we use your data internally
We DO NOT collect and use your identifiable data for the following purposes:
SHARE
How we share your data externally with other companies or entities
We
share your identifiable dataWe
(note that remaining data may not be anonymous)
SELL
Who we sell your data to
We DO NOT sell your identifiable data, only with your permission to some or all of the following
Marketing
Firms
Advertising
Networks
Analytics
Firms
Data
Brokers
Here is how to adjust your permission:
.
We DO NOT sell your data AFTER removing identifiers (note that remaining data may not be anonymous), only with your permission to some or all of the following
Marketing
Firms
Advertising
Networks
Analytics
Firms
Data
Brokers
Here is how to adjust your permission:
STORE
How we store your data
We do not store your data
ENCRYPTION
How we encrypt your data
Cloud computing means a kind of Internet-based computing that provides shared processing resources and data to computers and other devices on demand.
Not applicable
PRIVACY
How this technology accesses other data
This technology or app does NOT request access to other device data or applications, such as your phone's camera, photos, or contacts
Only with your permission it connects to
Camera
Photos
Contacts
Location Services
Microphone
Health Monitoring Devices
Here is how you can check your settings, including permissions set as a default.
This technology or app does
allow you to share the collected data with your social media accounts, like Facebook .USER OPTIONS
What you can do with the data that we collect
Access your data
Edit your data
Delete your data
Here is how to do this..
DEACTIVATION
What happens to your data when your account is deactivated
When your account is deactivated/terminated by you or the company, your data are Incomplete
POLICY CHANGES
How we will notify you if our privacy policy changes
test
BREACH
How we will notify you and protect your data in case of an improper disclosure
Here is how you can check your settings.


Floppy survival game Rust headed to PS4 and Xbox One
You'll never look at rocks the same again
by Jordan DevoreNever forget that for all its player-driven madness and brutality, Rust is pretty as hell.
It's a point worth making again today in light of the news that it's coming to PlayStation 4 and Xbox One. The console edition of Rust is underway at Double Eleven and Facepunch for a 2020 release.
Over on the PlayStation Blog, Facepunch founder Garry Newman said the priority is "making Rust the best survival game on console." To that end, they're trying to "avoid tripping over ourselves in terms of controls and performance" since it's "particularly important to get those things perfect in a PVP game."
He also added that players will be able to rent personal Rust servers, even on consoles.
I'm at a point where I enjoy Rust through the eyes of others – I've had my fill since the initial 2013 Early Access release – but I'm excited for a new generation to wake up on an island, nude, with a rock in hand.


I am a consulting software engineer with experience in industries such as Telco, Media, Travel, Logistics.
My current interests include:
Improving software delivery methods (i.e. DevOps, Agile) | Building efficient software using cutting edge technologies | Learning continuously by attending online courses, meetups, conferences | Passing on the acquired knowledge | Mentoring/guiding especially young professionals and graduates.
I hold a BSc from the Technical University of Thessaloniki in Greece (ATEI of Thessaloniki) and a Postgradute Diploma (PgDip) in Software Re-Engineering from University of Brighton.
For more information e.g. availability, mentoring, help, please contact me.


Helpful resources and guidance for interaction designers.
Resources
Accessibility
- Access needs posters
- Colour contrast checker
- JAWS screenreader
- Guide for VoiceOver screenreader
- WAVE accessibility evaluation tool
- GOV.UK user profiles for understanding disabilities and impairments
Prototyping
- Govuk Prototype kit with sub app feature
- JavaScript snippets used in prototypes
- Sketch file for GOV.UK patterns
Live prototypes
- https://das-employer-ux.herokuapp.com/
- https://das-raa-v2.herokuapp.com/sprints/sprint-3
- https://das-mya-beta.herokuapp.com/
- https://das-fat-beta.herokuapp.com/
- https://das-alpha-non-levy.herokuapp.com/
- https://esfs-prototype.herokuapp.com/
- https://esfa-hub-prototype.herokuapp.com/
- https://irt-prototype.herokuapp.com/


importance: 4
Here’s the document with the table and form.
How to find?…
id="age-table"
.label
elements inside that table (there should be 3 of them).td
in that table (with the word “Age”).form
with name="search"
.input
in that form.input
in that form.Open the page table.html in a separate window and make use of browser tools for that.


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 4
Using less meat is an easy way to save money without compromising on taste. This quick pasta dish makes a satisfying family meal from just four rashers of bacon.
Half-fill a large saucepan with water and bring to the boil.
Heat the oil in a large, non-stick frying pan over a medium heat. Add the onion and bacon and fry for 5-6 minutes, or until softened and lightly browned. Add the garlic and fry for a further minute (don't let the garlic burn or it will be bitter).
When the water is boiling, add the spaghetti in four batches, allowing each batch to soften into the water before adding the next. Stir well, then cook the spaghetti according to the packet instructions, stirring occasionally.
While the spaghetti is cooking, stir the chilli flakes into the onion and bacon mixture, then add the tinned tomatoes, tomato purée, oregano and 250ml/9fl oz water. Season, to taste, with the salt and freshly ground black pepper. Bring the mixture to a simmer and cook for 10 minutes, stirring regularly, until thickened. Stir in the cream and return the mixture to a gentle simmer.
Drain the pasta in a colander and return to the pan. Pour over the creamy tomato sauce, then stir the sauce into the spaghetti until evenly coated.
To serve, divide the spaghetti equally among four warmed serving bowls and serve.


2.4. NONDETERMINISTIC FINITE AUTOMATA
1
any
character
3
2
f
IF
5
z
a
4
.
.
.
0-9
a-z
6
.
.
.
ID
10
9
0
9
.
.
.
9
0
11
7
12
.
.
.
NUM
14
.
.
.
error
15
i
8
13
FIGURE 2.7.
Four regular expressions translated to an NFA.
CONVERTING AN NFA TO A DFA
As we saw in
Section 2.3
, implementing deterministic ﬁnite automata (DFAs)
as computer programs is easy. But implementing NFAs is a bit harder, since
most computers don’t have good “guessing” hardware.
We can avoid the need to guess by trying every possibility at once. Let
us simulate the NFA of
Figure 2.7
on the string
in
. We start in state 1. Now,
instead of guessing which
ϵ
-transition to take, we just say that at this point the
NFA might take any of them, so it is in one of the states
{
1
,
4
,
9
,
14
}
; that is,
we compute the
ϵ
-closure
of
{
1
}
. Clearly, there are no other states reachable
without eating the ﬁrst character of the input.
Now, we make the transition on the character
i
. From state 1 we can reach
2, from 4 we reach 5, from 9 we go nowhere, and from 14 we reach 15. So we
have the set
{
2
,
5
,
15
}
. But again we must compute
ϵ
-closure: from 5 there is
an
ϵ
-transition to 8, and from 8 to 6. So the NFA must be in one of the states
{
2
,
5
,
6
,
8
,
15
}
.
On the character
n
, we get from state 6 to 7, from 2 to nowhere, from 5 to
nowhere, from 8 to nowhere, and from 15 to nowhere. So we have the set
{
7
}
;
its
ϵ
-closure is
{
6
,
7
,
8
}
.
Now we are at the end of the string
in
; is the NFA in a ﬁnal state? One
of the states in our possible-states set is 8, which is ﬁnal. Thus,
in
is an
ID
token.
We formally deﬁne
ϵ
-closure as follows. Let
edge
(
s
,
c
)
be the set of all
NFA states reachable by following a single edge with label
c
from state
s
.
27


| {{block.hash}} | Height : {{block.height}} |
|---|
| Summary | |
|---|---|
| CoinBase Address | {{block.coinbase_addr}} |
| Depth | {{block.depth}} |
| Fees | {{block.fees}} |
| Mrkl Root | {{block.mrkl_root}} |
| Nombre des transactions | {{block.n_tx}} |
| Nonce | {{block.nonce}} |
| Size | {{block.size}} |
| Received Timer | {{block.received_time}} |
| Relayed by | {{block.relayed_by}} |
| Timestamp | {{block.time}} |
| Total | {{block.total}} |
Latest Transactions for this block
| Transaction #{{i+1}} | |
|---|---|
| Hash # | {{tx.hash}} |
| From | {{tx.from}} |
| To | {{tx.to}} |
| Gas | {{tx.gas}} |
| Input | {{tx.input}} |
| Value | {{tx.value}} |


This is a dashboard to visualize the data collected through the Kobo Toolbox forms that CWIN collects. This should provide the public and enforcement bodies insight into trafficking and human exploitation. Press '?' to view the keyboard shortcuts.
The following are the analyses provided
As you can see from the chart to the left, it seems that individual psycho-social counseling is the most often used service. We intend to....
| Registration # | Name | Age | Gender | Main Issue | Details |
|---|---|---|---|---|---|
| {{row["group_zu9nn95/_2_Registration_Number"]}} | {{row["group_zu9nn95/_5_full_name_of_child"]}} | {{row["group_zu9nn95/_7_age"]}} | {{mapping[row["group_zu9nn95/_8_gender"]]}} | {{mapping[row["group_sy7hf84/_24_Main_problem_of_the_Child"]]}} |


Get your passwords here!
Best passwords on the internet!
We'll beat any competitior's password! AT NO COST!
Your Password


Igniculus the firefly came into being when Aurora entered Lemuria, so everything is new to him. He was sent to help Aurora by the Lady of the Forest. By meeting another "firefly" like him in the Cynbel Sea, Igniculus discovers that he is an Elemental, sparks of light summoned from the ethereal plane. The "firefly" tells Igniculus that bright lights like him always forget to return to that everlasting morn, where thousands of other Elementals live.


class: center, middle, inverse, title-slide # Analysis of ATAC-seq data in R and Bioconductor
### Rockefeller University, Bioinformatics Resource Centre ###
http://rockefelleruniversity.github.io/Bioconductor_Introduction/
--- ## ATAC-seq ATAC-seq (Assay for Transposase-Accessible Chromatin using sequencing) uses a transposase to efficiently fragment accessible DNA prior to sequencing and so provides a method to map the accessible/open chromatin genome wide. In contrast to other techniques, ATAC-seq has several advantages including * Low input material required (> 50,000 cells) * Rapid experiment protocol (~ 4 hrs.)

 --- ## ATAC-seq, MNase-seq and DNase-seq

 * DNase-seq - Enzymatic digestion to extract signal from open chromatin around transcription factor binding sites. * MNase-seq - Enzymatic digestion to extract signal repesenting nucleosome positioning. * ATAC-seq - Uses transposases and offers a method to simultaneously extract signal from transcription factors binding sites and nucleosome positions from a single sample. --- ## Working with ATAC-seq data In this session we will look at some of the basics of ATAC-seq processing in R using some publically available data. We will look at the alignment, post-alignment processing and plotting of ATAC-seq data over TSSs. --- ## The Sequencing Data. In the ATACseq session we will make use of three sets of published data. The first dataset is from original ATAC-seq paper. Transposition of native chromatin for multimodal regulatory analysis and personal epigenomics Jason D. Buenrostro, Paul G. Giresi, Lisa C. Zaba, Howard Y. Chang, and William J. Greenleaf In particular, we will make use of the ATACseq_50k_Rep2 sample GEO - GSM1155958 Data can be retrieved in fastq format from ENA * SAMN02192806 - [here](https://www.ebi.ac.uk/ena/data/view/SAMN02192806) --- For the second dataset we take ATAC-seq generated by Bing Ren at UCSD as part of the Encode consortium. Links to data and sample information are included in list below. * Liver day 12 - [ENCSR302LIV](https://www.encodeproject.org/experiments/ENCSR302LIV/) * Kidney day 15 - [ENCSR023QZX](https://www.encodeproject.org/experiments/ENCSR023QZX/) * Hindbrain day 12 - [ENCSR088UYE](https://www.encodeproject.org/experiments/ENCSR088UYE/) --- Finally I have processed some of the data from Christina Leslie' lab at MSKCC exactly as described in this session so we can review some of the characteristics of ATAC-seq data alongside the same data processed by Encode's pipeline during the practical session. The raw data and processed BAM file is available from Encodes portal * T-Reg - [ENCSR724UJS](https://www.encodeproject.org/experiments/ENCSR724UJS/) In todays practical we will work with some of the ATAC-seq data of T-regulatory cells from Christina Leslie's lab. FQ files can be found can be found [here for read1](https://www.encodeproject.org/files/ENCFF175VOD/@@download/ENCFF175VOD.fastq.gz) and [here for read2](https://www.encodeproject.org/files/ENCFF447BGX/@@download/ENCFF447BGX.fastq.gz). We will also work with the aligned data as a BAM file [which can be found here.](https://www.encodeproject.org/files/ENCFF053CGD/@@download/ENCFF053CGD.bam) --- ## The Reference Data For ATAC-seq analysis we will require a few pieces of reference data. This includes- * Reference genome in fasta format - We will retrieve these from BSGenome Bioconductor annotation packages. * Gene models - We will retrieve these from TxDb Bioconductor annotation packages. * Blacklists - Artefact regions specific to genomes. These can be found in [Encode portal here](https://www.encodeproject.org/annotations/ENCSR636HFF/) --- ## Processed Data. We start with public sequencing data in links below and use reference data in Bioconductor. Since some of these processing steps may take a little time i provide links to pre-processed results. **Essentials** BAM file and BAI index from our alignment/sorting/indexing. * [SAMN02192806 - Greenleaf BAM](https://s3.amazonaws.com/rubioinformatics/ATAC_Workshop/ATAC_Data/ATAC_BAM/Sorted_ATAC_50K_2.bam) - Full BAM file for Greenleaf example produced following in our Rsubread alignment, sorting and indexing. * [SAMN02192806 - Greenleaf BAI index](https://s3.amazonaws.com/rubioinformatics/ATAC_Workshop/ATAC_Data/ATAC_BAM/Sorted_ATAC_50K_2.bam.bai) - BAI index file for BAM in Greenleaf example produced following in our alignment, sorting and indexing. --- **Essentials** Small BAM, peak calls and directory structure. * [ATAC_Workshop_Essential.zip](https://s3.amazonaws.com/rubioinformatics/ATAC_Workshop_Essential.zip) - Require additional workshop files and directory structure. Once you have downloaded the above and unzipped **ATAC_Workshop.zip**, you should move the **Sorted_ATAC_50K_2.bam** and **Sorted_ATAC_50K_2.bam.bai** file into **ATAC_Workshop/ATAC_Data/ATAC_BAM/** You should also copy the **RU_ATAC_Workshop.Rmd** to **ATAC_Workshop/** directory and open then to make sure all relative paths are correct. --- **Not essential** Same as above but with BAMs for counting as well as small BAM, peak calls and directory structure. * [ATAC_Workshop.zip](https://s3.amazonaws.com/rubioinformatics/ATAC_Workshop.zip) - Additional workshop files and directory structure. Bigwigs for IGV. * [Bigwigs](https://s3.amazonaws.com/rubioinformatics/ATAC_bigWigs.zip) - BigWigs to review in IGV. --- ## Greenleaf dataset fastq to aligned data in BAM. In this section we will work a little with the Greenleaf dataset. We will process one sample of the Greenleaf data from fastq to BAM to allow us to review some of the features of ATAC-seq data and to create some processed files for review and further analysis. --- ## Creating a reference genome First we will need to create a reference genome to align our ATAC-seq data. [We can create a FASTA file for alignment as we did previously for the ChIPseq analysis.](https://rockefelleruniversity.github.io/RU_ChIPseq/chipseq_course/Presentations/Slides/ChIPseq_In_Bioconductor.html#25) Here as we are working with human data we use the **BSgenome.Hsapiens.UCSC.hg19** library for the hg19 genome build. ```r library(BSgenome.Hsapiens.UCSC.hg19) mainChromosomes <- paste0("chr",c(1:21,"X","Y","M")) mainChrSeq <- lapply(mainChromosomes, function(x)BSgenome.Hsapiens.UCSC.hg19[[x]]) names(mainChrSeq) <- mainChromosomes mainChrSeqSet <- DNAStringSet(mainChrSeq) writeXStringSet(mainChrSeqSet, "BSgenome.Hsapiens.UCSC.hg19.mainChrs.fa") ``` --- ## Aligning Sequence Reads. Now we have a reference genome, we can align our ATAC-seq reads As ATACseq data is typically paired we will need to make some minor adjustments to our alignment steps. In QuasR we simply supply an additional column for the 2nd read pair. ```r FileName1 <- "ATAC_Data/ATAC_FQs/SRR891269_1.fastq.gz" FileName2 <- "ATAC_Data/ATAC_FQs/SRR891269_2.fastq.gz" SampleName <- "Myc_Mel_1" sampleTable <- data.frame(FileName1,FileName2,SampleName) write.table(sampleTable,file="sampleTable.txt",sep="\t", quote=FALSE,row.names = FALSE) ``` ``` ## FileName1 ## 1 ATAC_Data/ATAC_FQs/SRR891269_1.fastq.gz ## FileName2 SampleName ## 1 ATAC_Data/ATAC_FQs/SRR891269_2.fastq.gz Myc_Mel_1 ``` --- ## Aligning Sequence Reads. We can now use the **qAlign()** function to align our data. The **qAlign()** function requires the path to our sample table file and the path of a FASTA file to align sequence reads against. ```r library(QuasR) qAlign("sampleTable.txt","BSgenome.Hsapiens.UCSC.hg19.mainChrs.fa") ``` --- ## Creating Rsubread index Index building is part of the **QuasR** alignment process but for Rsubread we must build our index prior to Rsubread's alignment steps. Rsubread's [**buildindex()** function simply takes the parameters of our desired index name and the FASTA file to build index from.](https://rockefelleruniversity.github.io/Bioconductor_Introduction/r_course/presentations/slides/AlignmentInBioconductor.html#39). Here i additional specify the parameter **indexSplit** as TRUE in conjunction with **memory** parameter set to 1000 (1000MB) to control memory usage in Rsubread alignment step. ```r library(Rsubread) buildindex("BSgenome.Hsapiens.UCSC.hg19.mainChrs", "BSgenome.Hsapiens.UCSC.hg19.mainChrs.fa", indexSplit = TRUE, memory = 1000) ``` --- ## Aligning Sequence Reads. Here we can use a standard alignment for DNA (as for ChIPseq) but we increase the maximum allowed fragment length to capture long fragments representing poly-nucleosome signal. The maximum allowed fragment length set here is based on parameters used within Greenleaf study. To control maximum allowed fragment lengths i set the **maxFragLength** parameter to 2000. I also set **unique** parameter to TRUE to only include uniquely mapping reads. ```r read1 <- "ATAC_Data/ATAC_FQs/SRR891269_1.fastq.gz" read2 <- "ATAC_Data/ATAC_FQs/SRR891269_2.fastq.gz" outBAM <- "ATAC_50K_2.bam" align("BSgenome.Hsapiens.UCSC.hg19.mainChrs", readfile1=read1,readfile2=read2, output_file = outBAM, nthreads=2,type=1, unique=TRUE,maxFragLength = 2000) ``` --- ## Creating Rbowtie2 index To use Rbowtie2 we must also build our index prior to aligment. Here we use the [**bowtie2_build()** function specifying the parameters of our FASTA file to build index from and the desired index name](https://rockefelleruniversity.github.io/Bioconductor_Introduction/r_course/presentations/slides/AlignmentInBioconductor.html#32). ```r library(Rbowtie2) bowtie2_build(references="BSgenome.Hsapiens.UCSC.hg19.mainChrs.fa", bt2Index="BSgenome.Hsapiens.UCSC.hg19.mainChrs_bowtie2") ``` --- ## Creating Rbowtie2 index Once we have our index we must decompress our fastq files using **gunzip()** function. ```r gunzip("ATAC_Data/ATAC_FQs/SRR891269_1.fastq.gz") gunzip("ATAC_Data/ATAC_FQs/SRR891269_2.fastq.gz") ``` --- ## Creating Rbowtie2 index Now we can align our fastq to the genome with the **bowtie2()** function specifying our read1 and read2 to **seq1** and **seq2** parameters. Finally we can convert the output **SAM** file to a more useable **BAM** file with **asBam()** function. ```r bowtie2(bt2Index = "BSgenome.Hsapiens.UCSC.hg19.mainChrs_bowtie2", samOutput = "ATAC_50K_2_bowtie2.sam", seq1 = "ATAC_Data/ATAC_FQs/SRR891269_1.fastq", seq1 = "ATAC_Data/ATAC_FQs/SRR891269_2.fastq" ) asBam("ATAC_50K_2_bowtie2.sam") ``` --- ## Sorting and Indexing Following alignment [we would want to sort and index our BAM file for use with external tool.](https://rockefelleruniversity.github.io/Bioconductor_Introduction/r_course/presentations/slides/AlignedDataInBioconductor.html#10) First we sort our aligned data by sequence order (not Read Name here). We then index our file allowing for rapid access of particular genomic locations by other programs (e.g IGV, Samtools) and by R/Bioconductor packaes we will use. ```r library(Rsamtools) sortedBAM <- file.path(dirname(outBAM), paste0("Sorted_",basename(outBAM)) ) sortBam(outBAM,gsub("\\.bam","",basename(sortedBAM))) indexBam(sortedBAM) ``` ```r sortedBAM <- "~/Downloads/demo/ATAC_Workshop/ATAC_Data/ATAC_BAM/Sorted_ATAC_50K_2.bam" ``` --- ## Distribution of mapped reads In ATAC-seq we will want to check the distribution of mapped reads across chromosomes. [We can check the number of mapped reads on every chromosome using the **idxstatsBam()** function.](https://rockefelleruniversity.github.io/Bioconductor_Introduction/r_course/presentations/slides/AlignedDataInBioconductor.html#15) ATAC-seq is known have high signal on the mitochondrial chromosomes and so we can check for that here. ```r library(Rsamtools) mappedReads <- idxstatsBam(sortedBAM) ``` --- ## Distribution of mapped reads We can now use the mapped reads data frame to make a barplot of reads across chromosomes. In this example, we see a case where the mapping rate to mitochondrial genome is high. ```r library(ggplot2) ggplot(mappedReads,aes(seqnames,mapped,fill=seqnames))+ geom_bar(stat="identity")+coord_flip() ``` ![](RU_ATAC_files/figure-html/quickMappingStatsPerChromosomes-1.png) --- ## Greenleaf dataset post-alignment processing. Now we have the processed the ATAC-seq paired-end data we can start to work with alignments. First we will identify the expected fragment length distribution for ATAC-seq data. We read our newly aligned data using the GenomicAlignments package. Here we only wants read which are properly paired so we will use the **ScanBamParam()** and **scanBamFlag()** functions to control what will be read into R. We set the **scanBamFlag()** function parameters **isProperPair** to TRUE so as to only read in reads paired in alignment within our preset max fragment length (2000bpp) ```r library(GenomicAlignments) flags=scanBamFlag(isProperPair =TRUE) ``` --- ## Greenleaf dataset post-alignment processing. We can now use these flags with the **ScanBamParam()** function to read in only properly paired reads. We additionally specify information to be read into R using the **what** parameter. Importantly we specify the insert size information - **isize**. To reduce memory footprint we read only information from chromosome 20 by specifying a GRanges object to **which** parameter. ```r myParam=ScanBamParam(flag=flags, what=c("qname","mapq","isize"), which=GRanges("chr20", IRanges(1,63025520))) myParam ``` ``` ## class: ScanBamParam ## bamFlag (NA unless specified): isProperPair=TRUE ## bamSimpleCigar: FALSE ## bamReverseComplement: FALSE ## bamTag: ## bamTagFilter: ## bamWhich: 1 ranges ## bamWhat: qname, mapq, isize ## bamMapqFilter: NA ``` --- ## Greenleaf dataset post-alignment processing. Now we have set up the **ScanBamParam** object, we can use the **readGAlignmentPairs()** function to read in our paired-end ATAC-seq data in a similar way to how we read in single-end ChIP-seq data using the **readGAlignments()** function. The resulting object is a **GAlignmentPairs** object. ```r atacReads <- readGAlignmentPairs(sortedBAM, param=myParam) class(atacReads) ``` ``` ## [1] "GAlignmentPairs" ## attr(,"package") ## [1] "GenomicAlignments" ``` --- ## Greenleaf dataset post-alignment processing. The **GAlignmentPairs** object contains information on our paired reads. It stores information on each read in a pair in parallel **GAlignments** objects. ```r atacReads[1:2,] ``` ``` ## GAlignmentPairs object with 2 pairs, strandMode=1, and 0 metadata columns: ## seqnames strand : ranges -- ranges ## <Rle> <Rle> : <IRanges> -- <IRanges> ## [1] chr20 + : [60000, 60029] -- [60361, 60410] ## [2] chr20 + : [60000, 60029] -- [60361, 60410] ## ------- ## seqinfo: 25 sequences from an unspecified genome ``` --- ## Greenleaf dataset post-alignment processing. We access the **GAlignments** objects using the **first()** and **second()** accessor functions to gain information on the first or second read respectively. ```r read1 <- first(atacReads) read2 <- second(atacReads) read2[1,] ``` ``` ## GAlignments object with 1 alignment and 3 metadata columns: ## seqnames strand cigar qwidth start end width ## <Rle> <Rle> <character> <integer> <integer> <integer> <integer> ## [1] chr20 - 50M 50 60361 60410 50 ## njunc | qname mapq isize ## <integer> | <character> <integer> <integer> ## [1] 0 | SRR891269.17032370 40 -431 ## ------- ## seqinfo: 25 sequences from an unspecified genome ``` --- ## Retrieving insert sizes Now we have read in the paired aligned data into R, we can retreive the insert sizes from the elementMetadata attached to **GAlignments** objects of each read pair. Since properly paired reads will have the same insert size length we extract insert sizes from read1. ```r atacReads_read1 <- first(atacReads) insertSizes <- abs(elementMetadata(atacReads_read1)$isize) head(insertSizes) ``` ``` ## [1] 431 431 228 60 228 176 ``` --- ## Plotting insert sizes ATAC-seq should represent a mix of fragment lengths corresponding to nucleosome free, mononucleosome and poly-nucleosome fractions. We can use the **table()** function to retrieve a vector of the occurrence of each fragment length. ```r library(ggplot2) fragLenSizes <- table(insertSizes) fragLenSizes[1:5] ``` ``` ## insertSizes ## 50 51 52 53 54 ## 2470 2924 3062 2733 2497 ``` --- ## Plotting insert sizes Now we can use the newly acquired insert lengths for chromosome 20 to plot the distribution of all fragment lengths. ```r toPlot <- data.frame(InsertSize=as.numeric(names(fragLenSizes)), Count=as.numeric(fragLenSizes)) fragLenPlot <- ggplot(toPlot,aes(x=InsertSize,y=Count))+geom_line() ``` --- ## Plotting insert sizes ```r fragLenPlot+theme_bw() ``` ![](RU_ATAC_files/figure-html/processData_plottfingFragmentLengths2-1.png) --- ## Plotting insert sizes ```r fragLenPlot + scale_y_continuous(trans='log2')+theme_bw() ``` ![](RU_ATAC_files/figure-html/processData_plottingFragmentLengths3-1.png) --- ## Plotting insert sizes (Greenleaf). This looks very similar to the image from the Greenleaf paper. We can now annotate our nucleosome free (< 100bp), mono-nucleosome (180bp-247bp) and di-nucleosome (315-437) as in the Greenleaf study. ```r fragLenPlot+ scale_y_continuous(trans='log2')+ geom_vline(xintercept = c(180,247),colour="red")+ geom_vline(xintercept = c(315,437),colour="darkblue")+ geom_vline(xintercept = c(100),colour="darkgreen")+theme_bw() ``` ![](RU_ATAC_files/figure-html/processData_plottingFragmentLengths24-1.png) --- ## Subsetting ATAC-seq reads files by insert sizes. We may wish to divide our aligned reads into reads representing nucleosome free and nucleosome occupied. Here we create BAM files for the reads representing nucleosome free, mono and di nucleosome by using insert sizes to filter read. ```r atacReads_Open <- atacReads[insertSizes < 100,] atacReads_MonoNuc <- atacReads[insertSizes > 180 & insertSizes < 240,] atacReads_diNuc <- atacReads[insertSizes > 315 & insertSizes < 437,] ``` --- ## Creating BAM files split by insert sizes. The resulting reads can be written back to BAM files for use in other parts of our analysis or for visualisation in programs such as IGV by functions in the rtracklayer package. ```r openRegionBam <- gsub("\\.bam","_openRegions\\.bam",sortedBAM) monoNucBam <- gsub("\\.bam","_monoNuc\\.bam",sortedBAM) diNucBam <- gsub("\\.bam","_diNuc\\.bam",sortedBAM) library(rtracklayer) export(atacReads_Open,openRegionBam,format = "bam") export(atacReads_MonoNuc,monoNucBam,format = "bam") #export(atacReads_Open,diNucBam,format = "bam") ``` --- ## Creating an open region bigWig. We can make it significantly quicker to review the pile-up of ATAC-seq signal in a genome browser by creating a bigWig file. Here we use the **granges()** function to recreate full fragments from the paired single-end reads. ```r atacReads_Open[1,] ``` ``` ## GAlignmentPairs object with 1 pair, strandMode=1, and 0 metadata columns: ## seqnames strand : ranges -- ranges ## <Rle> <Rle> : <IRanges> -- <IRanges> ## [1] chr20 + : [60436, 60485] -- [60446, 60495] ## ------- ## seqinfo: 25 sequences from an unspecified genome ``` ```r atacFragments_Open <- granges(atacReads_Open) atacFragments_Open[1,] ``` ``` ## GRanges object with 1 range and 0 metadata columns: ## seqnames ranges strand ## <Rle> <IRanges> <Rle> ## [1] chr20 [60436, 60495] + ## ------- ## seqinfo: 25 sequences from an unspecified genome ``` --- ## Creating an open region bigWig. We can make it significantly quicker to review the pile-up of ATAC-seq signal in a genome browser by creating a bigWig file. Additional normalisation to total mapped reads could be applied at this point. ```r openRegionRPMBigWig <- gsub("\\.bam","_openRegionsRPM\\.bw",sortedBAM) myCoverage <- coverage(atacFragments_Open, weight = (10^6/length(atacFragments_Open))) export.bw(myCoverage,openRegionRPMBigWig) ```

 --- # Time for an exercise. [Link_to_exercises](../../Exercises/ATACseq_part1_exercises.html) [Link_to_answers](../../Answers/ATACseq_part1_answers.html)


Shatha Adoption Agency
Animal Name
Age
Species
Cat
Dog
Frog
Bird
Snake
Gender
Male
Female
Color
Brown
Black
White
Grey
Yellow
Green
Submit for adoption
Adopt Me


Learning Backbone Marionette
Ch7: Utilities
How to run this example?
Open index.html in browser
Press F12, go to console tab
See the console logs to understand the flow


Python is object oriented and you don't need to declare variables or define types before using them.
var a = "Joe";Python is written very similar to JavaScript, try converting a simple function.
function myFunction(){
alert("test");
}
def myFunction():
print("Test")
Python lists are also written just like JavaScript
myList = [1,"Apples"]
print(myList[0])
#prints out 1,"Apples"
for x in mylist:
print(x)
This is what Python conditionals look like
name = "John"
if name in ["John", "Rick"]:
print("Your name is either John or Rick.")
Little bit of OOP with Python
class Dog:
def __init__(self): #this is a constructor
age=24
def getAge(self): #this is a method
return self.age
myDog = Dog()
print(myDog.getAge())
Now let's do some file operations, and learn how to write to a file.
Follow me hereYou can get into the python command line by typing
>>python
and than start writing code. Exit the command line by
exit()
or create a file with the extension "myfile.py". Get this file executing by typine
>>python myfile.py
Follow me here


class: center, middle ### W4995 Applied Machine Learning # Word Embeddings 04/11/18 Andreas C. Müller ??? today we'll talk about word embeddings word embeddings are the logical next step in doing text analysis after working with topic models on Monday. FIXME: redo paragraph vector experiments FIXME: state of the art? FIXME: too short? FIXME: word embeddings with tensorflow? FIXME for CBOW and skip-gram shared weights for context FIXME for CBOW, which do we keep? --- # Beyond Bags of Words Limitations of bag of words: - Semantics of words not captured - Synonymous words not represented - Very distributed representation of documents ??? Last time we started talking about limitations of bag of words, such as semantics of words are not captured synonymous words are not represented - if I use two synonymous words, for example film and movie, they are represented in completely different ways and there is no connection between them. and we also have a very distributed representation of documents, which might be hard to understand or hard to learn from. --- # Last Time - Latent Semantic Analysis - Non-negative Matrix Factorization - Latent Dirichlet Allocation - All embed documents into a continuous, corpusspecific space. - Today: Embed words in a “general” space. ??? Last time we looked at latent semanic analysis, non-negative matrix factorization and latent dirichlet allocation. Each of them embedds the documents into a continuous, corpus specific space of a dimension of our choosing, using an unsupervised objective. The first two are matrix factorization, the third is a probabilistic generative model. Today we'll be talking about a more general embedding, which tries to embedd individual words, not documents. The goal is to learn an embedding that's generally useful, and not necessarily tied to a particular corpus. --- # Idea - Unsupervised extraction of semantics using large corpus (wikipedia etc) - Input: one-hot representation of word (as in BoW). - Use auxiliary task to learn continuous representation. ??? We'll talk about several methods, but they'll all use a very large corpus to create a relatively generic embedding. So we might use something like wikipedia or google news or a big corpus of books. It's an unsupervised task, but the way it is phrased is using an auxiliary supervised task to learn the embedding. And what I mean by that will be more clear shortly. The starting principle is a one-hot representation of each word, as in Bag of words, which basically just means each word is identified by some index. --- # Skip-Gram models - Given a word, predict surrounding word - Supervised task, each document yields many examples - Not interested in performance for this task, just want to learn representations. ??? A very commonly used auxiliary task is the skip-gram model. Here the task is, given a word, predict the surrounding words. This is a supervised task, with each document providing many examples, basically as many as there are words in the document. I'm saying this is an auxiliary task, because we're not really interested in actually solving this problem of predicting surrounding words, we just want to use this task to learn useful representations. --- class: left # Example ``` [“What is my purpose?”, “You pass the butter.”] ``` .center[ ![:scale 50%](images/context_window.png) ] Using context windows of size 1 (in practice 5 or 10): ??? Here's an example of what this task looks like. Let's say we have a corpus of two documents, "what is my purpose" and "you pass the butter". We specify a context window size, let's say one. Then, for each word that has enough context, we generate a training example. So for "is", we have a context of "what" and "my", for "my" we have "is" and "purpose", and so on. So the input would be "is" and the goal would be to predict that the word before is "what" and the word after is "my". that assigns a high probability to the outputs "what" and "my". In practice larger context windows are used, often 5-10 words in either direction. Cearly it's impossible to actually solve this task, because each word can appear in many different contexts. The goal is to learn which contexts are likely, and which are not. --- .center[ ![:scale 50%](images/cbow_skipgram_1.png) ] ??? Here’s the architecture that we will be using for this. It's kind of like neural network only, this is completely linear. In the left-hand side, we have the input layer with one hot encoding services in V-dimensional. V represents the size of vocabulary. And basically, only one of them will be 1 and the others will be 0. Then we have a weight matrix connecting it to the n-dimensional hidden layer. From there, we have multiple outputs that correspond to the previous word, previous 2 words, and previous 3 words and so on. And then the next word, next 2 words, next 3 words and so on. Each output is, again, one hot encoding, which allows you to predict each possible version of vocabulary. These layers here are very large in size. Behind the hidden layer is basically a logistic regression. So this is just a linear classifier with a softmax activation. So each of these Ws will try to predict what the words are before and after.  The reason why you have these two matrix multiplication is basically you want to create a bottleneck so if you had a very wide vector, you could do one matrix multiplication, basically, you want this matrix to have a lower rank. So you want to compress a representation to something small. Each row of W corresponds to a single word. We train this whole thing in a supervised fashion to minimize the log loss. But we’re only interested in is getting weights w. --- #Softmax Training .center[ ![:scale 70%](images/softmax.png) ] .smallest[
Mikolov et. al. - Distributed Representations of Words and Phrases and their Compositionality (2013)
] ] ??? The problem is you sum over all the outputs. All the outputs are all the words in the vocabulary. If you have a million words in your vocabulary, this is going to be a lot of work. This is a step that you need to do every time when you want to optimize it. And so what most of the algorithms do is they just approximate the sum by sampling some words. So it just normalizes by some words, but not by all words. This is the model that's most commonly used. This is called skip grams. --- # CBOW vs Skip-gram .center[ ![:scale 70%](images/cbow_skipgram.png) ] .smallest[ Efficient Estimation of Word Representations in Vector Space https://arxiv.org/pdf/1301.3781.pdf ] ??? This is the skip-gram model, here you can see it on the left (FIXME?!) So we start with the one-hot-encoding of the word, and we have a matrix multiplication into a latent space. A matrix multiplication with a one-hot vector just means that each row in that embedding matrix represents one word. From this latent space, we run logistic regression, trying to predict what the word is for each particular offset, so here in this picture we're trying to predict the word two to the left, one to the left, one to the right, and two to the right. So these are basically four classifiers running on the same input. Another approach is shown on the left, the continuous bag of words model, or CBOW. This is something that seems a bit more natural to me, where given the context, we are trying to predict the word in the center. So here we would be given four context words and try to figure out what's the most likely word to be in between those. The skip grams work better. CBOW might capture some things like synonymous words because I can switch the synonyms word for another word, and it’ll still make sense in the same context. So if I say, I watched a movie or I watched the film, it doesn't really matter. --- # Implementations - Gensim - Word2vec - Tensorflow - Don't train yourself ??? Word2vec uses both the skip grams and continues bag of words. You can train this using TensorFlow. If you actually want to train it yourself, it's probably the best idea because then you can do it on GPU. These are usually like large matrices, you have a large corpus which will take forever. With TensorFlow, you can do it on a GPU and, and it makes things much more bearable. But generally, just don't train it yourself. You can download several of these word2vec models from Google, for example. --- # Gensim - topic models for humans - Multiple Latent Dirichlet Allocation implementations - Wrappers for Mallet and vopal wabbit - Tools for analyzing topic models - No supervised learning - Uses list-of-tuples instead of sparse matrices to store documents. ??? Gensim is a Python library for text analysis. Gensim is very easy to use and it has a lot of features. Last time, I mentioned spacy and NLTK as libraries for NLP, Gensim is the third one in that list which is very specific to topic models. And it has multiple implementations of LDA. It has wrappers for Mallet and vowpal wabbit, which also has very fast on LDA implementation. It has no supervised learning. This is all about document retrieval and feature extraction. The main thing to keep in mind when you work with this and when you combine this with scikit-learn is that it uses a list of tuples to store documents instead of sparse matrices. It's completely equivalent. It's just a different data structure. But if you want to mix this with scikit-learn, you need to make sure to convert it. --- # Introduction to gensim .smallest[ ```python docs = ["What is my purpose", "You bring butter"] texts = [[token for token in doc.lower().split()] for doc in docs] print(texts) ``` ``` [['what', 'is', 'my', 'purpose'], ['you', 'bring', 'butter']] ``` ```python from gensim import corpora dictionary = corpora.Dictionary(texts) print(dictionary) ``` ``` Dictionary(7 unique tokens: ['butter', 'you', 'is', 'purpose', 'my']...) ``` ```python new_doc = "what butter" dictionary.doc2bow(new_doc.lower().split()) ``` ``` [(3, 1), (5, 1)] ``` ```python corpus = [dictionary.doc2bow(text) for text in texts] corpus ``` ``` [[(0, 1), (1, 1), (2, 1), (3, 1)], [(4, 1), (5, 1), (6, 1)]] ``` ] ??? Use NLTK or spacy or a regexp for tokenization in real applications. This method here doesn’t even handle punctuation. In gensim, a document is represented as list of tuples (index, frequency), corpus is a list of these. --- # Converting to/from sparse matrix .smallest[ ```python import gensim corpus ``` ``` [[(0, 1), (1, 1), (2, 1), (3, 1)], [(4, 1), (5, 1), (6, 1)]] ``` ```python gensim.matutils.corpus2csc(corpus) ``` ``` <7x2 sparse matrix of type '
' with 7 stored elements in Compressed Sparse Column format> ``` ```python X = CountVectorizer().fit_transform(docs) X ``` ```python sparse_corpus = gensim.matutils.Sparse2Corpus(X.T) print(sparse_corpus) print(list(sparse_corpus)) ``` ```
[[(4, 1), (3, 1), (2, 1), (5, 1)], [(1, 1), (0, 1), (6, 1)]] ``` ] ??? most transformations is gensim are lazy: They yield a generator (like Sparse2Corpus) which can be converted to a list. Note that the CSC is transposed to what we would expect in sklearn. --- # Corpus Transformations .smaller[ ```python tfidf = gensim.models.TfidfModel(corpus) tfidf[corpus[0]] ``` ``` [(0, 0.5), (1, 0.5), (2, 0.5), (3, 0.5)] ``` ```python print(tfidf[corpus]) print(list(tfidf[corpus])) ``` ```
[[(0, 0.5), (1, 0.5), (2, 0.5), (3, 0.5)], [(4, 0.577), (5, 0.577), (6, 0.577)]] ``` ] ??? You can do a TFIDF model with Gensim. --- # Word2Vec in Gensim ```python from gensim import models w = models.KeyedVectors.load_word2vec_format( '../GoogleNews-vectors-negative300.bin', binary=True) w['queen'].shape ``` ``` (300,) ``` ```python w.vectors.shape ``` ``` (3000000, 300) ``` ??? There are 2 benefits to using these prebuilt models. A) It takes a long time to run to train these B) You probably don't have the corpus, you can download Wikipedia, but I don't think you can actually download the Google News corpus. There are 3,000,000 word vectors in total stored in this model. So there’s a vocabulary of size 3,000,000. Each of the words in the vocabulary has a 300-dimensional vector. I can only apply this to words that are within this vocabulary. If I have any words that are not in this vocabulary, then this model is useless. The first thing that we want to do is to check whether these representations actually semantic in some way. To do this, first, we need to define how can we measure similarity in this space. And the way that similarities usually measured between words is using the cosine similarity. --- # Cosine Similarity .padding-top[ `$$\Large \text{similarity}(v, w)=\cos(\theta) = \frac{v^Tw}{\lVert v\rVert \lVert w \rVert}$$` ] ??? This is quite related to Euclidean distance but basically, it normalizes the weight, the length of the vector. This is a set of a distance matrix that’s very commonly used in NLP. For example, if you want to compare if the two documents are similar. For documents in the bag of words representation, this might be quite intuitive, since it just sort of normalizes the length of document away. --- class: smallerr # Inspecting Semantics ```python w.most_similar(positive=['movie'], topn=5) ``` ``` [('film', 0.8676770925521851), ('movies', 0.8013108968734741), ('films', 0.7363011837005615), ('moive', 0.6830361485481262), ('Movie', 0.6693680286407471)] ``` ??? Now that we know how we can measure similarities in the space, we can find similar words. And so let's start with ‘movie’ and the top 5 matches for it (ordered from most similar to least similar top 5) This computes the cosine similarities between the 300-dimensional vector for movie and all the other 300-dimensional vectors for the 3 million other words and gives the 5 closest one. In this case, they are ‘film’, ‘movies’, ‘films’, ‘moive’, ‘Movie’. I guess ‘moive’ is a common misspelling. --- ```python w.most_similar(positive=['good'], topn=5) ``` ??? Trying the same for the word ‘good’ gives ‘great’, ‘bad’, ‘terrific’, ‘decent’ and ‘nice’. ‘bad’ is an antonym not a synonym for ‘good’, this makes sense since sometimes if we replace ‘good’ with ‘bad’, it will still make sense. --- ``` [('great', 0.7291510105133057), ('bad', 0.7190051078796387), ('terrific', 0.6889115571975708), ('decent', 0.6837348341941833), ('nice', 0.6836092472076416)] ``` -- ```python w.most_similar(positive=['cute', 'dog'], topn=5) ``` ``` [('puppy', 0.7645270228385925), ('chihuahua', 0.7209305763244629), ('adorable_puppy', 0.7108923196792603), ('yorkie', 0.7013816833496094), ('Shitzu', 0.7004074454307556)] ``` ??? You can also look at multiple vectors and take the average and then look what's close to that. I’ve computed for ‘cute’ and ‘dog’. --- # Prepare document (IMDB) .smallest[ ```python print(text_train_sub[0].decode()) ``` ``` Maybe it's just because I have an intense fear of hospitals and medical stuff, but this one got under my skin (pardon the pun). This piece is brave, not afraid to go over the top and as satisfying as they come in terms of revenge movies. Not only did I find myself feeling lots of hatred for the screwer and lots of sympathy towards the "screwee", I felt myself cringe and feel pangs of disgust at certain junctures which is really a rare and delightful thing for a somewhat jaded horror viewer like myself. Some parts are very reminiscant of "Hellraiser", but come off as tribute rather than imitation. It's a heavy handed piece that does not offer the viewer much to consider, but I enjoy being assaulted by a film once and awhile. This piece brings it and doesn't appologize. I liked this one a lot. Do NOT watch whilst eating pudding. ``` ```python vect_w2v = CountVectorizer(vocabulary=w.index2word) vect_w2v.fit(text_train_sub) docs = vect_w2v.inverse_transform(vect_w2v.transform(text_train_sub)) docs[0] ``` ``` array(['in', 'for', 'that', 'is', 'the', 'at', 'not', 'as', 'it', 'by', 'are', 'have', 'an', 'this', 'they', 'but', 'one', 'which', 'do', 'than', 'over', 'just', 'some', 'like', 'only', 'did', 'because', 'off', 'being', 'my', 'very', 'much', 'go', 'under', 'does', 'got', 'top', 'come', 'really', 'lot', 'find', 'thing', 'once', 'offer', 'feel', 'film', 'medical', 'terms', 'rather', 'certain', 'felt', 'consider', 'watch', 'parts', 'heavy', 'towards', 'enjoy', 'feeling', 'maybe', 'piece', 'fear', 'myself', 'stuff', 'handed', 'brings', 'movies', 'hospitals', 'rare', 'lots', 'skin', 'eating', 'intense', 'somewhat', 'liked', 'afraid', 'tribute', 'horror', 'revenge', 'brave', 'whilst', 'sympathy', 'assaulted', 'satisfying', 'hatred', 'viewer', 'awhile', 'pardon', 'delightful', 'disgust', 'imitation', 'pudding', 'cringe', 'jaded', 'pun', 'pangs', 'doesn', 'junctures', 'hellraiser', 'appologize'], dtype='
Find closest vector to vec(“Queen”) + (vec(“Kings”) - vec(“King”)) ] .smallest[
Mikolov et. al. Linguistic Regularities in Continuous Space Word Representations (2013)
] ??? You can use these vectors to find relationships. So people found that if they look at the difference between men, and women, it looks very similar to the difference between uncle and aunt or king and queen. They also found that, for example, the difference between King and kings is the same as between queen and Queens. If you want to ask a question, what is to Queen as kings are to King? You can take vector representation of Queen and add the vector representation of kings, and subtract the vector representation of King. And if you look at the closest point to that, you'll find it's going to be queens. People did this with a lot of different sort of semantic pairs. --- .center[ ![:scale 80%](images/analogues.png) ] .smallest[
Mikolov et. al. - Distributed Representations of Words and Phrases and their Compositionality (2013)
] ??? One thing that's quite interesting is people embedded countries and their capitals using a 300-dimensional space and then did the PCA on it. This is projecting down to 2-dimensional space, all different countries and their capitals. Even after this projection, they all look pretty peril. And so basically, the thing that goes from Poland to Warsaw is basically the same that goes from Japan to Tokyo. You can use this to discover analogies or relations. --- # Finding Relations
$$\large a : b : : c : ?$$
$$\large d = \text{arg}\max_i\frac{\left(\text{vec}(b) - \text{vec}(a) + \text{vec}(v)\right)^T vec_i}{\lVert\text{vec}(b) - \text{vec}(a) + \text{vec}(v)\rVert\lVert \text{vec}_i\rVert}$$ ??? The vec(v) in the numerator should be vec(c) --- class: middle .center[ ![:scale 70%](images/table_cities_states.png) ] .smallest[
Stanford CS 224D: Deep Learning for NLP
] ??? The model is able to figure out what the relationship of what does it mean for a city to be in a state. So now we have a space in which vector additions have semantic meaning. When people found about this, they were really excited. --- # Examples with Gensim .smaller[ ```python w.most_similar(positive=['woman', 'king'], negative=['man'], topn=3) ``` ``` [('queen', 0.7118192911148071), ('monarch', 0.6189674139022827), ('princess', 0.5902431607246399)] ``` ```python w.most_similar(positive=['woman', 'he'], negative=['man'], topn=3) ``` ``` [('she', 0.8492251634597778), ('She', 0.6329933404922485), ('her', 0.6029669046401978)] ``` ```python w.most_similar(positive=['Germany', 'pizza'], negative=['Italy'], topn=3) ``` ``` [('bratwurst', 0.5436394810676575), ('Domino_pizza', 0.5133179426193237), ('donuts', 0.5121968984603882)] ``` ] ??? In the first example, I'm computing ‘woman’ + ‘king’ – ‘man’ and the top 3 results are ‘queen’, ‘monarch’ and ‘princess’. Queen is the highest since ‘man’ is to ‘king’ as ‘women’ is to ‘queen’. So relationships that are found here definitely depend a lot on the corpus that was used. --- class: center
.center[ ![:scale 70%](images/paper_title.png) ]
.smaller[ $\overrightarrow{man} - \overrightarrow{woman} \approx \overrightarrow{king} - \overrightarrow{queen}$
$\overrightarrow{man} - \overrightarrow{woman} \approx \overrightarrow{computer programmer} - \overrightarrow{homemaker}$ ] ??? This relation is actually in there. If you do ‘man is to computer programmer’ as ‘women is to x as to x, you get ‘homemaker’ and we might not be very happy about this. --- # Going along he-she direction:
.center[ ![:scale 90%](images/he_she.png) ] ??? They did an analysis of this particular embedding. And established that we don’t want these gender stereotypes in our model and gender appropriate he-she analogies Some of them are clearly something that we would not want. And this is just one particular instance. As with all machine learning models, this learns all the biases of the data that you give it, if you give it a lot of text, then it uses that to learn all the biases of human society. --- class: middle # Paragaph Vectors ??? Alright, so the next thing I want to talk about is a slightly smarter way to look at embedding documents, which is paragraph vectors. Instead of just taking averages we're trying to do a little bit better. Fixme rerun experiments from doc2vec paper to show it works? --- # Doc2Vec
.center[ ![:scale 70%](images/doc2vec.png) ] .smallest[
Le, Mikolov: Distributed Representations of Sentences and Documents (2014)
] ??? based on cbow, not skip-grams Add a vector for each paragraph / document, also randomly initialized. To infer for new paragraph: keep weights fixed, do stochastic gradient descent on the representation D, sampling context examples from this paragraph. FIXME better explanation. There is no gradient descent at encoding time for word2vec! The most common approach here is Doc2vec. This here on the right-hand side would be the continuous bag of word model where you get the context, and where you want to predict the word from the context. What paragraph vector now does is it adds in another thing, which is a paragraph specific ID. It’s basically like adding a unique word to a vocabulary that’s just unique to this paragraph and encodes its presence in this paragraph. And you do not only learn the embedding of all the words, but you also learn embedding for each paragraph. And so basically, this tries to make up for what the words cannot predict. So you have the standard CBOW in the middle layer that tries to make a prediction but then basically trying to correct this prediction by having a paragraph specific ID. This maybe not sorts of the most intuitive way. But it actually seemed to work quite well. This is actually in practice quite a bit trickier than just looking at the word vectors since how are you going to do this if you get a new document? If you get a new document for the word vectors, you just look for each word, if it's not in the vocabulary you’re lost out anyway, if it’s in the vocabulary, you can just take the vector for this word that you have computed already. If you get a new paragraph, how do you get the paragraph vector? Since you have a new paragraph that has never seen before, the paragraph is not in the training set. And so what you do then you look at the paragraph and you sample training samples from this paragraph, so your sample context and words. And you fix all the word vectors because you learned them on the training sets. You're basically learning this paragraph ID by doing gradient descent. So you initialize this paragraph vector randomly and to transform a new paragraph, you basically learn the paragraph vector for this paragraph, fixing all the word vectors. In this sense, it’s more of trying to correct what the model could not figure out with the word vectors. So now, you have a vector that represents everything in the paragraph that was not already encoded in the context, or it might encode like in a wider context or something like that. And usually, it's just the same dimensionality as the other vectors. So here, we would get like a 300-dimensional vector that encodes each paragraph. But to encode a new paragraph you need to do gradient descent. --- #Doc2Vec with gensim .smaller[ ```python def read_corpus(text, tokens_only=False): for i, line in enumerate(text): if tokens_only: yield gensim.utils.simple_preprocess(line) else: # For training data, add tags yield gensim.models.doc2vec.TaggedDocument( gensim.utils.simple_preprocess(line), [i]) train_corpus = list(read_corpus(text_train_sub)) test_corpus = list(read_corpus(text_val, tokens_only=True)) model = gensim.models.doc2vec.Doc2Vec(vector_size=50, min_count=2) model.build_vocab(train_corpus) model.train(train_corpus, total_examples=model.corpus_count, epochs=55) ``` ] .smallest[ https://github.com/RaRe-Technologies/gensim/blob/develop/docs/notebooks/doc2vec-lee.ipynb ] ??? fixme example of nearest neighbors to see if this learned something useful! Should use the unlabeled reviews! So here, basically, I started completely fresh from no model at all. And I learned embedding for all of the words and for all the paragraphs. So I did a small validation to see if the word vectors that I learned are meaningful. --- # Validation of Word Vectors ```python model.wv.most_similar("movie") ``` ``` [('film', 0.9482318758964539), ('flick', 0.822228193283081), ('series', 0.715380072593689), ('programme', 0.7032747268676758), ('sequel', 0.6939107179641724), ('story', 0.6771408319473267), ('show', 0.6559576392173767), ('documentary', 0.6537493467330933), ('picture', 0.6427854299545288), ('thriller', 0.6300673484802246)] ``` ??? I looked at the most similar ones to ‘movie’ and we get these results. I like this better than the ones from the pre-built one. These are pretty good but it's maybe not as surprising as ‘movie’ is sort of the most common word in the whole corpus. --- #Encoding using doc2vec .smaller[ ```python vectors = [model.infer_vector(train_corpus[doc_id].words) for doc_id in range(len(train_corpus))] X_train = np.vstack(vectors) X_train.shape ``` ``` (18759, 50) ``` ```python test_vectors = [model.infer_vector(test_corpus[doc_id]) for doc_id in range(len(test_corpus))] X_test = np.vstack(test_vectors) ``` ] ??? Now I can encode my training corpus. I get a 50-dimensional vector for each movie review in the training dataset. If I want to do classification I can run a logistic regression on this vector. So model.infer_vector does the gradient descent to compute the paragraph vectors for each document. In the paper, they used much more data from the same corpus and they used 400-dimensions and probably they also iterated longer. In the paper, they didn't train a logistic regression on this. They trained a neural network on this, this probably makes a difference --- ```python from sklearn.linear_model import LogisticRegression lr = LogisticRegression(C=100).fit(X_train, y_train_sub) lr.score(X_train, y_train_sub) ``` ``` 0.817 ``` ```python lr.score(X_val, y_val) ``` ``` 0.803 ``` ??? Not working well here. Either not enough training data, sgd didn’t converge yet, or too low dimension. FIXME combine with word vectors? In the paper: they actually get 0.926% 400 dimensions (And using unsupervised data) --- # GloVe: Global Vectors for Word Representation $X_{ij}$ = How often does work j appear in context of word i `$$ J = \sum\limits_{i,j=1}^{V} f(X_{ij}) (w_i^T \tilde{w_j} + b_i + \tilde{b_j} - \log X_{ij})^2$$` `$$ f(x) = \begin{cases} (x/x_\text{max})^\alpha & \text{if } x < x_\text{max} \\ 1 & \text{otherwise} \\ \end{cases} $$` .smaller[ https://nlp.stanford.edu/projects/glove/ ] ??? Here X_ij is the coocurrance count matrix, counting how often word I and j appear in the same context – say a 5 word window. We are learning a factorization of log(X_ij) into w_i and ~w_j, where w_i are the word-vectors we want to extract. Very infrequent word-pairs are less important to get right, and are down-weighted using f(X_ij). alpha is 3/4 empirically. x_max is 100. --- class: center, spacious # GloVe Weighting function f ![:scale 90%](images/glove_weighting.png) ??? If you're larger than X max, it's just weighted by 1. If all words appear at least 100 times then the loss is weighted fully and if words appear less than 100 times, then you take x divided by 100 to the power of alpha, and they found alpha equal to 0.75. So it works better than linear. So in the beginning, you have to compute this big sparse matrix once, but then you can do gradient descent just on this given statistics. --- # Word analogies .center[ ![:scale 45%](images/word_analogies.png) ] ??? Comparison of CBOW, SGD, skip-gram and Glove on the semantic (ie. state→capital) and syntactic (ie singular→ plural) word analogy tasks --- class: middle # Questions ?


kanheri Caves - A Treasure Hosue of Buddhism History
Kanheri Caves are located in Borivali East in Mumbai City, a part of Rajiv Gandhi National Park. It was such a good experience.
Kanheri Caves is a one of the most beautiful place of Mumbai located in Borivali East. One side a full of crowd of people and no space for peace in the Mumbai city, and another side this kind of completely peaceful historical place.The beauty of this place are caves and you can see a part of a city from the top of this place as it is on very height. Good place to visit during the weekend for Mumbai people.
At Kanheri Caves, civilization during the Buddhism time can be seen over here. There are number of caves at this place and the interesting thing is actually these are not only caves but a whole township type of construction. At each part of the Kanheri hills, different kinds of construction are found which seems like constructed in a well manner which contains underground water storage part, meditation rooms, drawing room and two benches outside of a house.
All these can be found in each house but in a different manner as the house is in which part of this Buddhist township. And another interesting thing is there is a prayer hall, in Hindi which is called "POOJA KHAND" for daily prayer and meditation. This place not only contain caves but also greenery among the caves as it can be said one part of the Sanjay Gandhi National Park.
Remembering Tiananmen
As many as 180,000 people were expected to attend the candlelight vigil at Victoria Park in Hong Kong on June 4, the 30th anniversary of the Tiananmen Square massacre. Commemorations took place in cities around the world to remember those who died when Chinese troops cracked down on pro-democracy protesters. No one knows for sure how many people were killed as China continues to censor any coverage or discussion of the event that takes place during the anniversary.


Metals are essential to everyday life: we use aluminium to make airplane bodies, copper to make piping, and steel to make bridges and cooking utensils, to name a few.
All of these metals are found naturally – in the Earth’s crust – but usually not in their pure form. They exist as ores: rocks that contain compounds of these metals. Millions of tonnes of rock are mined each year, because the pure metal contained in each tonne is only a small percentage.
If a metal is: (a) sufficiently useful to us; (b) found in large enough quantities; (c) not too difficult to separate from its ore, extracting it becomes worthwhile. It is mined and processed to make the pure metal.
Some metals are highly unreactive with other elements – e.g. silver, gold, platinum – and are found in their native state: the pure metal is mixed up in the rock; it is not found in compounds.
Some presently uneconomical ores might be extracted profitably in the future if new methods are discovered for their extraction. The financial viability of metal extraction may therefore change over time: scientific research and discovery continues.
Extraction of metals
There are different methods of extracting metals; these depend on the metal’s position in the reactivity series:
The more reactive a metal is, the harder it will be to extract: it will form many compounds. Highly reactive metals like potassium and sodium are extracted by electrolysis (see below). This is an expensive process using plenty of electricity.
The less reactive a metal is, the easier it will be to extract, e.g. gold or platinum. But that does not necessarily mean it will be economical to extract. It depends on how deep underground it is, in what quantities it can be found, and what price can be obtained for it.
Carbon, a non-metal, is often used to extract some metals. It reacts well when heated with common metal ores such as iron(III) oxide, tin oxide and lead oxide. This only works if carbon is more reactive than the metal – otherwise it is unable to displace oxygen in the metal’s oxide:
Generally metal oxide + carbon + HEAT ⇒
metal + carbon dioxide
Example iron(III) oxide + carbon + HEAT ⇒
iron + carbon dioxide
2Fe2O3 +3C ⇒ 4Fe + 3CO2
This type of reaction is called reduction: it removes oxygen.
If a metal is more reactive than carbon, it needs to be extracted using electrolysis. Carbon’s relative lack of reactivity (in this case) would not allow it to react with the metal substance and combine with the oxygen in the substance.
Oxidation and reduction (Edexcel)
The removal of oxygen from a compound is called reduction. In the example above, the metal oxide has ‘been reduced’. The opposite reaction – combining a metal with oxygen – is called oxidation.
Changes to the surface of a metal from its reaction with oxygen are called corrosion, a form of oxidation (see e.g. sodium exposed to air, Section 9.1). The corrosion of iron specifically – and alloys of it like steel – is called rusting.
Generally, the more reactive a metal is, the more it will corrode. Platinum and gold never corrode, this is one of the reasons they are called ‘precious’ metals. Aluminium only corrodes slightly: its oxidised outer layer protects the inner layer, rather than corroding further.


--- layout: about title: About ---
Write Angle is the official literary club of PES University!
The club has around 200 members in its community group who participate in writing tasks and events conducted by the club. The community is a forum for writers to share their work and to give and receive constructive criticism.


com.njkremer.Sqlite
Classes
ColumnExpression
DataConnectionManager
JoinExecutor
Relationship
SqlExecutor
SqlStatement
WhereExecutor
Enums
JoinExecutor.JoinType
Relationship.RelationshipType
StatementParts
StatementType
Exceptions
DataConnectionException


--- layout: post title: mark khaisman date: '2008-02-03T20:58:05+00:00' tags: [] tumblr_url: http://backlog.robbevan.com/post/25418851/mark-khaisman ---
Mark Khaisman


Computing statistics for 325 seconds. Tongue is usually boiled, sliced and marinated with a mixture of oil, vinegar, salt, chopped peppers and garlic. He returned to the Netherlands, where he maintained ties to Papuans and opened a dialogue with the government of Indonesia. MNNA thirty days after notifying Congress.Here’s a breakdown of how rock evolved in the island through the decades. The construction of the Mosque was completed in 1926 and the cost thereof was borne entirely by the women of the community. From 1461 to 1465 the career of Matthias was a perpetual struggle punctuated by truces.In spite of new material the band broke up yet again in 1993. VS then plunged into factional infighting. Some of gatherings have become annual traditions for the residents of Mt.Emerging Framework for Tangible User Interfaces.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.dtm.ref.ExpandedNameTable
public class ExpandedNameTable
This is a default implementation of a table that manages mappings from expanded names to expandedNameIDs. %OPT% The performance of the getExpandedTypeID() method is very important to DTM building. To get the best performance out of this class, we implement a simple hash algorithm directly into this class, instead of using the inefficient java.util.Hashtable. The code for the get and put operations are combined in getExpandedTypeID() method to share the same hash calculation code. We only need to implement the rehash() interface which is used to expand the hash table.
| Nested Class Summary | |
|---|---|
private static class |
ExpandedNameTable.HashEntry
Inner class which represents a hash table entry. |
| Field Summary | |
|---|---|
static int |
ATTRIBUTE
|
static int |
CDATA_SECTION
|
static int |
COMMENT
|
static int |
DOCUMENT
|
static int |
DOCUMENT_FRAGMENT
|
static int |
DOCUMENT_TYPE
|
static int |
ELEMENT
|
static int |
ENTITY
|
static int |
ENTITY_REFERENCE
|
(package private) ExtendedType |
hashET
Workspace for lookup. |
private int |
m_capacity
The capacity of the hash table, i.e. |
private static ExtendedType[] |
m_defaultExtendedTypes
The array to store the default extended types. |
private ExtendedType[] |
m_extendedTypes
Array of extended types for this document |
private static int |
m_initialCapacity
The initial capacity of the hash table. |
private static int |
m_initialSize
The initial size of the m_extendedTypes array |
private static float |
m_loadFactor
The default load factor of the Hashtable. |
private int |
m_nextType
Next available extended type |
private ExpandedNameTable.HashEntry[] |
m_table
The internal array to store the hash entries. |
private int |
m_threshold
The threshold of the hash table, which is equal to capacity * loadFactor. |
static int |
NAMESPACE
|
static int |
NOTATION
|
static int |
PROCESSING_INSTRUCTION
|
static int |
TEXT
|
| Constructor Summary | |
|---|---|
ExpandedNameTable()
Create an expanded name table. |
| Method Summary | |
|---|---|
int |
getExpandedTypeID(int type)
Given a type, return an expanded name ID.Any additional nodes that are created that have this expanded name will use this ID. |
int |
getExpandedTypeID(java.lang.String namespace,
java.lang.String localName,
int type)
Given an expanded name represented by namespace, local name and node type, return an ID. |
int |
getExpandedTypeID(java.lang.String namespace,
java.lang.String localName,
int type,
boolean searchOnly)
Given an expanded name represented by namespace, local name and node type, return an ID. |
ExtendedType[] |
getExtendedTypes()
Return the array of extended types |
java.lang.String |
getLocalName(int ExpandedNameID)
Given an expanded-name ID, return the local name part. |
int |
getLocalNameID(int ExpandedNameID)
Given an expanded-name ID, return the local name ID. |
java.lang.String |
getNamespace(int ExpandedNameID)
Given an expanded-name ID, return the namespace URI part. |
int |
getNamespaceID(int ExpandedNameID)
Given an expanded-name ID, return the namespace URI ID. |
int |
getSize()
Return the size of the ExpandedNameTable |
short |
getType(int ExpandedNameID)
Given an expanded-name ID, return the local name ID. |
private void |
initExtendedTypes()
Initialize the vector of extended types with the basic DOM node types. |
private void |
rehash()
Increases the capacity of and internally reorganizes the hashtable, in order to accommodate and access its entries more efficiently. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ExtendedType[] m_extendedTypes
private static int m_initialSize
private int m_nextType
public static final int ELEMENT
public static final int ATTRIBUTE
public static final int TEXT
public static final int CDATA_SECTION
public static final int ENTITY_REFERENCE
public static final int ENTITY
public static final int PROCESSING_INSTRUCTION
public static final int COMMENT
public static final int DOCUMENT
public static final int DOCUMENT_TYPE
public static final int DOCUMENT_FRAGMENT
public static final int NOTATION
public static final int NAMESPACE
ExtendedType hashET
private static ExtendedType[] m_defaultExtendedTypes
private static float m_loadFactor
private static int m_initialCapacity
private int m_capacity
private int m_threshold
private ExpandedNameTable.HashEntry[] m_table
| Constructor Detail |
|---|
public ExpandedNameTable()
| Method Detail |
|---|
private void initExtendedTypes()
public int getExpandedTypeID(java.lang.String namespace, java.lang.String localName, int type)
namespace
- The namespacelocalName
- The local nametype
- The node type
public int getExpandedTypeID(java.lang.String namespace, java.lang.String localName, int type, boolean searchOnly)
If searchOnly is true, we will return -1 if the name is not found in the table, otherwise the name is added to the table and the expanded name id of the new entry is returned.
namespace
- The namespacelocalName
- The local nametype
- The node typesearchOnly
- If it is true, we will only search for the expanded name.
-1 is return is the name is not found.
private void rehash()
public int getExpandedTypeID(int type)
public java.lang.String getLocalName(int ExpandedNameID)
ExpandedNameID
- an ID that represents an expanded-name.
public final int getLocalNameID(int ExpandedNameID)
ExpandedNameID
- an ID that represents an expanded-name.
public java.lang.String getNamespace(int ExpandedNameID)
ExpandedNameID
- an ID that represents an expanded-name.
public final int getNamespaceID(int ExpandedNameID)
ExpandedNameID
- an ID that represents an expanded-name.
public final short getType(int ExpandedNameID)
ExpandedNameID
- an ID that represents an expanded-name.
public int getSize()
public ExtendedType[] getExtendedTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Home
Info
How to help
About us
Sources/Citation
We are a group of students who would like to help the world!


Heart failure with reduced ejection fraction
heart failure with preserved ejection fraction
-
mortality:
-
in first year after diagnosis 30-40% die; 10% per year thereafter
-
highest
-
heart failure associated with:
-
Acute MI
-
arrhythmia
-
hypotensive
-
NYHA class IV
-
repeated hospitalisation
-
-
-
-
M>F
-
but F:
-
older than males when develop heart failure
-
have heart failure with a preserved ejection fraction
-
live longer than males with heart failure
-
more pronounced symptoms of heart failure compared to males
-
-
abnormality of structure or function of heart that leads to a failure of the heart to deliver sufficient oxygen to the metabolising tissues (or when heart can only do so with elevated diastolic filling pressures)
compensatory mechanisms eventually fail:
increase HR
increase cardiac muslce mass
increase cardiac filling pressures and blood volume
-
complex clincila syndrome
- typical signs and symptoms
-
risk factos:
-
IHD
- LV dysfunction
-
HTN
- 75% with heart failure
-
Valvular heart disease
-
Rhythm/conduction AbN
-
Cardiomyopathy
-
DM
-
Male
-
excessive Etoh
-
increase CVRA
-
direct cardiotoxin
-
-
Smoking
- direct cardiotoxin
-
Obesity
-
Dyslipidaemia
-
Respiratory condition
-
Thyroid disorders
-
Medicines
-
Cardiotoxins
-
Infections/inflammation
-
Congenital heart disease
-
-
evaluation undertaken:
-
new onset SOBOE
-
orthopnoea
-
PND
-
unless non cardiac cause
-
Symptoms
Typical
-
dyspnoea
-
orthopnoea
-
PND
-
reduced exercise tolerance
-
Fatigue, weakness, more time needed to recover oafter exercise
-
ankle oedema
-
consider varicose veins
-
medicines: CCB
-
decrease mobility
-
Less typical
-
nocturnal cough
-
wheezing
-
Weight gain of >2kg
-
bloated feeling
-
anorexia, nausea
-
cerrebral symptoms
- reduced cardiac output
-
depression
-
palpitations, chest pain or pressure
-
syncope
signs
-
more specific
-
elevated JVP
-
prolonged hepatojugular reflex
-
third heart sound (gallop rhythm)
-
laterally displaced apicle impulse
-
cardiac murmur
-
-
less specific
-
peripheral oedema
-
crepitations
-
decrease AE (pleural effusion)
-
tachycardia
-
irregular pulse
-
Tachypnoea
-
Hepatomegaly
-
Cachexia
-
-
careful attention causative factors:
-
htn
-
MI
-
valvular heart disease
-
atrial fibrillation
-
-
low specificity
-
exertional SOB
-
ankle swelling
-
-
more specific
-
orthopnoea
-
PND
-
Heart failure with preserved ejection fraction
-
50% of people with symptoms and signs of heart failure have been shown to have preserved or relatively preserved (≥ 45-50% LVEF)
-
definition
-
Symptoms typical of heart failure
-
Signs typical of heart failure
-
Normal or only mildly red. LVEF and no LV dilatation
-
relevant structural heart disease:
-
LV hypertrophy
-
LA enlargement
-
diastolic dysfunction
-
-
-
more frequently seen in:
-
elderly
-
females
-
obese
-
-
more likley to have
-
AF
-
hypertension
-
-
underlying causes;
-
constrictive pericarditis
-
cardiomyotphay
-
hypertrophic cardiomyopahty
-
restrictive cardiomyopahty
-
amyloidosis
-
sarcoidosis
-
-
Heart failure with reduced ejection fraction
-
impaired LV systolic function
-
definition
-
typical symptoms and signs
-
evidence of reduced LVEF on ECHO
-
Investigations
MICE rule:
-
increase diagnostic vaule of BNP and guide decisiions for ECHO
-
Male
-
Infarction
-
Crepitations
-
Edema
-
symptomatic patients who have ≥1 of above
-
refer for ECHO without need for BNP
-
else order BNP and refer based on above
-
-
studies underway to validate use in primary care
ECHO
-
gold standard
-
all patients should have ECHO
-
can get guidance from ECG and BNP
-
2 weeks
- if history of previous MI and elevated BNP
-
6 weeks
- if no history of MI and moderately raised BNP
-
BNP
-
assists in diagnosis
-
‘rule out’ test
-
cannot differentiate between HF-REF and HF-PEF
-
high levels associated with poorer prognosis
-
unlikely:
- \<100
-
likely
- >500
-
grey zone
-
may be elevated in absence of HF:
-
atrial fibrillation
-
COPD
-
ACS
-
pulmonary embolism
-
pulmonary hypertension
-
renal impairment
-
-
may be normal/marginaly elevated:
-
obese
-
recently commenced on diuretics
-
sudden onset (“flash”) pulmonary oedema
-
-
if diagnosis likely from clinical and other tests:
-
ecg
-
cxr
-
do not require BNP
-
ECG
-
long term left ventricular dysfunction
-
LA enlargement
-
LV hypertrophy
-
-
normal ECG usually rulse out heart failure
-
assess other cardiac pathology
CXR
-
most useful in apatient who is acutely unwell with pulmonary oedema
-
may help differentiate from pulmonary causes of SOB
Classification
-
worsening prognosis as move down classes;
-
NYHA
-
Class I:
- asymptomatic
-
Class 2:
-
mild symptoms
-
comfortable at rest
-
dyspnoea, fatigue, palpitations with ordinary physical activity
-
-
Class 3:
-
moderate symptoms
-
comfortable at rest
-
develops dyspnoea, fatigue, palpitations with less than ordinary phsycial activity
-
-
class 4:
-
severe symptoms
- unable to do any psycal activity
-
Management
goal =
improve symptoms and signs
decrease hospital admission
improve longevity
HF-REF
-
diuretic
-
reduce fluid overload to improve patient’s symptoms
-
no evidence improve mortality
-
loop diurectic
-
more effective
-
frusemide 20-40mg daily
-
improvement and weight loss of 1.0kg/day
-
bumetanide alternative who don’t respond
-
0.5-1mg/day
-
max = 5mg/day
-
-
-
too little;
-
blunt repsonse to ACEi
-
increase risk of decomensation when Bblocker introduced
-
-
too much;
-
increase risk of hypotension and rnal impairment
- especially when ACEi started
-
-
-
add ACEi and beta-blocker
-
improve both morbidity and mortality
-
ACEi
-
reduce symptoms
-
assis wtih LV remodelling
-
any medicine from ACEi class
-
if hypotension going to occur - will occur @ low doses; increasing dose wont’ make a difference
-
acceptable:
-
K \<5.5
-
eFGR \<50% increase in baseline
- if Cr >30% then change dose in CKD
-
-
if elevation:
-
reduce dose of diuretic, stop nephrotoxic
-
if remain raised
-
halve dose of ACEi
-
check in 2 weeks
-
-
-
-
-
beta-blocker
-
improve ventricular function
- markedly improve ejection fraction
-
no clear evidecne that any one more superior
-
bisoprolol
-
more cardioselective
-
reduces hr more than other betablockers
-
1.25mg OD gradually increasing
- aim for maintenance dose of 10mg od
-
-
-
start at low dose
- ‘go slow, aim high’
-
-
-
Add spironolactone
-
aldoseterone receptor antagonist
-
remain symptomatic or EF\<35%
-
reduce both morbidity and mortality
-
used in caution with impiared renal function and may cause hyperkalaemia
-
-
Digoxin
-
slow ventricular rate
-
improve symptoms
- symptomatic HF and AF
-
-
Use CHA2DS2 - VASc
-
digoxin didn’t improve survival
-
64% improvement symptoms
- NNT 9
-
23% reduction in hospitalisation
-
DIG trial
-
-
toxicity increase by hypokalaemia
-
-
nitrates
-
V-HEFT
- improve mortality in chronic heart failure
-
HF-PEF
-
evidence limited
-
should usually be referred to cardiologist for initial management
-
usually more brittle
- require careful control of fluid balance
-
beta blockers
-
prolonging diastole
-
rate limiting CCB can be used as an alternative
-
may improve symptoms and exercsie tolerance
-
NOT HF-REF
-
-
-
ACEi
-
Digoxin
Non-pharmacological
-
weight themselves daily
- establish “dry weight”
-
Participate in regular exercise
-
Avoid excessive salt and etoh
-
monitor fluid intake
- 1.5-2L/day restrict
-
maximise adherence to medicines
-
annyal influenza vaccination
Referral
-
valvular heart disease
-
heart failure and syncope
- PPM
-
HF and LBBB and wide QRS
-
associated with dyssyncrony
-
Caridac resynchronisation therapy/biventricular pacing may be indicated
-
-
history of cardiac arrest of VT
Left ventricular systolic dysfunction
-
LVEF \<45%
-
patient education
-
self managmenet
-
non pharmacological
-
pharmacotherapy
-
ACEi / ARB
-
Diuretics
-
beta- blockers
-
spironolactone
-
-
Device
-
cardiac resynchronisation therapy
-
implantable cardioverter defibrillator
-
-
Additional pharmacotherpy
-
Digoxin
-
nitrate
-
-
management of co-existing AF
-


%} {% endblock %}


Currently using numbers:
Card number:
CVV:
Expiration Month:
Expiration Year:
Choose which test card to use
Successful cards
Visa
MasterCard
American Express
Cards that will fail
Visa
MasterCard
American Express
Cards that will show fraud
Visa
Expiration:
Expiration month
Expiration year


I wanted to take the Digtal Engeering class to learn more about the machines. I have always come in here throughout the years not knowing how to work the machines and make things. I always would love to make like a big project of some kind, but im not sure what I would make. But just to get ideas.


Replaces an operator assignment expression which increments or decrements an
int
or
long
with an equivalent postfix increment or decrement expression.


How to make a two-sided shader material in Blender 2.8 EEVEE and Cycles
Daniel Oakfield writes:
The quickest way to make a two-sided shader material in Blender 2.8, the same technique works for Cycles and EEVEE as well. As a bonus, I also compare and explain how to assign multiple materials to a mesh!
This is a beginner tutorial!


Book | Pay | Travel
No more queues on jammed streets and bus stations for bus tickets.
Book a bus ticket from your couch or when you are on the move.
No more queues on jammed streets and bus stations for bus tickets.
Book a bus ticket from your couch or when you are on the move.


{% extends "admin/base_site.html" %} {% block breadcrumbs %}
{{ _("Your password has been set. You may go ahead and log in now.") }}
{{ _('Log in') }}