Add example site

This commit is contained in:
Joseph Kato
2020-01-22 22:03:16 -08:00
parent e5a08ce1a8
commit 552a970ef5
17 changed files with 1178 additions and 0 deletions

Binary file not shown.

122
code/py/requirements.txt Normal file
View File

@@ -0,0 +1,122 @@
altgraph==0.16.1
appdirs==1.4.3
atomicwrites==1.3.0
attrs==18.2.0
beautifulsoup4==4.7.0
black==18.9b0
bleach==3.1.0
blinker==1.4
cachetools==3.1.0
certifi==2018.8.24
chardet==3.0.4
Click==7.0
cssselect==1.0.3
cycler==0.10.0
cymem==2.0.2
cytoolz==0.9.0.1
delegator.py==0.1.1
dill==0.2.9
docutils==0.15
en-core-web-sm==2.0.0
et-xmlfile==1.0.1
falcon==1.4.1
feedfinder2==0.0.4
feedgenerator==1.9
feedparser==5.2.1
future==0.18.2
GDAL==2.4.2
gitdb2==2.0.6
GitPython==3.0.4
hug==2.4.7
idna==2.8
importlib-metadata==0.18
jdcal==1.4.1
jieba3k==0.35.1
Jinja2==2.10.3
joblib==0.13.2
jsonschema==2.6.0
kiwisolver==1.1.0
lxml==4.3.0
macholib==1.11
markdata==0.5.1
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==3.1.0
more-itertools==7.1.0
msgpack==0.5.6
msgpack-numpy==0.4.3.2
murmurhash==1.0.2
newspaper3k==0.2.8
nltk==3.4
numpy==1.16.4
opencv-python==4.1.0.25
openpyxl==2.6.2
oyaml==0.9
packaging==19.0
pandas==0.24.2
pathspec==0.5.9
peewee==2.10.2
pelican==4.2.0
pep8==1.7.1
pexpect==4.7.0
Pillow==5.4.0
pipenv==2018.11.26
pkginfo==1.5.0.1
plac==0.9.6
pluggy==0.12.0
preshed==2.0.1
prodigy==1.7.1
proselint==0.10.2
ptyprocess==0.6.0
py==1.8.0
pyasn1==0.4.5
pycodestyle==2.5.0
pyenchant==2.0.0
Pygments==2.4.2
PyInstaller==3.5
PyJWT==1.7.1
pyparsing==2.4.0
pytest==5.0.1
python-dateutil==2.7.5
python-frontmatter==0.4.5
python-mimeparse==1.6.0
pytz==2019.1
PyYAML==3.13
readme-renderer==24.0
regex==2018.1.10
requests==2.21.0
requests-file==1.4.3
requests-toolbelt==0.9.1
rsa==4.0
scikit-learn==0.21.1
scipy==1.3.0
seaborn==0.9.0
singledispatch==3.4.0.3
six==1.12.0
sklearn==0.0
smmap2==2.0.5
soupsieve==1.6.2
spacy==2.0.18
tabulate==0.8.3
TBB==0.1
thinc==6.12.1
tinysegmenter==0.3
tldextract==2.2.0
toml==0.10.0
toolz==0.9.0
torch==1.0.1
torchvision==0.2.2.post3
tqdm==4.31.1
twine==1.13.0
ujson==1.35
Unidecode==1.0.22
UpSetPlot==0.2.1
urllib3==1.24.1
virtualenv==16.0.0
virtualenv-clone==0.3.0
waitress==1.2.1
wcwidth==0.1.7
webencodings==0.5.1
wrapt==1.10.11
yamllint==1.14.0
zipp==0.5.2

26
code/py/test.py Normal file
View File

@@ -0,0 +1,26 @@
"""Testing Python with Markdata
Usage: $ pytest test.py
"""
def test_yaml():
"""An example of testing a Python code example.
"""
# Code snippet start:
from ruamel.yaml import YAML
inp = """\
- &CENTER {x: 1, y: 2}
- &LEFT {x: 0, y: 2}
- &BIG {r: 10}
- &SMALL {r: 1}
# Override
- <<: [*BIG, *LEFT, *SMALL]
x: 1
label: center/big
"""
yaml = YAML()
data = yaml.load(inp)
assert data[4]['y'] == 2