Skip to content

Commit d53c343

Browse files
committed
Add initial nbdev setup.
1 parent 157c2ef commit d53c343

File tree

4 files changed

+433
-0
lines changed

4 files changed

+433
-0
lines changed

.gitignore

+140
Original file line numberDiff line numberDiff line change
@@ -1 +1,141 @@
1+
*.bak
2+
.gitattributes
3+
.last_checked
4+
.gitconfig
5+
*.bak
6+
*.log
7+
*~
8+
~*
9+
_tmp*
10+
tmp*
11+
tags
12+
13+
# Byte-compiled / optimized / DLL files
14+
__pycache__/
15+
*.py[cod]
16+
*$py.class
17+
18+
# C extensions
19+
*.so
20+
21+
# Distribution / packaging
22+
.Python
23+
env/
24+
build/
25+
develop-eggs/
26+
dist/
27+
downloads/
28+
eggs/
29+
.eggs/
30+
lib/
31+
lib64/
32+
parts/
33+
sdist/
34+
var/
35+
wheels/
36+
*.egg-info/
37+
.installed.cfg
38+
*.egg
39+
40+
# PyInstaller
41+
# Usually these files are written by a python script from a template
42+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
43+
*.manifest
44+
*.spec
45+
46+
# Installer logs
47+
pip-log.txt
48+
pip-delete-this-directory.txt
49+
50+
# Unit test / coverage reports
51+
htmlcov/
52+
.tox/
53+
.coverage
54+
.coverage.*
55+
.cache
56+
nosetests.xml
57+
coverage.xml
58+
*.cover
59+
.hypothesis/
60+
61+
# Translations
62+
*.mo
63+
*.pot
64+
65+
# Django stuff:
66+
*.log
67+
local_settings.py
68+
69+
# Flask stuff:
70+
instance/
71+
.webassets-cache
72+
73+
# Scrapy stuff:
74+
.scrapy
75+
76+
# Sphinx documentation
77+
docs/_build/
78+
79+
# PyBuilder
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# pyenv
86+
.python-version
87+
88+
# celery beat schedule file
89+
celerybeat-schedule
90+
91+
# SageMath parsed files
92+
*.sage.py
93+
94+
# dotenv
95+
.env
96+
97+
# virtualenv
98+
.venv
99+
venv/
100+
ENV/
101+
102+
# Spyder project settings
103+
.spyderproject
104+
.spyproject
105+
106+
# Rope project settings
107+
.ropeproject
108+
109+
# mkdocs documentation
110+
/site
111+
112+
# mypy
113+
.mypy_cache/
114+
115+
.vscode
116+
*.swp
117+
118+
# osx generated files
1119
.DS_Store
120+
.DS_Store?
121+
.Trashes
122+
ehthumbs.db
123+
Thumbs.db
124+
.idea
125+
126+
# pytest
127+
.pytest_cache
128+
129+
# tools/trust-doc-nbs
130+
docs_src/.last_checked
131+
132+
# symlinks to fastai
133+
docs_src/fastai
134+
tools/fastai
135+
136+
# link checker
137+
checklink/cookies.txt
138+
139+
# .gitconfig is now autogenerated
140+
.gitconfig
141+

