Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonyfast/nbp
uses notebooks as python source
https://github.com/tonyfast/nbp
Last synced: 5 days ago
JSON representation
uses notebooks as python source
- Host: GitHub
- URL: https://github.com/tonyfast/nbp
- Owner: tonyfast
- License: bsd-3-clause
- Created: 2018-01-22T18:47:34.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-22T18:49:37.000Z (about 7 years ago)
- Last Synced: 2025-01-10T15:16:33.346Z (about 1 month ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.ipynb
- License: LICENSE
Awesome Lists containing this project
README
{
"cells": [
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting setup.py\n"
]
}
],
"source": [
"%%file setup.py\n",
"__import__('setuptools').setup(\n",
" name=\"myworks\",\n",
" packages=['works'],\n",
" version=\"0.0.🖕\",)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting works/__init__.py\n"
]
}
],
"source": [
"%%file works/__init__.py\n",
"from eye import update_hooks, Notebook\n",
"update_hooks(Notebook)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting MANIFEST.IN\n"
]
}
],
"source": [
"%%file MANIFEST.IN\n",
"include *.ipynb"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"from nbformat import v4, writes\n",
"from pathlib import Path"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"Path('works/Untitled.ipynb').write_text(writes(\n",
" v4.new_notebook(cells=[\n",
" v4.new_code_cell(\"value = 42\")\n",
" ])));"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/tonyfast/anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/dist.py:340: UserWarning: The version specified ('0.0.🖕') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.\r\n",
"running develop\r\n",
"running egg_info\r\n",
"writing pbr to myworks.egg-info/pbr.json\r\n",
"writing myworks.egg-info/PKG-INFO\r\n",
"writing top-level names to myworks.egg-info/top_level.txt\r\n",
"writing dependency_links to myworks.egg-info/dependency_links.txt\r\n",
"reading manifest file 'myworks.egg-info/SOURCES.txt'\r\n",
"reading manifest template 'MANIFEST.in'\r\n",
"writing manifest file 'myworks.egg-info/SOURCES.txt'\r\n",
"running build_ext\r\n",
"Creating /Users/tonyfast/anaconda/lib/python3.5/site-packages/myworks.egg-link (link to .)\r\n",
"myworks 0.0.- is already the active version in easy-install.pth\r\n",
"\r\n",
"Installed /Users/tonyfast/nbp/nbp\r\n",
"Processing dependencies for myworks===0.0.-\r\n",
"Finished processing dependencies for myworks===0.0.-\r\n"
]
}
],
"source": [
"if __name__ == '__main__':\n",
" !python setup.py develop"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
" import works"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'works'"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
" works.__package__"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
" import works.Untitled"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"42"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
" works.Untitled.value"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "p6",
"language": "python",
"name": "other-env"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}