“I’ve got some good news... and I’ve got some bad news,” the lawgiver yells to them.
“Which do you want first?”
“The good news!” the hedonists reply.
“I got Him from fifteen commandments down to ten!”
“Hallelujah!” cries the unruly crowd. “And the bad?”
“Adultery is still in.”
- - -
The Hedonists think: Why should we be judged according to another’s rule?
And yet judged we are.
After all, God didn’t give Moses “The Ten Suggestions,” he gave Commandments; and if I’m a free agent, my first reaction to a command might just be that nobody, not even God, tells me what to do.
Even if it’s good for me.
An upper respiratory tract infection (URTI) is an illness caused by an acute infection, which involves the upper respiratory tract, including the nose, sinuses, pharynx, larynx or trachea.
Medication
Amoxycillin 500
Period: 5 Days
Timing: Day and Night (after food)
Medication Side-effects
Rare: fever
URTI
A common viral infection that affects the nose, throat and airways.
Upper respiratory tract infections usually resolve within seven to 10 days.
Symptoms usually resolve within two weeks and include a scratchy or sore throat, sneezing, stuffy nose and cough.
Treatment includes rest and medication to relieve symptoms.
Stats
Very common: More than 10 million cases per year (India)
Spreads easily
Usually self-treatable
Usually self-diagnosable
Lab tests or imaging rarely required
Short-term: resolves within days to weeks
HOW IT SPREADS
By airborne respiratory droplets (coughs or sneezes).
By touching a contaminated surface (blanket or doorknob).
By saliva (kissing or shared drinks).
Tags:Technology,Medicine,Science,
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash
No local changes to save
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing> echo "20210826" > 20210826.txt
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git status
On branch main
Your branch is up to date with 'origin/main'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
20210826.txt
nothing added to commit but untracked files present (use "git add" to track)
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash
No local changes to save
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git add -A
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git status
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: 20210826.txt
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash
Saved working directory and index state WIP on main: 9f1b42f Merge branch 'test_branch' into main
(base) C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git branch
* main
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>dir
Volume in drive C is Windows
Volume Serial Number is 8139-90C0
Directory of C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing
08/26/2021 06:05 PM <DIR> .
08/26/2021 06:05 PM <DIR> ..
08/26/2021 04:15 PM 368 .gitignore
08/26/2021 04:15 PM 30 20210528_test_branch.txt
08/26/2021 04:15 PM 17 202107141543.txt
08/26/2021 04:15 PM 17 202107141608.txt
08/26/2021 04:15 PM 17 202107211228.txt
08/26/2021 04:15 PM 11,558 LICENSE
08/26/2021 04:15 PM 11 newFile.txt
08/26/2021 04:15 PM 38 README.md
08/26/2021 04:15 PM 23 test_file_20210528.txt
9 File(s) 12,079 bytes
2 Dir(s) 66,473,070,592 bytes free
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash list
stash@{0}: WIP on main: 9f1b42f Merge branch 'test_branch' into main
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git show
commit 9f1b42fe6b2cf1fbc3781cdb463b284f871ad291 (HEAD -> main, origin/test_branch, origin/main, origin/HEAD)
Merge: d210505 087a5ca
Author: unknown <ashishjain1547@gmail.com>
Date: Wed Jul 21 12:41:37 2021 +0530
Merge branch 'test_branch' into main
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash apply
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: 20210826.txt
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git status
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: 20210826.txt
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>dir
Volume in drive C is Windows
Volume Serial Number is 8139-90C0
Directory of C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing
08/26/2021 06:16 PM <DIR> .
08/26/2021 06:16 PM <DIR> ..
08/26/2021 04:15 PM 368 .gitignore
08/26/2021 04:15 PM 30 20210528_test_branch.txt
08/26/2021 04:15 PM 17 202107141543.txt
08/26/2021 04:15 PM 17 202107141608.txt
08/26/2021 04:15 PM 17 202107211228.txt
08/26/2021 06:16 PM 13 20210826.txt
08/26/2021 04:15 PM 11,558 LICENSE
08/26/2021 04:15 PM 11 newFile.txt
08/26/2021 04:15 PM 38 README.md
08/26/2021 04:15 PM 23 test_file_20210528.txt
10 File(s) 12,092 bytes
2 Dir(s) 66,475,622,400 bytes free
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash show
20210826.txt | 1 +
1 file changed, 1 insertion(+)
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash list
stash@{0}: WIP on main: 9f1b42f Merge branch 'test_branch' into main
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash clear
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash list
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>git stash show
No stash entries found.
C:\Users\Ashish Jain\OneDrive\Desktop\(1)\repo_for_testing>
Ref: git-scmTags: Technology,GitHub,
Git config variables can be stored in 3 different levels. Each level overrides values in the previous level.
--global use global config file
--system use system config file
--local use repository config file
- - - - - - - - - -
(base) CMD> git config
usage: git config [<options>]
Config file location
--global use global config file
--system use system config file
--local use repository config file
--worktree use per-worktree config file
-f, --file <file> use given config file
--blob <blob-id> read config from given blob object
Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--get-urlmatch get value specific for the URL: section[.var] URL
--replace-all replace all matching variables: name value [value_regex]
--add add a new variable: name value
--unset remove a variable: name [value-regex]
--unset-all remove all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit open an editor
--get-color find the color configured: slot [default]
--get-colorbool find the color setting: slot [stdout-is-tty]
Type
-t, --type <> value is given this type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)
--expiry-date value is an expiry date
Other
-z, --null terminate values with NUL byte
--name-only show variable names only
--includes respect include directives on lookup
--show-origin show origin of config (file, standard input, blob, command line)
--show-scope show scope of config (worktree, local, global, system, command)
--default <value> with --get, use default value when missing entry
- - - - - - - - - -
(base) CMD> git config --list
http.sslcainfo=E:/programfiles/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
add.interactive.usebuiltin=true
core.editor="E:\\programfiles\\Microsoft VS Code\\Code.exe" --wait
core.autocrlf=true
core.fscache=true
core.symlinks=true
pull.rebase=false
user.email=ashishjain1547@gmail.com
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process*
- - - - - - - - - -
(base) C:\Users\Ashish Jain\OneDrive\Desktop>git config --get user.email
ashishjain1547@gmail.com
If a variable is not set, it returns empty line and fails silently.
(base) C:\Users\Ashish Jain\OneDrive\Desktop>git config --get user.name
(base) C:\Users\Ashish Jain\OneDrive\Desktop>
- - - - - - - - - -
Check Global Configurations:
(base) C:\Users\Ashish Jain>cd
C:\Users\Ashish Jain
(base) C:\Users\Ashish Jain>dir .gitconfig
Volume in drive C is Windows
Volume Serial Number is 8139-90C0
Directory of C:\Users\Ashish Jain
05/03/2021 09:52 PM 167 .gitconfig
1 File(s) 167 bytes
0 Dir(s) 66,402,430,976 bytes free
~~~
(base) C:\Users\Ashish Jain>type .gitconfig
[user]
email = ashishjain1547@gmail.com
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
- - - - - - - - - -
(base) C:\Users\Ashish Jain\OneDrive\Desktop\repo_for_testing>git config --list --show-scope --show-origin
system file:E:/programfiles/Git/etc/gitconfig http.sslcainfo=E:/programfiles/Git/mingw64/ssl/certs/ca-bundle.crt
system file:E:/programfiles/Git/etc/gitconfig http.sslbackend=openssl
system file:E:/programfiles/Git/etc/gitconfig diff.astextplain.textconv=astextplain
system file:E:/programfiles/Git/etc/gitconfig filter.lfs.clean=git-lfs clean -- %f
system file:E:/programfiles/Git/etc/gitconfig filter.lfs.smudge=git-lfs smudge -- %f
system file:E:/programfiles/Git/etc/gitconfig filter.lfs.process=git-lfs filter-process
system file:E:/programfiles/Git/etc/gitconfig filter.lfs.required=true
system file:E:/programfiles/Git/etc/gitconfig credential.helper=manager
system file:E:/programfiles/Git/etc/gitconfig add.interactive.usebuiltin=true
system file:E:/programfiles/Git/etc/gitconfig core.editor="E:\\programfiles\\Microsoft VS Code\\Code.exe" --wait
system file:E:/programfiles/Git/etc/gitconfig core.autocrlf=true
system file:E:/programfiles/Git/etc/gitconfig core.fscache=true
system file:E:/programfiles/Git/etc/gitconfig core.symlinks=true
system file:E:/programfiles/Git/etc/gitconfig pull.rebase=false
global file:C:/Users/Ashish Jain/.gitconfig user.email=ashishjain1547@gmail.com
global file:C:/Users/Ashish Jain/.gitconfig filter.lfs.required=true
global file:C:/Users/Ashish Jain/.gitconfig filter.lfs.clean=git-lfs clean -- %f
global file:C:/Users/Ashish Jain/.gitconfig filter.lfs.smudge=git-lfs smudge -- %f
global file:C:/Users/Ashish Jain/.gitconfig filter.lfs.process=git-lfs filter-process
local file:.git/config core.repositoryformatversion=0
local file:.git/config core.filemode=false
local file:.git/config core.bare=false
local file:.git/config core.logallrefupdates=true
local file:.git/config core.ignorecase=true
local file:.git/config remote.origin.url=https://github.com/ashishjain1547/repo_for_testing.git
local file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
local file:.git/config branch.main.remote=origin
local file:.git/config branch.main.merge=refs/heads/main Tags: Technology,GitHub,
Article 15 of the Constitution of India forbids discrimination on grounds only of:
1. religion,
2. race,
3. caste,
4. sex, or
5. place of birth
It applies Article 14's general principle of equality in specific situations by forbidding classifications made on protected grounds.
While prohibiting discrimination based on prejudice, the Article is also the central issue in a large body of judicial decisions, public debate, and legislation revolving around affirmative action, reservations, and quotas.
As of the 103rd Amendment of the Constitution of India, Article 15 has five clauses.
General prohibition against state discrimination
Clause (1) prohibits discrimination against citizens on protected grounds.
(1) The State shall not discriminate against any citizen on grounds only of religion, race, caste, sex, place of birth or any of them.
Gay, Lesbian, Bisexual and Transgender people are also protected by Article 15, as discrimination against them is discrimination on the basis of 'sex' as interpreted by the Supreme Court.Horizontal prohibition of denial of access
Clause (2) mandates that citizens may access various public or commercial spaces or utilities without discrimination on protected grounds.
(2) No citizen shall, on grounds only of religion, race, caste, sex, place of birth or any of them, be subject to any disability, liability, restriction or condition with regard to:
(a) access to shops, public restaurants, hotels and palaces of public entertainment; or
(b) the use of wells, tanks, bathing ghats, roads and places of public resort maintained wholly or partly out of State funds or dedicated to the use of the general public
Clauses 3-6: Special provisions for disadvantaged groups
Clauses (3)-(5) create exceptions or 'special provisions' for these general prohibitions, by allowing the State to create special provisions for women, children, socially and educationally backward classes, scheduled castes and scheduled tribes.Women and children
(3) Nothing in this article shall prevent the State from making any special provision for women and children.
Socially and educationally backward classes
(4) Nothing in this article or in clause (2) of Article 29 shall prevent the State from making any special provision for the advancement of any socially and educationally backward classes of citizens or for the Scheduled Castes and the Scheduled Tribes.
Reservations in educational institutions
(5) Nothing in this article or in sub-clause (g) of clause (1) of Article 19 shall prevent the State from making any special provision, by law, for the advancement of any socially and educationally backward classes of citizens or for the Scheduled Castes or the Scheduled Tribes insofar as such special provisions relate to their admission to educational institutions including private education institutions, whether aided or unaided by the State, other than the minority educational institutions referred to in clause (1) of Article 30.
Economically weaker sections
(6) Nothing in this article or sub-clause (g) of clause (1) of article 19 or clause (2) of article 29 shall prevent the State from making—
(a) any special provision for the advancement of any economically weaker sections of citizens other than the classes mentioned in clauses (4) and (5); and
(b) any special provision for the advancement of any economically weaker sections of citizens other than the classes mentioned in clauses (4) and (5) in so far as such special provisions relate to their admission to educational institutions including private educational institutions, whether aided or unaided by the State, other than the minority educational institutions referred to in clause (1) of article 30, which in the case of reservation would be in addition to the existing reservations and subject to a maximum of ten per cent. of the total seats in each category.
Explanation — For the purposes of this article and article 16, "economically weaker sections" shall be such as may be notified by the State from time to time on the basis of family income and other indicators of economic disadvantage.
Ref: Wikipedia: 20210819Tags: Behavioral Science, Biography, Emotional Intelligence, Indian Politics, Politics, Psychology
For our examples in this post, we would use the following sentence as input:
sentence = "Thomas Jefferson began building Monticello at the age of 26."
-----
For the fundamental building blocks of NLP, there are equivalents in a computer language compiler:
# tokenizer — scanner, lexer, lexical analyzer
# vocabulary — lexicon
# parser — compiler
# token, term, word, sentence, or n-gram — token, symbol, or terminal symbol
N-gram: two-gram, three-gram or four-gram... so on.
For sentence: Thomas Jefferson began building Monticello at the age of 26.
Two-grams: “Thomas Jefferson”, “Jefferson began”, “began building”, ...
Three-grams: “Thomas Jefferson began”, “Jefferson began building”, ...
-----
One Hot Vector
Each row of the table is a binary row vector, and you can see why it’s also called a one-hot vector: all but one of the positions (columns) in a row are 0 or blank. Only one column, or position in the vector, is “hot” (“1”). A one (1) means on, or hot. A zero (0) means off, or absent. And you can use the vector:
[0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
to represent the word “began” in your NLP pipeline.
-----
One-hot vector Representation of a Document
-----
One hot encoding of a categorical column
-----
Word Frequency Vector Representation of the Corpus
If you summed all these one-hot vectors together, rather than “replaying” them one at a time, you’d get a bag-of-words vector. This is also called a word frequency vector, because it only counts the frequency of words, not their order.
Ex 1:
Ex 2:
-----
Explaining Construction of "Word Frequence Vector Representation"
1) Thomas Jefferson began building Monticello at the age of 26.
2) Construction was done mostly by local masons and carpenters.
3) He moved into the South Pavilion in 1770.
4) Turning Monticello into a neoclassical masterpiece was Jefferson's obsession.
We have 26 and 1770 as Numbers.
First step to building vocabulary is sorting the words:
Sorting the words:
1770, 26, Construction, He...
-----
Dot product / Inner product / Scalar product
Geometric Definition
In Euclidean space, a Euclidean vector is a geometric object that possesses both a magnitude and a direction. A vector can be pictured as an arrow. Its magnitude is its length, and its direction is the direction to which the arrow points. The magnitude of a vector “a” is denoted by ||a||. The dot product of two Euclidean vectors a and b is defined by:
An application of dot product
Sent0 = I am Ashish.
Sent1 = Maybe am not.
Words: I am Ashish Maybe not
Sent0 1 1 1 0 0
Sent1 0 1 0 1 1
SENT0.SENT1 = (1 * 0) + (1 * 1) + (1 * 0) + (0 * 1) + (0 * 1)
= 1
Number of common words in these two sentences is “1”.
-----
Several Python libraries implement tokenizers, each with its own advantages and disadvantages
# spaCy — Accurate , flexible, fast, Python
# Stanford CoreNLP — More accurate, less flexible, fast, depends on Java 8
# NLTK — Standard used by many NLP contests and comparisons, popular, Python
-----
Treebank Word Tokenizer
An even better tokenizer is the Treebank Word Tokenizer from the NLTK package. It incorporates a variety of common rules for English word tokenization. For example, it separates phrase-terminating punctuation (?!.;,) from adjacent tokens and retains decimal numbers containing a period as a single token. In addition, it contains rules for English contractions. For example, “don’t” is tokenized as ["do", "n’t"]. This tokenization will help with subsequent steps in the NLP pipeline, such as stemming. You can find all the rules for the Treebank Tokenizer at: nltk.tokenize.treebank
-----
Stop Words
Stop words are common words in any language that occur with a high frequency but carry much less substantive information about the meaning of a phrase. Examples of some common stop words include:
 a, an
 the, this
 and, or
 of, on
