JupyterOcean

所属分类:编程语言基础
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-10-10 11:48:43
上 传 者sh-1993
说明:  Jupyterlab扩展,用于与去中心化市场(Ocean)交互,
(An Jupyterlab extension for interacting the decentralized marketplace (Ocean),)

文件列表:
.DS_Store (14340, 2023-10-27)
.ipynb_checkpoints/ (0, 2023-10-27)
.ipynb_checkpoints/convert_example-checkpoint.ipynb (4257, 2023-10-27)
.ipynb_checkpoints/demostration-checkpoint.ipynb (172376, 2023-10-27)
.ipynb_checkpoints/ocean_algo-checkpoint.py (1208, 2023-10-27)
.ipynb_checkpoints/output_script-checkpoint.py (298, 2023-10-27)
.ipynb_checkpoints/test-checkpoint.ipynb (910, 2023-10-27)
.ipynb_checkpoints/test_jupyterOcean-checkpoint.ipynb (180967, 2023-10-27)
MANIFEST.in (419, 2023-10-27)
c2d_output/ (0, 2023-10-27)
c2d_output/4893459b9df0462daf12e3a246356bad.pickle (1958, 2023-10-27)
c2d_output/504088e86c024d44909b41e46597fa14.pickle (1958, 2023-10-27)
c2d_output/d03bb5af013942fc9440760ffd26cf82.txt (1958, 2023-10-27)
convert_example.ipynb (4146, 2023-10-27)
demostration.ipynb (172376, 2023-10-27)
dist/ (0, 2023-10-27)
dist/algovera-0.1.4-py3-none-any.whl (1754478, 2023-10-27)
dist/algovera-0.1.4.tar.gz (907593, 2023-10-27)
docs/ (0, 2023-10-27)
docs/Makefile (608, 2023-10-27)
docs/environment.yml (126, 2023-10-27)
docs/ipylab.png (173124, 2023-10-27)
docs/make.bat (778, 2023-10-27)
docs/screencasts/ (0, 2023-10-27)
docs/screencasts/commands.gif (986287, 2023-10-27)
docs/source/ (0, 2023-10-27)
docs/source/_static/ (0, 2023-10-27)
docs/source/_static/helper.js (121, 2023-10-27)
docs/source/conf.py (5812, 2023-10-27)
docs/source/develop-install.rst (800, 2023-10-27)
docs/source/examples/ (0, 2023-10-27)
docs/source/examples/index.rst (385, 2023-10-27)
docs/source/examples/introduction.nblink (53, 2023-10-27)
docs/source/index.rst (612, 2023-10-27)
docs/source/installing.rst (993, 2023-10-27)
docs/source/introduction.rst (109, 2023-10-27)
install.json (185, 2023-10-27)
ipfs_files/ (0, 2023-10-27)
... ...

# JupyterOcean Extension The JupyterOcean Library currently comprises of a Jupyter Lab extension for using MetaMask within Jupyter Lab to interact with the [Ocean market](https://market.oceanprotocol.com/), and use the decentralized storage to store data scientist raw asset files (Infura IPFS for decentralized storage). ## Setup To start using the extension, simply run these commands in your terminal:: ( Note: if the `jupyter labextension` failed with the extension not found error, try to reload the IDE and run again. ) ``` git clone https://github.com/Han-Linnn/JupyterOcean.git cd JupyterOcean/ conda create -n jupyterocean -c conda-forge jupyterlab ipylab jupyter-packaging nodejs ipytree bqplot ipywidgets numpy conda activate jupyterocean python -m pip install -e ".[dev]" jupyter labextension develop . --overwrite jlpm jlpm run build jupyter lab ``` After any changes, run `jlpm run build` to see them in Jupyter Lab. Note that you might need to run `jlpm` or `python -m pip install -e ".[dev]"` depending on whether you add new dependencies to the project. ## Usage ### Init: ``` from jupyterOcean import JupyterFrontEnd app = JupyterFrontEnd() ``` ### Connect to Metamask: You can either click the `JupyterOcean` pannel on the menu and execute the `connect wallet` option to connect Metamask wallet or run the following command: ``` app.commands.execute('connect_wallet') ``` ### Send OCEAN and tokens to virtual wallet: You can either click the `JupyterOcean` pannel on the menu and execute the `send ocean` option to send OCEAN and tokens to virtual wallet or run the following command: ``` app.commands.execute('send_ocean') ``` ### Convert notebook to Compute-to-data(C2D) format Python script: ``` app.ocean.convert() ``` ### Store asset on IPFS: Click the `JupyterOcean` pannel on the menu and execute the `IPFS Storage` option to save file on IPFS and get CID hash. ### Publish asset to Ocean Market: Run the following command and input the IPFS CID `cid` and the asset name `name` you want to use on Ocean Market. If you want to publish the dataset to run the C2D on Ocean Market, you can authorize the target algorithm for the dataset you publish by adding extra param `algo_did`. ``` // For dataset app.ocean.dt_publish(, , ) // For algorithm app.ocean.at_publish(, ) ``` ### Download asset from Ocean Market: Run the following command and input the DID of target asset to download the asset. ``` // For dataset app.ocean.buy_dt_download() // For algorithm app.ocean.buy_at_download() ``` ### Run Compute-to-data on Ocean Market: Run the following command and input the DIDs of target dataset and algorithm to run the compute job online and get the result model. ``` \\ For running assets published through JupyterOcean app.ocean.temp_c2d(, ) \\ For running assets published through UI app.ocean.c2d(, ) ```

近期下载者

相关文件


收藏者