00_core.ipynb

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# default_exp core"
10+
]
11+
},
12+
{
13+
"cell_type": "markdown",
14+
"metadata": {},
15+
"source": [
16+
"# Jacobs VAULT (module name)\n",
17+
"\n",
18+
"> Contains Jacobs' response to the VAULT challenge problem to correlate noisy satellite TLE data with AIS ship tracks, and see what we can find. (Add more info later.)"
19+
]
20+
},
21+
{
22+
"cell_type": "code",
23+
"execution_count": null,
24+
"metadata": {},
25+
"outputs": [],
26+
"source": [
27+
"#hide\n",
28+
"from nbdev.showdoc import *"
29+
]
30+
},
31+
{
32+
"cell_type": "code",
33+
"execution_count": null,
34+
"metadata": {},
35+
"outputs": [],
36+
"source": [
37+
"#export\n",
38+
"def say_hello(to):\n",
39+
" \"\"\"Say hello to the reader.\"\"\"\n",
40+
" return f'Hello {to}!'"
41+
]
42+
},
43+
{
44+
"cell_type": "markdown",
45+
"metadata": {},
46+
"source": [
47+
"Example:"
48+
]
49+
},
50+
{
51+
"cell_type": "code",
52+
"execution_count": null,
53+
"metadata": {},
54+
"outputs": [
55+
{
56+
"data": {
57+
"text/plain": [
58+
"'Hello Kevin!'"
59+
]
60+
},
61+
"execution_count": null,
62+
"metadata": {},
63+
"output_type": "execute_result"
64+
}
65+
],
66+
"source": [
67+
"say_hello('Kevin')"
68+
]
69+
},
70+
{
71+
"cell_type": "code",
72+
"execution_count": null,
73+
"metadata": {},
74+
"outputs": [
75+
{
76+
"data": {
77+
"image/svg+xml": [
78+
"<svg height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"none\" stroke=\"black\" stroke-width=\"10\"/></svg>"
79+
],
80+
"text/plain": [
81+
"<IPython.core.display.SVG object>"
82+
]
83+
},
84+
"metadata": {},
85+
"output_type": "display_data"
86+
}
87+
],
88+
"source": [
89+
"from IPython.display import display, SVG\n",
90+
"display(SVG('<svg height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"none\" stroke=\"black\" stroke-width=\"10\"/></svg>'))"
91+
]
92+
},
93+
{
94+
"cell_type": "markdown",
95+
"metadata": {},
96+
"source": [
97+
"And a test:"
98+
]
99+
},
100+
{
101+
"cell_type": "code",
102+
"execution_count": null,
103+
"metadata": {},
104+
"outputs": [],
105+
"source": [
106+
"assert say_hello(\"Roger\") == \"Hello Roger!\""
107+
]
108+
},
109+
{
110+
"cell_type": "code",
111+
"execution_count": null,
112+
"metadata": {},
113+
"outputs": [],
114+
"source": []
115+
}
116+
],
117+
"metadata": {
118+
"kernelspec": {
119+
"display_name": "Python 3",
120+
"language": "python",
121+
"name": "python3"
122+
}
123+
},
124+
"nbformat": 4,
125+
"nbformat_minor": 2
126+
}

index.ipynb

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"#hide\n",
10+
"from jacobs_vault.core import *"
11+
]
12+
},
13+
{
14+
"cell_type": "markdown",
15+
"metadata": {},
16+
"source": [
17+
"# Jacobs VAULT\n",
18+
"\n",
19+
"> Here is the summary of Jacobs VAULT from the index.ipynb file. \n",
20+
"> This is the source for documentation and README.md."
21+
]
22+
},
23+
{
24+
"cell_type": "markdown",
25+
"metadata": {},
26+
"source": [
27+
"This file will become your README and also the index of your documentation."
28+
]
29+
},
30+
{
31+
"cell_type": "markdown",
32+
"metadata": {},
33+
"source": [
34+
"## Install"
35+
]
36+
},
37+
{
38+
"cell_type": "markdown",
39+
"metadata": {},
40+
"source": [
41+
"`pip install jacobs_vault`"
42+
]
43+
},
44+
{
45+
"cell_type": "markdown",
46+
"metadata": {},
47+
"source": [
48+
"## How to use"
49+
]
50+
},
51+
{
52+
"cell_type": "markdown",
53+
"metadata": {},
54+
"source": [
55+
"Fill me in please! Don't forget code examples:"
56+
]
57+
},
58+
{
59+
"cell_type": "code",
60+
"execution_count": null,
61+
"metadata": {},
62+
"outputs": [
63+
{
64+
"data": {
65+
"text/plain": [
66+
"2"
67+
]
68+
},
69+
"execution_count": null,
70+
"metadata": {},
71+
"output_type": "execute_result"
72+
}
73+
],
74+
"source": [
75+
"1+1"
76+
]
77+
},
78+
{
79+
"cell_type": "code",
80+
"execution_count": null,
81+
"metadata": {},
82+
"outputs": [],
83+
"source": []
84+
}
85+
],
86+
"metadata": {
87+
"kernelspec": {
88+
"display_name": "Python 3",
89+
"language": "python",
90+
"name": "python3"
91+
}
92+
},
93+
"nbformat": 4,
94+
"nbformat_minor": 2
95+
}

0 commit comments

Comments
 (0)