Historically, stop words have been excluded from NLP pipelines in order to reduce the computational effort to extract information from a text. Even though the words themselves carry little information, the stop words can provide important relational information as part of an n-gram. Consider these two examples:
 Mark reported to the CEO
 Suzanne reported as the CEO to the board
-----
Document Parsing Ends Here And: Word Embeddings Begin.
Word Embeddings
One of the most exciting recent advancements in NLP is the “discovery” of word vectors. This chapter will help you understand what they are and how to use them to do some surprisingly powerful things. You’ll learn how to recover some of the fuzziness and subtlety of word meaning that was lost in the approximations of earlier chapters.
In the previous chapters, we ignored the nearby context of a word. We ignored the words around each word. We ignored the effect the neighbors of a word have on its meaning and how those relationships affect the overall meaning of a statement. Our bag-of-words concept jumbled all the words from each document together into a statistical bag. In this chapter, you’ll create much smaller bags of words from a “neighborhood” of only a few words, typically fewer than 10 tokens. You’ll also ensure that these neighborhoods of meaning don’t spill over into adjacent sentences. This process will help focus your word vector training on the relevant words.
Word Vectors or Word Embeddings
Word vectors are numerical vector representations of word semantics, or meaning, including literal and implied meaning. So word vectors can capture the connotation of words, like “peopleness,” “animalness,” “placeness,” “thingness,” and even “conceptness.” And they combine all that into a dense vector (no zeros) of floating point values. This dense vector enables queries and logical reasoning.
Labels: Artificial Intelligence,Natural Language Processing,Python,Technology,