@@ -56,21 +56,8 @@ Please refer to [data-nfts-and-datatokens-flow](data-nfts-and-datatokens-flow.md
5656In the same python console:
5757
5858``` python
59- from ocean_lib.web3_internal.constants import ZERO_ADDRESS
60-
6159# Publish the datatoken
62- DATA_datatoken = erc721_nft.create_datatoken(
63- template_index = 1 ,
64- name = " Datatoken 1" ,
65- symbol = " DT1" ,
66- minter = alice_wallet.address,
67- fee_manager = alice_wallet.address,
68- publish_market_order_fee_address = ZERO_ADDRESS ,
69- publish_market_order_fee_token = ocean.OCEAN_address ,
70- publish_market_order_fee_amount = 0 ,
71- bytess = [b " " ],
72- from_wallet = alice_wallet,
73- )
60+ DATA_datatoken = erc721_nft.create_datatoken(" DATA 1" , " D1" , from_wallet = alice_wallet)
7461print (f " DATA_datatoken address = ' { DATA_datatoken .address} ' " )
7562
7663# Specify metadata and services, using the Branin test dataset
@@ -137,18 +124,7 @@ ALGO_nft_token = ocean.create_erc721_nft("NFTToken1", "NFT1", alice_wallet)
137124print (f " ALGO_nft_token address = ' { ALGO_nft_token .address} ' " )
138125
139126# Publish the datatoken
140- ALGO_datatoken = ALGO_nft_token .create_datatoken(
141- template_index = 1 ,
142- name = " Datatoken 1" ,
143- symbol = " DT1" ,
144- minter = alice_wallet.address,
145- fee_manager = alice_wallet.address,
146- publish_market_order_fee_address = ZERO_ADDRESS ,
147- publish_market_order_fee_token = ocean.OCEAN_address ,
148- publish_market_order_fee_amount = 0 ,
149- bytess = [b " " ],
150- from_wallet = alice_wallet,
151- )
127+ ALGO_datatoken = ALGO_nft_token .create_datatoken(" ALGO 1" , " A1" , from_wallet = alice_wallet)
152128print (f " ALGO_datatoken address = ' { ALGO_datatoken .address} ' " )
153129
154130# Specify metadata and services, using the Branin test dataset
@@ -315,14 +291,14 @@ X0_vec = numpy.linspace(-5., 10., 15)
315291X1_vec = numpy.linspace(0 ., 15 ., 15 )
316292X0, X1 = numpy.meshgrid(X0_vec, X1_vec)
317293b, c, t = 0.12918450914398066 , 1.5915494309189535 , 0.039788735772973836
318- u = X1 - b* X0 ** 2 + c* X0 - 6
319- r = 10 .* (1 . - t) * numpy.cos(X0) + 10
320- Z = u** 2 + r
294+ u = X1 - b * X0 ** 2 + c * X0 - 6
295+ r = 10 . * (1 . - t) * numpy.cos(X0) + 10
296+ Z = u ** 2 + r
321297
322298fig, ax = pyplot.subplots(subplot_kw = {" projection" : " 3d" })
323299ax.scatter(X0, X1, model, c = " r" , label = " model" )
324300pyplot.title(" Data + model" )
325- pyplot.show() # or pyplot.savefig("test.png") to save the plot as a .png file instead
301+ pyplot.show() # or pyplot.savefig("test.png") to save the plot as a .png file instead
326302```
327303
328304You should see something like this:
@@ -336,7 +312,7 @@ For examples using different datasets and algorithms, please see [c2d-flow-more-
336312In the "publish algorithm" step, to replace the sample algorithm with another one:
337313
338314- Use one of the standard [ Ocean algo_dockers images] ( https://github.com/oceanprotocol/algo_dockers ) or publish a custom docker image.
339- - Use the image name and tag in the ` container ` part of the algorithm metadata.
315+ - Use the image name and tag in the ` container ` part of the algorithm metadata.
340316- The image must have basic support for installing dependencies. E.g. "pip" for the case of Python. You can use other languages, of course.
341317- More info: https://docs.oceanprotocol.com/tutorials/compute-to-data-algorithms/ )
342318
0 commit comments