test

Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.

Running Code

When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:

1 + 1
2

You can add options to executable code like this

4

The echo: false option disables the printing of code (only output is displayed).

import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()

A line plot on a polar axis

Polar axis plot

Section

This document uses Font Awesome .

flowchart LR
  A[qmd] --> B(Knitr)
  A[qmd] --> C(Jupyter)
  B(Knitr) --> D[md]
  C(Jupyter) --> D[md]
  D[md] --> E(pandoc)
  E(pandoc) --> F(HTML)
  E(pandoc) --> G(PDF)
  E(pandoc) --> H(Word)
  E(pandoc) --> I{and more}

Figure 1: How Quarto orchestrates rendering of documents: start with a qmd file, use the Knitr or Jupyter engine to perform the computations and convert it to an md file, then use Pandoc to convert to various file formats including HTML, PDF, and Word.

import spacy
nlp = spacy.load("en_core_web_sm")
text='Tony Stark owns the company StarkEnterprises . Emily Clark works at Microsoft and lives in Manchester. She loves to read the Bible and learn French'
doc=nlp(text)
print(doc.ents)
(Tony Stark, Clark, Microsoft, Bible, French)
for entity in doc.ents:
  print(entity.text,'--- ',entity.label_)
Tony Stark ---  PERSON
Clark ---  PERSON
Microsoft ---  ORG
Bible ---  WORK_OF_ART
French ---  LANGUAGE
from spacy import displacy
displacy.render(doc,style='ent',jupyter=True)
Tony Stark PERSON owns the company StarkEnterprises . Emily Clark PERSON works at Microsoft ORG and lives in Manchester. She loves to read the Bible WORK_OF_ART and learn French LANGUAGE